Recover broken Grub2 install on RAID permalink
After updating my mediacenter PC running Linux Mint 16.1 Petra with XBMC to the newer 17.1 Rebecca version I rebooted into an unfortunate state:
error: symbol 'grub_term_highlight_color' not found
Entering Rescue mode...
grub rescue>
This was apparently brought about due to a bug in the grub2 package distributed with the Trusty Tahr 14 .04 LTS version of Ubuntu. Since the Ubuntu package repositories back Linux Mint, when I updated from the now unsupported Petra (backed by Ubuntu 13.10 Saucy Salamander), I inherited this gem.
As an added bonus, my installation is running on two separate RAID 10 arrays: one each for the OS and general storage . What follows is the succinct directions on how to fix it for my own personal benefit in the event that it happens again.
As a friendly reminder to myself, in order to boot from a USB drive, I needed to update the hard drive order in the BIOS so that the “USB Mass Storage Drive” was the first hard drive.
-
Install mdadm in the LiveUSB instance:
sudo apt-get install mdadm
-
Assemble the mdadm RAID arrays:
sudo mdadm --assemble --scan
-
Mount the array with the broken Grub2 installation:
sudo mount /dev/md0 /mnt
-
Mount the critical directories within our RAID array mount:
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
-
Jump into the RAID array mount:
sudo chroot /mnt
-
Re-install Grub to all drives that make up the RAID array:
grub-install /dev/sdb grub-install /dev/sdc
-
Update the Grub config:
update-grub
-
Restart the PC
Moving forward I think I just need to remember to perform the last three steps following every update to either Grub or the kernel.