Gentoo Archives: gentoo-user

From: Jake Moe <jakesaddress@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Booting Gentoo from USB stick
Date: Wed, 22 Sep 2010 04:38:08
Message-Id: 4C9987E2.60709@gmail.com
In Reply to: Re: [gentoo-user] Booting Gentoo from USB stick by "J. Roeleveld"
1 On 21/09/10 17:26, J. Roeleveld wrote:
2 > On Tuesday 21 September 2010 07:35:13 Jake Moe wrote:
3 >> On 16/09/10 21:30, J. Roeleveld wrote:
4 > <snipped old stuff>
5 >
6 >>> Please bear in mind, I have not actually used nor needed a ramdisk to
7 >>> boot from ever since I started using Gentoo.
8 >>> Not even when I played with booting from USB-sticks myself.
9 >>> I simply build the kernel with all the necessary drivers compiled-in and
10 >>> used that to boot from.
11 >>>
12 >>> This might also be an idea for you?
13 >>>
14 >>> --
15 >>> Joost
16 >>>
17 >>> Eg. if you do the mknod-commands to build the /dev/sda, /dev/sda1,....
18 >>> device nodes, then it should be able to continue.
19 >> Well, I've finally gotten this to work with a manually config'ed
20 >> kernel. Before, I was only getting kernel panics. Now, after your
21 >> comment "all compiled-in", I took the old config I tried, did a sed to
22 >> change all "=m" to "=y", and recompiled, and it worked. So obviously,
23 >> there was some option that I wasn't building into the kernel (only as a
24 >> module) that was needed to start from USB.
25 > That's generally a good way to start, stick everything in the kernel :)
26 >
27 >> I had previously started from a working config I had previously used for
28 >> the same model PC that I was doing my testing on, and just changed the
29 >> USB drivers from modules to built-in, but apparently that's not enough.
30 >> Any ideas what else is needed for a USB-stick boot that's not needed in
31 >> a SATA boot? I'd like to a) find out what I missed, and b) be able to
32 >> cull the kernel back down again, so I can build up lots of SATA,
33 >> graphics and audio modules to make this able to boot (and work properly)
34 >> on other systems.
35 > Ok, doing this from memory here.
36 > To be able to boot from USB, you need (additionally to what you normally
37 > have):
38 > 1) USB Host drivers (OHCI,UHCI,EHCI,...)
39 > 2) USB Mass Storage
40 > 3) file system on the USB-stick
41 > 4) SCSI-disk (USB Mass storage depends on this)
42 >
43 > If others can also have a quick look on this list to check that I didn't miss
44 > anything?
45 >
46 > --
47 > Joost
48 >
49 Well, now that I've managed to get it booting, the only problem is that
50 I can't seem to get the disk label working right. In GRUB's menu.lst,
51 if I use root=LABEL=UsbRoot, it doesn't work (kernel panic, label not
52 found, but sda1 is listed as available), but if I use root=/dev/sda1, it
53 works. However, later in the boot process, it mounts / using
54 LABEL=UsbRoot in fstab just fine. Is that a problem with GRUB? Or the
55 kernel? Or am I doing something else wrong?
56
57 And for future reference, while looking into various things for this, I
58 found these in the Gentoo Wiki:
59 USB Portable Install - http://en.gentoo-wiki.com/wiki/USB_Portable_Install
60 Portable USB Gentoo - http://en.gentoo-wiki.com/wiki/Portable_USB_Gentoo
61
62 Unfortunately, both use genkernel instead of manually configured
63 kernels, so that part doesn't help, but one mentions the option
64 "scandelay=2" to add to the kernel boot line in GRUB to introduce the
65 delay genkernel needed to see the USB device; would have been good to
66 know that last week when I was trying genkernel. :-P
67
68 Jake Moe

Replies

Subject Author
Re: [gentoo-user] Booting Gentoo from USB stick Al <oss.elmar@××××××××××.com>
Re: [gentoo-user] Booting Gentoo from USB stick "J. Roeleveld" <joost@××××××××.org>