cannot reinstall grub after windows xp messes up partitions

Craig White craigwhite at azapple.com
Sun Apr 3 05:21:31 UTC 2005


On Sat, 2005-04-02 at 18:19 -0800, Evan White wrote:
> I'm running a Windows XP / FC3 dual-boot system on a
> Dell Inspiron 9300 laptop and it was running fine. 
> Here's the partitions from fdisk:
> 
> device     start end   Blocks    Id   System
> /dev/sda1  1     4462  35840983  7    HPFS/NTFS
> /dev/sda2  4463  8287  30724312  f    W95 Ext'd (LBA)
> /dev/sda3  8288  8300  104422    93   Amoeba
> /dev/sda4  8301  12161 31013482  8e   Linux LVM
> /dev/sda5  4463  8287  30724281  b    W95 FAT32
> 
> Inside the LVM, there is a 2 GB Swap and the rest is
> /.
> 
> I noticed that the Linux parition showed up in Windows
> as F: and was concerned that Windows would somehow
> corrupt the partition if it was mounted, so I looked
> for ways to hide that partition from Windows.  I ended
> up changing my grub.conf file to include this line in
> the Windows section: hide (hd0,2)
> 
> In hindsight, perhaps it should have been (hd0,3).
> 
> Anyways, upon reboot into Windows, I could tell that
> Windows did something before I logging me in.  It went
> to that light blue screen that it uses for scandisk
> for about 2 seconds, then it logged me in.  The F:
> drive was still visible, and when I rebooted, I got
> the following error:
> 
> GRUB Loading stage1.5
> 
> GRUB loading, please wait...
> Error 17
> 
> 
> Well I've seen this before, so I booted to my FC3 disk
> and typed "linux rescue"  then "chroot /mnt/sysimage".
>  I checked my grub.conf, which reads:
> 
> title Fedora Core (2.6.10-1.770_FC3)
> 
> 
> Then I ran "grub-install /dev/sda" and got this:
> 
> The file /boot/grub/stage1 was not read correctly.
> 
> I didn't know what that was all about, but after
> looking around, I found people suggesting the
> following:
> 
> #>grub
> grub> find /boot/grub/stage1
> 
> To which I received:
> 
> Error 15: File not found
> 
> I am, however, about to browse to /boot/grub/ and I
> can see the stage1 file.  But for some reason grub
> can't find it.  Someone suggested using grub.img, but
> I don't have a floppy drive.  I do, however, have
> network/internet access still enable thru FC3 rescue
> mode. 
> 
> Questions:
> 
> Firstly, is the hide command the best way to keep
> Windows away from the Linux partition?  What is the
> best way?
> 
> Secondly, how do I reinstall grub successfully?
----
my nephew - I told him that someone on this list would be able to help
him work this problem through.

The partition table looks odd to me

what the heck is an 'amoeba' partition? /dev/sda3 ?

That doesn't make any sense whatsoever.

Also with an anaconda install, it is generally the 4th partition that
generally would be an 'extended' partition upon which the 5th and
subsequent partitions would be located.

Thus one of my systems with lots of partitions looks like this...

Disk /dev/hda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14         666     5245222+  83  Linux
/dev/hda3             667        1188     4192965   83  Linux
/dev/hda4            1189        3649    19767982+   f  W95 Ext'd (LBA)
/dev/hda5            1189        1449     2096451   83  Linux
/dev/hda6            1450        1580     1052226   82  Linux swap
/dev/hda7            1581        1711     1052226   83  Linux
/dev/hda8            1712        3649    15566953+  83  Linux

note that the 4th partition is a type 'f'

now on the only system that I have that is LVM...(and in reality, is 3
SATA drives in a Raid 5 array)

Disk /dev/sda: 319.9 GB, 319930630144 bytes
255 heads, 63 sectors/track, 38896 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           8       64228+  de  Dell Utility
/dev/sda2   *           9          21      104422+  83  Linux
/dev/sda3              22       38896   312263437+  8e  Linux LVM

so I suspect that something happened to the partition table that needs
to be fixed and I don't know how to accomplish that - hopefully someone
else can tell you a way to fix it.

Craig




More information about the fedora-list mailing list