[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: grub error 22. Bad partition table?



On Wed, 2004-11-24 at 23:25 +0100, Duncan Lithgow wrote:
> Tired of pulling out my hair I'll see if I can get some help here.
> 
> The problem:
> 
> On my single physical drive, partitioned, dual boot system with xp and 
> FC2, grub can no longer boot to any of the fc2 kernels, I can only get 
> WinXP to run.
> 
> This started after I did two things. 1st I ran QTparted from knoppix on
> my system to get rid of a small partition which nothing else could seem
> to delete. It was the first partition of my extended partition
> (hda3?).

Partitions in extended partitions start at number 5, so it was probably
hda5. Deleting this partition will, as far as grub is concerned, have
reduced the partition number of every later partition by 1.

> PartitionMagic had complained 'unknown partition type' when I 
> tried with it, even though it shows up as being fat32 - which is what I 
> originally made it as. Because my wife has nearly killed me several 
> times when I screw up the computer so she can't use it, the second thing 
> I did was run windows rescue mode (or whatever it's called) and ran 
> fixboot. This got WinXP back for me.
> 
> Here's what I've been trying to fix this: (I've added the '>'s hoping 
> it'll be easier to read for you)
> 
> my first error message, looking rather grim was:
> 
>  >GRUB Loading stage1.5.
> 
>  >GRUB loading, please wait...
>  >Error 22
> 
> If I put the Fedora Core 2 CD1 in and run root>linux rescue I get the
> following:
> 
> >An error occured trying to mount some or all of your system. Some of 
> >it may be mounted under /mnt/sysimage
> 
> If I then press F3 (or whichever one it is) I get some more info as follows:
> 
> ><3>FAT:bogus number of reserved sectors
> ><4>EXT2-fs warning:mounting uncheked fs ...
> >..
> ><6>EXT3 FS on hda8, internal journal
> ><6>EXT3-fs:mounted filesystem with ordered data mode
> ><6>Kjounrnal starting. Commit internal 5 seconds
> ><6>EXT3 FS on hda8, internal journal
> ><6>EXT3-fs:mounted filesystem with ordered data mode
> ><6>Kjounrnal starting. Commit internal 5 seconds
> ><6>EXT3 FS on hda8, internal journal
> ><6>EXT3-fs:mounted filesystem with ordered data mode
> 
> (yes, it repeats itself)
> 
> So, I run grub (version 0.94) to see of it can fix things:
> 
> >grub>root (hd0,8)
> >Error 22: No such partition

Your original partition (hd0,8) will have moved to be (hd0,7) now due to
the deleted (hd0,4) [hda5].

> >grub>root (hd0,7)
> >filesystem type is ext2fs, partition type 0x83

And there it is.

> >grub setup (hd0)
> >checking if "/boot/grub/stage1" exists... yes
> >checking if "/boot/grub/stage2" exists... yes
> >checking if "/boot/grub/e2fs_stage1_5" exists... yes
> >running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
> >succeeded
> >running "install /boot/grub/stage1 (hd0)(hd0)1+15p (hd0,7)/boot/grub/stage2/boot/grub/grub.conf"...
> >succeeded
> >Done
> 
> Looks fine, but makes absolutely no difference.

You've reinstalled grub but are using the same grub.conf file, which
still refers to (hd0,8) in the "kernel" lines for the root partition.

> I think it was at about
> this stage that I ran the window xp install disk recovery console and
> ran fixboot. Now (because XP was my default in grub) windows starts
> fine. On each startup it gets to the grub os selection screen (which is
> missing but apparently running in the background). If I do nothing XP
> starts fine after timeout=10.
> 
> If, instead of allowing it to boot to XP I press the up arrow and select 
> one of the linux kernels I get:
> 
> To see what the problem is I tried to run PartitionMagic and it reported:
> 
>  >Booting 'Fedora Core[whichever kernel'
>  >root (hd0,8)
>  >Error 22: No such partition
>  >Press any key to continue...

Select the entry you want to boot and press "e" to edit the entry.
Change the reference to (hd0,8) to say (hd0,7) instead. Then try
booting. Once you're booted, edit grub.conf and fix all references to
(hd0,8).

> ... which takes me back to timeout=10 again. So I put in the 
> PartitionMagic disk hoping to learn something...
> 
> >Partition table error #114 found
> 
> There's no info on the net about error #114, so I don't know exactly
> what #114 is. It's in the category which means something is wrong with 
> the partition table.
> 
> So, grub is telling it that it's been told root is hda8,

No it isn't. grub starts counting partitions at 0, not 1.

Paul.
-- 
Paul Howarth <paul city-fan org>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]