One of the most annoying thing about re-install Windows XP in my dual-boot laptop is that MBR is overwritten. In other words, GRUB is lost and I cannot boot my beloved Ubuntu. So, I have to restore it with a few easy steps as follows:
- Boot the computer with Ubuntu Live CD.
- Once the booting process is finished and you reach the Desktop, open "Terminal"
- At the command prompt, enter the command below to load the GRUB shell.
$ sudo grub
- Then, the GRUB shell appears ("grub>"). Now, we have to find out which partition contains GRUB's files. We can do so by enter the following command at the GRUB shell.
grub> find /boot/grub/stage1
This command will print the list of partitions which contains the file. In my case, the file exists only in "hd(0,3)".
- Now, we have to tell GRUB where the files needed for setup are. So, we execute the "root" command with the partition name from the previous step.
grub> root (hd0,3)
- Run the following command to install GRUB to MBR.
grub> setup (hd0)
- Finally, we have to quit the GRUB shell by executing "quit" command.
grub> quit
- Restart your computer and you will see the GRUB menu again. \@/
Post new comment