Add Linux to Boot menu for dual / triple / quadruple booting with vhdx files


jimbo45

Well-known member
Power User
VIP
Local time
2:29 PM
Posts
1,669
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi folks
If you use physical vhdx files it's really simple at boot to see as well as your Windows systems any Linux distros as well

Skjámynd 2022-05-25 102725.png

Say you have a 1 TB internal (but can be external) SSD drive. (I have 4 Windows systems and 2 Linux ones installed)

Create 1 single EFI partition, file (size 100 format fat32), one msr partition (size 128 unformatted), a SINGLE NTFS partition with enough space for your windows installs and allocate space for say in my case 2 Linux systems - Arch and UBUNTU.

You MUST install the Windows systems FIRST I simply use /dism apply-image and then add the bootloader (bcdboot).
The bootloader is written to the EFI partition.

Now install each linux system to its relevant partitions --note don't include any extra efi partition in the setup as the trick is to use the same one as we used here for the Windows installs.

for each linux after install you will have to install grub and run the config -- the trick here is to mount /boot/efi on the efi partition, run grub-install --target=X86_64-efi --bootdir-id=LINUX1 --efi=directory -/boot/efi and gruib-mkconfig -O /boot/grub/grub.cfg

Change the bootdir-id to another name for the 2nd system

Now on boot you should see the familiar blue menu --- to get to the linux options go to 3rd page (use device etc) and you'll see the names say LINUX1 and LINUX2 or whatever you called it.

Now you'll probably see the bios menu or depending on your machine something like hit esc to pause where it will go into the hardware menu -- leave it - the correct boot will continue with your required OS.

If you don't install the Windows systems ist you'll probably hose the entire thing ¬!!!! You can add more Windows systems later so long as you have at least one installed first.

It's not as complicated as it seems and I find this far better if dual / triple or whatever booting than having to go into the hardware Bios menu and remember what's loaded where. !!! The single EFI partition covers the boot for the whole lot.

Screen shot of a Test disk I made on a test junk laptop before doing it on a "proper" aptop "For Real".

Here's what the disk looks like (Test disk 500GB external SSD)
Screenshot_20220525_110522.png

partition sdb2 is the "Common" EFI partition. sdb3 is the msr partition, sdb4 is the disk area for two windows systems on two vhdx files while partitions sdb5,6,and 7 are "root", Home and swap for a Linux system.


Cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
Top Bottom