grub-mkstandalone
Build a standalone GRUB image with a memdisk
TLDR
SYNOPSIS
grub-mkstandalone [OPTION]... [SOURCE]...
DESCRIPTION
grub-mkstandalone builds one GRUB 2 image that contains the modules it needs (and any files you graft in) inside a memdisk. The firmware can boot that single file without a separate /boot/grub tree. Typical uses are a USB stick, a custom UEFI application, and an image that must carry its own grub.cfg.The tool is a front end to grub-mkimage. Output is a format-specific binary such as an EFI application or a BIOS core image. It does not register the image with the firmware.
PARAMETERS
-O, --format FORMAT
Image format, for example x86_64-efi or i386-pc. --help lists the formats this build supports.-o, --output FILE
Write the image to FILE. This option is required.-d, --directory DIR
Read GRUB images and modules from DIR. The default is /usr/lib/grub/ followed by the platform name.--modules MODULES
Pre-load these modules in the core image, before the memdisk is used.--install-modules MODULES
Put only these modules and their dependencies in the memdisk. The default is every module.--compress no|xz|gz|lzo
Compress files stored in the image.--fonts FONTS
Fonts to install. The default is unicode.--locales LOCALES
Locales to install. The default is all of them.--themes THEMES
Themes to install. The default is starfield.-k, --pubkey FILE
Embed FILE as a public key for signature checking.-v, --verbose
Print verbose messages.-?, --help
Show the full option list and exit.-V, --version
Print the version and exit.SOURCE
A file to place in the memdisk, written as a graft point: the path inside the image, an equals sign, and the file to embed. Example: boot/grub/grub.cfg=./grub.cfg.
INSTALL
CAVEATS
--output is mandatory. A graft path is the location inside the memdisk, not a second output file. The format must match the machine that will boot the image. Building from a GRUB install for a different platform requires --directory to point at that platform's modules.
SEE ALSO
grub-mkimage(1), grub-install(8), grub-mkconfig(8)
