I would like to add the windows 11 installer ISO to the grub boot menu on a portable NVME drive to use a multi-tool USB of sorts. (yes I know ventoy exists but it's unclear how to use it as a bootloader and I would like to get grub working since I know it's possible)
I have spent the last two days trying and this is what I've figured out:
-
I should boot GRUB in BIOS mode not UEFI mode to support the linux16 & initrd16 commands needed to load wimboot (currently not supported on mainline grub and I couldn't find any maintained forks). The NVME drive is less then 2TB so this works fine.
-
It's unclear if wimboot supports booting directly from the unmodified Win11_24H2_EnglishInternational_x64.iso so files may need to be provided + newc:<stuff> may need to be added in the grub boot option.
-
This my current boot script (see attached video for what happens when I try boot it)
menuentry "Windows 11 Install (BIOS)" {
insmod part_gpt
insmod fat
insmod udf
set isofile="/iso/Win11_24H2_EnglishInternational_x64.iso"
loopback loop $isofile
linux16 /wimboot/wimboot
initrd16 \
newc:bootmgr.exe:/wimboot/bootmgr.exe \
newc:null.cfg:/wimboot/null.cfg \
newc:winpeshl.ini:/wimboot/winpeshl.ini \
newc:startup.bat.sdi:/wimboot/startup.bat \
newc:boot.sdi:(loop)/boot/boot.sdi \
newc:bcd:(loop)/boot/bcd \
newc:boot.wim:(loop)/sources/boot.wim
boot
}
- I have also managed to get into the "windows boot manager" once with the error 0xc000000f, I cannot seem to reproduce this.
- I have been testing with mainly with qemu but do test on bare metal too.
- grub->iPXE is technically an option but I don't think I want to do that because it requires putting files on the efi partition (which I want to keep small).
I am very lost so any help or insight would be appreciated. I've attached some auxiliary scripts and stuff that is references in the grub boot entry (that I store under /etc/grub.d/40_custom)