PDA

View Full Version : Pivot Root Install dead?



Francesco Pietra
10-10-2006, 09:22 AM
I wonder whether Pivot Root Install is dead. That because I posted a couple of days ago that the latest directions to this regard on KNOPPIX.net do not work in my hands with knoppix 5.0.1: no PTY (ie no usable konsole), no "su" command, no user "home". That prevents doing anything easily, which could otherwise been done if the install were really debian. I got no comment so far to my post.

First, "knoppix26 single" does not work because "knoppix26" is not recognized by kernel 2.6.17, while "knoppix single" is recognized. I tried variants of "knoppix26" syntax without success. Moreover, the directions embody a number of syntax errors that shed a dubious light on everything one is going to do. In my opinion, procedures suggested on KNOPPIX.net should have been checked before publishing. If no time to do that, better leave the choice to the posted mails.

Unless I have done major mistakes, should one go back to previous versions of knoppix for Pivot Root Install? It would be a solution, although it will deprive the tool of much scope because older kernels may not recognize recent hardware. For the scientist traveling often for scientific reasons (with the prospect of finding the most various hardware where to play), the mirage of porting his debian i386 everywhere (with his home) is very alluring (actually the only reason to look at knoppix, because recovery from failures of a normal debian install can also be remedied otherwise). Unfortunately the scientist lacks know how to set in order a house that is founded on such a perverse stuff as kdm (I had to abandon kdm in favor of jwm window manager on my debian OS installations, both i386 and amd64, and start in the order X and kde when I need them). Ideally, the portable knoppix on HD+CD should allow starting from pure bash, from where to call X and then kde. The advantage and real value of a unix system is freedom of use; stuff like kdm may help until they work, otherwise they take all the time of non-experts without results. kdm reminds me what is chatted about Windows, although I do not know this OS.

To conclude, is still any hope about Pivot Root Install? Frankly I would be happy if my failure is my fault.

Cheers
francesco pietra

Jacky
10-10-2006, 12:12 PM
Hi Francesco,

I have never done a pivot_root before, but in order to try and help you, I just did tried it. I did not expect it to work, and I can think of many reasons why they shouldn't work - my Knoppix and my Debian have different kernel versions for example. But it did work.

I have now pivoted to my Debian Etch, launched gnome and writing to you from within my Debian Etch Gnome environment, I have console and I have internet. I have also been able to launch many Gnome applications which were definitely not on Knoppix, so it shows I am definitely pivoted into my Debian, after booting from Knoppix.

I don't recommend a pivot_root as I think there are easier ways to do what you want. But I will give you my steps. I do not understand the entire technical logic of the commands I entered. They worked for me, although I cannot explain why.

I think the steps in the wiki are a little out of date. First, you don't need to launch with knoppix26 because Knoppix 5.0.1 only has the 2.6 kernel. Secondly if you work from the Knoppix root shell, there is no need for sudo. Third, I think there are typo mistakes - where it says newroot, it should be new_root. Fourth, init 5 didn't work. I used startx.

Here are my steps:

1) My Debian Etch is on partition hdb2. I boot with Knoppix CD. I did not enter cheat codes, not even knoppix single.
2) Within Knoppix, I did ctrl-alt-f2 to exit from X and go to terminal mode. I had a root prompt.
3) mkdir /mnt/new_root
4) mount /dev/hdb2 /mnt/new_root
5) mkdir /mnt/new_root/mnt/old_root (remember you only need to do this once. If done once, don't make this directory again).
6) cd /mnt/new_root
7) pivot_root . /mnt/new_root/mnt/old_root
8.) mount /proc /proc -t proc
9) startx

The last step launched Gnome and I saw my Debian desktop.

Try it out and see. If it doesn't work, then may be we can discuss other options. I can think of a few: 1) remaster a Knoppix with all the scientific packages you need or 2) while at home, install Debian packages of the scientific packages into Knoppix. Create a persistent image. Then carry the persistent image in a USB thumb stick or on the USB external drive. Load it when you boot with the Knoppix CD

Regards.

Francesco Pietra
10-10-2006, 11:10 PM
Hi Jackie:
Following your indications, pivot root install with knoppix 5.0.1 basically works.

Not everything yet, however.
THE BAD PART:
1)No networking, although eth0 is detected. pump, pump -s, pump -i eth0 are returned "operation failed". Configure networking ADSL router finds eth0 though PPPoE Acccess Concentration not responding. I must say that the same occurred with live knoppix 5.0.1 from CD on the same machine, while on my amd64 machine internet connection was established (the 64 machine can not be used at the moment because APC UPS on repair)

2)No printing. Tried to configure usb HP 5740 CUPS: no Foomatics found. The same occurred with live knoppix.

During my travel, internet connection is not essential and I do not know which ethernet I'll find. Printing also not essential. In order to complete the pivot installation, I could download deb packages with my i386 debian, and install with dkpg on debian-knoppix (OK ?).

THE GOOD PART
1) All my data are in a FAT32 partition. By mounting it (it is on fstab) I can access it. Not checked if I can write in. I plan to create a FAT32 partition on the remaining space of my extrenal HD to be used for my data.

2)OpenOffice works.

3) KDE also works, although with the same idiosyncrasy on i386 debian.

My i386 /home/francesco contains - besides an installation of wine - two Windows programs (a free-form database and a chemical drawing package) essential to me. I plan to transfer these two packages to my debian-knoppix /home/francesco and try an install on wine already present on debian-knoppix (say try because I succeeded with one of them without transcribing the tortuous procedure that I do not remember). My i386 /home/francesco also contains a self-contained Linux molecular mechanics package that only needs external libraries for OpenGL graphics. It should be simply transferred in its compiled form to my debian-knoppix home.

Do you see any better plan for pivot install for my needs? No problem for me to switch to one of the other option you have proposed. At any event, external HD, not usb flashcard (I had unpleasant experiences with them).

Is any risk of damaging Windows and Mac operative systems on running pivot knoppix as above?

Cheers and huge thanks


francesco

Francesco Pietra
10-10-2006, 11:22 PM
Hi Jacky:
I forgot to mention that I found difficult to leave knoppix pivot install. The knoppix CD was sealed as a mounted device. Tried unsuccessfully various umount. Kill on one of the pid led to the text prompt though with unusual behavior and still CD unobtainable. I had to command shutdown -h now and start i386 debian to recover the knoppix CD. Did you find a smooth procedure?
francesco

Jacky
10-11-2006, 01:15 AM
Hi, my system is undergoing maintenance today so I cannot run any tests. So here is some general advice. I may have more info for you later.

For standardisation of terminology, I will assume you boot with a Knoppix Live CD and intend to pivot to your Debian i386. I will call Knoppix Live CD just "Knoppix". As for Debian, I do not know what version of Debian i386 you have, but let's assume it is Debian Testing, which is named Etch. I will call it Etch. You intend to bring your Etch installation with you on an USB drive.


I found difficult to leave knoppix pivot install. The knoppix CD was sealed as a mounted device. Tried unsuccessfully various umount.
If you boot Knoppix and pivot to Debian Etch on the USB drive, Knoppix is still the "mother" adn Debian the "child". You cannot umount and remove the CD while running. If you want to free up the CD there are other ways: see Live CD tips in the wiki FAQ section, I just wrote it up yesterday.

How to shut down pivot_root. After pivoting to Debian Etch, I left Debian Etch in the normal way by selecting Log Out. I was returned to Knoppix. Then I shut down Knoppix the usual way.


In order to complete the pivot installation, I could download deb packages with my i386 debian, and install with dkpg on debian-knoppix (OK ?).
You can install deb packages on Knoppix, but if you install on Live CD, the new packages are in RAM, so will disappear after power down. Of course you can install again when you boot up (or make a Persistent Image) But if you pivot to Debian Etch, you won't be able to use what is installed in Knoppix. You can also install the Deb package to Debian Etch. Then pivot_root to Debian and run it from Debian. Probably better because you can be sure the Deb package is compatible with your Debian version. Bring also the raw Deb packages with you to the South Seas so you can always reinstall.


My i386 /home/francesco contains - besides an installation of wine - two Windows programs (a free-form database and a chemical drawing package) essential to me
Not all Windows programs work under Wine, so best to test. However there are Linux programs for chemical drawing. Do a google search and go to the Klik website and look under Scientific -> Chemistry. Klik is convenient because they have repackaged programs into one file which only need to be stored in the /home directory. To use Klik, see the whole section on klik in this forum.


No printing. Tried to configure usb HP 5740 CUPS: no Foomatics found. The same occurred with live knoppix.
Printing in Version 5.0.1 is a general problem affecting many users with many different printers. So it is not related to the pivot_root. Basically there is a problem with the driver files on the CD.


Is any risk of damaging Windows and Mac operative systems on running pivot knoppix as above?
If you don't mount the partitions where the Windows and MAC OS are stored, and don't try to write to an NTFS partition, the risks are small. Of course, it is a good idea to back up your Windows etc and leave them at home before going off to the South Seas.

Some other advice before going to the South Seas. Since you will be far away from civilisation, and will not have internet, I think the plan is to be flexible, for example:
1) bring a notebook computer with you - then you know you have something that works
2) bring many different Live CD with you: for example, a few versions of Knoppix (including older ones), also, Kanotix, and the Ubuntu install CD which also works as a Live CD. So many different versions, there is a good chance of one which works with the hardware you find there. Try them before you leave.

Regards.

Francesco Pietra
10-11-2006, 09:04 AM
Hi Jacky:
Trying to be concise I omitted information on previous mail. I do that now, with advice request, also in the hope that it may serve other pivot_root installers. The very problem is that I do not fully understand Linux-specific pivot_root (I have to study www.die.net/doc/linux/man/man#/pivot_root.#.html). To my excuse, our computing parallel machines still run under BSD.


YOU: For standardisation of terminology, I will assume you boot with a Knoppix Live CD and intend to pivot to your Debian i386. I will call Knoppix Live CD just "Knoppix". As for Debian, I do not know what version of Debian i386 you have, but let's assume it is Debian Testing, which is named Etch. I will call it Etch. You intend to bring your Etch installation with you on an USB drive.

ME: Here my mental confusion. Let me call, in addition to your established terminology, "knoppix-HD" my installation of knoppix on sda6 partition of my external USB/Firewire HD (a very small 80GB usb-powered HD). When pivoting, I commanded

mount /dev/sda6 /mnt/new_root

May be I am crazy, though I though to have been pivoted to knoppix on sda6 (which was made root by the system), not to Etch. In fact, my /home/francesco was empty. While I plan to reexamine this matter by re-running pivot, it may be you call me crazy and then I have to rexamine the whole plan. When I said that I intend to bring with me my Etch, I intended it reconstructed partly on knoppin-HD for what I need as specified below under my home.
__________________

ME: In order to complete the pivot installation, I could download deb packages with my i386 debian, and install with dkpg on debian-knoppix (OK ?).

YOU: You can install deb packages on Knoppix, but if you install on Live CD, the new packages are in RAM, so will disappear after power down. Of course you can install again when you boot up (or make a Persistent Image) But if you pivot to Debian Etch, you won't be able to use what is installed in Knoppix. You can also install the Deb package to Debian Etch. Then pivot_root to Debian and run it from Debian. Probably better because you can be sure the Deb package is compatible with your Debian version. Bring also the raw Deb packages with you to the South Seas so you can always reinstall.

ME: Continuing on my ME above, I intended to install packages on knoppix-HD on sda6 partition, either in /bin or in my home. It was unclear if I had to make any persistent image: I though NO, because everything should be on my external HD.
_____________________

ME: My i386 /home/francesco contains - besides an installation of wine - two Windows programs (a free-form database and a chemical drawing package) essential to me

YOU: Not all Windows programs work under Wine, so best to test.

ME: I run daily these two packagen with wine on my Etch. The database is far more robust (actually never crashed) on wine than on its native Windows (where crashes during editing were common events). Also, no slow down on wine, may be even acceleration.

YOU: However there are Linux programs for chemical drawing. Do a google search and go to the Klik website and look under Scientific -> Chemistry. Klik is convenient because they have repackaged programs into one file which only need to be stored in the /home directory. To use Klik, see the whole section on klik in this forum.

ME: I'll examine Klik. So far, all unix-native chemical drawing packages I have examined, either do not work yet or do not exchange files with packages the editors are used at (bear in mind that scientific editors - with rare exceptions - are the most strict Windows/Mac adepts. Or, such unix packages do not provide eps files that may be accepted by editor's software.

ME: I forgot to mention that I use POV-ray for rendering for conference slides.

____________________

ME: Is any risk of damaging Windows and Mac operative systems on running pivot knoppix as above?

YOU: If you don't mount the partitions where the Windows and MAC OS are stored, and don't try to write to an NTFS partition, the risks are small. Of course, it is a good idea to back up your Windows etc and leave them at home before going off to the South Seas.

ME: I was not clear. I have only Etch on my machines. I meant Windows and Mac as the only OS on the computers that I'll have access to during my travel. I intend(ed) to put the live knoppix CD on their CD player, and my USB/Firewire HD on their usb or firewire port.
____________________

YOU: Some other advice before going to the South Seas. Since you will be far away from civilisation, and will not have internet, I think the plan is to be flexible, for example:
1) bring a notebook computer with you - then you know you have something that works

ME: I stopped buying notebooks since that involved paying Microsoft or Mac OS. I have none. Also, a notebook normally delays the travel because police wants to known if there are any bombs inside. It was so in the past. I imagine it is worse today. In addition, I have so many things with me, that a knoppix disk and a few ounces HD is a better perspective that a notebook.

YOU: 2) bring many different Live CD with you: for example, a few versions of Knoppix (including older ones), also, Kanotix, and the Ubuntu install CD which also works as a Live CD. So many different versions, there is a good chance of one which works with the hardware you find there. Try them before you leave.

ME: My plan was to bring only a live knoppic CD and my external knoppix-HD. The South Seas are no more those of Stevenson (unfortunately). Heavily populated, universities (I am going to visit them again). They have even plans for high-speed cable. Anyway, internet works as anywhere. The very reason to bring my system with was to be able to do want I may need to do. Example: modify my CD-recorded ppt=saved conferences because I knew something I was not aware of, so that my CD would be ridicoulously outdated (even there today the conference are through a ppt, not live conference; you can not find anymore an overhead projector even there).

Regards and thanks indeed
francesco

Jacky
10-11-2006, 10:49 AM
Thanks for explanations. Everything is very clear now.


I though to have been pivoted to knoppix on sda6 (which was made root by the system).
This can be done and is ok. From what I read, you were successful. Pivot from Knoppix CD to Knoppix-HD on sda6 is probably easier and presents fewer problems than what I did which was to pivot from Knoppix CD to Debian Etch. Now all you need to do is copy your Debian Etch /home/Francesco to /sda6/home/Francesco. Hopefully you will find the contents (your molecular mechanics package) on sda6/home/Francesco after pivoting.


Continuing on my ME above, I intended to install packages on knoppix-HD on sda6 partition, either in /bin or in my home. It was unclear if I had to make any persistent image: I though NO, because everything should be on my external HD.
Ok, installing packages on Knoppix-HD on sda6 can be done. The only thing to remember is that not every Deb is compatible with Knoppix. If you install the wrong package, you could cause problems to the Knoppix-HD on sda6. Most people who have problems after hard disk installations met problems this way. Best to test beforehand. If you install to Knoppix-HD on sda6, no need for persistent image now, because the programs are on sda6.


Is any risk of damaging Windows and Mac operative systems on running pivot knoppix as above?...............I meant Windows and Mac as the only OS on the computers that I'll have access to during my travel. I intend(ed) to put the live knoppix CD on their CD player, and my USB/Firewire HD on their usb or firewire port
Ok, little or no risk, if you only use sda6 and the CD, and don't mount the disks belonging to your hosts. Knoppix will never mount any disks without your command. You can also safely mount your host's disks to read-only in order to read data. Just remember never to try to write to an ntfs formatted disk.


Also, a notebook normally delays the travel because police wants to known if there are any bombs inside. It was so in the past. I imagine it is worse today. In addition, I have so many things with me, that a knoppix disk and a few ounces HD is a better perspective that a notebook.
You are right!


The South Seas are no more those of Stevenson (unfortunately). Heavily populated, universities (I am going to visit them again). They have even plans for high-speed cable. Anyway, internet works as anywhere. The very reason to bring my system with was to be able to do want I may need to do. Example: modify my CD-recorded ppt=saved conferences because I knew something I was not aware of, so that my CD would be ridicoulously outdated (even there today the conference are through a ppt, not live conference; you can not find anymore an overhead projector even there).
That's good news. I don't think you will have much problems doing what you want to do. With internet, you can keep in touch with home if you encounter problems. Secondly, if there are universities, there is a good chance they may even be using Linux and OpenOffice (many universities do), so you can use theirs.

Regards and Good Luck.

malaire
10-11-2006, 10:56 AM
Hi Jacky:
Trying to be concise I omitted information on previous mail. I do that now, with advice request, also in the hope that it may serve other pivot_root installers. The very problem is that I do not fully understand Linux-specific pivot_root (I have to study www.die.net/doc/linux/man/man#/pivot_root.#.html). To my excuse, our computing parallel machines still run under BSD.

YOU: For standardisation of terminology, I will assume you boot with a Knoppix Live CD and intend to pivot to your Debian i386. I will call Knoppix Live CD just "Knoppix". As for Debian, I do not know what version of Debian i386 you have, but let's assume it is Debian Testing, which is named Etch. I will call it Etch. You intend to bring your Etch installation with you on an USB drive.

ME: Here my mental confusion. Let me call, in addition to your established terminology, "knoppix-HD" my installation of knoppix on sda6 partition of my external USB/Firewire HD (a very small 80GB usb-powered HD). When pivoting, I commanded

mount /dev/sda6 /mnt/new_root

May be I am crazy, though I though to have been pivoted to knoppix on sda6 (which was made root by the system), not to Etch. In fact, my /home/francesco was empty. While I plan to reexamine this matter by re-running pivot, it may be you call me crazy and then I have to rexamine the whole plan. When I said that I intend to bring with me my Etch, I intended it reconstructed partly on knoppin-HD for what I need as specified below under my home.


It seems that you and Jacky were speaking past each-other. Jacky thought that you boot from Knoppix LiveCD and then pivot into a Debian Etch installation. But instead of that you boot from Knoppix LiveCD and then pivot into a Knoppix installation.

Jacky
10-11-2006, 12:09 PM
Malaire, thanks, you are right. But Francesco clarified and now I understand him.

Anyway, as a result of the "misunderstanding" I found that it was possible to pivot from Knoppix into Debian! There's always something new to learn everyday.

Regards.

Francesco Pietra
10-11-2006, 05:08 PM
Hi Francky, Hi Malaire:
I invested today the sum of ten euros for a RealTech Ethernet controller, so that I am now able to contact this forum from my pivot_root install. Previous card (Davicom) was seen, though not put to work. RealTech makes even a faster Debian booting of Etch. With Davicom there was a long trial-and-error series before contact was established.

When you say "copy your Etch home into sda6 /home/francesco (knoppix-HD) you mean the filesystems existing in my Etch /home/francesco (not the whole /francesco directory in block) Correct?
Further, because wine is installen on knoppix, I should skip copying my installation of wine (present in Etch /home/francesco) into sda6 /home/francesco. Should knoppix wine not work, I should have to copy my installation (unfortunately not recorded which native dll were used: without them I was unable to install the database, although it may well be that now wine has newer dll that work).

If I would be asked about a single suggestion for unix-type environments, I would say: make a unix-native strong free-form database. In scanning the literature, learning, and taking notices, we can not use relational fully structured databases (for a number of valid reasons that I am not going to bother you with now). However, the free-form database should perform Boolean search, and very rapidly so, and should also allow to mark text so that it becomes a field. And should also allow aritmetic search: if you ask me which sponges (or a class, order or species, etc, of them) have been fished in between 20 and 40 meters depth, I can tell you in seconds through my database running on wine.

Cheers
francesco