GRUB is not Booting Correctly
Posted
by
msknapp
on Ask Ubuntu
See other posts from Ask Ubuntu
or by msknapp
Published on 2014-08-24T14:44:22Z
Indexed on
2014/08/24
16:28 UTC
Read the original article
Hit count: 266
I have a PC with three hard disks. Windows 7 is installed on the first, Ubuntu 14.04 is installed on the third. After I re-booted, it went straight to Windows 7. So I tried explicitly telling my PC to boot using the third hard disk, but that just takes me to the grub rescue prompt.
I followed Scott Severence's instructions here to try and recover. Essentially, I updated grub, reinstalled grub, and then updated it again. After re-booting, absolutely nothing had changed.
So instead I tried using the boot-repair tool. In the past it had failed for me, saying that I had programs running and it could not unmount drives, when I was running nothing. I never figured out how to solve that problem, but it went away when I bought another hard drive and used that for my Ubuntu installation, I don't know why.
In any case, I ran the boot-repair tool and this time it said it was successful. First time for everything right? I re-booted, only to be taken straight to the grub rescue prompt. So I changed my BIOS settings to use the third hard disk for boot start up. That is the same hard drive where I have Ubuntu and grub installed, and the same one that the grub-repair tool told me to use. It still took me straight to the grub rescue prompt. So I went from not being able to boot Ubuntu, to not being able to boot either OS installed on my system. Thanks boot-repair!
Boot repair gave me this URL for future troubleshooting:
http://paste.ubuntu.com/8131669
When I try to boot from the third hard disk, this is my console:
Loading Operating System ...
error: attempt to read or write outside of disk 'hd0'.
Entering rescue mode...
grub rescue>
grub rescue> set
cmdpath=(hd0)
prefix=(hd0,gpt2)/boot/grub
root=hd0,gpt2
grub rescue> ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1) (hd2) (hd2,gpt2) (hd2,gpt1) (hd3)
Those values look correct to me. I have also experimented with changing some of those values, but 'insmod normal' always throws the same error.
Somebody please tell me how to fix this. I have tried everything, reinstalling grub, and running boot-repair.
===========================
Update: I think the problem might be that the ubuntu installer did not partition my hard disk correctly. I booted from live USB and then launched gparted and looked at how it partitioned things. This is what gparted says:
Partition, File System, Size, Used, Unused, Flags
/dev/sda1 (!), unknown, 1.00 MiB, ---, ---, bios_grub
/dev/sda2, ext4, 2.71 TiB, 47.30 GiB, 2.67 TiB,
/dev/sda3, linux-swap, 16.00 GiB, 0.00 B, 16.00 GiB,
So that first line looks problematic. It is supposed to be the /boot partition. However, it was given only 1 MiB? I am assuming that MiB is actually supposed to mean megabyte, no idea why that 'i' is there. It also says the file system is unknown.
I read the answer by andrew here, and he says he had to do a custom install, explicitly configuring the boot partition. So I think that maybe Ubuntu's installer has a bug in it, where it does not set up the boot partition correctly if you are not installing on the first hard disk in your computer.
I am going to try reinstalling with a custom partition scheme. I read elsewhere (askubuntu won't let me post another link) that I don't even need a /boot partition any more. So instead of following Andrew's instructions ver batim, I'm first going to try having just two partitions: one for /, and another for my 16GB swap space. Both as primary partitions. The first will be formatted as ext4. If that doesn't work, I may try again using /boot.
========================
So I did my custom install with no /boot partition, and it did not work. When I rebooted, I had an error message saying that some address did not exist. So for the hundredth time, I booted from the live USB, and ran boot-repair. Now I get this message
GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again.
I feel like I'm running in circles and nobody will help me.
© Ask Ubuntu or respective owner