Branko Badrljica wrote:
Jason wrote:
You may want to look at specifying root by it's UUID. This will prevent issues like the USB drive being /dev/sdg on one machine, /dev/sdb on another, and on reboot it all changing because the drives were detected in a different order.

I have tried that and booting by UUID never worked for me except once in past on some particular kernel. I can put an UUID in /etc/fstab, but not as kernel boot parameter. I did some googling about that and found soemthing about that UUID as kernel parameter was a hack which was thrown out and that they don't intend to support it in the future. It's aong the lines of "if you don't like anything about booting procedure, boot from initramfs, do what you have to do and then do pivot_root "...

Exactly. The kernel command line should be simple. Complicated or unusual tasks, like booting from USB, should be handled by initrd.

In the past, instead of 'rootdelay=', I add a wait to the init script, eg:

while [ ! -e /dev/disk/by-uuid/1234-abcd-45gf-0659 ]
do
    sleep 0.1
done
And how do you do that when you are trying to get to root partition after kernel initialisation ? At that moment you can't run a script, since you don't have an access to any partition.

initrd is exactly how you do it. In the case of booting off of USB, there are too many variables (drive detection order, different hardware, etc) to handle on the kernel command line. An initrd gives you the flexibility to solve these problems.

You could use initrd/initramfs, but seems like a lot of complications for little gain...

I wouldn't call a portable, writable, boot from anywhere Linux OS on a thumbdrive a trivial gain. ;-)

Jason.

--
gentoo-amd64@lists.gentoo.org mailing list

Reply via email to