Closed pgj closed 2 years ago
Preliminary test: the size of the snapshot-20220307
disk image could be shrunk from 363 MB to 189 MB (+ 12 MB for vmlinuz
and initramfs
) this way.
I have been using it in the last couple of days without any problems. Based on the tests, XZ compression could also be used without any effect on the boot-up time and memory consumption. With XZ, the disk image could be shrunk further down to ~164 MB.
Ports for testing can be found at https://github.com/pgj/freebsd-wifibox-port/tree/squashfs-root .
This is implemented as the result of 6e1e4ce874dfe0945f679d0ecc6f2c7e52730ff8 .
Make the supplied virtual disk image even more compact by changing its format to SquashFS and deprecate the use of the solution that is based on the ext2 file system and optimized for read-only use. They are used in the same way, so this would not cause any regression. Use the (conservative) LZO compression for maintaining the speed and the low memory footprint.
grub.cfg
to configurevmlinuz
for loading the root file system usingsquashfs
/boot
directory from the disk image completely, addvmlinuz
andinitramfs
besides the disk image for GRUB to load them at boot time