Chainload Windows boot manager from another?

3

Is it possible to use the Windows Boot Manager to chainload another Windows Boot Manager?

For example, (how) can I use a boot manager on C:\bootmgr that reads C:\boot\BCD to chainload another boot manager D:\bootmgr that uses D:\boot\BCD?

user541686

Posted 2013-09-11T17:20:09.647

Reputation: 21 330

What problem are you trying to solve exactly? – Ramhound – 2013-09-11T17:58:02.733

@Ramhound: I have a UEFI and a legacy BIOS boot loader (installed on different disks -- one MBR, one GPT) and I want them to use the same Boot Configuration Database. – user541686 – 2013-09-11T18:02:49.960

have you ruled out the possibility that your motherboard has the ability to boot to either one simply by changing the boot order? – Ramhound – 2013-09-11T18:35:13.937

@Ramhound: Huh? I'm trying to avoid having two BCD stores if possible -- I can already switch between OSes just fine. – user541686 – 2013-09-11T18:54:00.030

Answers

1

BOOTMGR will look for the hive \boot\bcd on the partition it believes to be the active boot partition (usually the active partition on disk 0). On EFI machines, the EFI version of bootmgr will load \boot\bcd from the ESP (EFI System Partition) which is always FAT32 and usually around 100 MiB or so.

Your question is, however, very confusing. You state

that reads C:\boot\BCD to chainload another boot manager D:\bootmgr that uses D:\boot\BCD

But then say

Huh? I'm trying to avoid having two BCD stores if possible

In the example you give of what you're trying to achieve, aren't those two different BCD files on two different partitions?

So I'm not sure exactly what you're trying to do. If you're trying to make the legacy BOOTMGR load the same BCD database that the EFI BOOTMGR uses, yes, that would be possible. You'll need to modify the emulation bootrecord on your disk (the fake MBR that's used to stop machines that don't understand GPT from reinitializing disks and losing data) to indicate the presence of at least two partitions, being the ESP and the Windows partition, with the ESP marked as active.

That way, if a BIOS in legacy mode (or a BIOS that doesn't support UEFI) attempts to start your machine from a GPT disk with your modified emulation MBR, it'll see the ESP partition as a "regular" boot partition and load from it (via its bootsector, which you would need to make sure was correctly written with a tool like bootsect or bootrec) BOOTMGR which, in turn, would read the \boot\bcd on the self-same partition.

Mahmoud Al-Qudsi

Posted 2013-09-11T17:20:09.647

Reputation: 3 274

Sorry, I realize my comment was confusing -- what I meant was that I don't want to have two BCD stores that have duplicate entries (which is what would be otherwise required if I can't do chainloading to load a different BCD store). It's fine to have two separate stores; they just shouldn't overlap. Instead, what I want is to have either boot loader be able to load the other boot loader's entries, so that I don't have to list an operating system twice (once in each). Is this possible? – user541686 – 2013-09-29T05:18:59.640

1@Mehrdad: this is a bewildering and contradictory specification. Each bootloader needs entries for each OS it boots and each chainloaded boot application (typically another bootloader). There will necessarily be N entries in each of N bootloaders if each can chainload the others. – kreemoweet – 2014-05-22T22:22:44.553

@kreemoweet: what exactly is "contradictory" here? There is no fundamental reason why each boot loader would need a separate database. It may be that that is the current state of affairs, but there is nothing "contradictory" or "bewildering" about it. I can very well imagine an alternative system in which that wouldn't be the case. – user541686 – 2014-05-23T03:12:15.673

0

The question is not clear, however you may try the tool EasyBCD Download EasyBCD here! & VisualBCD Download VisualBCD here!

These tools help you to edit and modify the bootloaders.

Mayank Agarwal

Posted 2013-09-11T17:20:09.647

Reputation: 291

What is not clear about the question exactly? And yes I know about EasyBCD and VisualBCD, those don't answer the question. – user541686 – 2013-09-12T02:57:45.013

0


You want:

Boot C:, starting bootmgr with specially configured BCD in C:\Boot.
One boot entry in this BCD should start another bootmgr on D:\ which loads the BCD on d:\Boot with different boot entries.

Correct?


To do that:

Get an image of the boot sector of D:\

  1. Start Linux, dd if=/dev/sda2 of=bootsec_D.img bs=512 Count=1^
  2. mount /dev/sda2 /media/sda2
  3. cp bootsec_D.img /media/sda2
  4. umount /dev/sda2

This bootsec_D.img can then be chainloaded with bootmgr the usual way.
For example, with Visual_BCD adding a new bootsector loader. Configure Partition and path properly.


Hope that helped.

It worked on my Computer, hopefully at yours, too.

Axel

Posted 2013-09-11T17:20:09.647

Reputation: 1

The author already said he didn't want to use a solution like this. – Ramhound – 2014-05-22T20:11:47.170

0

You want the first bootmgr to load a secondary bootmgr instead of loading one of the typical OS boot-loaders

"if it works" you should add the following entries to the first C:\boot\BCD

bcdedit /create /d "Chainloaded Bootmgr" /application BOOTSECTOR
bcdedit /set {ID} device partition=d:
bcdedit /set {ID}  path \bootmgr
bcdedit /displayorder {ID} /addlast

this should create the menu entry "Chainloaded Bootmgr"; when triggered it should load the second bootmgr from D:

Pat

Posted 2013-09-11T17:20:09.647

Reputation: 2 593

The author already said he didn't want to use this solution. – Ramhound – 2014-05-22T20:11:21.933

@Ramhound where did he say that? these 2 stores do not overlap and that's "exactly" what the author wants. – Pat – 2014-05-22T20:15:20.373