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!
- 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 yourboot options
list up, you should be able to find in there; somewheregrub.EFI
that you can boot to, which will enter you into the grub rescue screen. - The next thing you need to do is find where your
vmlinuz
file is; start by typingls
and you should see a list of your drives and partitions. From there typels (hd0,gpt1)/
for example and you'll see the contents of that file system. You're looking forvmlinuz-*-generic
. Once you've got it, make a note of this partition. - Type the following:
- set root=(hd0,gpt1)
- set boot=(hd0,gpt1)/boot
- insmod normal
- normal
- 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.