Much better boot manager when using VHDX physical disks

jimbo45

Well-known member
Power User
VIP
Local time
6:07 AM
Posts
771
Location
Hafnarfjörður IS
Hi folks
If you use virtual hard drives for "multi boot" -- not VM's but boot from physical disk then instead of the standard default boot which shows you the main OS's - you really get an infinitely better selection of boot options with a dropdown of all sorts of options e.g safe mode, safe mode without networking, don't load drivers etc etc via a simple menu.
It's basically the boot manager from Windows PE.

So easy way to do it is to create a VHDX of Windows PE so you can also have that as a boot option -- then run the bcdboot so it picks up the Windows PE boot manager menu which will show your OS's in a much better GUI format than the standard multi-boot menu.

So easy way to do it and have winpe as a bootable option.

1) download adk plus addons from the ms site

2) create winpe as per the instructions here

Download WinPE (Windows PE)

3) make bootable usb from the iso created (ignore this step if you created a bootable USB device directly)

I'm assuming that your main HDD doesn't have a native installed Windows on it -- only Windows on vhdx partitions
so you main disk should have a system EFI partition, an MSR partition and the rest a data store for your vhdx windows systems.

4) boot the usb winpe drive

Now assume system partition (EFI) is "S", data store partition is "D" usb winpe is "F" and the WinPE vhdx will be "V".

5) create a vhdx for the target winpe system :

diskpart
create vdisk file=D:\Winpe.vhdx size=4000 type=fixed
select vdisk file=D:\Winpe.vhdx
attach vdisk
list disk
select disk zzz <======== the disk nr of the vdisk attached -- should be 4GB size
create partition primary
format fs=fat32 quick label="Win PE" <===== virtual disks don't need to be made gpt - in fact better to leave as MBR
assign letter=V
exit

4) apply the Winpe image to the newly create vdisk
dism /Apply-Image /ImageFile:F:\sources\boot.wim /index:1 /ApplyDir:V:\ <<<note boot.wim not install.wim (there isn't one)

5) update the boot entry using bcdboot from the winpe disk !!!!!
cd V:
V:
cd v:windows\system32

bcdboot v:\windows /s S: /f UEFI

exit

enjoy !!!!

I find 1) boot mgr much better than the bog standard windows GUI one -- especially with the easily accessible options and 2) saves hunting around for usb stick with the winpe on it.

Cheers
jimbo
 
Last edited:

My Computer

System One

  • Operating System
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

pparks1

Active member
Member
VIP
Local time
1:07 AM
Posts
157
It's funny, I've never once done this booting from vhdx file....but I see that you have been posting about this quite a bit lately. I actually played with it yesterday.

It's not really something that I see myself using a whole lot. I don't have a need for booting a bunch of different operating systems. I can see myself doing it on my windows 10 gaming machine, I may make a vhdx and boot into it for a while to just make sure that all of my hardware is going to run stable under 11 and that drivers are good.
 

My Computer

System One

  • Operating System
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink SEI8
    CPU
    Intel Core i5-8279u
    Motherboard
    AZW SEI
    Memory
    32GB DDR4 2666Mhz
    Graphics Card(s)
    Intel Iris Plus 655
    Sound Card
    Intel SST
    Monitor(s) Displays
    Asus ProArt PA278QV
    Screen Resolution
    2560x1440
    Hard Drives
    512GB NVMe
    PSU
    NA
    Case
    NA
    Cooling
    NA
    Keyboard
    NA
    Mouse
    NA
    Internet Speed
    500/50
    Browser
    Edge
    Antivirus
    Defender
    Other Info
    Mini PC used for testing Windows 11.

cereberus

Well-known member
Power User
VIP
Local time
6:07 AM
Posts
512
It's funny, I've never once done this booting from vhdx file....but I see that you have been posting about this quite a bit lately. I actually played with it yesterday.

It's not really something that I see myself using a whole lot. I don't have a need for booting a bunch of different operating systems. I can see myself doing it on my windows 10 gaming machine, I may make a vhdx and boot into it for a while to just make sure that all of my hardware is going to run stable under 11 and that drivers are good.
Where it is handy is to run Insider versions as dual boot without affecting existing partitions. It is easy to delete them - delete vhdx file, delete boot entry using MSCONFIG.

The other plus is they auto activate if same edition as host drive. We could get into the perrenial discussion of whether rhat violates EULA but Insider versions actually have a different EULA which makes such discussions rather meaningless.

The other thing that is great is you can copy vhdx files to another PC (at least with HyperV) and it always works (but may not activate of course).

Backing them up is a cinch too - copy file using explorer.
 

My Computer

System One

  • Operating System
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0

jimbo45

Well-known member
Power User
VIP
Thread Starter
Local time
6:07 AM
Posts
771
Location
Hafnarfjörður IS
Hi folks

1) It's a lot easier for instance to have the same user id that can boot into the same Windows system with differentlanguage e.g both for Windows display and Office /xxx (whatever version of Office you have). Standard Windows won't allow same user name to logon in 2nd language unless you go through the whole hassle of switching languages from the primary logon --

2) if your VHDX file(s) are on an external HDD / SSD or example -- easy to boot from those so you can isolate your main HDD easily too. Also these vhdx files on external HDD are almost as good as Windows to Go machines -- OK you still need the initial C drive to boot rather than 100% from the external drive but IMO this is a lot more convenient and performance seems better.

3) OK disadvantage is VHDX OS's can't be updated to totally new builds -- clean install required - but you CAN use the VHDX files in a HYPER VM, do the update and then its all OK (as per tutorial as per @Kari ). Updates via WU work OK as do "minor release updates".

4) VM's are good for "Concurrent operations" but the VHDX method doesn't need an underlying OS on the main HDD and you use 100% of Windows hardware so anything you need testing e.g graphics, games, video editing etc can be done on various versions of the OS without having to install / re-install all the time.

5) I still like VM's as well --if I'm on Linux then running a Windows VM is a good alternative.
I'm experimenting with running those vhdx's on a VM running HYPER-V with the vhdx disks as a 2nd level VM --could be fun. !!

Cheers
jimbo
 

My Computer

System One

  • Operating System
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

pparks1

Active member
Member
VIP
Local time
1:07 AM
Posts
157
Thanks for the feedback guys.

For my usage, I don't have dual language support to worry about. I typically use VM's and activation isn't an issue for me as when I am running VM labs, it's usually just for the short term and the 90day and 180day evaluation editions of the software work perfectly fine for me in that respect.

I haven't done much whatsoever with dual boots in the last 10 years or so. Done everything in a VM instead as I don't run things that need any true hardware to perform well. However, this method does make that very non-intrusive and won't lead to any damage to your existing system.
 

My Computer

System One

  • Operating System
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink SEI8
    CPU
    Intel Core i5-8279u
    Motherboard
    AZW SEI
    Memory
    32GB DDR4 2666Mhz
    Graphics Card(s)
    Intel Iris Plus 655
    Sound Card
    Intel SST
    Monitor(s) Displays
    Asus ProArt PA278QV
    Screen Resolution
    2560x1440
    Hard Drives
    512GB NVMe
    PSU
    NA
    Case
    NA
    Cooling
    NA
    Keyboard
    NA
    Mouse
    NA
    Internet Speed
    500/50
    Browser
    Edge
    Antivirus
    Defender
    Other Info
    Mini PC used for testing Windows 11.

cereberus

Well-known member
Power User
VIP
Local time
6:07 AM
Posts
512
Thanks for the feedback guys.

For my usage, I don't have dual language support to worry about. I typically use VM's and activation isn't an issue for me as when I am running VM labs, it's usually just for the short term and the 90day and 180day evaluation editions of the software work perfectly fine for me in that respect.

I haven't done much whatsoever with dual boots in the last 10 years or so. Done everything in a VM instead as I don't run things that need any true hardware to perform well. However, this method does make that very non-intrusive and won't lead to any damage to your existing system.
That is not strictly true as the VHD installation works at host level so has full access to all other drives. However risk is low but not as low as in a VM.

In the end, our site mantra always applies "make regular image backups".
 

My Computer

System One

  • Operating System
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0

jimbo45

Well-known member
Power User
VIP
Thread Starter
Local time
6:07 AM
Posts
771
Location
Hafnarfjörður IS
That is not strictly true as the VHD installation works at host level so has full access to all other drives. However risk is low but not as low as in a VM.

In the end, our site mantra always applies "make regular image backups".
Hi there
agreed -- for example if you have main internal disk with files a.vhdx, b.vhdx,c.vhdx which are bootable OS's in the boot menu and you are using the OS on a.vhdx the main disk appears as Disk D in file explorer -- you can't delete the vhdx files normally as it says in use by the system !! Not impossible but it will avoid accidental deletes.

You IMO though can never have too much backup. !!!!!!!

An easy way to create these W11 editions (or W10) is simply to create a VM in VMWare workstation / player or (quicker if you have W10/11 pro) is to use Macrium free to create the VM - then simply use the vhdx file as a native boot updating drivers with physical drivers from a W10/W11 install -- you can mount a macrium image to get to the driver file. From VMWare it's a bit more complex --uninstall vmware tools, backup the vm and restore it to a new vhdx file, fix the boot mgr and you are in business.

Using HYPER-V and macrium method can create a new physical instance in literally minutes. Boot windows pe to add the vhdx to the boot menu and you are in business -- just update drivers from old macrium image --point to windows\system32driverstore or have that file stored somewhere - use a file from you last latest working system where all devices were working normally. W10 drivers will probably work for the next few months until native specific W11 drivers appear.

My testing now starts with a VM -- if that has problems then I don't bother with physical install until problems can be solved or are too trivial to worry about. I then replicate this to a physical machine via the physical vhdx method. Believe me once you get used to using vhdx physical systems you won't want to use "traditional" OS on internal C drive again !!!

These disks perform very fast on SSD's and excellent way of separating OS from data -- with quite a few applications e.g photoshop, Office 2021, some SAP DB front end software to access some work ERP systems, VLC, video editing and Stock exchange trading software my Windows OS is only around 40 GB -- I've allocated 65GB for the vhdx files. Keep data and OS separate -- always !!!!

Cheers
jimbo
 

My Computer

System One

  • Operating System
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

cereberus

Well-known member
Power User
VIP
Local time
6:07 AM
Posts
512
Hi there
agreed -- for example if you have main internal disk with files a.vhdx, b.vhdx,c.vhdx which are bootable OS's in the boot menu and you are using the OS on a.vhdx the main disk appears as Disk D in file explorer -- you can't delete the vhdx files normally as it says in use by the system !! Not impossible but it will avoid accidental deletes.

You IMO though can never have too much backup. !!!!!!!

An easy way to create these W11 editions (or W10) is simply to create a VM in VMWare workstation / player or (quicker if you have W10/11 pro) is to use Macrium free to create the VM - then simply use the vhdx file as a native boot updating drivers with physical drivers from a W10/W11 install -- you can mount a macrium image to get to the driver file. From VMWare it's a bit more complex --uninstall vmware tools, backup the vm and restore it to a new vhdx file, fix the boot mgr and you are in business.

Using HYPER-V and macrium method can create a new physical instance in literally minutes. Boot windows pe to add the vhdx to the boot menu and you are in business -- just update drivers from old macrium image --point to windows\system32driverstore or have that file stored somewhere - use a file from you last latest working system where all devices were working normally. W10 drivers will probably work for the next few months until native specific W11 drivers appear.

My testing now starts with a VM -- if that has problems then I don't bother with physical install until problems can be solved or are too trivial to worry about. I then replicate this to a physical machine via the physical vhdx method. Believe me once you get used to using vhdx physical systems you won't want to use "traditional" OS on internal C drive again !!!

These disks perform very fast on SSD's and excellent way of separating OS from data -- with quite a few applications e.g photoshop, Office 2021, some SAP DB front end software to access some work ERP systems, VLC, video editing and Stock exchange trading software my Windows OS is only around 40 GB -- I've allocated 65GB for the vhdx files. Keep data and OS separate -- always !!!!

Cheers
jimbo
Boot windows pe to add the vhdx to the boot menu

This is not necessary. Simply boot from Host OS, mount vhdx as a drive, then make a note of its windows drive letter (say E).

Then run following from admin command

Code:
bcdboot e:\windows /p /d

No need to use Winpe at all.
 

My Computer

System One

  • Operating System
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0

martyfelker

Member
VIP
Local time
1:07 AM
Posts
83
Hi there
agreed -- for example if you have main internal disk with files a.vhdx, b.vhdx,c.vhdx which are bootable OS's in the boot menu and you are using the OS on a.vhdx the main disk appears as Disk D in file explorer -- you can't delete the vhdx files normally as it says in use by the system !! Not impossible but it will avoid accidental deletes.

You IMO though can never have too much backup. !!!!!!!

An easy way to create these W11 editions (or W10) is simply to create a VM in VMWare workstation / player or (quicker if you have W10/11 pro) is to use Macrium free to create the VM - then simply use the vhdx file as a native boot updating drivers with physical drivers from a W10/W11 install -- you can mount a macrium image to get to the driver file. From VMWare it's a bit more complex --uninstall vmware tools, backup the vm and restore it to a new vhdx file, fix the boot mgr and you are in business.

Using HYPER-V and macrium method can create a new physical instance in literally minutes. Boot windows pe to add the vhdx to the boot menu and you are in business -- just update drivers from old macrium image --point to windows\system32driverstore or have that file stored somewhere - use a file from you last latest working system where all devices were working normally. W10 drivers will probably work for the next few months until native specific W11 drivers appear.

My testing now starts with a VM -- if that has problems then I don't bother with physical install until problems can be solved or are too trivial to worry about. I then replicate this to a physical machine via the physical vhdx method. Believe me once you get used to using vhdx physical systems you won't want to use "traditional" OS on internal C drive again !!!

These disks perform very fast on SSD's and excellent way of separating OS from data -- with quite a few applications e.g photoshop, Office 2021, some SAP DB front end software to access some work ERP systems, VLC, video editing and Stock exchange trading software my Windows OS is only around 40 GB -- I've allocated 65GB for the vhdx files. Keep data and OS separate -- always !!!!

Cheers
jimbo
Keeping data separate from code is the practice I always used - you may want to store data in an n-dimensional array which I wrote in COBOL. The fools were hard coding data in their programs.
 

My Computer

System One

  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Eluktronics Max 17
    CPU
    Intel Core i7 @ 2300MHz
    Motherboard
    AMI
Top Bottom