[SOLVED] Need a Grub guru

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

[SOLVED] Need a Grub guru

Postby mark9117 » Dec 29th, '11, 04:45

This is actually a duplicate of the post at https://forums.mageia.org/en/viewtopic.php?f=7&t=1605, but that post is getting a little stale and I have more info.

My HTPC locked up and just failed to reboot last week. Attempted reboot saw the POST move really slowly taking almost 5 minutes to discover all attached devices. Attempting to boot from the hard drive results in gfxmenu not found (hd1,7) and then "grub error 22" no such partition.

The three HD's attached are S.M.A.R.T capable and enabled; all three show OK health. Seagate's diag run on the boot disc (a 320 GB Barracuda) shows the disc failing with age, but not imminently so.

When I boot into a GUI (Mageia live CD) I can use the partition manager to see /dev/sdb8 (/boot) full of the files and directories that you would see in the /boot directory. They're all there. But when I boot the Magia DVD into rescue mode and mount all the existing partitions under /mnt, I can see the /mnt/boot partition in the terminal, but it is empty.

The fdisk -l command yields:
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


Tried the following:

    1. Used cfdisk to turn off boot flags on sda and sdc. Verified boot flag set on sdb (hd1,7).

    2. Reboot. Observe gfxmenu not found (hd1,7) and then "grub error 22" no such partition.

    3. Booted Mageia DVD in rescue mode and attempted to reload boot loader - guessmounts failed at /usr/bin/install_bootloader line 28

    4. Reinstall grub:
    grub> root (hd1,7)
    grub> setup (hd1)
    grub> quit

    5. Reboot. Observe gfxmenu not found (hd1,7) and then "grub error 22" no such partition.

    6. Disconnected non-boot drives and tried it all over again - no change

I see 2 possibilities here:

1. The hard drive is failing. I attempted to replace that drive with a reconditioned 1TB drive that I had. Initial installation of Mageia 1 went well, but while attempting to update, after about 10 minutes or so, the update failed claiming that the file system was marked read only. This happened several times. I tend to suspect the disc but it's possible that...

2. The motherboard is failing. The glacially slow POST bothers me. It can take several minutes to detect the drives. It can also take several minutes to produce the BIOS menus or the boot device menu if one of those options is selected on boot. Once a boot device is selected, or if I just let it boot, it eventually (I'm talking 5 - 10 minutes) kicks that boot device and proceeds to boot the CD or fail on the hard drive as described above. The pace at which the POST proceeds is not consistent from boot-to-boot. Some are slower than others.

I have another hd ordered and if that one misbehaves, I'll start looking to replace the mobo, but if anybody out there has any wisdom on this before I start throwing time and money at it, I'd appreciate hearing from you about it.

Thanks much.

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: Need a Grub guru

Postby JoesCat » Jan 5th, '12, 10:43

When I boot into a GUI (Mageia live CD) I can use the partition manager to see /dev/sdb8 (/boot) full of the files and directories that you would see in the /boot directory. They're all there. But when I boot the Magia DVD into rescue mode and mount all the existing partitions under /mnt, I can see the /mnt/boot partition in the terminal, but it is empty.


If you think about this, this is correct behaviour. Under normal circumstances, when you boot-up, /boot is an empty directory in partition assigned to "/", and then it gets linked to /dev/sdb8 (according to the information posted in /etc/fstab) so that you then see the contents of /dev/sdb8.

to put it in another perspective, image you created a directory /mnt/x and if you look in /mnt/x it will appear empty, but if you were to then do:
mount /dev/sd_something /mnt/x

You would then see something in /mnt/x (which is whatever contents is in /dev/sd_something

If you see SMART reporting a poor drive, you should look at replacing the drive. You may start getting corrupt/fragments/sectors and not know it until some time later. Because of this, I find file systems that do a diskcheck every time your computer boots up will be quicker in pointing-out an error than file systems that do a cursory-quick check. In this case, this is where file systems like ext2 have an advantage over other file systems like perhaps ext3 or ext4 or any of the others that don't do a complete check (which is one reason ext2 boots up slower than other file systems, but in this case worth the trouble).

Did a quick look at your steps 1..6, but you have to think, is it worth your time trying to fix a partition on a drive that is crumbling around you, or is it just best to extract whatever latest files are of most value to you (if possible), and collect the rest from whatever backups you have been making in the past. 99% of the time nobody needs a backup, but it's times like this is when you are glad you've done one (or preferably many on a continuous rolling basis).
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada

Re: Need a Grub guru

Postby mark9117 » Jan 5th, '12, 17:14

Thanks for the reply JoseCat. I replaced the drive and it resolved all the boot issues. I have the drive in an external enclosure and it seems fine, but obviously there was an issue. Incidentally, the SMART info for this drive was fine. Seatools was telling me it was failing. As near as I could gather it was just suffering from old age and limited air flow (heat). That drive was at least six years old. It's behind me now.

Thanks again.

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.


Return to Basic support

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest