From 7cbf44e029dc94e9b9822281cabab8655ff7b9e5 Mon Sep 17 00:00:00 2001 From: "Gerd v. Egidy" Date: Wed, 19 Jan 2022 21:51:30 +0100 Subject: [PATCH 1/3] don't recompress, but just uncompress the kernel modules: mksquashfs will be better able to compress them --- build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 16c53f1..d821401 100755 --- a/build.sh +++ b/build.sh @@ -225,10 +225,9 @@ make_customize_airootfs() { find ${work_dir}/${arch}/airootfs/usr/lib -type f -name "lib*.so.*" -exec strip --strip-all {} \; # recompress kernel modules to save space (#247) - echo "Recompressing kernel modules ..." + echo "Uncompressing kernel modules ..." kernelver=$(basename ${work_dir}/${arch}/airootfs/usr/lib/modules/*) find ${work_dir}/${arch}/airootfs/usr/lib/modules/${kernelver} -type f -name "*.ko.zst" -exec zstd -q -d --rm {} \; - find ${work_dir}/${arch}/airootfs/usr/lib/modules/${kernelver} -type f -name "*.ko" -exec xz {} \; depmod --all --basedir=${work_dir}/${arch}/airootfs/usr ${kernelver} } From 4df6386059445b715c3668e8033dda9f61683a95 Mon Sep 17 00:00:00 2001 From: "Gerd v. Egidy" Date: Wed, 19 Jan 2022 21:52:41 +0100 Subject: [PATCH 2/3] delete unnecessary files (stray kernel image, unnecessary grub picture) --- airootfs/root/customize_airootfs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airootfs/root/customize_airootfs.sh b/airootfs/root/customize_airootfs.sh index d9ecc53..2e6dd9a 100755 --- a/airootfs/root/customize_airootfs.sh +++ b/airootfs/root/customize_airootfs.sh @@ -64,6 +64,10 @@ rm -rf /usr/share/gir* rm -rf /usr/include rm -rf /usr/share/man/man3 +# save some more space by removing large & unnecessary files +rm -f /lib/modules/*/vmlinuz +rm -f /usr/share/grub/themes/starfield/starfield.png + # Cleanup XFCE menu sed -i '2 i NoDisplay=true' /usr/share/applications/{xfce4-mail-reader,xfce4-web-browser}.desktop sed -i "s/^\(Categories=\).*\$/Categories=Utility;/" /usr/share/applications/{geany,*ristretto*,*GHex*}.desktop From 56024247dc887e4e1facd406473c006bd1fc688f Mon Sep 17 00:00:00 2001 From: "Gerd v. Egidy" Date: Wed, 19 Jan 2022 22:50:50 +0100 Subject: [PATCH 3/3] improve compression of the initramfs image (sysresccd.img) --- mkinitcpio.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/mkinitcpio.conf b/mkinitcpio.conf index c03540a..60c328e 100644 --- a/mkinitcpio.conf +++ b/mkinitcpio.conf @@ -2,3 +2,4 @@ MODULES=(fuse) BINARIES=(aq jq mount.ntfs) HOOKS=(base udev memdisk findroot archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block mdadm_udev modconf encrypt lvm2 filesystems keyboard) COMPRESSION="xz" +COMPRESSION_OPTIONS="--threads=0 --lzma2=preset=9e,dict=128MiB --verbose"