Grub error 22 after update

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Grub error 22 after update

Postby mark9117 » Dec 15th, '11, 20:48

I'm at work and don't have the system at hand, but I'm trying to install Mageia 1 on my htpc. The system involves 2 SATA drives and 1 ide drive. The system drive is on one of the sata drives. I've been wrestling with this thing for a while now.

What's happening is that I am installing on an SATA driver that is in the BIOS boot list. Mageia installs and boots just fine until updates.

At some point in the update process, the system hangs and I have to reboot. On reboot, I'm getting grub error 22 file not found and the line from grub that identifies the drive and image it's trying to boot from. On failure, the line identifies the drive as sda(0,0). The fstab line identifies the drive as sdb(0,5) Ithink - remember, the system is at home and I am not.

I've googled around on this and found information on it, but most of what I'm finding uses mount points and not uuid's. I'm also pretty confused about which device/partition grub wants in that line. The device map is pretty clear about which device is which, but for some reason, despite the fact that I've been using Mandriva since about 1993, I'm getting confused about the partitions and am not quite sure how to start hacking around on this grub menu.list file.

Can somebody point me to a primer on this?

Thanks.


Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Grub error 22 after update

Postby doktor5000 » Dec 15th, '11, 21:24

Please show at least your /boot/grub/device.map and /boot/grub/device.map.old and as root the output of
Code: Select all
fdisk -l
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18054
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Grub error 22 after update

Postby merlin » Dec 24th, '11, 18:23

As you have 3 hard drives in your system, the BIOS makes a choice of which hard drive to try to boot off. You can manually select the drive to boot off on each boot-up so avoiding any confusion of which drive the BIOS is automatically (randomly?) selecting. Depending on the BIOS press, F10, F11 or F12 during the initial PC boot-up screen to select the BIOS boot menu. Find the right drive and select that. Does the system now boot OK ?

It is possible that more than 1 or your hard drives contains grub on the hard drive's Master Boot Record (MBR) and the BIOS is selecting the wrong drive causing a bogus grub to run and fail (as /boot is not on that hard drive).

grub numbers partitions differently to /etc/fstab. eg.
fstab grub
sda1 => hd(0,0)
sdb5 => hd(1,4)

This can lead to confusion. Note that BIOS always numbers the boot drive as hd(0). I think a device map file in /boot can override the default numbering.

What you need to do is confirm that the right menu.lst file is being found and used.

Another word of warning is that the /boot entry in fstab does not select the /boot partition for booting, this is done in grub's menu.lst file. The /boot entry in fstab allows the system to access the files in /boot after boot-up has taken place. However, the /boot entry in fstab could potentially be pointing to the wrong boot partition so care needs to be taken.
merlin
 
Posts: 39
Joined: Dec 23rd, '11, 00:09

Re: Grub error 22 after update

Postby mark9117 » Dec 26th, '11, 10:35

merlin wrote:What you need to do is confirm that the right menu.lst file is being found and used.

Another word of warning is that the /boot entry in fstab does not select the /boot partition for booting, this is done in grub's menu.lst file. The /boot entry in fstab allows the system to access the files in /boot after boot-up has taken place. However, the /boot entry in fstab could potentially be pointing to the wrong boot partition so care needs to be taken.


Sorry it took me so long to get back to this. Bottom line here is that I was shipped a defective hard drive. Beyond that, I have determined that the bios in the computer in question allows one hard drive to appear in the boot device list and it's a little tricky to get that drive to show up in the list. Once that's done, you can set the machine to boot from that device. Which device would that be?

Code: Select all
fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x72ba2115

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       30401   244196001   83  Linux

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1275    10241406    7  HPFS/NTFS
/dev/sdb2            1276       38913   302327235    5  Extended
/dev/sdb5            1276        1784     4088511   83  Linux
/dev/sdb6            1785        2293     4088511   82  Linux swap / Solaris
/dev/sdb7            2294        3312     8185086   83  Linux
/dev/sdb8            3313        3950     5124703+  83  Linux
/dev/sdb9            3951        7259    26579511   83  Linux
/dev/sdb10           7260        7583     2602498+  83  Linux
/dev/sdb11           7584       21525   111989083+  83  Linux
/dev/sdb12          25526       38913   107539078+  83  Linux
/dev/sdb13          21526       25525    32129968+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8aa3d05b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       60801   488384001   83  Linux


As near as I can tell, I managed to install a bootloader all three of these drives. The only one that actually works is sdb. Not sure why the other bootloaders can't find the partition in question, but they can't and it doesn't matter.

Once everything is configured, it boots. With these three drives in the box, there was a bit of shuffling around to be done, but eventually I got it and was able to boot the original system disc. I'm pretty sure this drive is failing and needs to be replaced soon, but for now, I'm good.

I'll be back for more later.

Thanks for the info.


Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Grub error 22 after update

Postby mark9117 » Dec 27th, '11, 05:31

Okay, it locked up and failed to boot again this evening. I shut it down, let it cool off for 5 minutes unplugged from power and it still wouldn't boot.

The issue is grub error 22. It cant seem to find gfxmenu on hd1(7,0). I have established that I'm trying to boot off drive 1 and the above excerpt from fdisk clearly shows that it is partition 7 that is the "/boot" partition. I have Mageia 1 live booted on it now and I can see that there is a gfxmenu file of 608.5 KB in /boot on the disc in question. I am not sure why I can see it under a different OS but it can't find it when trying to from that drive. Puzzling.

If anybody can throw me a clue, I'm interested.

Mark

Edit: fired up the Mageia DVD in rescue mode and tried to reinstall the bootloader. I got a "guessmounts failed at /usr/bin/install_bootloader line 28". I'm still looking for a fix for that, but if anybody has a clue....

Edit Edit: Doing the above mounted the existing partitions under /mnt. I see nothing in the existing "/boot" partition -- it's just empty. I'm supposing hardware failure would cause the intermittent loss of a single partition like this?
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest