[syslinux] Booting linux install on usb key using extlinux
Shocky
shocky1 at users.sourceforge.net
Fri Sep 25 13:44:59 PDT 2009
On Wednesday 23 September 2009 14:53:10 Luciano Rocha wrote:
...
> > 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)
Thanks, the UUID did the trick. It was easy too because the distro I was
installing (Mandriva 2009.1) already uses UUID in the grub menu.lst and in
fstab, so it was just copy and paste.
I couldn't get grub to even be recognized as a boot loader on the two machines
I was testing with, but with extlinux it worked great. No problem with the
initrd once I got the extlinux.conf right:
UI vesamenu.c32
MENU TITLE Mandriva 2009.1 USB
DEFAULT mandriva
TIMEOUT 30
LABEL mandriva
MENU LABEL Mandriva 2009.1 default
KERNEL vmlinuz
INITRD initrd.img
APPEND BOOT_IMAGE=linux root=UUID=513aa106-4bb9-4f5e-9028-f0fad7bb1ff4
vga=788
Unfortunately after I got it installed, booted and updated, but before I could
back it up, a bunch of system files got hopelessly corrupted. But that's
nothing to do with extlinux. Probably the el-cheapo brand usb key I bought. I
think I'll have to go for a real external hdd.
Anyway, thanks for the help. And thanks to all the syslinux/isolinux/extlinux
developers for the great tools.
Shocky
--
These are my opinions. Get your own.
More information about the Syslinux
mailing list