File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -47,23 +47,23 @@ To save space, you can now delete the compilation artifacts:
4747
4848If you prefer, you can also build the modules VHDX manually as follows:
4949
50- 1 . Calculate the modules size (plus 1024 bytes for slack):
51- ` modules_size=$(du -s "$PWD/modules" | awk '{print $1;}'); modules_size=$((modules_size + 1024 )); `
50+ 1 . Calculate the modules size (plus 256MiB for slack):
51+ ` modules_size=$(du -s "$PWD/modules" | awk '{print $1;}'); modules_size=$((modules_size + (256 * (1<<20)) )); `
5252
53532 . Create a blank image file for the modules:
54- ` dd if=/dev/zero of="$PWD/modules.img" bs=1 count=$modules_size `
54+ ` dd if=/dev/zero of="$PWD/modules.img" bs=1024 count=$(( modules_size / 1024)) `
5555
56563 . Setup filesystem and mount img file:
57- ` lo_dev=$(losetup --find --show "$PWD/modules.img") && mkfs -t ext4 "$lo_dev" && sudo mount "$lo_dev" "$PWD/modules_img" `
57+ ` lo_dev=$(sudo losetup --find --show "$PWD/modules.img") && sudo mkfs -t ext4 "$lo_dev" && sudo mount "$lo_dev" "$PWD/modules_img" `
5858
59594 . Copy over the modules, unmount the img now that we're done with it:
60- ` cp -r "$PWD/modules" "$PWD/modules_img" && sudo umount "$PWD/modules_img" `
60+ ` mkdir "$PWD/modules_img" && sudo cp -r "$PWD/modules" "$PWD/modules_img" && sudo umount "$PWD/modules_img"`
6161
62625 . Convert the img to VHDX:
6363 ` qemu-img convert -O VHDX "$PWD/modules.img" "$PWD/modules.vhdx" `
6464
65656 . Clean up:
66- ` rm modules.img # optionally $PWD/modules dir too `
66+ ` rm modules.img # optionally $PWD/modules dir and the now-empty $PWD_modules_img dir too `
6767
6868# Install Instructions
6969
You can’t perform that action at this time.
0 commit comments