Andy's Unix FAQ

My boot loader vanished after I installed Windows !
Also in this FAQ - How to restore your Windows Boot block ("MBR")


Unix FAQ Menu
Contents
Basic commands
Cron
Creating CDs
Device Files
DHCP server (Solaris)
Filesystem explained
Fsck
grub/lilo vanished!
Linux applications?
Linux databases?
Linux distributions
Serial Console
Solaris devices
Solaris disks - Intro
Solaris disks - Adding
Solaris x86 install
SQL/Shell script
Syslog/Monitoring
Time Synchronisation.
Virtual Memory
Web Multi-Language
Web Server Errors
Humour
Unix a Prank



 

Excellent This page has received an average rating of 93% from 8 readers

Question:

Subject: boot loader
hi,

i installed redhat 7.3 in my computer with grub as my boot loader. i also installed windows xp. when i reboot my system my grub disappeared! how do i restore this?

thanks
gie

Answer:

This is a very common problem and is probably covered in a linux FAQ somewhere...

I guess you installed grub in the master boot record. Installation of recent windows variants (NT, 2000, 98, XP, ME) check the MBR and rewrite it if the contents seem corrupt. This is most likely how your grub installation got scrubed.

You need to boot a linux system from either a rescue floppy or your Redhat media ("rescue" boot). Then you can re-install grub. You should read the grub documentation on this ("info grub"), but for most systems this is simply a case of running;
# grub-install /dev/hda

If you were using Lilo as your boot loader the command would be;
# /sbin/lilo

TIP:
If you expect to have multiple operating systems on a PC (esp. if one is a MS one) it's better to install the boot loader (grub/lilo) in your linux partition, rather than the MBR. In this way Windows won't mess with it.

Restoring DOS/Windows MBR
If you arrived at this page looking for how to replace the grub/lilo MBR with the standard DOS version then you probably don't know about the DOS command;
     FDISK /MBR
This undocumented option to Fdisk causes it to re-write the MBR. Using this will make your Linux system unbootable but not irrecoverable - use a rescue floppy or CD.


Feedback

I hope you found this FAQ to be of some use. It would be most helpful if you could rate it below. All fields are optional...
Please do not use this form to seek free technical assistance - Try AllExperts...

Excellent Your Email:
Good Comments or Suggestions
Useful
Slightly useful
Not useful
        


Home Thai Guide   Great Circle Calculator WorldClock AMS Services Contact us