[syslinux] chainboot from grub to syslinux in logical partition

Cynthia Flynn 1cynthia2flynn3 at telus.net
Mon Mar 16 19:55:11 PDT 2009


One of my pet peeves is mailing list threads that start out asking about
a technical problem I share, but that just taper off with no real
conclusion. So for those that run across this one, I just want to leave
my conclusion.

At one point I'd asked for references to the supposed GRUB Legacy bug
that might be preventing chain booting a logical partition. These
threads discuss that very thing:

   http://forums.gentoo.org/viewtopic-p-4757849.html
   http://www.mail-archive.com/bug-grub@gnu.org/msg11609.html

I began this thread with the assertion that I needed to use GRUB, but
gave no explanation. The primary reason was the need to create the
bootable thumb drives using FreeBSD systems. Both GRUB Legacy and
syslinux are available in the FreeBSD ports collection. My reason for
avoiding syslinux was because its FreeBSD port has an completely absurd
number of direct and indirect dependencies. It was easily doubling the
number of installed ports on our servers, which is not acceptable to us.
Why syslinux should require both perl *and* python is not something I
looked into. Add to that several X11 libraries and the mtools mess and
the consequential dependencies *really* pile up. The GRUB Legacy port
causes no where near the bloat.

But as neat and tidy as GRUB is, it's inability to boot logical
partitions is a show stopper. So, in the end I've had to use syslinux as
my main boot loader after all. Don't get me wrong, I'm quite satisfied
with how syslinux functions and I even like its menu system better than
GRUB Legacy. Unfortunately though, this means I have to build my thumb
drive images on FreeBSD systems, but without a boot loader in any of the
partitions. I then write the image to a physical thumb drive and copy
the contents of a syslinux distribution onto the thumb drive - no
syslinux "install" yet. Next I boot a live Linux file system CD and from
within that environment I use the syslinux installer Linux binary on the
thumb drive to actually install the main syslinux bootloader as well as
the patched boot sectors and ldlinux.sys instances to each of the other
partitions that require it. And yes this does include logical
partitions. Once complete, I boot back into FreeBSD, create any
necessary syslinux menus, and take an image of the now fully
multi-bootable thumb drive. That image can then be used to produce new
copies of the thumb drive from FreeBSD at any time. Obviously this
process is more complex than it should have to be, but I am unaware of
cleaner alternatives at this time.

Cynthia




More information about the Syslinux mailing list