PDA

View Full Version : [ubuntu] 11.10 clean install fails to install GRUB2 in /dev/sda2



EC120
October 17th, 2011, 11:07 PM
I tried to install Ubuntu 11.10 amd64 on my notebook, but installation fails to install GRUB2 in custom location.

My drive:
sda
sda1: win7 truecrypt wde (raw)
sda2: /boot (ext2)
sda5: / (ext4)
sda3: truecrypt (raw)

First I tried using Alternate CD and at the end it says it can't see other operating systems and suggests to install into MBR, I select no and specify /dev/sda2, it fails to install grub and finishes installation.
Then I tried using Desktop CD (clean install again) and at the grub installation screen I select from the dropdown menu "sda2" and again it fails to install grub.


Unable to install GRUB in /dev/sda2
Executing 'grub-install/dev/sda2' failed
This is fatal error
OKAre there any changes since 11.04, since I successfully installed 11.04 from alternate CD, installing grub to sda2 and then upgraded to 11.10 and it works.
But how to go about fresh install using 11.10 CD's? Is this a bug that is now too late to mention?

zvacet
October 17th, 2011, 11:34 PM
I hope this (https://help.ubuntu.com/community/Boot-Repair) will be helpful to you.

EC120
October 18th, 2011, 12:32 AM
Thanks for the reply, I tried to boot Boot-Repair CD but in GRUB options tab, place GRUB into:, sda is the only option.
So I'm not sure how would I repair failed 11.10 GRUB install using this Boot-Repair CD.

(not my pic)
http://pix.toile-libre.org/upload/img/1313715508.png

I simply need to install GRUB to sda2, I think that is the only option for me.

Is this a bug that made it to final release, can anyone confirm this?

drs305
October 23rd, 2011, 04:21 AM
Use the last option. Answered in the other thread.

EC120
October 24th, 2011, 06:43 PM
The last option lists sda5 in my case, not sda2.

drs305
October 24th, 2011, 08:28 PM
The last option lists sda5 in my case, not sda2.

You might be able to get an option for sda2 by running this command:

sudo dpkg-reconfigure grub-pc
TAB to OK, and the last screen will ask where you want to install it. It will show the MBR(s) and partition(s). You select/deselect the specific location with the spacebar. Perhaps sda2 will display via this method.

Brutalix
October 25th, 2011, 10:17 PM
I have the same problem. Reinstalled an ubuntu 11.04 with 11.10. Will not install grub on any of my discs.

Will try the solution suggested earlier.


Kind Regards
Brut.

EC120
October 27th, 2011, 06:46 PM
Thanks drs305 (http://ubuntuforums.org/member.php?u=223945) for your suggestion.
When I tried this command on a working ubuntu installation on other computer, I get those options on a third screen, but this installation does not work since it boots to grub> So I tried the command in live CD session, but I only get first 2 screens and then it exits to command prompt without giving me the choice to select the partition. :(
I still have a lot of learning to do, and this install problem is not really critical for me, more of an experiment with 11.10. And if it is in fact a bug, as I think it is, it will not get fixed anyway till 12.04 cd's are released. For now I'm staying with 11.04 for my working system.

EC120
February 17th, 2012, 07:45 AM
I tried 12.04 both Alpha 1 & Alpha 2 and neither could install grub.
The solution is that the target partition must not be ext2.
During installation I format sda2 (/boot) as ext4 and now it works with 11.10 and also 12.04. :P
Can't believe how easy the solution was. If the installer would inform about this fact that would be great, instead of just stating that grub installation failed.

tomsn2
February 17th, 2012, 08:08 AM
I believe this error occurs because the installer defaults to /dev/sda even if that is not the drive you have selected to install on. My machine has 3 drives in it and /dev/sdc was the one I was installing on but the installer still tried to put it on sda. Click on the custom partitions options and select the proper drive. Then just back out and continue. Installer had the grub drive showing correctly after this and the install went fine. I hope that helps.

mrsfixit
April 8th, 2012, 01:57 PM
I tried 12.04 both Alpha 1 & Alpha 2 and neither could install grub.
The solution is that the target partition must not be ext2.
During installation I format sda2 (/boot) as ext4 and now it works with 11.10 and also 12.04. :P
Can't believe how easy the solution was. If the installer would inform about this fact that would be great, instead of just stating that grub installation failed.

I don't know if you'll ever read this, but I just wanted to tell you how helpful this was to me.

I'm dual booting Windows 7 and Mint Debian on the same hard drive on a netbook. I wanted to replace Mint Debian with Xubuntu.

I tore my hair out for the better part of a day trying to install Xubuntu to my hard drive. I set up a proper /boot partition of 1 GB, and each and every time it failed with a Grub error. I tried Xubuntu 12.04, and 11.10, same result.

That /boot partition (sda5) was formatted as ext2. I just kept getting "cannot install Grub to sda5".

When I read your post, I tried again, formatting sda5 as ext4 instead, and the install went flawlessly.

Yes, it would be SO nice if the installer would inform you of this, instead of just failing with no explanation.

I just wanted you to know how much your post helped me. Thank you very much! :p