====== Work Around BIOS Halting on iPXE Exit ====== ===== Overview ===== Often times, iPXE users will need to exit iPXE and continue with the BIOS boot order for any number of reasons. This is often the case for people who would like to install an OS directly to a SAN device. Unfortunately, many system BIOSes will not continue their boot order after iPXE exits and hands back control of the boot process. In the majority of these scenarios, one can use the [[cmd:sanboot|sanboot]] command directed at a local disk to achieve the same effect as having the BIOS continue to the next boot device. But when this doesn't work, a more robust option for booting a local drive is to use iPXE to simply chainload a different bootloader more suited to handling local disks. ===== Using GRUB4DOS ===== [[wp>GRUB4DOS]] has the ability to chainload the MBR from a local disk, can execute a second stage bootloader((such as the Windows Boot Manager)) directly from a FAT, NTFS, or EXT volume, and includes an ATAPI driver for chainloading CD/DVD drives. ==== Setup ==== * [[http://sourceforge.net/projects/grub4dos/files/GRUB4DOS/|Download the GRUB4DOS binaries]] of the latest version((grub4dos 0.4.4 at the time of this writing (January 2013) )) over at SourceForge. * Place the file grub.exe from the archive on an HTTP/FTP/TFTP server so that you can chainload it with iPXE. ==== Usage ==== grub.exe is loaded like any other kernel image that iPXE can pass control to, and iPXE can pass commandline arguments to it to supply either a configuration file, or a simple string of commands. For simplicity, we'll use the command-based approach: chain http://server/grub4dos/grub.exe --config-file="command1;command2;commandN" ==== Examples ==== == Boot Hard Disk 0 == chain http://server/grub4dos/grub.exe --config-file="root (hd0,0);chainloader +1" == Boot CD/DVD 0 == chain http://server/grub4dos/grub.exe --config-file="cdrom --init;map --hook;root (cd0);chainloader (cd0)" == Find and Load the Windows Boot Manager == * Notes: This is good for booting Windows when you don't know its disk number. chain http://server/grub4dos/grub.exe --config-file="find --set-root /BOOTMGR;chainloader /BOOTMGR" == Find a File, and Boot the Disk it's on == * Notes: Unlike the BOOTMGR example, this will load the MBR of the disk, which will then chain your second-stage bootloader. chain http://server/grub4dos/grub.exe --config-file="find --set-root /filename;chainloader +1"