PDA

View Full Version : Problem with Grub rescue and Boot repair



jjjacob
October 9th, 2016, 08:13 PM
Hello, I have managed to create a problem with my boot partition.

I am able to boot using this: https://askubuntu.com/questions/493826/grub-rescue-problem-after-deleting-ubuntu-partition/495993#495993?newreg=0347346a14e3400ebd656b1c95165 da8

So, when I run the commands, I get this:

grub rescue > set root=(hd0,gpt2)
grub rescue > set prefix=(hd0,gpt2)/boot/grub
grub rescue > insmod normal
grub rescue > normal
Where I'm booting to /dev/sda2. Ok so far. When I then run

update-grub # <-- this is fine

But, when I run the following, I get errors:

user@system-243abf:~$ grub-install /dev/sda2
Installing for i386-pc platform.
grub-install: error: cannot delete `/boot/grub/i386-pc/sleep_test.mod': Permission denied.
user@system-243abf:~$ sudo grub-install /dev/sda2
Installing for i386-pc platform.
grub-install: error: failed to get canonical path of `aufs'.
user@system-243abf:~$ sudo grub-install /dev/gpt2
Installing for i386-pc platform.
grub-install: error: failed to get canonical path of `aufs'.

I tried umount to unmount the volume, but of course it is busy.

So, I try Boot Repair and I get this:

"Please close all your package managers (software center, update manager, synaptic, ...) Then try again"

I don't have any of that open, and I've tried rebooting several times. So clearly I'm missing something.

I've pasted my boot info here http://paste.ubuntu.com/23299723/

Any help offered would be greatly appreciated.

Thanks in advance,

JJ

oldfred
October 9th, 2016, 11:40 PM
You always install grub to a drive, not to a partition.

grub-install /dev/sda2
should be, if booted into your install, if live installer, you must mount install partition first.
sudo grub-install /dev/sda

Or you can just run Boot-Repair's update.
If still issues, then run Boot-Repair's advanced mode to totally uninstall & reinstall all of grub2.