PDA

View Full Version : Running applications on pivot_root installations



Francesco Pietra
10-13-2006, 07:04 PM
Hope this is the right section of forum to place my question.

1) I installed successfully (pivot_root) knoppix 5.0.1 on external usb/firewire hd (sda6).

2) Exited knoppix and launched my Debian Etch.

3) Placed sda6 on fstab of Debian Etch (planning to keep sda6 updated with my data files) and mounted sda6. Then, copied my data files and special applications to my home on sda6.

4) Exited Debian Etch.

5) Launched knoppix pivot_root. Openoffice opens my files (even impress) although ownership is root root.

QUESTION: I am a little confused about the bash use of knoppix pivot_root, because the konsole (or terminal window) only operates as user. The prompt is of the type

sh-3.1#

unusual for a Debian user. Commanding "exit" closes the terminal window instead of providing the user prompt. Well, that may be intrinsic to the installation and I have to learn ho to use it.

6) I tried to run a molecular modeling program that makes part of the applications mentioned above at (3). That was transferred as a self-contained directory, which includes all libraries except perhaps for graphics, see the following). I set the environmental variables:

PCM_DIR="home/francesco/<application>"
export PCM_DIR
PATH="/home/francesco/<application>:$PATH"; export PATH

which failed to launch

#<application>

returning
"command not found"
The same occurred while sitting in the directory containing the executable. And changing the ownership to user "framcesco"

#chown -R francesco /home/francesco/<directory_name>

did not help: "command not found".

QUESTION: I wonder whether I did silly mistakes or what? The executable was there, so that unaccepted environmental variables, if any, were turned around. I expected that libraries for its OpenGL graphics were not found, nonetheless the command <application>, which is the executable, should have been acknowledged.

Hope the trick is discovered and thanks a lot for considering my problem in the general frame of running applications with knoppix.

Cheers

francesco

Francesco Pietra
10-14-2006, 01:01 AM
Answering to myself, I tried wrongly to set the environmental variable by writing them in my home .bashrc. I should have recognized that now sda6 is root.

Actually,
#printenv |less

shows
HOME=/

The environmental variables are to be set from terminal window, which means any time knoppix is launched. They are set correctly, while
HOME=/
can not be changed.

Under such conditions, as expected, trying to launch my application:

Error while loading shared libraries: libXm.so.3 not found.

That is to put OpenGL to work.

QUESTION: should I modify /etc/apt/sources.list
by merely adding debian repositories, or changing something else too?

What do you expect will happen on
#apt-get update
?


Cheers

francesco

Francesco Pietra
10-14-2006, 04:23 PM
Pivot_root install on external hd of knoppix 5.0.1 is OK, in particular as concerns OpenOffice. That is great indeed. I am only stopped at the moment because my molecular modeling package does not accept libXm.so.3 from the STABLE Debian distribution of package libmotif3 (problems with Open Motif affect Debian from long time, which creates problems to science, where graphics is based on that). Because POVray files are provided by my modeling package, I have not yet tried to install POVray. The same for my database, which also plays OpenGL graphics.

Now two questions. It is true that hd install changes knoppix into debian, nonetheless the following questions can not be answered by debian experts who do not know knoppix.

BASIC 1st QUESTION about pivot_root install on external hd: the external hd is made ROOT, so that any file there is root root, unless one goes to chown. Correspondingly, the kde konsole has prompt # for root only. Is that the correct way of running debian-knoppix under pivot_install?

SECOND LESS BASIC QUESTION:
/home/francesco/.bashrc
as from the installation consists of:

# /etc/bash.bashrc
[ -f /etc/profile ] && . /etc/profile

Does this mean that in order to have something read (such as setting of environmental variables) by .bashrc at boot I have to write my needs to
/etc/profile
?

Obviously because external hd is made root, scripts (such as setting environmental variables) in

/home/francesco/.bashrc

are not felt.

Much indebted for any clarification.

Cheers
francesco pietra

Jacky
10-15-2006, 03:11 AM
Hello Francesco,

I must say you are taking us into deeper waters than many of us have ever ventured (you sound like a oceanologist). Certainly not many people seem to have the experience with pivot install, or even running scientific programs from a pivot_install. So my advice is based on my limited knowledge of this area.


It is true that hd install changes knoppix into debian...........
Well, not exactly. A special form of Debian that is prone to problems, but that's a long story.


BASIC 1st QUESTION about pivot_root install on external hd: the external hd is made ROOT, so that any file there is root root, unless one goes to chown. Correspondingly, the kde konsole has prompt # for root only.
Yes I think this is correct. But you can try to su to a different user instead of root.


Is that the correct way of running debian-knoppix under pivot_install?
There is no right or wrong way -- you are in uncharted waters here. You have a very special situation, so do whatever works.


Does this mean that in order to have something read (such as setting of environmental variables) by .bashrc at boot I have to write my needs to
/etc/profile
? Obviously because external hd is made root, scripts (such as setting environmental variables) in

/home/francesco/.bashrc

are not felt.
Yes, I think that is correct.


I am only stopped at the moment because my molecular modeling package does not accept libXm.so.3 from the STABLE Debian distribution of package libmotif3 (problems with Open Motif affect Debian from long time, which creates problems to science, where graphics is based on that).
Is this molecular package open source and downloadable as a Debian package? If I can get hold of it, I'll see if I can discover something useful as a fix.

Regards.

Francesco Pietra
10-15-2006, 09:06 AM
Hello Jacky:

ME: Thanks a lot. I want to reassure that I am still with my feet on the ground. I do not intend to have a pivot_root install to carry out actual scientific work, only to show results. The molecular drawing package would be useful in particular to view graphically the results of mpqc calculations carried out on the amd64 machine (and to set up presentation slides because it affords also povray graphics, which is great). The database on wine would also be of great help to retrive data when out of home, in particular when in the South Seas. Not yet tried to install on wine, I wanted before to solve the Motif problem.

YOU: I must say you are taking us into deeper waters than many of us have ever ventured (you sound like a oceanologist).

ME: Well, I hope other guys are attracted to pivot_root install. Not a oceanologist, rather a marine natural product chemist. My dives are at compressed-air-scuba level. It is true, however, that I know many coral reefs.


YOU: Well, not exactly [Debian install]. A special form of Debian that is prone to problems, but that's a long story.

ME: I understand, actually I have seen on passing parts of RedHat in knoppix 5.0.1.


YOU: But you can try to su to a different user instead of root.

ME: Could you please explain with examples? Ever user (me)? At any event, a throughout use as root should not bring problems in. With the exception, perhaps, that when on internet with pivot_root install (like at this writing) I am exposing knoppix (and perhaps also my Etch debian i386 pc) to hackers. Which is no minor risk, although knoppix has 17 kernel.


ME: I am only stopped at the moment because my molecular modeling package does not accept libXm.so.3 from the STABLE Debian distribution of package libmotif3 (problems with Open Motif affect Debian from long time, which creates problems to science, where graphics is based on that).

YOU: Is this molecular package open source and downloadable as a Debian package? If I can get hold of it, I'll see if I can discover something useful as a fix.

ME: No, it is commercial, although a very special form of commercial software: it is given with the source code and the user can correspond with the author, modify the code, ask for modifications. In my use it is two parts: one running with graphics (the one I intend to run with knoppix) and a non-graphic all-space conformational search that I compiled for amd64 (then results can be transferred to the i386 program to show the results graphically). I use the program since its beginning, may be 25 years ago and in the last few months, working on flexible large molecules (ie many degrees of freedom) I discovered bugs that have been fixed by the author. Great stuff.
It is a pity that you can not have a look in. Surely you'll find a trick. However, I can say that an updated "locate" shows the things in order:

sh-3.1# locate libXm.so
/mnt/old_root/KNOPPIX/usr/lib/libXm.so.2
/mnt/old_root/KNOPPIX/usr/lib/libXm.so.2.0.1
/mnt/old_root/UNIONFS/usr/lib/libXm.so.2
/mnt/old_root/UNIONFS/usr/lib/libXm.so.2.0.1
/usr/lib/libXm.so.2
/usr/lib/libXm.so.2.0.1
/usr/X11R6/lib/libXm.so.3
/usr/X11R6/lib/libXm.so.3.0.2
sh-3.1#

ie, the required libXm.so.3 is available to X11 as a link (lrw-r--r-- dated 13/6/2004) like on i386 Etch Debian, where its works. The difference is that on the latter the version of libmotif3 (which affords the liXm.so.3), as from "apt-cache policy libmotif3" is 2.2.3-1.3, while on knoppix it is 2.2.3-1. I must say that, because thing did not work with the original install of knoppix, I downloaded the Sarge version of libmotif3 and installed it (dpkg) on knoppix (you can verify if on original knoppix the date is 13/6/2004 or more recent). In other words, I suspect that the Sarge version of libmotif3 is not OK for knoppix. However, at the moment Debian does not provide an etch or unstable version of libmotif3 (because there is no more a maintainer, the situation may not improve soon; the alternative would be to compile libmotif3 on knoppix, but I fear I am going to destroy knoppix: I am no expert in informatics).

I must also add that lesstif is also present on both knoppix and my i386 Etch Debian. On knoppix:

sh-3.1# locate lesstif
/mnt/old_root/KNOPPIX/usr/share/doc/lesstif2
/mnt/old_root/KNOPPIX/usr/share/doc/lesstif2/copyright
/mnt/old_root/KNOPPIX/usr/share/doc/lesstif2/ReleaseNotes.txt.gz
/mnt/old_root/KNOPPIX/var/lib/dpkg/info/lesstif2.list
/mnt/old_root/KNOPPIX/var/lib/dpkg/info/lesstif2.md5sums
/mnt/old_root/KNOPPIX/var/lib/dpkg/info/lesstif2.postinst
/mnt/old_root/KNOPPIX/var/lib/dpkg/info/lesstif2.shlibs
/mnt/old_root/UNIONFS/usr/share/doc/lesstif2
/mnt/old_root/UNIONFS/usr/share/doc/lesstif2/copyright
/mnt/old_root/UNIONFS/usr/share/doc/lesstif2/ReleaseNotes.txt.gz
/mnt/old_root/UNIONFS/var/lib/dpkg/info/lesstif2.list
/mnt/old_root/UNIONFS/var/lib/dpkg/info/lesstif2.md5sums
/mnt/old_root/UNIONFS/var/lib/dpkg/info/lesstif2.postinst
/mnt/old_root/UNIONFS/var/lib/dpkg/info/lesstif2.shlibs
/usr/share/doc/lesstif2
/usr/share/doc/lesstif2/copyright
/usr/share/doc/lesstif2/ReleaseNotes.txt.gz
/var/lib/dpkg/info/lesstif2.list
/var/lib/dpkg/info/lesstif2.md5sums
/var/lib/dpkg/info/lesstif2.postinst
/var/lib/dpkg/info/lesstif2.shlibs
sh-3.1#

Because it is known that libmotif is in conflict with lesstif (both are to the same purpose, affording the same libraries) I guss that on i386 Etch Debian, graphics works because lesstif is one version lower (2) than libmotif (3).. Why, however, installing both libbmotif and lesstif is not clear to me; if the reason is free lesstif, why not installing the latter only?

Hope not to have confused things too much and thanks for your kind attention. To morrow I'll be pseudo-hunting (I am no shooter) for one day with my Brittany on the mountains,. Today still wondering how to circumvent problems.

francesco

Francesco Pietra
10-15-2006, 09:16 AM
I wrote above " I downloaded the Sarge version of libmotif3 and installed it (dpkg) on knoppix (you can verify if on original knoppix the date is 13/6/2004 or more recent)."

What occurred:

#dpkg --install libmotif3_2.2.3-1_i386.deb
Selecting previously deselected libmotif3
(Reading database .... 103700 files and directories currently installed)
Unpacking libmotif3_2.2.3-1_i386.deb
Setting up libmotif3 (2.2.3-1)

Perhaps you can understand from that if the original libmotif3 on knoppix (if any) was replaced or not.

cheers
francesco