Skip to content

Commit da588db

Browse files
committed
Boot directly from boot.wim images
1 parent 53b7b7d commit da588db

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

config/grub.config

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ insmod font
1414
if [ "${grub_platform}" == "efi" ]; then
1515
# Unload modules
1616
rmmod tpm
17+
18+
wimboot_kernel=linux
19+
wimboot_initrd=initrd
20+
else
21+
wimboot_kernel=linux16
22+
wimboot_initrd=initrd16
1723
fi
24+
export wimboot_kernel wimboot_initrd
1825

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

85-
submenu "Auto-detect ISOs (Directory: $iso_dir) -->" {
92+
submenu "Auto-detect ISOs/WIMs (Directory: $iso_dir) -->" {
8693
echo -n "Loading configuration files... "
8794
for cfgfile in /MultiOS-USB/config/*/*.cfg /MultiOS-USB/config_priv/*/*.cfg; do
8895
source "$cfgfile"

config/windows/wim_file.cfg

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Boot directly from bootable *.wim file
2+
# Automatically detects wim files in default directory with iso images
3+
4+
wim_pattern="*.wim"
5+
6+
for wimfile in $iso_dir/$wim_pattern; do
7+
if [ -e "$wimfile" ]; then
8+
regexp --set=wimname "$iso_dir/(.*)" "$wimfile"
9+
10+
submenu "$wimname -->" "$wimname" "$wimfile" {
11+
for wimindex in 1 2; do
12+
menuentry "$2 (image $wimindex)" "$3" "$wimindex" --class=windows {
13+
echo Loading $2... This may take some time
14+
$wimboot_kernel /MultiOS-USB/tools/wimboot-*/wimboot.x86_64 quiet index=$3
15+
$wimboot_initrd newc:boot.wim:$2
16+
echo Loading complete, booting...
17+
}
18+
done
19+
}
20+
fi
21+
done

0 commit comments

Comments
 (0)