Is it possible to verify grub installation without rebooting?
I don't think you can just check whether this will works or not before trying to do it, but instead you can get a preview of your GRUB instantly so you can be sure that your new configuration is loaded correctly in GRUB.
This could be achieved using a tool called grub-emu
.
man grub-emu
NAME
grub-emu - GRUB emulator
SYNOPSIS
grub-emu [OPTION]...
DESCRIPTION
GRUB emulator.
-r, --root-device=DEV
use DEV as the root device [default=guessed]
-m, --device-map=FILE
use FILE as the device map [default=/boot/grub/device.map]
-d, --directory=DIR
use GRUB files in the directory DIR [default=/boot/grub]
-v, --verbose
print verbose messages
Easily install grub-emu
using command line:
sudo apt-get install grub-emu
To run it just use terminal to run this command:
grub-emu
This answer uses file -s /dev/sda
to see if the GRUB MBR has been successfully installed. Past that, you could definitely double-check the values in /boot/grub/grub.cfg
to make sure the UUIDs match up with the values in /dev/disk/by-uuid
, and make sure that everything looks right in /boot/grub/device.map
. If that file is wrong you'll have trouble with (hdX) specifications in grub.cfg.
Managing these files manually isn't necessary though if you're using update-grub
after installing grub on replacement drives. The biggest gotchas in my experience have been not updating the GRUB configuration, not installing GRUB on all the drives, or improper partitioning that makes it so you can't install GRUB without using --force.