The program grub-mkrescue generates a bootable GRUB rescue image.
grub-mkrescue -o grub.isoAll arguments not explicitly listed as grub-mkrescue options are passed on directly to xorriso in mkisofs emulation mode. Options passed to xorriso will normally be interpreted as mkisofs options; if the option ‘--’ is used, then anything after that will be interpreted as native xorriso options.
Non-option arguments specify additional source directories. This is commonly used to add extra files to the image:
mkdir -p disk/boot/grub(add extra files to disk/boot/grub)grub-mkrescue -o grub.iso disk--helpPrint a summary of the command-line options and exit.
--versionPrint the version number of GRUB and exit.
-o file--output=fileSave output in file. This "option" is required.
--modules=modulesPre-load the named GRUB modules in the image. Multiple entries in modules should be separated by whitespace (so you will probably need to quote this for your shell).
--rom-directory=dirIf generating images for the QEMU or Coreboot platforms, copy the resulting qemu.img or coreboot.elf files respectively to the dir directory as well as including them in the image.
--xorriso=fileUse file as the xorriso program, rather than the built-in default.
--grub-mkimage=fileUse file as the grub-mkimage program, rather than the built-in default.