This is a discussion on How to restore the GRUB boot loader when you loose the boot sector in a dual boot PC? within the Operating Systems forums, part of the Computer Hardware/Software and Networking category; How to restore the GRUB boot loader when you loose the boot sector in a dual boot PC?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| GRUB is the default boot manager in linux. It helps to choose the desired OS to boot on the booting stage.It shows a list of OS, so that we can choose anyone to boot. GRUB is so powerful that can understand the file system without booting the system. n the dual boot machines, often the windows should be reinstalled because of various reasons. When we do the reinstallation of windows, it erases the GRUB which resides at MBR normally. So, after re-installing windows, Most of newbies think that we have to re-install linux too. No. No. No. Linux never went out. It is safely in its partition only, until you deleted that partition. Only the GRUB is washed out by windows. we can recover it easily. Here are some ways to do it. Needed Materials: 1. Any LiveCD or Live DVD like ubuntu, knoppix or The installation CD of your or any Distro. Way - 1: 1. Pop in the Live CD, boot from it until you reach the desktop. 2. Open a terminal window or switch to a tty. 3. Type “grub” 4. Type “root (hd0,6)”, or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for grub). 5. Type “setup (hd0)”, or whatever your harddisk nr is. 6. Quit grub by typing “quit”. 7. Reboot. Way -2: 1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or similar. 2. Open a Terminal. Go SuperUser (that is, type “su”). Enter root passwords as necessary. 3. Type “grub” which makes a GRUB prompt appear. 4. Type “find /boot/grub/stage1?. You’ll get a response like “(hd0)” or in my case “(hd0,3)”. Use whatever your computer spits out for the following lines. 5. Type “root (hd0,3)”. 6. Type “setup (hd0)”. This is key. Other instructions say to use “(hd0)”, and that’s fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as “(hd0,3)”. 7. Type “quit”. 8. Restart the system. Remove the bootable CD. Way - 3: 1. Boot with any live CD (I’ve done it with Knoppix 3.x and Ubuntu) 2. Get a root shell and make a folder (mkdir ubuntu) 3. mount the root (/) partition of ubuntu (e.g. mount /dev/hdb ubuntu if you have two disks) 4. chroot the mounted partition (chroot ubuntu) 5. grub-install /dev/hda 5. Exit the shell 6. Reboot |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Intel or AMD (dual core) | ventyra | Computer Hardware | 2 | 12-25-2007 07:50 AM |
| Restore CentOS if crashed | $enthil | Operating Systems | 4 | 09-12-2007 06:19 AM |
| Vista - Dual Booting XP with pre-installed | bluesky | Operating Systems | 1 | 08-17-2007 06:57 AM |
| Default Boot Device | vigneshgets | Operating Systems | 0 | 07-18-2007 03:36 AM |
| Intel's Dual Core | juol | The Lounge | 2 | 03-14-2007 09:49 PM |