[syslinux] Bootable CD for booting of USB HDD

Shocky shocky1 at users.sourceforge.net
Wed Sep 30 14:19:43 PDT 2009


On Wednesday 30 September 2009 13:44:49 Luciano Rocha wrote:
> On Wed, Sep 30, 2009 at 12:33:46PM -0600, Shocky wrote:
> > Hi,
> >
> > I bought a USB hard drive, got Mandriva installed on it, and made it
> > bootable with extlinux. Works great on machines that can boot from USB. I
> > also created a boot cd using the instructions in the wiki. This is
> > working too.
> >
> > The only problem with the boot cd is that I had to copy the kernel,
> > initrd, etc. to the cd. This means that whenever I install a new kernel
> > I'll have to create and burn a new cd image. Not so burdensome I can't
> > live with it if there's no better way.
> >
> > But I'm wondering if there is a way to get the cd to tell the computer to
> > boot using the kernel on the usb drive. Is such a thing possible?
>
> Yes, if the kernel on the CD supports kexec. But then, you'll have to
> make a costumized initrd that, after finding the root device, executes
> the kernel and initrd there, with options extracted from extlinux.conf.
>
> If the kernel doesn't include kexec support, you could always compile a
> bare one with it, usb and ext3 support, and not much else.

Sounds like an interesting option. I'll have to learn a bit more first about 
kexec and how to make a customized initrd. The Mandriva kernel does seem to 
be compiled with kexec support:

# zcat /proc/config.gz | grep -i kexec
CONFIG_KEXEC=y

BTW, I found a more flexible alternative than UUID for locating the root 
partition, LABEL. I used "root=LABEL=root". Then even if I repartition, I 
just need to make sure I label the root partition "root" and it will find it, 
even though the UUID has changed. Hopefully I can do the same sort of thing 
with this custom initrd.


> > On a related note, it doesn't seem that isolinux can use the boot menu
> > like extlinux. At least I couldn't get it to work. Is this a limitation
> > on booting from cd or was I just doing something wrong again? I started
> > by copying over my working extlinux.conf to isolinux.cfg, along with the
> > vesamenu.c32 file that it references, but it seemed to ignore it.
>
> Make sure you're using isolinux.bin from the same sources as
> vesamenu.c32.

Turned out to be my mistake again. I had the vmlinuz and initrd paths wrong 
early on in my isolinux.cfg. Possibly I had other things wrong as well. 
Something either led it to not find the config file, or consider it invalid. 
I tried again based on the working one I have and it displayed the UI 
properly this time.

Shocky
-- 
These are my opinions. Get your own.




More information about the Syslinux mailing list