PDA

View Full Version : Ubuntu Grub Error 2



aidanmaz
11-06-2008, 09:25 AM
Just installed unbuntu 8.0.4, restarted the PC to boot from the hdd and get a loading stage 1.5, grub error 2. I have tried to reinstall 3 times and i get the same error. After researching on the net i read it has something to do with the bios settings :dogeye: If it was my bios i wouldnt be able to get to where i am. Everything is detected, *shrugs* any ideas?

cheers

kjaada
11-06-2008, 10:22 AM
Did you see this:

BugFix:

Grub Loader problems:- "OS will not boot halts at Grub loader" as seen in versions 5.04 / 6.06 / 6.10 / 7.04 (& beta) / 7.10

Most of these are created by the grub loader reading (or attempting to read) an area that it can't see because of the DMA settings.

Fix: Rather simple really go into your BIOS and reset the IDE hard-drive settings from (Auto) to a DMA mode the hard-drvie does not recognise,

e.g. On the following two motherboards, Asus A8V Deluxe (model A + B I'm building two for friends) and Asus A7V 880, the hard-drives are seen automatically and the drives set according to the reported back DMA mode is auto-selected (using Seagate Barracuda 120gb, 250gb, and 320gb ATA {also known as PATA} 16mb cache drives are seen as UDMA modes 5 and 6, and Hitachi Deskstar 80gb (these drives are the same as IBM I believe.)

Set the value to one NOT recognised by the drive (ignore motherboard modes) and set them to UDMA 4, if your drive uses DMA4 or UDMA 4 use a lower value or adjust accordingly.

This will force the grub loader to read the relevant DMA/UDMA mode directly from the drive and not from the motherboard BIOS, so it then selects the correct mode and can read the drive. (If it trys to read from the motherboard BIOS it stalls and this is where the problem [BUG] occurs.

aidanmaz
11-06-2008, 10:36 AM
Did you see this:

BugFix:

Grub Loader problems:- "OS will not boot halts at Grub loader" as seen in versions 5.04 / 6.06 / 6.10 / 7.04 (& beta) / 7.10

Most of these are created by the grub loader reading (or attempting to read) an area that it can't see because of the DMA settings.

Fix: Rather simple really go into your BIOS and reset the IDE hard-drive settings from (Auto) to a DMA mode the hard-drvie does not recognise,

e.g. On the following two motherboards, Asus A8V Deluxe (model A + B I'm building two for friends) and Asus A7V 880, the hard-drives are seen automatically and the drives set according to the reported back DMA mode is auto-selected (using Seagate Barracuda 120gb, 250gb, and 320gb ATA {also known as PATA} 16mb cache drives are seen as UDMA modes 5 and 6, and Hitachi Deskstar 80gb (these drives are the same as IBM I believe.)

Set the value to one NOT recognised by the drive (ignore motherboard modes) and set them to UDMA 4, if your drive uses DMA4 or UDMA 4 use a lower value or adjust accordingly.

This will force the grub loader to read the relevant DMA/UDMA mode directly from the drive and not from the motherboard BIOS, so it then selects the correct mode and can read the drive. (If it trys to read from the motherboard BIOS it stalls and this is where the problem [BUG] occurs.

no i didnt see that mentioned anywhere, im using a seagate 200gb drive..... would that be a dma 4?

kjaada
11-06-2008, 10:51 AM
Sorry not able to answer that 4 U. Wainuitech or some other tech guy will hopefully see the post and give further help.

laneel
12-06-2008, 08:41 PM
You could try this site http://www.supergrubdisk.org/

laneel

Jen
12-06-2008, 08:52 PM
no i didnt see that mentioned anywhere, im using a seagate 200gb drive..... would that be a dma 4?I have a Seagate IDE 160 gig drive and it is using udma5 (well hdparm -I /dev/sda reports this).

If this is your problem, you could try changing the BIOS and just change it back if it doesn't work.

The bug report posted above doesn't mention your release version of Ubuntu though, and a quick google doesn't find the original bug report.

kjaada, could you please post a link to that report?

kjaada
13-06-2008, 06:30 AM
Sorry Jen I just put the "grub 2 error" in to Google and sorted out the best looking one.I do remember it was 2007.There were a lot of posts and some mentioned also that Super Grub
did not work.Off hand I think that was the only one that seemed to offer a solution.

kjaada
13-06-2008, 07:48 AM
The bug report is here:https://answers.launchpad.net/ubuntu/+question/7137
Note the answer at the bottom of the page from someone who used the fix.

jaspmatt
23-10-2008, 10:19 AM
My problem occurs when trying to boot the first partition on the IDE drive from the SATA drive. GRUB actually fails to recognize the first partition on IDE at all. Booting SATA from IDE works just fine as does booting either drive from a USB dongle. I have tried all the fixes and none work for me.

My BIOS only allows DMA to be enabled or disabled for my drives (it contains nothing about UDMA) and does not seem to change anything.

I have also tried hdparm -d0 /dev/sdx or hdx which only throws off an IOCTL error.

Also adding ide=nodma and nohdparm on the kernel line at boot makes no difference.

Gigabyte GA-K8NS (Rev 2.x) nForce3 250 chipset mother board with
Award Bios firmware Ver. F19

Any other suggestions would be welcome.

jaspmatt
03-11-2008, 10:56 AM
I found the solution for my Grub error 2 at least for users of the new Ubuntu release. This is thanks to another forum user and is not my discovery.

Anyway, the new Ubuntu Intrepid release defaults to using a 256 byte inode size for its ext3 file system rather than the older 128 bytes used in Hardy and in prior releases. Unfortunately the Grub version in Hardy and before can't handle the larger inode size, so you will typically get a Grub error 2 if you try to boot one of the newer ext3 partitions.

Things were fine on my IDE drive because the new Grub version installed itself in the MBR so all installations on that drive were fine. However when I would try to boot from the SATA drive, its MBR had the older version of Grub so it could handle everything on itself as well as all older OS's on the IDE, but NOT the new Intrepid Ibex installation which used the larger inode size.

The fix was to download the latest release of Grub, (0.97-29ubuntu45) and remove the two modules e2fs_stage1_5 and stage2 then install them into the old /boot/grub directory of the OS on the SATA drive from which I was trying to boot, then regenerating the MBR on the SATA drive thus:

# sudo grub
grub> device (hd0) /dev/sda
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Hope this helps someone.

rumpty
03-11-2008, 09:03 PM
I found the solution for my Grub error 2 at least for users of the new Ubuntu release. This is thanks to another forum user and is not my discovery.

Anyway, the new Ubuntu Intrepid release defaults to using a 256 byte inode size for its ext3 file system rather than the older 128 bytes used in Hardy and in prior releases. Unfortunately the Grub version in Hardy and before can't handle the larger inode size, so you will typically get a Grub error 2 if you try to boot one of the newer ext3 partitions.

Things were fine on my IDE drive because the new Grub version installed itself in the MBR so all installations on that drive were fine. However when I would try to boot from the SATA drive, its MBR had the older version of Grub so it could handle everything on itself as well as all older OS's on the IDE, but NOT the new Intrepid Ibex installation which used the larger inode size.

The fix was to download the latest release of Grub, (0.97-29ubuntu45) and remove the two modules e2fs_stage1_5 and stage2 then install them into the old /boot/grub directory of the OS on the SATA drive from which I was trying to boot, then regenerating the MBR on the SATA drive thus:

# sudo grub
grub> device (hd0) /dev/sda
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Hope this helps someone.

What a pain in the neck all that must have been. Why did they change the inode size? I guess they don't understand about leaving well enough alone.

That sort of thing really confuses the situation in a multi-boot installation. Like the change to UUID did.

Erayd
03-11-2008, 11:49 PM
Because with larger drives, it starts making a lot of sense to pack more information into a single inode. If they did actually make this change, then it was a change dictated by necessity.

memphis
04-11-2008, 01:47 AM
Update to the new Ubuntu 8.10 it maybe better/fix things for you ;):cool:
Good luck and I hope that helps you out.:):thumbs:

rumpty
04-11-2008, 01:09 PM
Because with larger drives, it starts making a lot of sense to pack more information into a single inode. If they did actually make this change, then it was a change dictated by necessity.

Thanks for that clarification.

esayolay
04-11-2008, 02:35 PM
I like to eat grub for dinner.
i get an error if i eat 2 many though...