Wednesday, December 10, 2014

How to boot win 7/8 from gpt disk in bios mode (no UEFI, no Hybrid MBR)

 Problem: Boot Win 7/8 from a gpt disk (sorry still requires an mbr style disk to be present)

Windows 7 or 8 can't boot from a gpt disk unless booted from UEFI firmware

Solution:
1- Use UEFI DUET: sufficient explanation and how to is available at http://www.rodsbooks.com/bios2uefi/

Disadvantages: Complicated set up, May not work on AMD cpus

2-Use Hybrid MBR: could be found at http://www.rodsbooks.com/gdisk/booting.html

Disadvantages: Hybrid MBR non-aware partition programs wont work. And each time gpt partitions are modified a specific tool is needed to update the hybrid MBR.

3- Boot from a MBR partitioned second Hard Disk or USB disk: http://www.sevenforums.com/installation-setup/320700-boot-windows-7-8-gpt-bios-system-no-hybrid-mbrs-duet.html

Disadvantages: Requires a second hard drive or USB disk to present at boot.

4- My proposed solution: Rather than using a MBR partitioned second physical disk use a MBR partitioned virtual disk:

Prerequisites:
1- Download GRUB4DOS
2- Linux OS

Steps:

1- Use windows "diskpart" or "disk manager" (gui) to build a virtual disk (winboot.vhd) 20 to 32 MB in size

2- Make partition on virtual disk and assign it active partiton using diskpart

3- Format the partition to FAT16 using either diskpart or windows gui

4- Mount and assign a drive letter to new partition using either diskpart or windows disk manager

5- Now copy boot files using "bcdboot c:\windows /s X: /f BIOS" (X is the newly mounted partitions drive letter)

6- Boot your linux OS and Launch a terminal app enter the directory where you extracted grub4dos. Superuser rights are needed for the following commands, use either ""sudo" or "su"

7- Assuming your disk is /dev/sda and your EFI system partition (FAT32) is /dev/sda1in linux. Mount your efi system partition "mount /dev/sda1 /boot/efi" (you may need to "mkdir /boot/efi" first) and copy grldr from grub4 dos to mounted partition "cp ./grldr /boot/efi"

6-  Now install grub4dos partition boot sector "./bootlace.com --floppy=0 --fat32 /dev/sda1".

7- Build a "menu.lst" file with the following content using your favorite text editor (nano, gedit, vim, ..)

----------------------------------------
title Windows 7/8
root (hd0,1)
map /winboot.vhd (hd2)
map --hook
root (hd2,0)
chainloader /bootmgr
---------------------------------------

Note: second line "root(hd0,1)" is assuming your windows partiton which winboot.vhd is second partition on your gpt disk fallowing EFI system partition if not change it accordingly.

8- Reboot and see if it works (worked for me)

No comments:

Post a Comment