[syslinux] Returning to syslinux bootloader
Dag Wieers
dag at wieers.com
Thu Apr 16 11:06:46 PDT 2009
On Thu, 16 Apr 2009, Jeffrey Hutzelman wrote:
> --On Thursday, April 16, 2009 02:39:35 PM +0200 Dag Wieers <dag at wieers.com>
> wrote:
>
>> 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.
Yes, this is what I planned to do. Although my first goal is to get rid of
DOS altogether. I don't understand why vendors still provide DOS hardware
config utilities, while it is much easier to automate something via Linux.
It is pretty ugly to send the correct boot-options (eg. anaconda network
info and boot-options) that I have in syslinux (on a per system basis) via
DOS to loadlin. It also requires me to have all the different
kernels/initrds in DOS, while they are now available only from isolinux.
(I guess a generic DOS CD driver would work though).
All-in-all being able to save some state somewhere in syslinux would be
very useful so that I know after each reboot what we have to do next. I
was thinking if we have lua scripting, we could use the VPD to store some
information and make the process less interactive.
Then I could do:
- first reboot
store phase 1 somewhere in VPD
ask for system name (and store in VPD)
store phase 2 somewhere in VPD
hardware configuration changes (DOS)
- second reboot
store phase 3 somewhere in VPD
load network debugging tool (Linux)
- third reboot
store phase 4 somewhere in VPD
load the system with required OS (RHEL/ESX)
Now each of these tasks require someone to type something, and wait for
reboots (which on some systems can take up 2 to 3 minutes).
--
-- dag wieers, dag at wieers.com, http://dag.wieers.com/ --
[Any errors in spelling, tact or fact are transmission errors]
More information about the Syslinux
mailing list