[syslinux] Booting linux install on usb key using extlinux

Luciano Rocha strange at nsk.no-ip.org
Wed Sep 23 13:53:10 PDT 2009


On Wed, Sep 23, 2009 at 02:14:57PM -0600, Shocky wrote:
> Thanks for the reply. That's what I thought, that it shouldn't matter live or 
> installed. I forgot to mention that I already tried it, and couldn't get it 
> to boot with extlinux (kept complaining about not being able to find the 
> root). That combined with the exclusive focus of numerous articles on live 
> usb made me wonder if I was trying to do something that doesn't work. But I 
> probably just had the extlinux config wrong.

Or probably the initrd doesn't support usb, or the root= is wrong. Check
the UUID of the filesystem in the pen.

> According to one article, grub doesn't work well because the usb key will be 
> assigned a different drive number on different machines, based on the number 
> of hard drives and partitions on it. Not portable. Though I could always just 
> boot to the grub command line and do it manually. But the article also said 
> extlinux doesn't suffer from that limitation, so it sounds like the way to 
> go.

Grub is strange when it needs to be installed, but you don't need to
know the number of hard drives and partitions. You can remove any
(hdx,y) from the configuration and grub will use the filesystem where
it's installed.

> 
> Anyone here happen to have a working usb install with extlinux or syslinux? If 
> so can you show me the config file, to see how to do it properly? In 
> particular, what do I pass to the kernel for the root partition?

Run as root:
# blkid /dev/usb_pen_partition

Check the UUID and use it as the root device.
Eg:
 /dev/sdb1: LABEL="root" UUID="721a849f-0788-4d6c-a4a6-bf5934bfabd3" TYPE="ext3"

becomes
 root=UUID=721a849f-0788-4d6c-a4a6-bf5934bfabd3
or
 root=/dev/disk/by-uuid/721a849f-0788-4d6c-a4a6-bf5934bfabd3

Make sure etc/fstab agrees.

Generating an initrd with usb modules depends on distribution. On Fedora:
# mkinitrd -f -v --with-usb usb-initrd.img $(uname -r)


-- 
lfr
0/0




More information about the Syslinux mailing list