79 lines
2.6 KiB
Text
79 lines
2.6 KiB
Text
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):
|
|
|
|
'net_<INTERFACE>_ip'
|
|
The network interface's IP address. Read-only.
|
|
|
|
'net_<INTERFACE>_mac'
|
|
The network interface's MAC address. Read-only.
|
|
|
|
'net_<INTERFACE>_hostname'
|
|
The client host name provided by DHCP. Read-only.
|
|
|
|
'net_<INTERFACE>_domain'
|
|
The client domain name provided by DHCP. Read-only.
|
|
|
|
'net_<INTERFACE>_rootpath'
|
|
The path to the client's root disk provided by DHCP. Read-only.
|
|
|
|
'net_<INTERFACE>_extensionspath'
|
|
The path to additional DHCP vendor extensions provided by DHCP.
|
|
Read-only.
|
|
|
|
'net_<INTERFACE>_boot_file'
|
|
The boot file name provided by DHCP. Read-only.
|
|
|
|
'net_<INTERFACE>_dhcp_server_name'
|
|
The name of the DHCP server responsible for these boot parameters.
|
|
Read-only.
|
|
|
|
'net_<INTERFACE>_next_server'
|
|
The IP address of the next (usually, TFTP) server provided by DHCP.
|
|
Read-only.
|
|
|
|
'net_default_interface'
|
|
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'
|
|
|
|
'net_default_ip'
|
|
The IP address of default interface. Read-only. This is alias for
|
|
the 'net_${net_default_interface}_ip'.
|
|
|
|
'net_default_mac'
|
|
The default interface's MAC address. Read-only. This is alias for
|
|
the 'net_${net_default_interface}_mac'.
|
|
|
|
'net_default_server'
|
|
The default server used by network drives (*note Device syntax::).
|
|
Read-write, although setting this is only useful before opening a
|
|
network device.
|
|
|