http://www.iceflatline.com/2009/09/how-to-dual-boot-windows-7-and-linux-using-bcdedit/
Configuring for Dual Boot
Now that we have our disk partitioned and Fedora or Ubuntu installed, let’s set up our system to boot Windows 7 or the Linux distribution. This will involve copying the Master Boot Record of our Linux boot partition to Windows 7, and using BCDEdit to create a new entry in the BCD store that will point to that file. This way Windows 7 will display a menu at boot time that will give you a choice between Windows 7 and Linux.
Boot the system again using either the GParted disk or the Ubuntu or Fedora install disk you created and let’s make a mount point for the FAT32 share partition we created (I prefer using the GParted disk because it boots to a usuable state much faster). Open a terminal and enter the following:
mkdir /mnt/share |
mount /dev/hda6 /mnt/share |
dd if=/dev/hda3 of=/mnt/share/linux.bin bs=512 count=1 |
bcdedit /create /d “Linux” /application BOOTSECTOR |
bcdedit /set {ID} device boot
bcdedit /set {ID} device partition=c: |
bcdedit /set {ID} path \linux.bin |
bcdedit /displayorder {ID} /addlast |
bcdedit /timeout 30 |
Note: Fedora users will notice that GRUB uses the hiddenmenu option by default. This requires users to hit “Esc” within 5 seconds (another Fedora GRUB default) in order to see the full GRUB menu. Not selecting Esc results in GRUB booting to the OS selected as the default in the boot loader operating system list during installation, which, in our case, should be Fedora, if the steps above were followed. If you would like to defeat the hiddenmenu option and/or change the default timeout, boot Fedora and open a terminal. Change to root and make a back up copy of /boot/grub/grub.conf Now open the original file in your favorite editor and comment out the line hiddenmenu. You can also change the timeout value to something greater than 5 (seconds). Now you when you select the Linux option from the Windows boot loader you should see the full GRUB menu with the option of selecting Fedora or Windows 7 within the timeout value you selected.
On a final note, if at any time you want to eliminate the Linux menu option simply delete the BCD store entry you created using the following command:
bcdedit /delete {ID}
c:\>bcdedit
Windows XP?
If you plan to dual boot using Windows XP then you will still partition and install Ubuntu or Fedora as described above (Note, however, that XP does not use a small primary partition for boot configuration data like Windows 7 does), but you won’t be needing BCDEdit. Instead, you can simply open the boot.ini file located at C:\ and add the following entry:
c:\linux.bin="Linux" |
With a minimal amount time, the free and open source disk partitioning tool GParted, and a little command line foo, you can easily set up a system that can dual boot Windows 7 and your choice of Linux distributions.
References
http://technet.microsoft.com/en-us/library/cc709667%28WS.10%29.aspx
No comments:
Post a Comment