Showing posts with label gruberror. Show all posts
Showing posts with label gruberror. Show all posts

Wednesday, January 21, 2009

Grub Fix - Windows

Uninstall Grub (fix bootMBR) to restore Windows xp bootmbr


For old PCs, just use Windows XP install disk to repair it by use fixboot and fixmbr commands.

For PCs with SATA disks, the windows XP install disk can not fix the boot problem. You need use Windows Vista install DVD to fix the Grub problem.

How to use Windows Vista install DVD to fix the boot problem?

1. Put the Windows Vista installation disc in the disc drive, and then start the computer (set to boot from CD in BIOS).
2. Press a key when you are prompted.
3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
4. Click Repair your computer.
5. Click the operating system that you want to repair (Vista in this case), and then click Next.
6. In the System Recovery Options dialog box, click Command Prompt.
7. Once in the command prompt, type exactly Bootrec.exe /FixMbr and then press ENTER. You will see "operation completed successfully."
8. Reboot and set BIOS to boot from the HDD again.

GRUB will be overwritten in step 7 and your old bootloader (windows xp, windows vista) will once again take control of loading your OS(s).

Grub Fix - Ubuntu

Grub Fix – Ubuntu


Installing Windows After Ubuntu

Normally when Windows is installed after Ubuntu the master boot record will be overwritten. This means that you would have to boot off a LiveCD and re-install grub. The steps are


#sudo grub


From the grub

Type


grub> find /boot/grub/stage1 (If you installed a /boot partition, do find /grub/stage1)

(hd0,1)

(hd0,5)


It dispay partition which contains your grub files. I have two linux OS installed.

Then run the following command


>root (hd0,1)
>setup (hd0)

(hd0) = the MBR for the hard disk which is where grub needs to install itself too for it to load on bootup.