PDA

View Full Version : Problem with "root=" kernel command-line argument



LukeyBoy
03-24-2004, 03:21 AM
So I ran the knoppix-installer script and successfully got a working Knoppix filesystem installed onto my USB hard disk, /dev/sda2. The phase of the installation where the boot disk is created failed, which is no big problem since I don't think this machine can boot from a USB floppy.

My plan was to boot from the CD again with the boot command "knoppix root=/dev/sda2". This doesn't work - Knoppix just boots into it's regular mode, using the uncompressed root drive image.

It's as if the kernel ignores the root= parameter.

I can actually boot from a Gentoo CD with the LILO command "gentoo root=/dev/sda2" and this *works*. So I know that the hard drive install worked correctly.

Anyone know why I can't get the parameter to be adhered to? Thanks.

c123
03-24-2004, 11:41 AM
I can actually boot from a Gentoo CD with the LILO command "gentoo root=/dev/sda2" and this *works*. So I know that the hard drive install worked correctly.

Very very interesting, the fact of being able to pass a boot time argument to boot/have your root on an sd* hard drive :)) I have no internal HDD in my laptop, and have to use an external firewire drive (this is where Linux is cool - try doing this trick with Windows!).

Sounds as though I shold try out Gentoo, but I've put a fair amount of effort in learning about the debian way of doing things (and this is after a try out of Mandrake 18 months ago or so)... And one huge advantage of Knoppix is these forums - support here is good.

To get back to your question - I don't know the answer, but I can tell you how I and a few others use the Knoppix CD to boot (well technically move root) to the external 1394 hard drive. The technique was originally found by tinker, see this post for more info http://knoppix.net/forum/viewtopic.php?t=6463


knoppix single #at boot prompt
sudo su
lsmod #check firewire/1394 modules are present
/mnt/floppy/rescan-scsi-bus.sh #run a script from floppy to find my hard drive, apparently this should not be needed for 2.6
mkdir /mnt/new_root
mount /dev/sda1 /mnt/new_root
mkdir /mnt/new_root/mnt/old_root #required the first time only, not needed for subsequent boots
cd /mnt/new_root
pivot_root . /mnt/new_root/mnt/old_root
mount /proc /proc -t proc
swapon -a
init 5


There are a couple of problems with this approach - it's a pain to type all the commands each time, you need to set the hostname, I'm not sure if the ramdisk is destroyed afterwards nad the RAM given back to the system. But hey it works. But it seems the Gentoo way is better ;)

c123
03-24-2004, 11:53 AM
I shoulld add that my BIOS does not give me the choice of booting from USB or Firewire, I can only boot from Floppy or CD-ROM.

LukeyBoy
03-24-2004, 02:35 PM
No, I'm actually just using the Gentoo kernel to boot since it accepts the root= parameter. It's still a Debian system - in fact I'm posting from it right now (albeit with the Links browser).