Revision 3 of 2026-11-25 21:17 UTC by tux, the current one. Current version - History

Boot process SliTaz 5.1

What happens between power on and the login prompt, for a live SliTaz and for an installed one: the boot loader, the kernel, the /init script of the live system, then /etc/init.d/rcS and the boot scripts. Knowing the chain helps to find where a boot hangs, and which boot option acts where.

From the firmware to /etc/init.d/rcS

                  BIOS or UEFI firmware
                           |
     +----------------+----+-----------+------------------+
     |                |                |                  |
  CD/DVD          USB key          hard disk        PXE / web boot
     |                |                |                  |
     +----------------+----------------+------------------+
                           |
       already running     V
       kernel --kexec--> boot loader
                           |
              +------------+------------+
              |                         |
              V                         V
     Live (ISO, frugal):           Installed:
     load bzImage + rootfs.gz      load the kernel only
              |                         |
              V                         V
     kernel unpacks rootfs.gz      kernel mounts root=
     in RAM and runs /init         (PARTUUID=..., rootwait)
              |                         |
              V                         |
     /init: copy the system             |
     into a tmpfs, switch_root          |
              |                         |
              +------------+------------+
                           |
                           V
                  /sbin/init (BusyBox)
                           |
                           V
             /etc/inittab runs /etc/init.d/rcS

The boot loader

x86_64 ISO: GRUB2, for BIOS and UEFI from the same image. The menu is /boot/grub/grub.cfg on the ISO; a language and keyboard menu adds lang=, kmap= and tz= to the kernel line. The kernel is /boot/bzImage and the whole system is /boot/rootfs.gz, a cpio archive compressed with zstd: a little bigger than lzma, but the kernel unpacks it several times faster. (core-retro, on the 3.16 kernel, keeps lzma.)

i486 ISO: isolinux, BIOS only, with the same bzImage and rootfs.gz. Its menu has a Languages submenu, a help screen (F1, F2 for the boot options) and Check media.

Installed system: the installer writes a GRUB2 menu (BIOS or UEFI), or a syslinux one for old BIOS machines. It loads the kernel /boot/vmlinuz-<version> with root=PARTUUID=... rootwait and no initramfs. trame boot changes the default entry and the timeout.

The Handbook explains the menus and how to edit a kernel line: Live boot menu, BIOS, UEFI and Secure Boot, Boot loader and dual boot.

The kernel

SliTaz 5.1 runs Linux 6.12 LTS on both architectures. The kernel mounts what it needs, finds its drivers as modules, and starts the first program:

/init: the live system

/init is a shell script of the slitaz-boot-scripts package. Its job is to give the live system a proper root before the real init starts:

  1. it mounts /proc, /sys and a tmpfs on /run, and logs to /run/boot.log;
  2. it creates the device nodes, loads the modules of modprobe=;
  3. when enough memory is free, it mounts a tmpfs on /mnt (90% of the RAM at most), moves the whole system into it and runs switch_root to it. Without enough memory it prints Skipped and the system stays where the kernel unpacked it;
  4. it runs /sbin/init.

The same script also mounts a root from a hard disk for the frugal and uncommon installs (mount=, loopfs=, subroot=, see below).

/sbin/init and /etc/inittab

/sbin/init is BusyBox init: no runlevels. /etc/inittab tells it to run /etc/init.d/rcS once, then start a login (getty) on tty1 to tty6, and to run /etc/init.d/rc.shutdown at reboot or power off.

/etc/init.d/rcS

rcS reads /etc/rcS.conf and runs in two passes, both logged to /var/log/boot.log:

readonly:

readwrite:

The variables of /etc/rcS.conf, the services and local.sh are in the Handbook: Boot and services. To read the messages of the last boot:

$ bootlog

It prints /var/log/dmesg.log and /var/log/boot.log; the logs of the ten boots before are /var/log/boot.log.0 to .9.

Boot options

Every boot option ends up in /proc/cmdline. The kernel takes its own (video=, nomodeset, console=...), the SliTaz scripts read the others. The common ones (lang=, kmap=, tz=, user=, home=, screen=text, sound=no, modprobe=, font=, mount, noswap, console=, config=, reprise, autologin) are listed in the Handbook: Boot options.

The scripts also read these:

And these, read by /init on a live or frugal system:

The frugal installs that use them are on Frugal install.

Root on RAID, LVM or an encrypted disk SliTaz 5.0

/init can also mount a root on softraid=, dmraid=, lvmroot= or cryptoroot=. These need the tools (mdadm, dmraid, lvm2, cryptsetup) and the kernel modules inside the initramfs, as the preinit flavor of SliTaz 5.0 did. The comments at the top of /init describe every option.

i486 ISO tricks SliTaz 5.0

The i486 ISO image is hybrid: it boots from a CD, or from a USB key it was copied to with dd. It is also a DOS and Windows program: renamed to .exe, it boots SliTaz from DOS, or writes a USB key from Windows (32-bit).

C:\> ren slitaz.iso slitaz.exe
C:\> slitaz.exe

The iso2exe tool of the syslinux-extra package (i486) adds your own boot options and an extra initramfs to an ISO, and lists or extracts them:

# iso2exe -a "lang=fr_FR kmap=fr-latin1 tz=Europe/Paris" -i myconfig.gz slitaz.iso
# iso2exe -l slitaz.iso
# iso2exe -r slitaz.iso custom.append custom.initrd

Your own /init in that initramfs can tune the boot, then hand over to the real one:

#!/bin/sh

sed -i 's,^RUN_DAEMONS=",RUN_DAEMONS="dropbear ,' /etc/rcS.conf
cat >> /etc/init.d/local.sh <<EOM
/my/special/inits.sh
EOM
exec /init "$@"

Name it with rdinit= and rewrite the options of the ISO with -f:

# iso2exe -a "rdinit=/myinit lang=fr_FR kmap=fr-latin1 tz=Europe/Paris" -i myconfig slitaz.iso -f

syslinux-extra also brings /usr/share/boot/init.custom, a ready /init of that kind: it copies the files of an /extra directory into the system and runs the scripts of /init.d/, with a log in /var/log/init.log.

Troubleshooting

The boot stops before the login: boot with screen=text to skip the desktop, then read bootlog. The reprise boot option starts the rescue tool before the desktop.

Kernel panic, "VFS: Unable to mount root fs": on an installed system, the root= of the boot loader does not match the partition. Edit the kernel line in the menu (e in GRUB) and check it with blkid from a live system.