On 2026/03/16 02:13, Jonathan Carter wrote:
Yikes. Ok lets see how much mksquashfs can shave off that with a huge dictionary and xz compression:

   4.4G    extracted.squashfs

Woah. That's less than 10% of the total uncompressed data!

I tried to every tip I could find to get that smaller using just squashfs. The best I could do was score 80MB by running hardlink -cv on the tree to hardlink files in advance. Everything else just either made the process slower or the resulting image larger, so I think squashfs options are about exhausted.

So I thought I'd check what the biggest files are shared across the media, since there might be some sacrifices that are worth while.

The top one already seems like an easy one!

218526876 extracted/mate-filesystem.squashfs/boot/initrd.img-6.18.12+deb14-amd64 218526876 extracted/lxqt-filesystem.squashfs/boot/initrd.img-6.18.12+deb14-amd64 218526876 extracted/lxde-filesystem.squashfs/boot/initrd.img-6.18.12+deb14-amd64 218526876 extracted/kde-filesystem.squashfs/boot/initrd.img-6.18.12+deb14-amd64 218526876 extracted/gnome-filesystem.squashfs/boot/initrd.img-6.18.12+deb14-amd64 218526876 extracted/cinnamon-filesystem.squashfs/boot/initrd.img-6.18.12+deb14-amd64 218515930 extracted/xfce-filesystem.squashfs/boot/initrd.img-6.18.12+deb14-amd64

That's 218MiB for an initrd.img that we don't use. The one we boot for live is on the USB media filesystem, and on the target system, it's generated from scratch. Since that is its size already compressed, that could make a yummy saving by just deleting it as part of the build process. And this would be beneficial even for our existing images.

The second biggest file is libQt6WebEngineCore.so.6.9.2:

201778840 extracted/xfce-filesystem.squashfs/usr/lib/x86_64-linux-gnu/libQt6WebEngineCore.so.6.9.2 201778840 extracted/mate-filesystem.squashfs/usr/lib/x86_64-linux-gnu/libQt6WebEngineCore.so.6.9.2 201778840 extracted/lxqt-filesystem.squashfs/usr/lib/x86_64-linux-gnu/libQt6WebEngineCore.so.6.9.2 201778840 extracted/lxde-filesystem.squashfs/usr/lib/x86_64-linux-gnu/libQt6WebEngineCore.so.6.9.2 201778840 extracted/kde-filesystem.squashfs/usr/lib/x86_64-linux-gnu/libQt6WebEngineCore.so.6.9.2 201778840 extracted/gnome-filesystem.squashfs/usr/lib/x86_64-linux-gnu/libQt6WebEngineCore.so.6.9.2 201778840 extracted/cinnamon-filesystem.squashfs/usr/lib/x86_64-linux-gnu/libQt6WebEngineCore.so.6.9.2 184513406 extracted/standard-filesystem.squashfs/boot/initrd.img-6.18.12+deb14-amd64

I believe that's only necessary if you display web pages in Calamares, which we don't do. It might be possible to drop this dependency, or have a calamares binary with libQt6WebEngineCore support and one without, so that derivatives who'd like to use that feature still can.

Thunderbird's libxul is next:

176609760 extracted/lxqt-filesystem.squashfs/usr/lib/thunderbird/libxul.so
176609760 extracted/gnome-filesystem.squashfs/usr/lib/thunderbird/libxul.so
176609760 extracted/cinnamon-filesystem.squashfs/usr/lib/thunderbird/libxul.so

I think it's better to just remove thunderbird, it doesn't have that much use on a live image, and if someone really wants to install it, then it's easy enough.

Then there's a bunch of stuff we'd want. Firefox's libxul (pity that Firefox and Thunderbird can't share that), libllvm, libwebkit2gtk and then another large thunderbird file:

87696513 extracted/lxqt-filesystem.squashfs/usr/share/thunderbird/omni.ja
87696513 extracted/gnome-filesystem.squashfs/usr/share/thunderbird/omni.ja


Then there's some package lists that I was sure was deleted in the past:

58409448 extracted/xfce-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_source_Sources 58409448 extracted/standard-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_source_Sources 58409448 extracted/mate-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_source_Sources 58409448 extracted/lxqt-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_source_Sources 58409448 extracted/lxde-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_source_Sources 58409448 extracted/kde-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_source_Sources 58409448 extracted/gnome-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_source_Sources 58409448 extracted/cinnamon-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_source_Sources 56077914 extracted/xfce-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_binary-amd64_Packages 56077914 extracted/standard-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_binary-amd64_Packages 56077914 extracted/mate-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_binary-amd64_Packages 56077914 extracted/lxqt-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_binary-amd64_Packages 56077914 extracted/lxde-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_binary-amd64_Packages 56077914 extracted/kde-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_binary-amd64_Packages 56077914 extracted/gnome-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_binary-amd64_Packages 56077914 extracted/cinnamon-filesystem.squashfs/var/lib/apt/lists/deb.debian.org_debian_dists_forky_main_binary-amd64_Packages

That probably compresses very well, but still it's probably best to delete those after build.

-Jonathan

Reply via email to