bug-grub
[Top][All Lists]
Advanced

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

Re: [Bug-grub] I am very stupid: 'grub-install hda1'


From: Joseph Lorenzo Hall
Subject: Re: [Bug-grub] I am very stupid: 'grub-install hda1'
Date: Fri, 14 Jun 2002 16:35:34 -0700 (PDT)

Problem solved:
http://astro.berkeley.edu/~jhall/grub_install_hda1.html

This may seem obvious to most of you but it wasn't for me so I include
this for the archives:

Basically, I did this:
1. Zero out MBR. (but not all of it!) You need to use 'dd' to erase
   the MBR. For my machine the command was:

dd if=/dev/zero of=/dev/hda bs=446 count=1

   Why the 'bs=446'? Because the rest of your MBR holds the partition
   table for the drive... which you do not want to destroy. (note how
   'hda' in this context refers to the MBR where, in general, 'hda' is
   the first hard drive in your system)

2. Zero out the boot sector of the Windows partition. Once again, for
   my system, the commad was:

dd if=/dev/zero of=/dev/hda1 bs=512 count=1

   This erases the boot sector of the first partition on hda.

3. Re-write a Windows MBR. You'll need to boot into DOS with your
   trusty Windows boot disk and do:

fdisk /mbr

4. Copy Windows system files to boot sector of Windows partition. Do:

sys a: c:

   Which tells DOS to copy the system files from a: to the boot sector
   of c:.

5. At this point your computer should be able to reboot into Windows
   as if you just had Windows installed. Try it by rebooting.

6. If all has gone well, you can reinstall GRUB.

7. Now is a good time to make copies of the boot sectors of all your
   partitions and your MBR. Then you can use 'dd' to replace them if
   anything should go wrong in the future.

8. Pat yourself on the back... you deserve it.


------------------------------------------------------------------
Joseph Lorenzo Hall                     address@hidden
Graduate Student                        astron.berkeley.edu/~jhall
Astronomy Department
601 Campbell Hall                       voice: (510) 643-8592
University of California at Berkeley    fax  : (510) 642-3411
Berkeley, CA 94720-3411                 face : 753B Campbell






reply via email to

[Prev in Thread] Current Thread [Next in Thread]