Grub-mkrescue - making a bootable grub cd

o Packages required
xorriso [1]
mtools
efibootmgr
dosfstools

[1] - Some sub-packages of it may be sufficient but just install xorriso (because I can remember it, not these sub-packages which may change version numbers)
[2] - most of these packages are already default installed, not in net-install, so best check out first.

o To make a plain grub prompt (sufficient for all purposes)

grub-mkrescue -o anyname.iso

o To include a current working grub.cfg to isofile (such that it boots to grub menu, not prompt)

mkdir -p ~/burn/boot/grub
sudo grub-mkconfig -o ~/burn/boot/grub/grub.cfg
sudo grub-mkrescue -o anyname.iso burn

o Burn isofile anyname.iso to cd (less than 20 MB)
or dd to usb drive.

Some uses of grub rescue cd
o When system won’t boot
o When dropped to grub rescue prompt
o When need to reinstall Windows
o When dropped to initramfs shell
o When installing another OS and it got clobbered (with your bootloader)
o When Windows only systems (no linux) won’t boot

11 Likes

Is this essentially grub rescue mode? As if there was a grub rescue entry running from a separate hard drive so you can mount and unmount drives?

It is not in grub rescue mode but in ‘normal’ grub mode.
If we have, for whatever reason, encountered grub rescue mode or cannot boot up, in our system, this would be able to boot up as the original working system if we include the grub.cfg in making it.
If we don’t include our working grub.cfg in it, it will boot up to a working grub prompt; but note that since our installer is using grub, it would be similar as using our install media and pressing ‘c’ at the install menu which will bring up the grub prompt (like this).

Cheers.