forked from M-Labs/wfvm
Split install.wim before creating USB image
With newer Windows 10 versions, `install.wim` can become larger than 4GiB, which can't be placed in a FAT32 partition anymore. By splitting it into chunks with `wimsplit` and removing `install.wim`, the larger images work fine.
This commit is contained in:
parent
c0d09940d7
commit
fbd5b97d79
|
@ -96,7 +96,7 @@ let
|
|||
''
|
||||
#!${pkgs.runtimeShell}
|
||||
set -euxo pipefail
|
||||
export PATH=${lib.makeBinPath [ p7zip utils.qemu libguestfs ]}:$PATH
|
||||
export PATH=${lib.makeBinPath [ p7zip utils.qemu libguestfs pkgs.wimlib ]}:$PATH
|
||||
|
||||
# Create a bootable "USB" image
|
||||
# Booting in USB mode circumvents the "press any key to boot from cdrom" prompt
|
||||
|
@ -106,6 +106,10 @@ let
|
|||
mkdir -p win/nix-win
|
||||
7z x -y ${windowsIso} -owin
|
||||
|
||||
# Split image so it fits in FAT32 partition
|
||||
wimsplit win/sources/install.wim win/sources/install.swm 3072
|
||||
rm win/sources/install.wim
|
||||
|
||||
cp ${autounattend.autounattendXML} win/autounattend.xml
|
||||
|
||||
virt-make-fs --partition --type=fat win/ usbimage.img
|
||||
|
|
Loading…
Reference in New Issue