Revision 2 of 2026-11-25 15:15 UTC by tux, not the current one. Current version - History
Boot process
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
compressed cpio archive.
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:
- with an initramfs (live, frugal): it unpacks
rootfs.gzin memory and runs/initfrom it (rdinit=names another program); - without one (installed): it mounts the partition given by
root=and runs/sbin/init.
/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:
- it mounts
/proc,/sysand a tmpfs on/run, and logs to/run/boot.log; - it creates the device nodes, loads the modules of
modprobe=; - when enough memory is free, it mounts a tmpfs on
/mnt(90% of the RAM at most), moves the whole system into it and runsswitch_rootto it. Without enough memory it prints Skipped and the system stays where the kernel unpacked it; - 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:
- mount
/proc,/sysand/dev(devtmpfs); - start udev, which loads the drivers of the hardware it finds;
- check the partitions of
CHECK_FS, then remount/read and write; - mount everything in
/etc/fstab(and the EFI variables on UEFI).
readwrite:
- save the kernel messages to
/var/log/dmesg.log; - read the early boot options:
modprobe=,config=,screen=; - clean
/tmp, set the host name, startsyslogdandklogd; - load the modules of
LOAD_MODULES; - run the scripts of
RUN_SCRIPTS, in order:bootopts.sh: the live user, then the boot options (language, keyboard, time zone,home=...);system.sh: locale, keymap, time zone, swap, zram on a live system, sound;network.sh: the network, from/etc/network.conf;local.sh: your own commands;
- start the graphical login (
LOGIN_MANAGER), unlessscreen=text; - start the services of
RUN_DAEMONS, in order.
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:
swap=512: withhome=, make a 512 MB swap file/home/swap;nozram: no zram swap on a live system;rtc=local: the hardware clock is in local time (dual boot with Windows);laptop: turn on the kernel laptop mode;eject: eject the CD once booted;sound=noconf: do not set up the sound card;rdinit=/myinit: run another program than/initfrom the initramfs (a kernel option).
And these, read by /init on a live or frugal system:
tmpram=50: copy the system into a tmpfs even when less memory is free (default 100, see/init);rootfssize=70%,rootfsinodes=: size and number of files of that tmpfs;mount=/dev/sda1: mount this partition, then withloopfs=boot a root file system in a file on it, or withsubroot=one in a directory of it.mntopts=gives mount options,posixovlallows a Linux root on FAT or NTFS;extra=loads more initramfs files from that partition.
The frugal installs that use them are on Frugal install.
Root on RAID, LVM or an encrypted disk
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
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.