GRUB-MKIMAGE(1)

๐Ÿ’… grub-mkimage โ€” like, the manual page, but make it make sense ๐Ÿ’…

okay so bestie, you're reading the grub-mkimage(1) page from the User Commands manual, and I'm gonna walk you through it like we're on FaceTime at 1am. it's literally the tool that makes a bootable image of GRUB. that's the whole vibe. let's go ๐Ÿซถ


โœจ NAME โœจ

grub-mkimage โ€” make a bootable image of GRUB ๐Ÿ‘‘

like, it builds the thing that boots the thing. main character energy fr.


โœจ SYNOPSIS โœจ

grub-mkimage [OPTION...] [OPTION]... [MODULES]

that's it. that's the shape of it. options, options (yes twice, don't ask, it's giving "quirky"), and then a list of MODULES at the end. ๐Ÿ’ซ


โœจ DESCRIPTION โœจ

Make a bootable image of GRUB. ๐ŸŽ€ that's the one-line summary and honestly it ate.

but like โ€” the real content of this page is the options, so let's get into it.

๐ŸŒธ the options ๐ŸŒธ

  • -c, --config=FILE โ€” embed FILE as an early config. like, sneaking a little config snack inside the image before anything else runs. ๐Ÿ“
  • -C, --compression=(xz|none|auto) โ€” pick the compression for the core image. your choices are literally xz, none, or auto. choose your fighter ๐Ÿ’…
  • --disable-shim-lock โ€” turns off the shim_lock verifier. (no cap, that's what it says, that's all it says.)
  • -d, --directory=DIR โ€” use the images and modules that live under DIR. default is [default=/usr/lib/grub/<platform>] โ€” so <platform> gets filled in for you, cute right? ๐ŸŒˆ
  • -D, --dtb=FILE โ€” embed FILE as a device tree (DTB). ๐Ÿฆ‹
  • -k, --pubkey=FILE โ€” embed FILE as the public key used for signature checking. security girlie behavior ๐Ÿ”ฅ
  • -m, --memdisk=FILE โ€” embed FILE as a memdisk image.
โš ๏ธ okay so this one has receipts: it implies -p (memdisk)/boot/grub and overrides any prefix supplied previously โ€” BUT the prefix itself can still be overridden by later options. so like, order matters, bestie. read the room (and the argument order). ๐Ÿ˜ญ
  • -n, --note โ€” add a NOTE segment for CHRP IEEE1275. that's the whole description, I'm not gonna invent lore about it. ๐Ÿงš
  • -o, --output=FILE โ€” write the generated image out to FILE. default is [default=stdout], so if you don't say anything it justโ€ฆ goes to stdout. ๐Ÿ™ˆ
  • -O, --format=FORMAT โ€” generate the image in FORMAT. the available formats are literally this entire list, and I'm listing every single one because I would never do you like that:
i386-coreboot, i386-multiboot, i386-pc, i386-xen_pvh, i386-pc-pxe,
i386-pc-eltorito, i386-efi, i386-ieee1275, i386-qemu, x86_64-efi,
i386-xen, x86_64-xen, mipsel-yeeloong-flash,
mipsel-fuloong2f-flash, mipsel-loongson-elf, powerpc-ieee1275,
sparc64-ieee1275-raw, sparc64-ieee1275-cdcore,
sparc64-ieee1275-aout, ia64-efi, mips-arc, mipsel-arc,
mipsel-qemu_mips-elf, mips-qemu_mips-flash,
mipsel-qemu_mips-flash, mips-qemu_mips-elf, arm-uboot,
arm-coreboot-vexpress, arm-coreboot-veyron, arm-efi, arm64-efi,
loongarch64-efi, riscv32-efi, riscv64-efi

yes, all of them. every last one. slay ๐Ÿ’€

  • -p, --prefix=DIR โ€” set the prefix directory. ๐ŸŒผ
  • -s, --sbat=FILE โ€” SBAT metadata. (that's the description. short and mysterious, iykyk.) โญ
  • -v, --verbose โ€” print verbose messages. let her yap!! ๐Ÿ—ฃ๏ธ
  • -?, --help โ€” give this help list. ๐ŸŽ€
  • --usage โ€” give a short usage message. the tl;dr version ๐Ÿ’–
  • -V, --version โ€” print program version. ๐Ÿ“Œ

and one little footnote-ish reminder that applies to the whole list:

๐Ÿ’ก Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. so like, if the long one needs a value, the short one needs it too. no cap. ๐Ÿ™

โœจ REPORTING BUGS โœจ

found a bug? report it to <bug-grub@gnu.org>. be nice, be specific, include receipts. ๐Ÿ›๐Ÿ’Œ


โœจ SEE ALSO โœจ

also!! the full documentation for grub-mkimage is maintained as a Texinfo manual. so if info and grub-mkimage are properly installed on your system, then this command:

info grub-mkimage

should give you access to the complete manual. go off, read the full lore ๐Ÿ“šโœจ


okay that's the whole page, you understood all of it, I'm so proud of you ๐Ÿซถ this was GRUB 2.12-1ubuntu7.3, dated March 2025 โ€” mwah, love u, bye ๐Ÿ’‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from