[syslinux] Returning to syslinux bootloader

Jeffrey Hutzelman jhutz at cmu.edu
Thu Apr 16 07:19:45 PDT 2009


--On Thursday, April 16, 2009 02:39:35 PM +0200 Dag Wieers <dag at wieers.com> 
wrote:

> Hi,
>
> I was wondering whether it is technically possible to go back from eg.
> DOS or Linux directly to the bootloader (instead of rebooting the
> hardware).
>
> We currently have 2 images (one DOS and one Linux) that need to be
> started before loading a system. They do things like disable PXE on NICs
> (using an Intel DOS tool), verify the correctness of the network
> patchings and validate if the hardware was configured according to
> corporate standards (usage of PCI slots, hardware revisions and firmware).

Generally, no.  As Peter points out, tools like HDT actually run with the 
bootloader still in memory, while DOS and Linux expect to take over the 
machine.  However, there are some games you might be able to play to chain 
from one to another...

Boot the DOS system first, do what you need to do to reprogram the NIC, 
then use LOADLIN to load the Linux image.  Once your Linux image has done 
what it needs to do, use kexec to load the kernel and initrd for the real 
system installer.

This assumes that the installer itself is Linux based, so you're booting
PXELINUX -> MEMDISK -> DOS -> Linux -> Linux.  The files you need for DOS, 
including LOADLIN and the kernel and initrd for the first Linux, all live 
in a FAT filesystem in a ramdisk provided by MEMDISK.  The kernel and 
initrd for the second Linux live inside the initrd for the first.

Of course, if you're booting from media instead of via PXE, then you can 
just use SYSLINUX and a local FAT filesystem instead of PXELINUX and 
MEMDISK.  The concept is the same.

-- Jeff




More information about the Syslinux mailing list