Frugal install SliTaz 5.1

A frugal install is SliTaz run from two files copied onto a partition you already have: the kernel and the compressed system, taken from the ISO. The boot loader loads them, and SliTaz runs in RAM exactly like the live CD, beside Windows or another Linux. No new partition, no format, nothing of the other system is changed. To remove it, delete a directory and a menu entry.

Like the live CD, it forgets everything at shutdown, unless you give it a place to keep your files (see below). For a real system that keeps packages and settings, install SliTaz.

The two files

Every SliTaz ISO has them in its boot/ directory, on i486 and x86_64 alike:

Copy them into a directory of any partition the boot loader can read: ext4, FAT or NTFS. Here /slitaz/boot/.

From Linux, as root:

# mount -o loop,ro slitaz-core-x86_64-cooking.iso /media/cdrom
# mkdir -p /mnt/slitaz/boot
# cp /media/cdrom/boot/bzImage /media/cdrom/boot/rootfs.gz /mnt/slitaz/boot
# umount /media/cdrom

where /mnt is the partition you chose, mounted. On the system's own partition, /slitaz/boot is fine.

From Windows, double-click the ISO to open it as a drive, and copy bzImage and rootfs.gz from its boot folder into a new folder C:\slitaz\boot. Keep the names exactly as they are.

The machine needs enough RAM for the system and your programs: see memory in the Handbook.

With an existing GRUB

If another Linux, or an installed SliTaz, already boots the machine with GRUB2 (BIOS or UEFI), add a menu entry:

menuentry "SliTaz frugal" {
	search --no-floppy --file --set=root /slitaz/boot/bzImage
	linux /slitaz/boot/bzImage rw root=/dev/null autologin
	initrd /slitaz/boot/rootfs.gz
}

search finds the partition that holds the files, whatever its number. The paths are from the root of that partition: if it is mounted as /home in your Linux, the files in /home/slitaz/boot are /slitaz/boot/... for GRUB.

Where to put it:

Reboot and choose SliTaz frugal.

UEFI, next to Windows alone

With no GRUB on the machine, use the GRUB of the x86_64 ISO. It is a single file, EFI/BOOT/BOOTX64.EFI, and it can read FAT and NTFS partitions. It goes on the EFI System Partition (ESP), the small FAT partition the firmware boots from; the kernel and the system stay in C:\slitaz\boot.

Open a command prompt as administrator, and give the ESP a drive letter:

mountvol S: /S

Copy the loader under its own name, so that it never replaces the one of Windows, and create the menu (E: is the opened ISO):

mkdir S:\EFI\slitaz
copy E:\EFI\BOOT\BOOTX64.EFI S:\EFI\slitaz\grubx64.efi
mkdir S:\boot\grub
notepad S:\boot\grub\grub.cfg

In Notepad, write the menu and save:

set timeout=5
insmod all_video

menuentry "SliTaz frugal" {
	search --no-floppy --file --set=root /slitaz/boot/bzImage
	linux /slitaz/boot/bzImage rw root=/dev/null autologin
	initrd /slitaz/boot/rootfs.gz
}

Remove the drive letter: mountvol S: /D.

Then, in the firmware setup:

# spk-add efibootmgr
# efibootmgr -c -d /dev/sda -p 1 -L "SliTaz" -l '\EFI\slitaz\grubx64.efi'

At startup, GRUB prints a few lines like error: no such device: /efi/grub.cfg.: it looks in several places for its menu, they are harmless.

Windows Fast Startup leaves its partition half closed. Turn it off (powercfg /h off as administrator) if SliTaz is to write on the Windows partition.

On a BIOS machine with Windows alone there is no GRUB to add an entry to: use a USB key, or install SliTaz on its own partition, which sets up GRUB with a Windows entry.

Boot the ISO file itself

GRUB can also open the ISO without extracting anything: copy the ISO as /slitaz/slitaz.iso, and use this entry. Handy to try a new ISO.

menuentry "SliTaz ISO" {
	search --no-floppy --file --set=root /slitaz/slitaz.iso
	loopback iso /slitaz/slitaz.iso
	linux (iso)/boot/bzImage rw root=/dev/null autologin
	initrd (iso)/boot/rootfs.gz
}

Boot options

The kernel line takes the same options as the live CD, see boot options in the Handbook: lang=fr_FR kmap=fr-latin1 for the language and keyboard, screen=text for a text system, rtc=local when Windows keeps the clock in local time. For example:

	linux /slitaz/boot/bzImage rw root=/dev/null autologin lang=fr_FR kmap=fr-latin1 rtc=local

Keep rw root=/dev/null: they are the options of the ISO menu.

Keep your files

A /home partition. Add home= with the device name, the label or the UUID of a partition: it becomes /home, and what you save there is kept. ext4, FAT, exFAT or NTFS work. Use a partition of its own, or a USB key, not the Windows partition: all of it would become /home.

	linux /slitaz/boot/bzImage rw root=/dev/null autologin home=MYDATA

See keeping your data in the Handbook.

Your own settings in an archive. GRUB can load more archives after rootfs.gz; the kernel unpacks them in order and the last one wins. Pack the files you want into a small archive, for example as root on a running SliTaz, with the partition of the frugal install mounted on /mnt:

# cd /
# find etc/hostname etc/keymap.conf etc/locale.conf | cpio -o -H newc | gzip -9 > /mnt/slitaz/boot/my-config.gz

and add it to the initrd line:

	initrd /slitaz/boot/rootfs.gz /slitaz/boot/my-config.gz

A script at boot. config=<device>,<path> runs a shell script from a partition at boot, as root: config=LABEL=MYDATA,slitaz.sh.

Update and remove

To move to a newer SliTaz, replace bzImage and rootfs.gz with those of the new ISO. Your home= partition and archives stay.

To remove it, delete the slitaz directory and the menu entry (and on UEFI, S:\EFI\slitaz and S:\boot\grub).

Troubleshooting

"error: no such device: /slitaz/boot/bzImage" or "file not found": GRUB did not find the file at that path. Paths start at the root of the partition that holds the files, and are case-sensitive on ext4.

"Secure Boot violation", or the firmware refuses the file: turn Secure Boot off.

GRUB stops at grub>: it did not find its menu. On UEFI, check that grub.cfg is in \boot\grub on the ESP. You can still boot by hand:

grub> search --no-floppy --file --set=root /slitaz/boot/bzImage
grub> linux /slitaz/boot/bzImage rw root=/dev/null autologin
grub> initrd /slitaz/boot/rootfs.gz
grub> boot

The boot stops or the system is killed while it starts: not enough RAM for this ISO. Try SliTaz Base, or Core instead of Firefox.