Skip to content

Commit deb4846

Browse files
committed
Fix README to align with the script
1 parent b585a63 commit deb4846

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,23 @@ To save space, you can now delete the compilation artifacts:
4747

4848
If 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

5353
2. 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

5656
3. 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

5959
4. 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

6262
5. Convert the img to VHDX:
6363
`qemu-img convert -O VHDX "$PWD/modules.img" "$PWD/modules.vhdx"`
6464

6565
6. 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

0 commit comments

Comments
 (0)