grub-mknetdir
Create network bootable GRUB directory
SYNOPSIS
grub-mknetdir [OPTION...] --directory=DIR
PARAMETERS
--directory=DIR
Specifies the directory where the network boot files will be created. This option is mandatory.
--net-directory=DIR
Specifies the root directory used to create a relative symbolic link. Default to the absolute directory created.
--subdir=DIR
Specifies subdirectory used to create a relative symbolic link. Default to the directory created.
--grub-mkimage=FILE
Use the specified grub-mkimage executable.
--modules='MODULES'
Add the specified modules to the core image.
--locales='LOCALES'
Install only the specified locales.
--fonts='FONTS'
Install only the specified fonts.
--themes='THEMES'
Install only the specified themes.
--help
Display help message and exit.
--version
Display version information and exit.
DESCRIPTION
The grub-mknetdir command creates a directory containing the necessary files to network boot a system using GRUB. It copies the required GRUB modules and configuration files into the specified directory, making it ready to be served via TFTP or HTTP(S) for network booting.
This command is primarily used for setting up a PXE (Preboot Execution Environment) server or similar network boot environment. It ensures that the target system can load GRUB over the network and subsequently boot into a chosen operating system. It supports various architectures by choosing appropriate modules. The target architecture is defined during GRUB installation.
CAVEATS
Ensure that the target architecture for GRUB is correctly configured before using grub-mknetdir. Incorrect architecture settings can lead to boot failures.
EXAMPLE
Creates a network boot directory called /tftpboot, using all the default modules:
grub-mknetdir --directory=/tftpboot
BOOTLOADER CONFIGURATION
grub-mknetdir only sets up the initial GRUB environment for network booting. You will still need to configure a bootloader configuration in the generated directory which points to the next stage operating system.
SEE ALSO
grub-install(1), grub-mkconfig(8), grub-mkimage(1)