Broken Grub?

How to fix grub when your linux machine won't boot!

I recently decided to try a new Linux distro; elementary. However after what (appeared) to be a successful UEFI installation my machine reboots and I got a lovely No bootable media found message!

Another lad in my office experienced a similar issue with Ubuntu 15.04 and after a good few hours of digging I found a solution!

  1. You will find that Grub has been installed, but is not configured correctly, you should be able to press F10 or something similar to get your boot options list up, you should be able to find in there; somewhere grub.EFI that you can boot to, which will enter you into the grub rescue screen.
  2. The next thing you need to do is find where your vmlinuz file is; start by typing ls and you should see a list of your drives and partitions. From there type ls (hd0,gpt1)/ for example and you'll see the contents of that file system. You're looking for vmlinuz-*-generic. Once you've got it, make a note of this partition.
  3. Type the following:
  • set root=(hd0,gpt1)
  • set boot=(hd0,gpt1)/boot
  • insmod normal
  • normal
  1. This should then boot your OS! But; these settings are not persistent, you need to fix the boot partition. The best way to do this is to use the Boot Repair tool, there is an article here which talks you through how to do this!

Hope this helps.