grub-install seems to be wiping my partitions

Jeff Vian jvian10 at charter.net
Tue Apr 5 06:46:12 UTC 2005


bad form to reply to myself, but I want to clarify.

On Mon, 2005-04-04 at 22:28 -0500, Jeff Vian wrote:
> On Mon, 2005-04-04 at 17:13 -0400, Duncan Lithgow wrote:
> > Sounds strange to you too? It does to me, here\s what\s happening...
> > 
> > I recently installed win2000 at the front of my drive, knowing it
> > would mess my boot loader (grub) but expecting I could fix it, I have
> > before.
> > 
> > So I threw in FC3 disk one, got to the command line chrooted to
> > /mnt/sysimage and ran grub/install hd0. Maybe that wasn\t a good idea
> > after all...
> > 
> hd0 is not a valid name in fedora.   Did you mistype and mean hda, or
> did you maybe do /dev/hda0 (again invalid)?
> 
hd0 is not a valid device name, although it is used by grub in the
device map.

> > On rebooting it seemed to work when I booted into windows so I thought
> > I\d try fc3 and rebooted. Grub Error 22, something about can\t find
> > stage1-5. So, I put FC3 Disk1 in again and ran that - this time it
> > refuses to mount the old system saying "no linux partitions found" -
> > my blood pressure rises...
> > 
> > I thought "that can\t be and threw in PartitionMagic - "partition
> > Table error", So I tried Knoppix, it found two drives, one the win2000
> > partition and the other and unmountable, unrecognised section. It
> > should have found about 7.
> > 
> > So, I guessed that I\d somehow lost my partitions and went looking for
> > a solution. Found TestDisk, got win2000 installed again - that being
> > the only partition I could risk playing with. Ran TestDisk, great wee
> > program, worked fine, found the 'deleted' partitions and restored them
> > - windows could see the big fat32 partition with all my non-system
> > files and things looked good. But then as I went through the process
> > of getting grub working, same as above - it did the same thing again.
> > 
> The instructions for reinstalling grub on a dual boot system with a
> simgle IDE drive are:
> 
> 1. boot to rescue mode (you have done that several times)
> 2. chroot /mnt/sysimage (you did that as well)
> 3. grub-install /dev/hda (your text above says you may have flubbed this
> step)
> 
> If you use any other partition name it WILL NOT get written to the MBR,
> and MAY corrupt your drive (as you have done).
> 
Unless grub-install is able to use the device map and get the physical
device it will not get properly written to the MBR.  I do not know if it
can do that or not since I have never tried.

I have always used the actual device name ( /dev/hda ) with no problems.

> > So now I\m using gmails web interface and Knoppix and hoping someonw
> > knows what's going on - I'm going to bed.
> > 
> > Duncan
> > 
> 




More information about the users mailing list