Jul 082009
 

After the first complications with the quadruple boot, I was facing new ones when I tried to do everything again on a new hard drive.
The installation order was 1. Windows XP 2. Windows 7 (which recognized the “old” XP and integrated it in the boot loader) 3. Ubuntu 9.04 4. OpenSolaris 2009.06
(for detailed partition info see quadruple-boot blog entry).

The boot process would then be like this:

  • load OpenSolaris GRUB from third primary
    1. boot OpenSolaris from third primary
    2. load Microsoft bootloader from first primary
    3. load Microsoft bootloader from second primary
      1. boot Windows 7 from C: (as first primary)
      2. boot Windows XP from E: (as second primary)
    4. boot Ubuntu (several entries for different kernels) from logical


It turned out that when installing Windows 7 over XP, it kept the second primary partition as booting partition and installed its bootloader there. Choosing load Microsoft bootloader from second primary in GRUB got me to the MS bootloader screen, where I was able to choose which Windows I would like to boot into. However, if I went for load Microsoft bootloader from first primary, I was getting this error message:
BOOTMGR is missing
Press Ctrl+Alt+Del to restart

or in German:
BOOTMGR fehlt
Neustart mit Strg+Alt+Entf

It means that there was no MS bootloader (of any sort) located on the first primary partition (obviously because Win7 kept the second primary as boot partition).
I was able to fix this by booting via the second primary partition into Windows 7 and running “bcdboot.exe C:\Windows C:” on the command line with elevated rights. This command would create the file C:\bootmgr as well as the directory C:\Boot (which contains the BCD registry file along with language files).
After that I was perfectly able to choose the entry from GRUB which would load the MS bootloader from the first primary partition.
(As a note: if you found this blog entry without having the same setup and a working Windows 7 or Vista installation, you can achieve the same effect via the Installation-DVDs. Maybe not via bcdboot but bootrec)

The second effect I encountered was, when I was trying to edit the text of the MS bootloader on the second partition (change “Earlier Windows version” into “Windows XP”), which is done via bcdedit.exe, all I found was this error message:
The boot configuration data store could not be opened.
The system cannot find the file specified.

in German:
Der Speicher für die Startkonfigurationsdaten konnte nicht geöffnet werden.
Das System kann die angegebene Datei nicht finden.

The reason for this is, bcdedit looks for its registry file (\Boot\BCD) only on the active partition. (You can check this on this Microsoft site)
Note: BE CAREFUL about the program with which you make a partition active! You can safely do this for example via GRUB or Gparted. I strongly discourage from using diskmgmt.msc (under Windows): it removed Ubuntu’s swap and root partition from the partition table and I had no choice but to reinstall Ubuntu (this might be a bug in the Win 7 RC, but I think it’s rather a bug in the disk management console itself).

So, after some fuss about changing the active partitions back and forth while setting messages for the (different) MS boot loader(s), I renamed (just in case) the folder \Boot and file bootmgr on the second(!) primary partition, leaving just NTLDR on it.
Because Windows XP was booting just fine, I am assuming, that an MS bootsector first looks for bootmgr and if it doesn’t find one, it looks for ntldr. (The reason why I believe this is, if I renamed the file ntldr as well, I got the above message about BOOTMGR missing).

The current setup now looks like this (after making the third primary, OpenSolaris, partition active again):

  • load OpenSolaris GRUB from thirrd primary
    1. boot OpenSolaris from third primary
    2. load Microsoft bootloader from first primary, which boots via bootmgr (into Win7)
    3. load Microsoft bootloader from second primary, which boots via ntldr (into WinXP)
    4. boot Ubuntu (several entries for different kernels) from logical

  4 Responses to “BCDboot and BCDedit”

  1. …to put that long post very short.

    Just RESTART before applying the: bcdboot d:\windows /s c: -command :)

  2. I’ve found out something really weird myself.

    After starting WinPE, diskparting your HDD to two partitions (one 200mb for bitlocker, will be assigned C-letter, and second for D – Windows) and applying .wim -image with ImageX, bcdboot doesn’t do ANYTHING. Yes, it says “bootfiles succesfully created”, but indeed that’s not the case. Still claims boot manager is missing, BUT…

    …after you re-run WinPE and run simply bcdboot again, everything works fine. Only reason I’ve came up with is that after diskpart + image apply, bcdboot cannot do some of the changes it should do, which require a restart first. So, don’t lose your hope if you get “bootmgr is missing!” at the first time, instantly after dropping your image! Try it twice!

    Notice that the syntax is: bcdboot d:\windows /s c:
    (D:\Windows -being the path of Windows on the drive where you applied your imageX) and C: the small “system” named partition for Win7/Bitlocker.

  3. The purpose of four operating systems is of various nature:
    On the one hand, I wanted this to be a coding machine on which I wanted to be able to program under Linux and Windows. And on the other hand, it’s supposed to be an experimental computer, so I wanted to test Windows 7 and OpenSolaris :)

  4. Hey Harry,
    Du machst Sachen =) Haben 4 BS auf einem Rechner dann auch n bestimmten Zweck? Software-Tests a la “selbe Komponenten, verschiedene BS”? Oder einfach zur Gaudi?

    Und schreib mal wieder was neues – die Leserschaft will bei Laune gehalten werden 😛

 Leave a Reply

(required)

(required)


(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">