PDA

View Full Version : [SOLVED] 9.10 installer wrote grub2 to the wrong drive!



wkulecz
October 30th, 2009, 07:55 PM
My 9.10 AMD64 install wrote Grub2 to the wrong drive! I was able to boot by changing the BIOS boot order to make the SATA drive boot first which loaded Grub2 and gave me the boot menu, but I installed to my first IDE drive and want/need it to be the first BIOS boot device because it is an IDE carrier and I swap in various systems for testing. Drives hdb, the DVD burner, and the SATA drive have the data I need.

How do I install Grub2 to /dev/hda?

--wally.

wkulecz
October 30th, 2009, 10:45 PM
Once I booted the solution was simply to run "sudo update-grub /dev/sdb"

I fail to see why, and certainly don't like the fact that the first IDE drive is mapped to /dev/sdb but that is the way it is. I think this new drive mapping scheme will cause lots of broken systems when multiple drive types are involved!

Lots of useful grub2 info is here:
https://help.ubuntu.com/community/Grub2

Under "improvements" for grub2, all I can say is: "so what, who cares?", unless perhaps you have a PowerPC or other non-x86 system. But are the hassles I already see about installations not booting really worth having one boot loader for multiple architectures and the boot up eye-candy potential? Default boot is if anything uglier than grub to my eyes, but who looks at the bootup anyways, unless its not working??

--wally.

Rumpty
October 31st, 2009, 02:03 AM
Good to hear you solved it. I also have a mixture of SATA and IDE drives, and have been confused about which one comes first in Grub's world. So it looks like the SATA ones do?

I am still controlling the multi-boot here from menu.lst in Jaunty. Also I would like to install Grub2's bootloader in a floppy, but so far can't get it to work. Any ideas?

KinKiac
October 31st, 2009, 03:42 AM
Isnt it your BIOS that assigns the SDA/SDB stuff? Im pretty sure the first time you boot up the BIOS detects the drives and assigns that to them and then after that they will remain like that until you reset your BIOS. I may be wrong though.

Also, if you were to install again you can fix this by simply going into the advanced options button on the last page before you start the actual install. In there it has a check box to install boot loader(selected by default) and gives you the option of selecting what disk to load the boot loader to. Hope that helps.

ajgreeny
November 4th, 2009, 12:10 AM
Good to hear you solved it. I also have a mixture of SATA and IDE drives, and have been confused about which one comes first in Grub's world. So it looks like the SATA ones do?

I am still controlling the multi-boot here from menu.lst in Jaunty. Also I would like to install Grub2's bootloader in a floppy, but so far can't get it to work. Any ideas?
To get grub on a floppy try first adding your floppy to /boot/grub/device.map as

(hd0) /dev/sda
(hd1) /dev/sdb
(fd0) /dev/fd0assuming that is your floppy device name, (ignore the hard disk part) then run
sudo update-grub /dev/fd0I'm not certain it will work but
sudo grub-install /dev/fd0 worked with legacy grub, so it ought to work similarly to that.

Rumpty
November 5th, 2009, 11:16 PM
No success with sudo grub-install /dev/fd0, unfortunately.
Produces an error message: grub-probe: error: Cannot find a GRUB drive for /dev/fd0. Check your device.map:

I have checked the device map, and it looks good.

wkulecz
November 19th, 2009, 05:40 PM
worked with legacy grub, so it ought to work similarly to that

Pretty much everything you know about grub is wrong for grub2 :(

The boot order is set in the BIOS. Either grub2 or the 9.10 installer ignored it for my system. This is the same BIOS section that allows you to boot a CDROM or USB before trying the hard drives.

--wally.