Gentoo Archives: gentoo-amd64

From: Jason <gentoo@××××××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] boot Gentoo from USB key
Date: Wed, 30 Apr 2008 14:47:15
Message-Id: 4818866C.90109@lakedaemon.net
In Reply to: Re: [gentoo-amd64] boot Gentoo from USB key by Branko Badrljica
1 Branko Badrljica wrote:
2 > Jason wrote:
3 >> You may want to look at specifying root by it's UUID. This will
4 >> prevent issues like the USB drive being /dev/sdg on one machine,
5 >> /dev/sdb on another, and on reboot it all changing because the drives
6 >> were detected in a different order.
7 >
8 > I have tried that and booting by UUID never worked for me except once in
9 > past on some particular kernel. I can put an UUID in /etc/fstab, but not
10 > as kernel boot parameter.
11 > I did some googling about that and found soemthing about that UUID as
12 > kernel parameter was a hack which was thrown out and that they don't
13 > intend to support it in the future.
14 > It's aong the lines of "if you don't like anything about booting
15 > procedure, boot from initramfs, do what you have to do and then do
16 > pivot_root "...
17
18 Exactly. The kernel command line should be simple. Complicated or
19 unusual tasks, like booting from USB, should be handled by initrd.
20
21 >> In the past, instead of 'rootdelay=', I add a wait to the init script,
22 >> eg:
23 >>
24 >> while [ ! -e /dev/disk/by-uuid/1234-abcd-45gf-0659 ]
25 >> do
26 >> sleep 0.1
27 >> done
28 > And how do you do that when you are trying to get to root partition
29 > after kernel initialisation ? At that moment you can't run a script,
30 > since you don't have an access to any partition.
31
32 initrd is exactly how you do it. In the case of booting off of USB,
33 there are too many variables (drive detection order, different hardware,
34 etc) to handle on the kernel command line. An initrd gives you the
35 flexibility to solve these problems.
36
37 > You could use initrd/initramfs, but seems like a lot of complications
38 > for little gain...
39
40 I wouldn't call a portable, writable, boot from anywhere Linux OS on a
41 thumbdrive a trivial gain. ;-)
42
43 Jason.
44
45 --
46 gentoo-amd64@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] boot Gentoo from USB key Branko Badrljica <brankob@××××××××××.com>