What have windows boot manager done during booting Windows From VHDX file? (is about Principle not Configure step)

0

When Windows 7 released, a feature of Windows Boot Manager also came out. It is Native boot. However there is a magic point which make me confused.

When Windows Boot Manager is working, we can assume that it is powerful, it reads VHDX file and extract NT kernel to RAM. However, when NT kernel has been loaded in RAM, the life of boot loader is ended.

Even if NT kernel is powerful, it is still just a kernel. It needs a lot of other components to work with, and I think NT kernel has no ability to read VHDX file.

Q1. Is the progress of boot loader extract ntkernel that I described correct?

Q1.1. Is the verb "extract" suitable in there? Or boot loader just put the handle in the start position of VHDX file on disk without anything else.

Generally, not just limit in Windows Boot Manager, the boot loader can be other program.

Q2. Is it possible to boot from VDI, VMDK or ISO files?

Q3. Is the possibility of Native boot of VHDX is based on the special structure of VHDX format that any program can directly access it as the similar way of accessing the file on real disk?

Q4. Is there any resource which explain the principle of Native VHDX booting in detail? (Is about principle, not configure step tutorial. It is the behavior during native booting)

(I am just a beginner in Firmware and Booting aspect, wish to gain help from master)

pah8J

Posted 2018-04-15T07:31:13.350

Reputation: 715

Why wouldn’t the kernel support it? It’s just about having a driver for that. Which exists, because you can mount VHD/VHDX natively. – Daniel B – 2018-04-15T09:54:54.323

@DanielB, Thanks for this good point, I'm just a beginner. So is there any open source implementation of this kind of driver? – pah8J – 2018-04-15T10:17:31.580

@DanielB, How much CPU resource does this kind of driver cost? – pah8J – 2018-04-15T10:19:58.407

Answers

1

  • First, Windows 7 does not support booting from VHDX; only VHD is supported. VHDX is supported on Windows 8 and later.
  • Second, it is a known fact that bootmgr, part of the Windows boot loader since Windows Vista, supports booting from VHD files, WIM files (that's how Windows Setup runs from within sources\boot.wim), RAM disks, network, and various disk controllers such as SCSI and IDE. According to Windows Internals, Sixth Edition, Part 2, page 503:

    Bootmgr contains a lightweight NTFS file system library (Bootmgr also supports other file systems, such as FAT, El Torito CDFS, and UDFS, as well as WIM and VHD files); unlike the boot sector’s code, Bootmgr’s file system code can also read subdirectories.

    —Russinovich, Mark; Solomon, David A.; Ionescu, Alex (2012). Windows Internals, Sixth Edition, Part 2. Redmond, WA: Microsoft Press. p. 503. ISBN 978-0-7356-6587-3.

    All of these are orders of magnitude more complicated than VHD. (WIM actually supports file deduplication and compression.) Of course, at some point the control is transferred to Windows and its own device drivers. The VHD driver is %SystemRoot%\System32\Drivers\Vdrvroot.sys. It loads Vhdmp.sys and Fsdepends.sys.

  • Third, ISO, VDI and VMDK are not supported.

For more information, you can consult:

But for more in-depth reading, the Windows Internals books from Mark Russinovich are my recommendations. Please keep in mind that none of these sources expose Microsoft trade secrets and this website does not endorse such sources either.

user477799

Posted 2018-04-15T07:31:13.350

Reputation:

Is this drivers integrated in ntkernel or just loaded from disk by ntkernel? – pah8J – 2018-04-16T09:25:39.650

@MartinS.Victory I've updated the prose to answer this question – None – 2018-04-16T10:00:54.257