0

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.

=======================

Both of my attempts at making custom partitions during installation have failed. First I tried with no /boot and no bios_grub partition, then I tried with /boot but no bios_grub, neither worked.

Now I am trying the normal install one last time, and plan to use the boot-repair disk instead of boot-repair command line.

=====================

The boot repair disk did not work, it would not even start. I tried one last time to do boot-repair from the live USB. This time when I rebooted, I told my BIOS to use the third hard disk the very first time. Then it finally took me to a GRUB menu where I could choose an OS to launch. Unfortunately, when I chose Ubuntu, it just immediately threw an exception and failed to launch.

I am giving up on Ubuntu. I have already wasted about 20 hours trying to install this just this weekend. Nobody is giving me help, at least not help that works.

msknapp
  • 171
  • I now prefer gpt partitioning. But you have to have a 1 or 2MB unformatted partition with the bios_grub flag for grub to install correctly in BIOS boot mode. Do not use Boot-Repairs auto fix as it installs grub to every MBR, and if gpt drive will give an error if no bios_grub partition. Also use Boot-Repairs advanced mode to reinstall a Windows boot loader to the MBR of sdb. Your Ubuntu install is on sda. Use advanced mode to reinstall grub to the MBR of sda, but you must have the bios_grub partition. It will not show in gparted as it is unformatted space and is not a boot partition. – oldfred Aug 24 '14 at 18:26

1 Answers1

0

Have you tried the boot-repair-disk? When I couldn't run ubuntu, even after use of boot-repair, this image helped me.

p.s. Mega - it's 1000 0000. Mebi it's 1024x1024. That's why you got MiB instead of MB.

Hiperon43
  • 320
  • going to try this soon – msknapp Aug 24 '14 at 17:29
  • will that work with a DVD-RW? – msknapp Aug 24 '14 at 17:35
  • at boot, I switched my BIOS to use the CD, it says "error: no such device: bc8...1b4" and then gives me the grub rescue prompt. – msknapp Aug 24 '14 at 17:46
  • I tried again with a CD-R, and had the same issue. Tried again with my other CD drive, same issue. It does not work. – msknapp Aug 24 '14 at 18:17
  • btw, a megabyte is 1024 kilobytes – msknapp Aug 24 '14 at 18:27
  • About boot - sorry, I'm not experienced enough to help you more, hope others will help. About prefix - Mega (M) is scientific 10^6. In Informatics, you use 2^10=1024 as "about" 10^3. So when you talk about bytes, and you say "kilo", you mean "1024". But kilo IS 1000 not 1024. You can do two things. Give "kilo" two meaning, and it will depend on the situation. You talk about distance? Mass? Something physics related? Kilo -> 1000. You talk about information? Bytes? Kilo -> 1024. In colloquial language, it work that way. But it's not accurate or scientific. – Hiperon43 Aug 30 '14 at 21:41
  • Look, how the hard drive sellers were using it. They say "I'm selling 1 TB drive". You think - its 1024 GB, 1048576 MB, 1073741824 kB and 1099511627776 bytes. But its not, because they use prefix in their true form. So it's only 1000 GB, 1000 0000 MB and 1000 000 000 kB and 1000 000 000 000 bytes. And now, using proper - scientific version of prefix, it's only 931 GiB, 953674 MiB or 976562500 kiB where Gi is 2^30 not 10^9, Mi is 2^20 not 10^6 and ki is 2^10 not 10^3. I guess colloquial Megabyte is 1024, but scientific Megabyte is 1000 kilobytes, and you should say Mebibyte. – Hiperon43 Aug 30 '14 at 21:41
  • I'm idiot... ofc it was answered here. http://askubuntu.com/questions/22102/meaning-of-i-in-mib – Hiperon43 Aug 30 '14 at 21:45
  • I majored in engineering, not computer science, I know kilo means 1000, but that is in the engineering domain. In the computer science domain things are different, and that's the domain we are in now. Hard drive sellers use the engineering definition because they are cheap and trying to mislead people. – msknapp Sep 01 '14 at 04:03