Grub4dos

The following sections are covered in this page -

Introduction

grub4dos version 0.4.5c 2013-04-19 is included in the Tiny PXE Server Download. Two grub4dos files were included in previous versions of the Tiny PXE Server download, both standalone files without any file dependencies. Tiny PXE Server version 1.0.0.20 (dated 12/2/2017 (19:29)) includes only grldr. As it is possible that grub.exe may be reintroduced, I have decided to include in in this guide. In the scope of this guide the two versions and their usage are as follows -

grub4dos is a sophisticated boot manager with its own scripting language - due to the range of commands it supports I recommend that you refer to the following sites for more information -

PXE related notes from the Grub4dos help file README_GRUB4DOS.txt -

Configuration File Path

The default path for the Grub4dos configuration file is the \menu.lst\ directory - the path is relative to the Grub4dos Network Bootstrap Program - grldr (or grub.exe). It's possible to use separate configuration files for each client PC by using a filename based upon information unique to each client. Configuration file names are parsed in the following order -

On a test system with the following setup...

...the attempted load order will be as follows -

Grub4dos Menu System

The default Grub4dos menu (i.e. the embedded menu loaded if a menu file cannot be located) is text based. Grub4dos also has built in graphic support for splash images. The syntax for graphic support is covered in detail here.

The splashimage command can be used without defining a graphicsmode providing that a supported image type is specified and the image is of a resolution supported by the client systems VESA BIOS Extensions (VBE) mode.

"...0.4.5c and later versions of grub4dos support bmp files and compressed .bmp.gz files in 640x480, 800x600 and 1024x768, 8, 16, 24 or 32 bit colour!...

The PXELINUX menu entries in this guide have been kept as simple as possible. The majority of options here use the format -

     title PXELINUX
     pxe keep
     chainloader --raw (pd)/pxelinux.0

and -

     title Win98 DOS Boot Disk
     map --mem (pd)/images/win98.ima (fd0)
     map --hook
     root (fd0)
     chainloader +1

and -

     title Win98 DOS Boot Disk (Memdisk)
     kernel (pd)/memdisk
     initrd (pd)/images/win98.ima

It's also possible to load submenus -

     title Floppy Disk Image Submenu
     configfile /menu.lst/submenu1.txt

Putting all this together -

Screenshot of the above menu as displayed on the client system -

Now let's take a closer look at the menu entry syntax -

Chainloading iPXE Scripts

iPXE supports HTTP and SANBOOT - consequently there are times when it might be useful to chainload ipxe.lkrn from grub4dos. The following menu entry shows the syntax for loading ipxe.lkrn (kernel) with a script (initrd) -

If chainloading ipxe.lkrn the iPXE scripts used in this guide may need to be edited to add commands for configuring the Client PCs network interface. This is not required when using iPXE as the network bootstrap program with a script set as altfilename in config.ini as the network interface is automatically configured. To configure the first network adapter, simply add the following code at the start of any scripts to run the dhcp command -

E.g. -

Document date - 28th February 2017(DRAFT)