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). But rebooting the hardware on certain devices takes a long time, if we could go back to the bootloader it could be useful. Even when the hardware may not be properly reset. I noticed that HDT can exit and return to the bootloader without a reboot, the same could be useful for memtest and some other tools that are not com32 modules. -- -- dag wieers, dag at wieers.com, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
Dag Wieers 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). > > But rebooting the hardware on certain devices takes a long time, if we > could go back to the bootloader it could be useful. Even when the > hardware may not be properly reset. > > I noticed that HDT can exit and return to the bootloader without a > reboot, the same could be useful for memtest and some other tools that > are not com32 modules. >There are major differences, though. When HDT runs, the hardware is not reprogrammed and the bootloader is kept in memory. Although it would be theoretically possible to restore the pre-OS state, noone has actually built that. -hp -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
--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
H. Peter Anvin a ?crit :> There are major differences, though. When HDT runs, the hardware is not > reprogrammed and the bootloader is kept in memory. Although it would be > theoretically possible to restore the pre-OS state, noone has actually > built that. > >Any hints on how it could be done ? At least, I could be interested in HDT being able to return to hdt after running as external tool like memtest etc... Cheers, Erwan