View Single Post
  #9   (View Single Post)  
Old 5th June 2010
Marrea Marrea is offline
New User
 
Join Date: Jun 2010
Posts: 3
Default

I stumbled upon this forum while searching the Internet for information about using BCD to dual boot Windows 7 and Linux and have to say it is the most comprehensive set of instructions I have managed to find yet, so should like to compliment ocicat on his extremely well set out guide. I am fairly experienced in using boot.ini to dual/multi boot Windows XP and Linux on a single hard drive but have still to get my head round the new BCD, especially with the added complication of a second hard drive as I now have.

I hope I may be allowed to post here. Although I am using Linux rather than OpenBSD the principles are surely pretty much the same (identical?) and therefore my queries hopefully will be of interest and relevance to OpenBSD users.

My situation is as follows.

I have two separate hard drives. My main C: drive contains Windows 7 Home Premium 64 bit, which came pre-installed with the computer. The second hard drive was originally empty.

The C: drive has two partitions, shown in Windows Disk Management as follows:
1. System Reserved, 100 MB NTFS, Healthy (System, Active, Primary Partition)
2. (C:), 232.79 GB (NTFS), Healthy (Boot, Page File, Crash Dump, Primary Partition)

The second hard drive now has two partitions, which I created using Windows Disk Management, prior to installing Ubuntu 10.04 64 bit as follows:
1. /dev/sdb1, Linux root partition, Ext4, 230.88 GB
2. /dev/sdb2, Linux swap partition, 2.00 GB

I placed Ubuntu’s Grub on its root partition. I then took a copy of the Linux bootsector, which I called linux.bin.

My first problem was knowing where on Windows to place the copy of the Linux bootsector. I have read elsewhere that it needs to be in the same location as the bootmgr file. Unfortunately I am not quite sure where bootmgr is on my system. A Windows search for bootmgr shows nothing. (And, yes, I do have all the various options ticked to (i) show hidden files, folders and drives, (ii) show protected system operating files, (iii) when searching non-indexed locations include system directories.) If I use Windows Explorer to do a manual search, there is no bootmgr in the root C: drive. However in C:\Windows\Boot\EFI\en-US\ there is a file called bootmgr.efi.mui, along with bootmgfw.efi.mui and memtest.efi.mui. I am not sure whether this efi file is the bootmgr file. The only other place I can think it might be is in the 100 MB System Reserved partition but, if so, I have no idea how one would copy a file into that partition. So I simply copied the Linux bootsector to the Windows root C: drive and hoped for the best.

Next I edited BCD, but first taking the precaution of doing a backup:
Code:
C:\Windows\system32>bcdedit /export "C:\BCDBackup"
The operation completed successfully.
and then proceeded to follow ocicat’s instructions as follows:
Code:
C:\Windows\system32>bcdedit /create /d "Ubuntu 10.04" /application bootsector
The entry {66a21b2f-62f1-11df-9194-d9f24e40b78f} was successfully created.

C:\Windows\system32>bcdedit /set {66a21b2f-62f1-11df-9194-d9f24e40b78f} device boot
The operation completed successfully.

C:\Windows\system32>bcdedit /set {66a21b2f-62f1-11df-9194-d9f24e40b78f} device partition=c:
The operation completed successfully.

C:\Windows\system32>bcdedit /displayorder {66a21b2f-62f1-11df-9194-d9f24e40b78f} /addlast
The operation completed successfully.
bcdedit then showed:

Code:
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {66a21b2b-62f1-11df-9194-d9f24e40b78f}
displayorder            {current}
                        {66a21b2f-62f1-11df-9194-d9f24e40b78f}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {66a21b2d-62f1-11df-9194-d9f24e40b78f}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {66a21b2b-62f1-11df-9194-d9f24e40b78f}
nx                      OptIn

Real-mode Boot Sector
---------------------
identifier              {66a21b2f-62f1-11df-9194-d9f24e40b78f}
device                  partition=C:
path                    \linux.bin
description             Ubuntu 10.04
However, on reboot when selecting the Ubuntu 10.04 entry from the Windows boot menu all that happened was I was taken to a black screen with a flashing white cursor in the top left hand corner.

So my queries are:

1. Have I copied the Linux bootsector to the right location on Windows?
2. Does the black screen with the flashing cursor indicate that my bcdedit commands were correct but there is instead a problem with Ubuntu’s Grub which is preventing it booting and that is where I need to investigate?
Reply With Quote