GRUB failure after WinXP re-install + CHS errors in SFDISK

Mikael Konttinen micken at home.se
Sun Jul 18 12:12:30 UTC 2004


Mugdha and Jim,
Thanks for your advice!

I tried that, doing a successful grub-install /dev/hda2. Though no luck.

Also, this time I realized that somewhere along the way the order in the
partition table has been changed! I guess it's more logic with this new
order, but still... Straaaange...

Earlier my disk looked like this:
/dev/hda1 NTFS WinXP
/dev/hda2 Container for extended partitions
/dev/hda3 /boot
(...)

Now, hda2 and hda3 have changed places, so that the disk looks like this:
/dev/hda1 NTFS WinXP
/dev/hda2 /boot
/dev/hda3 Container for extended partitions
(...)

Since the partitions changed places, I figured that should be the key to the
mystery, and so I edited my grub.conf to:

#boot=/dev/hda2
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title WinXP
    rootnoverify (hd0,0)
    chainloader +1
title Fedora Core (2.6.7-1.437.1.ll.rhfc2.ccrma)
    root (hd0,1)
    kernel /vmlinuz-2.6.7-1.437.1.ll.rhfc2.ccrma ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.7-1.437.1.ll.rhfc2.ccrma.img
title Fedora Core (2.6.5-1.358)
    root (hd0,1)
    kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.5-1.358.img


According to my logic the translation of partitions for GRUB should be like
this:

(hd0,0) /dev/hda1 NTFS WinXP
(hd0,1) /dev/hda2 /boot
(hd0,2) /dev/hda3 Container for extended partitions <-- last of primary
partitions
(hd0,4) /dev/hda5 Linux Swap <-- first of extended partitions
(hd0,5) /dev/hda6 Linux Root
(hd0,6) /dev/hda7 NTFS Data
(hd0,7) /dev/hda8 NTFS Data

...and the root (hd0,x) should be pointing at the /boot partition, and that
is also where the splashimage resides, which in this case is (hd0,1). Now
all (hd0,x) pointers should be corrrect, including splashimage, I think.
But, still no menu. Just the GRUB command prompt.


Here is the full readout from SFDISK and strange CHS errors that I don't
know what I should do about as I don't understand how disk geometry works.

sfdisk -l /dev/hda

Disk /dev/hda: 19457 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 1019 1020- 8193118+ 7 HPFS/NTFS
/dev/hda2 1020 1032 13 104422+ 83 Linux
/dev/hda3 1033 19456 18424 147990780 f W95 Ext'd (LBA)
              start: (c,h,s) expected (1023,254,63) found (1023,0,1)
/dev/hda4 0 - 0 0 0 Empty
/dev/hda5 1033+ 1096 64- 514048+ 82 Linux swap
              start: (c,h,s) expected (1023,254,63) found (1023,1,1)
/dev/hda6 1097+ 2039 943- 7574616 83 Linux
              start: (c,h,s) expected (1023,254,63) found (1023,1,1)
/dev/hda7 2040+ 14787 12748- 102398278+ 7 HPFS/NTFS
              start: (c,h,s) expected (1023,254,63) found (1023,1,1)
/dev/hda8 14788+ 19456 4669- 37503711 7 HPFS/NTFS
              start: (c,h,s) expected (1023,254,63) found (1023,1,1)

(manually tabbed in this post for easier overview and reading)

Please note that I did the SFDISK -H255/240 tricks before, but didn't get
WinXP booting anyway. Now XP is working but the failure lies in GRUB with no
menu and possibly booting Fedora Core 2, though since I've got no menu I
haven't got that far yet.

Maybe the SFDISK -Hxxx fix should be run with other numeric value to get the
2.6 kernel and Windows XP to live happily together? Any clues on how those
numbers are computed?


So, in short, there are two problems and one peculiarity:

Problem 1: After re-installation of Windows XP, GRUB loads to command prompt
but no longer displays a menu.
Problem 2: SFDISK reports CHS errors.
Peculiartity: Order of partitions have changed. Not much of a problem more
than an annoyance as grub.conf had to be edited.

..but could all of the above be connected, and how should it then be
handled?


Jim, yes. Backing up is definitely a good idea.
I'll try and start doing that regurarly from now on. :)


Yours
Mkn.


----- Original Message ----- 
From: "Ms Mugdha Jain" <mugdha at cse.iitb.ac.in>
To: "For users of Fedora Core releases" <fedora-list at redhat.com>
Sent: Sunday, July 18, 2004 12:17 PM
Subject: Re: GRUB failure after WinXP re-install


>
> Hi,
>
> Boot from a CD.
> Do : fdisk -l
> Now find out, which is your /boot partition.
> check that this is the same in your /boot/grub.conf
>
> now run /sbin/grub-install /dev/hda(or whatever is your primary hard disk)
> hope this will help.
>
>

and

----- Original Message ----- 
From: "Jim Cornette" <fc-cornette at sbcglobal.net>
To: "For users of Fedora Core releases" <fedora-list at redhat.com>
Sent: Sunday, July 18, 2004 1:16 PM
Subject: Re: GRUB failure after WinXP re-install


>
> It's great that you didn't lose your AV data.
>
> About grub after the reinstallation of XP. I had a similar symptom when
> upgrading systems before. I ended up booting from the first CD in
> rescue mode.
> linux rescue
> After getting into rescue mode, I typed the below to change the
> environment to the FC install.
> chroot /mnt/sysimage
> This gave me a shell with a bash prompt still, but the programs from FC
> worked fine.
> Now, I would rerun grub-install. This depends on where your boot
> partition is located snd on which partition is active for boot. In my
> case /dev/hda1. I believe that you have /dev/hda2 setup as active and
> as your boot partition.
> grub-install /dev/hda2
> This works for me with several FC installations on the same machine.
> Why it sometimes corrupts with reinstallations of one OS or another is
> beyond me.
>
> Good luck and hopefully this works for you. Backing up data is still
> wise to do though.
>
> Jim
>





More information about the fedora-list mailing list