Skip to content

Commit

Permalink
Boot directly from boot.wim images
Browse files Browse the repository at this point in the history
  • Loading branch information
Mexit committed Jan 3, 2025
1 parent 53b7b7d commit da588db
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
9 changes: 8 additions & 1 deletion config/grub.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ insmod font
if [ "${grub_platform}" == "efi" ]; then
# Unload modules
rmmod tpm

wimboot_kernel=linux
wimboot_initrd=initrd
else
wimboot_kernel=linux16
wimboot_initrd=initrd16
fi
export wimboot_kernel wimboot_initrd

regexp -s dev '^(.*),' "$root"
probe --fs-uuid $root --set=rootuuid
Expand Down Expand Up @@ -82,7 +89,7 @@ function LOOPBACK {
loopback loop "$1"
}

submenu "Auto-detect ISOs (Directory: $iso_dir) -->" {
submenu "Auto-detect ISOs/WIMs (Directory: $iso_dir) -->" {
echo -n "Loading configuration files... "
for cfgfile in /MultiOS-USB/config/*/*.cfg /MultiOS-USB/config_priv/*/*.cfg; do
source "$cfgfile"
Expand Down
21 changes: 21 additions & 0 deletions config/windows/wim_file.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Boot directly from bootable *.wim file
# Automatically detects wim files in default directory with iso images

wim_pattern="*.wim"

for wimfile in $iso_dir/$wim_pattern; do
if [ -e "$wimfile" ]; then
regexp --set=wimname "$iso_dir/(.*)" "$wimfile"

submenu "$wimname -->" "$wimname" "$wimfile" {
for wimindex in 1 2; do
menuentry "$2 (image $wimindex)" "$3" "$wimindex" --class=windows {
echo Loading $2... This may take some time
$wimboot_kernel /MultiOS-USB/tools/wimboot-*/wimboot.x86_64 quiet index=$3
$wimboot_initrd newc:boot.wim:$2
echo Loading complete, booting...
}
done
}
fi
done
File renamed without changes.

0 comments on commit da588db

Please sign in to comment.