Operating principle


The following packages are required:

Quick start

The following commands build a live system from the running one:

build-live-system.sh --init / /tmp/live
    #builds the live system initRD & copies the kernel
build-live-system.sh --module / /tmp/live 0-main.sfs
    #creates a squashfs module of the system (and mounted medias...)
build-live-system.sh --iso /tmp/live /tmp/live-system.iso
    #generates an ISO of the live CD (if needed)
build-live-system.sh --usb /tmp/live /dev/sdx
    #copies the live system to USB (if needed)

Preparing a clean Slackware system from a running one

installpkg -root /mnt/system /mnt/cdrom/slackware/a/*.t?z #...
chroot /mnt/system
   useradd -m -g users -s /bin/bash liveuser #(if needed)
   usermod -G cdrom,netdev,plugdev,scanner,audio,video,power liveuser
   passwd liveuser
   exit #chroot

Preparing a clean Arch system from a running one

mkdir -p /mnt/system/var/{cache/pacman/pkg,lib/pacman}
mkdir -p /mnt/system/{dev,proc,sys,run,tmp,etc,boot,root}
chmod 0750 /mnt/system/root
chmod 1777 /mnt/system/tmp
chmod 0555 /mnt/system/proc /mnt/system/sys
for d in dev proc sys; mount --bind /$d /mnt/system/$d; done
pacman --root /mnt/system -Sy base xorg lxde midori \
   net-tools wireless_tools wpa_supplicant rfkill \
   ipw2100-fw ipw2200-fw b43-fwcutter iw \
   network-manager-applet networkmanager #...
for d in dev proc sys; umount /mnt/system/$d; done

Build a live system from a clean install

build-live-system.sh --sysprep /mnt/system
build-live-system.sh --init /mnt/system /tmp/live
build-live-system.sh --module /mnt/system /tmp/live 0-main.sfs -xz
build-live-system.sh --iso /tmp/live /tmp/live-system.iso

Live system build commands

Live media detection relies on filesystem label ("LiveSystem" by default), hard-coded in "init" and "build-live-system.sh" scripts.


Running "sysprep" is required before building the live system; it runs commands like "ldconfig" and "depmod", "mkfontdir", "fc-cache", "update-desktop-database" (...), merges "/etc/passwd" and "/etc/group" system files (if the system is divided into multiple directories), and sets up root and users profile (from "/etc/skel").

Setup kernel and initrd

Create a SquashFS module for the system

Using multiple modules

The system can be divided into multiple modules (example: "core", "gui", "tools",...) that are loaded in alphabetical order; if a file is present into several modules, the one taken from the last loaded module is used; naming example:

Copy live system on USB device

Warning: if the destination is a whole disk or key ("/dev/sdb" for example), it is automaticaly repartitionned (see below) (and all data on it are wiped).

USB device partition scheme

For USB booting (live or installed system), the recommended partition scheme is an hybrid GPT / MBR with the following partitions (use "r" then "h" gdisk commands to add partitions 1, 2 and 3 to MBR):

NumberStart (sector)End (sector)SizeCodeFilesystemContent
1 2048 at least 16 MiB ef00 FAT EFI System & misc files
2 at least 1 GiB 8300 Ext4 Live system
3 at least 500 MiB 8300 Ext4 (without journal) Persistent data (optional)
any 34 2047 1007.0 KiB ef02 GRUB / CSM

Create a live CD/DVD ISO from live system

Boot parameters

System language and keymap layout


Live system installation

The live system can be installed into a hard disk partition; the result is the same as a clean installation.

Install live system

Install GRUB

If not done during install or for repairing.

GRUB can be installed on a MBR (for legacy BIOS firmware) or GPT disklabel; for the later one, it supports both UEFI and legacy BIOS booting; as said before: