Bigger ISOs but boot 4 times faster: GO zstd!

pankso, 2026-11-25 15:21 UTC

We measured where a live boot spends its time, and most of it was not in our scripts. On the core x86_64 ISO in a small VM (KVM, 1 core, 2 GB of RAM), the kernel needed 7.96 seconds just to unpack the LZMA rootfs, out of 10.4 seconds from kernel start to "desktop ready".

With the same rootfs compressed with zstd -19, the unpack takes 0.77 second and the desktop is ready in 3.1 seconds. The price is a rootfs about 10% bigger: the test ISO grows from 80.5 MB to 87.7 MB. We keep level 19 rather than --ultra -22: it saves only 4 MB more, takes eight times longer to build and needs a 128 MB window at boot, which old machines would feel.

metier now accepts --compression zstd, or COMPRESSION="zstd" in a flavor receipt. The test ISO boots as a CD and as a USB key, on BIOS and on UEFI. The official ISOs are not switched yet: tazinst reads the rootfs with zcat or lzma and must learn zstd first, that work is in progress. The file keeps its name, /boot/rootfs.gz: the kernel detects the format by itself. The first target is x86_64; i486 stays on LZMA until we have tested on real old hardware.

The boot scripts got their share too. In libtaz, an action/status pair went from 23 forks to 7, and no longer calls gettext in the C locale. The lang= boot option is now handled by trame first, with tazlocale as fallback: trame sees that en_US.UTF-8 is already compiled in the ISO and skips localedef, which saves about 0.3 second on an English boot. With these changes the same VM reaches the desktop in 2.5 seconds.

Along the way: the network notifications of network.sh are now translatable (new slitaz-boot-scripts gettext domain, French done, Korean file ready for its translator), and switching network shows two notifications instead of three. The browser command opens a local manual in the language of the session when it is installed, so nothing links documentation files at boot anymore. And metier no longer lets the locale of the build host leak into the ISO.

Packages: slitaz-base-files 357, slitaz-boot-scripts 518 and slitaz-tools 1070 are in the wok. The zstd ISOs will follow once the installer is ready.

All news