3

My boot files and BCD are on E:, My windows files are on C:

When setting the BCD should the windows boot loader device and osdevice be C: or E:?

I already have an entry for Windows Boot Manager which has the parameter device partition=E:

I'm on 64bit Windows 8.1

Ajay
  • 936
  • 3
  • 9
  • 25
Max
  • 151
  • 1
  • 1
  • 8

3 Answers3

11

Max is not completely right in his own answer (23. dec 2013) to his own question.

The answer is that both (device + path) and (osdevice + systemroot) make up a whole.

a) (device + path) is the "complete file path" to Windows loader for Vista, Windows 7/8

  • usually "c:\windows\system32\winload.exe" (or extension .efi for UEFI boot).

b) (osdevice + systemroot) is the "complete directory path" to Windows directory

  • usually "c:\windows".

There is no need for path to boot manager (bootmgr) and BCD itself as they are established programmatically during initial load and execution of MBR and PBR (master and partition boot record) for BIOS booting. Both bootmgr and \Boot\BCD are on active partition on MBR style disk.

On GPT disks (using UEFI booting) boot manager and BCD are on ESP (EFI System Partition).

It is obvious that the path to BCD inside of BCD cannot be used when loading BCD for the first time (BCD is loaded by boot manager).

You can find information about how to fix boot BCD problems here.

snayob
  • 4,384
  • 1
  • 16
  • 22
  • Thanks mate. You seem very knowledgeable about the subject. Don't suppose you know what BCD issues may cause a laptop to be able to restart but not shutdown, hibernate or sleep? It shuts down everything but the fan and screen do not completely turn off. I suspect it's BCD related as it started occurring after I messed around with the BCD. Any help would be appreciated! I've not been able to fix this since Dec 2013.. – Max Apr 21 '14 at 04:35
  • When you repair BCD using bcdboot command all corresponding loaders for the OS are fixed. Problems with shutdown, hibernation do not depend on BCD. Resume from hibernation is depending on BCD settings. You can use Visual BCD Editor to view/examine all loader elements. – snayob Apr 30 '14 at 17:02
  • 1
    I see. So if it is resuming correctly it is most likely not BCD related. – Max May 01 '14 at 01:33
  • Aha! Finally this information :) That means that winload.exe can be at a different path (or even on a different volume) than the \Windows\ directory..? – Milind R Sep 06 '14 at 08:15
  • I have never checked if a copy of winload.exe in ANY directory can execute the boot sequence (but I think its parameters are stored in system registry so it should be 'portable'). Another way of thinking would lead to the same conclusion - Windows root does not have to be always "\Windows". System registry should be loaded from a fixed place as there are stored the main system parameters as device/partition mappings and paths to other registry hives. – snayob Nov 22 '15 at 19:36
  • @MilindR: yeah, a MSFT guy (Arthur Xie) says so, i.e. that the two settings (`device` vs osdevice) exist solely for that purpose. For resume app, the latter is actually called `filedevice` and it specifies where the hibernation file is located, together with `filepath` (instead of specifying the windows root dir). It's actually a bit more common to have the hybernation file somewhere else than to move the Windows root dir. The MS docs say that device and osdevice can differ if you use Bitlocker. – Fizz Jul 01 '20 at 07:33
  • @MilindR : According to the Windows Internals book, winload.exe loads ntoskrnl.exe from the osdevice/systemroot (Apparently you can't change the name of ntoskrnl.exe) – Fizz Jul 01 '20 at 08:09
  • According to the book, you can change `bcddevice` and `bcdfilepath` at bootmgr level to change where the BCD itself is located, but that seems a bit unreliable in practice https://social.technet.microsoft.com/Forums/windows/en-US/99b51238-0d8f-4e56-88d2-8c2120487e90/setting-up-new-bcd-store-at-a-quotspecific-directoryquot-for-win7?forum=w7itproinstall – Fizz Jul 01 '20 at 08:18
1

Both device and osdevice should point to the drive the OS is installed on, not the boot files.

If you have a single OS there is usually no need to change this.

Say you have another bootable Windows on another drive and want to add it to the current boot configuration data store.

You would set both device and osdevice to the drive-letter that other Windows is currently on (internally this will not be stored as a drive letter anyways)

Peter Hahndorf
  • 13,370
  • 9
  • 51
  • 67
  • 2
    From my experience with this it appears incorrect. osdevice is the partition with your windows directory. device is where your boot files are kept, which for a lot of laptops are small hidden partitions separate from C: – Max Dec 23 '13 at 02:33
0

I'll answer my own question. The osdevice is what should be pointing to your os partition (seems obvious when it works doesnt it?)

The device parameter points to your boot bcd (which may be on a separate drive)

To check that in cmd use bootsect.exe /nt60 all /force which should show all your drives.

In addition, another helpful tip is if you do not have an ISO of Win 8 then you can download an evaluation version from technet. I wont post a link as im sure it will be invalid/dead by the time anyone sees this. A lot of laptops (especially netbooks) no longer come with them and there are no official ISOs like in the Win 7 days.

I hope this helps someone. It is very frustrating and most similar issues end up in a reformat from what i've googled.

Max
  • 151
  • 1
  • 1
  • 8