Next: , Previous: , Up: Top   [Contents][Index]

8 Booting GRUB from the network

The following instructions don’t work for *-emu, i386-qemu, i386-coreboot, i386-multiboot, mips_loongson, mips-arc and mips_qemu_mips

To generate a netbootable directory, run:

grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/<platform>

E.g. for i386-pc:

grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i386-pc

Then follow instructions printed out by grub-mknetdir on configuring your DHCP server.

After GRUB has started, files on the TFTP server will be accessible via the ‘(tftp)’ device.

The server IP address can be controlled by changing the ‘(tftp)’ device name to ‘(tftp,server-ip)’. Note that this should be changed both in the prefix and in any references to the device name in the configuration file.

GRUB provides several environment variables which may be used to inspect or change the behaviour of the PXE device. In the following description <interface> is placeholder for the name of network interface (platform dependent):


The network interface’s IP address. Read-only.


The network interface’s MAC address. Read-only.


The client host name provided by DHCP. Read-only.


The client domain name provided by DHCP. Read-only.


The path to the client’s root disk provided by DHCP. Read-only.


The path to additional DHCP vendor extensions provided by DHCP. Read-only.


The boot file name provided by DHCP. Read-only.


The name of the DHCP server responsible for these boot parameters. Read-only.


The IP address of the next (usually, TFTP) server provided by DHCP. Read-only.


Initially set to name of network interface that was used to load grub. Read-write, although setting it affects only interpretation of ‘net_default_ip’ and ‘net_default_mac


The IP address of default interface. Read-only. This is alias for the ‘net_${net_default_interface}_ip’.


The default interface’s MAC address. Read-only. This is alias for the ‘net_${net_default_interface}_mac’.


The default server used by network drives (see Device syntax). Read-write, although setting this is only useful before opening a network device.

Next: , Previous: , Up: Top   [Contents][Index]