GRUB errors 16 and 18

I am having a very strange problem with GRUB: it refuses to boot from certain partitions, and in a very strange way. This is what I’ve noticed so far:

  • When using GRUB in the default OpenSUSE 11.3 graphical interface and trying to boot it, GRUB almost always gives me Error Message 16: Inconsistent filesystem structure. The GRUB manual says that "This error is returned by the filesystem code to denote an internal error caused by the sanity checks of the filesystem structure on disk not matching what it expects. This is usually caused by a corrupt filesystem or bugs in the code handling it in GRUB. " I’ve ran fsck on all the partitions and neither of them has any corruption.
  • When I switch to the non-graphical GRUB window, the message changes to Error Message 18: “Selected cylinder exceeds maximum supported by BIOS”. The GRUB manual says that "This error is returned when a read is attempted at a linear block address beyond the end of the BIOS translated area. This generally happens if your disk is larger than the BIOS can handle (512MB for (E)IDE disks on older machines or larger than 8GB in general). " However, I haven’t touched any BIOS settings when the problem started to appear, and the BIOS is brand new anyway so it doesn’t have such limits.
  • When I try to boot directly from the command line, it roots to the boot partition just fine, but refuses to load the kernel, giving me the error 16 again.
  • When I try to boot Windows from the non-graphical GRUB list, it gives me the error 18 again, but it always succeeds when I do all the booting directly from the command line.
  • One time I was able to boot Linux from the command line by using rootnoverify instead of root, but never again since then.
  • One time it didn’t boot Windows even from the OpenSUSE graphical interface, error 18 again.
  • Sometimes it boots even Linux just fine, but it happens quite rarely now.

The problems started appearing just recently, and without any reason that I could think of. I also ran setup again in order to reinstall GRUB, and it worked for one boot, but not any more…

My partition list is like this:
(hd0,0) Windows 7 boot, NTFS, primary
(hd0,1) Windows 7, NTFS, primary
(hd0,2) Windows XP, NTFS, primary
(hd0,3) Extended
(hd0,4) /root, EXT3, logical
(hd0,5) /home, EXT3, logical
(hd0,6) swap, logical
(hd0,7) /boot, EXT2, logical

So, any suggestions on how to solve this problem? Or why it’s happening? Especially puzzling is the fact that the graphical interface and the text-based list react differently… Or maybe it’s just my luck?..

You can have this problem with some modern BIOS too if there are configured in IDE/SATA legacy mode (which is unfortunately the default on some mainboards) rather than AHCI and the boot partition is too far away. I had similar issues on Gigabyte mainboards.

Anything in Windows that may be overwriting the first track? There are several virus detection programs that may be fiddling with it. Try using a generic MBR and install grub to the boot partition setting the HD boot flag to that partition. BTW not sure why you have a separate boot partition that is not default install.

I have had set my BIOS to AHCI mode since the day I got this PC, so that’s definitely not the issue here…

Hmm, I might try installing it to the MBR, I have it installed only on the partition right now. And I believe that it’s already has the boot flag, but I’ll check to make sure.
I have the boot partition a separate one for convenience and safety purposes, since if there was something wrong with the Linux partition, I wouldn’t have any problems booting others.

I’ve installed it into the MBR now and booted once successfully so far. Will keep you posted if I get those errors again.

About the boot flag, it’s on the extended partition, so I assume that’s correct.

On 2010-11-03 16:06, GreatEmerald wrote:
>
> I am having a very strange problem with GRUB: it refuses to boot from
> certain partitions, and in a very strange way. This is what I’ve noticed
> so far:

Strange indeed.

> the BIOS can handle (512MB for (E)IDE disks on older machines or
> larger than 8GB in general). " However, I haven’t touched any BIOS
> settings when the problem started to appear, and the BIOS is brand new
> anyway so it doesn’t have such limits.

I’m not sure about that. 11.3 has weird reports of grub related to bios,
on machines that didn’t have problems in 11.2. It’s just a feeling I have.

> My partition list is like this:
> (hd0,0) Windows 7 boot, NTFS, primary
> (hd0,1) Windows 7, NTFS, primary
> (hd0,2) Windows XP, NTFS, primary
> (hd0,3) Extended
> (hd0,4) /root, EXT3, logical
> (hd0,5) /home, EXT3, logical
> (hd0,6) swap, logical
> (hd0,7) /boot, EXT2, logical

Mmm. I would have put /boot in the first logical partition. With grub
complaining about the bios, I would try that as a solution. It means
shrinking /root by 200 MB or so.

> So, any suggestions on how to solve this problem? Or why it’s
> happening? Especially puzzling is the fact that the graphical interface
> and the text-based list react differently… Or maybe it’s just my
> luck?..

No, not quite… there is an extra file to load, perhaps some code. And
it resides in the farthest partition.

Question: where is grub installed? In the MBR, or in the extended partition?


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)