Recently I had a Debian Linux VM that wasn’t booting. It was getting a GRUB error: ‘error symbol grub_register_command_lockdown not found
‘. Attempting to select any other boot option, including the listed recovery options, all took me back to this same error.
I didn’t find a lot of helpful information while searching for that error. In the end, the solution was to re-install GRUB. These steps walk through how I was able to re-install GRUB in a Debian Linux VM on DigitalOcean (DO).
Resolution
- Shutdown the droplet
- Take a snapshot
- Click into the Recovery tab in DO
- Select Boot from Recovery ISO
- Power on your droplet
- Click into the Access tab
- Click on Launch Recovery Console to access the VM
- When choosing recovery environment options, select the interactive shell
- Find the boot disk using
fdisk -l
(mine was Disk:/dev/vda
; Partition:/dev/vda1
) - Mount the boot disk’s partition
mount /dev/vda1 /mnt
- Mount the critical virtual filesystems
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt/$i; done
- ChRoot into the normal boot disk
chroot /mnt
- Re-install GRUB on to the disk
grub-install /dev/vda
(NOTE: on the disk, not on the partition) - Re-create the GRUB menu
update-grub
- Exit ChRoot
exit
- Power off the droplet
poweroff
- Back in DO, select the Recovery tab again
- Select Boot from Hard Drive
- Power the droplet back on
- Click on the Access tab again
- Click on Launch Recovery Console to access the VM again
- Validate that it booted correctly