Master Boot Record and Boot Manager
GRUB2 is the boot manager installed in Ubuntu by default. If you use the Alternate CD you can choose GRUB or Lilo instead. GRUB2, GRUB and Lilo are open source boot managers that install the main parts of the boot loaders inside Ubuntu. This means Ubuntu is independent and avoids any need for writing to other operating systems. To accomplish this, the only thing in your computer outside of Ubuntu that needs to be changed is a small code in the MBR (Master Boot Record) of the first hard disk. The MBR code is changed to point to the boot loader in Ubuntu. You will be presented with a list of operating systems and you can choose one to boot. If you do nothing the first option will boot after a ten second countdown. If you select Windows then GRUB or Lilo will chain-load Windows for you at the Windows boot sector, which is the first sector of the Windows partition.
If you have a problem with changing the MBR code, you might prefer to just install the code for pointing to GRUB to the first sector of your Ubuntu partition instead. If you do that during the Ubuntu installation process, then Ubuntu won't boot until you configure some other boot manager to point to Ubuntu's boot sector. Windows Vista no longer utilizes boot.ini, ntdetect.com, and ntldr when booting. Instead, Vista stores all data for its new boot manager in a boot folder. Windows Vista ships with an command line utility called bcdedit.exe, which requires administrator credentials to use. You may want to read http://go.microsoft.com/fwlink/?LinkId=112156 about it.
Using a command line utility always has its learning curve, so a more productive and better job can be done with a free utility called EasyBCD, developed and mastered during the times of Vista Beta. EasyBCD is very user friendly and many Vista users highly recommend it.
Installing Windows After Ubuntu
Normally when Windows is installed after Ubuntu the "Master Boot Record", MBR, will be overwritten. You can bootup off a LiveCDand repair the MBR. However, there are 2 different approaches:
Recovering GRUB after reinstalling Windows
Please use this guide :
Master Boot Record backup and re-replacement
Back-up the existing MBR, install Windows, replace your backup overwriting the Windows boot code:
1. Create an NTFS partition for windows (using fdisk, GPartEd or whatever tool you are familiar with)
2. Backup the MBR e.g. dd if=/dev/sda of=/mbr.bin bs=446 count=1
3. Install windows
5. Mount your root partition in the LiveCD
6. Restore the MBR e.g. dd if=/media/sda/mbr.bin of=/dev/sda bs=446 count=1
7. Restart and Ubuntu will boot
8. Setup grub to boot windows
No comments:
Post a Comment