Tazinst Manual

NAME

Tazinst — Tiny autonomous zone installer manager

SYNTAX

tazinst [--machine] [command] <setting> <value> <file>

Commands run on an install file holding the installation settings. The default file is ./tazinst.rc, another file may be given as the last argument of every command. With --machine, output is machine readable records for frontends (see doc/protocol.txt).

DESCRIPTION

Tazinst is a lightweight SliTaz HDD installer. It installs SliTaz to a hard drive from the running live system (LiveCD or LiveUSB key) or from an ISO image located on one of your disks.

Tazinst can format the target partition (ext2, ext3, ext4 and more, as installed on the live system). The home directory can live on another partition which may be formatted as well. Tazinst can install the GRUB2 bootloader for BIOS and UEFI machines, add a dual-boot entry for an existing Windows™ partition, and add rescue entries booting the live system from RAM or SliTaz from the web.

Tazinst can also upgrade a SliTaz already installed on a hard disk partition, handy on version changes: settings, /home and the package list are saved, the new version is installed, then they are restored. Additional packages are reinstalled over an active Internet connection.

Tazinst is written from scratch in shell script and is compatible with Busybox Ash and Bash. Tazinst is licensed under the GNU GPL v3. The installer needs root: run it with su.

SETTINGS

Tazinst performs an unattended installation from a few settings stored in the install file. Required settings cannot stay empty; the others are optional. In upgrade mode only a subset applies — run tazinst get settings to list the settings of the current mode.

mode

Required. Installation mode: install (fresh install on a partition) or upgrade (upgrade an installed SliTaz, keeping settings, users and packages). Type tazinst help mode to list supported modes.

media

Required. The media holding the SliTaz source files: cdrom (SliTaz LiveCD), usb (SliTaz LiveUSB key) or iso (ISO image on a local disk). Only media available on your system are listed by tazinst list media.

source

Required, except with the cdrom media. The SliTaz source, depending on media: with usb, the partition of the live USB key (tazinst list usb); with iso, the ISO image file (tazinst list iso).

root_uuid

Required. The partition SliTaz installs to (or the SliTaz system to upgrade). Type tazinst list uuid to list partitions on your disks.

root_format

Optional. If set, the target partition is formatted with the given filesystem; if in doubt, choose ext4. Formatting erases everything on the partition. Without formatting, it is emptied too, except /home. Type tazinst help root_format for supported filesystems and tazinst list format for the ones installed on your system.

home_uuid

Optional. A separate partition for personal files (/home), kept across reinstalls and upgrades. Leave empty for no separate partition.

home_format

Optional. If set, the separate /home partition is formatted. Keep it empty to keep the files on it — formatting erases everything on the partition.

hostname

Required. The name of the machine on the network, slitaz by default. It can be changed after the install.

root_pwd

Optional. Superuser [root] password, root by default. The root administrator manages the whole system: choose a strong password, with numbers and special characters.

user_login

Required. First user name, tux by default. The first user keeps personal files in /home/<user> and belongs to the audio group.

user_pwd

Optional. First user password, tux by default. It has to be strong if the machine accepts SSH connections.

bootloader

Optional. Install a bootloader: set it to auto and GRUB2 starts SliTaz at power on, on BIOS and UEFI machines. Skip it (empty value) only if another bootloader manages this disk: you will have to set it up to start SliTaz. Type tazinst help bootloader to list supported bootloaders.

liveboot

Optional, needs a bootloader. Adds a boot menu entry starting the live system in RAM, for rescue. Takes auto (yes) or an empty value (no). The entry asks for the root password.

webboot

Optional, needs a bootloader. Adds a boot menu entry starting SliTaz from the Internet. Takes auto (yes) or an empty value (no). The entry asks for the root password.

winboot

Optional, needs a bootloader. Adds a boot menu entry starting Windows: auto selects the first Windows™ partition found, or give a partition. Type tazinst list winboot to see the values tazinst detects.

COMMANDS

new

Creates a new self-documenting install file. It defaults the root format to ext4 and the bootloader to auto when the tools are available. Refuses to overwrite an existing file.

Examples:
tazinst new
tazinst new /var/lib/tazinst.conf

set

Assigns a new value to a setting, then checks it.

Examples:
tazinst set mode install
tazinst set mode install /var/lib/tazinst.conf

unset

Clears a setting.

Examples:
tazinst unset home_format
tazinst unset home_format /var/lib/tazinst.conf

get

Prints the value of a setting, or of all settings without argument. tazinst get settings lists the settings applying to the current mode.

Examples:
tazinst get
tazinst get mode
tazinst get mode /var/lib/tazinst.conf

check

Checks a setting for errors, or all active settings without argument. With --machine, prints one key status message record per setting (ok, warning, error).

Examples:
tazinst check
tazinst check mode
tazinst check mode /var/lib/tazinst.conf

describe

Describes the settings a frontend has to ask for, in order, one key type required active value label help warning record per setting. Run it again after each change: types and active flags follow the values (source with a CD, home format without a home partition, boot entries without a bootloader).

Example:
tazinst describe

options

Lists the values a setting can take, one value label record per value. An empty value is valid when listed (no format, no bootloader, no separate home...). Text and password settings have no options.

Example:
tazinst options root_format

plan

Shows what execute will do, for a summary page: mode, source, formatting or cleaning, home, hostname, user, bootloader and boot entries, one record per action.

Example:
tazinst plan

help

Prints a short help for a setting, or for all settings without argument. Also documents cdrom, usb and iso sources.

Example:
tazinst help mode

list

Lists system resources. Resources are:

mode Available install modes
media Available media to install from. Example: cdrom is not listed on systems with no cdrom drive
usb Partitions of USB disks
iso ISO images on local drives: /root, /home, and disks mounted on /media or /mnt
uuid Partitions on your disks, with filesystem and label
partitions All partitions, machine readable, with size, role and detected system
format Installed filesystems
bootloader Available bootloaders
partition_table Partition table schemes of local disks
winboot Bootable Windows™ partitions
Examples:
tazinst list
tazinst list media

execute

Performs the install or upgrade described by the install file. Needs root, and refuses to run twice (lock file). If you selected to format, all data on the partition is lost; otherwise it is emptied except an existing /home. On upgrade, /etc /home /var/www are kept. Send SIGTERM to cancel; the full log stays in /var/log/tazinst.log and is copied to the installed system. With --machine, streams progress percent message, info message and error code message records, and exits 0 on success.

Examples:
tazinst execute
tazinst execute /var/lib/tazinst.conf

clean

Removes the install file, temporary files and the log file.

Examples:
tazinst clean
tazinst clean /var/lib/tazinst.conf

log

Displays the last log file contents and exits.

Example:
tazinst log

version

Prints the version information and exits.

Example:
tazinst version

usage

Prints a short help and exits.

Example:
tazinst usage

Exit codes

1Parameters error
2Install file error
3Source error
4Target error
5Missing resource
6No SliTaz system to upgrade
7Another instance is running
8Internal error
9Cancelled by user

FRONTENDS

Three frontends drive the tazinst backend step by step through its machine protocol (doc/protocol.txt): steps, values and checks all come from tazinst, so a setting added to the backend shows up with no frontend change. All need root and take an optional install file:

slitaz-installer [install file]
tazinst-tui [install file]
tazinst-gtk [install file]

Without argument, they create a fresh install file under /tmp (removed on exit, it holds passwords) and walk through every step up to a summary page — the last chance to cancel or go back. With a ready install file given, they open it right on its summary.

EXAMPLES

Install

Install SliTaz on a partition of your hard disk from an ISO image. The root partition is not formatted: all data except an existing /home directory is removed.

  1. Create an install file:
    # tazinst new
  2. Set the mode to install:
    # tazinst set mode install
  3. Use an ISO as source:
    # tazinst set media iso
  4. Select the ISO image:
    # tazinst set source ~/slitaz-rolling.iso
  5. Select the partition to install SliTaz on:
    # tazinst set root_uuid /dev/sda1
  6. Install a bootloader:
    # tazinst set bootloader auto
  7. Check your settings, execute, clean up:
    # tazinst check
    # tazinst execute
    # tazinst clean

Complex Install

Install SliTaz with a separate home partition and a Windows™ dual-boot. Both root and /home partitions are formatted (all existing data is lost).

  1. Create an install file:
    # tazinst new
  2. Set the mode to install:
    # tazinst set mode install
  3. Use a LiveUSB as source:
    # tazinst set media usb
  4. Select the live USB partition:
    # tazinst set source /dev/sdb1
  5. Select the partition to install SliTaz on:
    # tazinst set root_uuid /dev/sda1
  6. Format / as ext4:
    # tazinst set root_format ext4
  7. Use a separate /home partition:
    # tazinst set home_uuid /dev/sda2
  8. Format /home as ext4:
    # tazinst set home_format ext4
  9. Install a bootloader and a Windows™ dual-boot:
    # tazinst set bootloader auto
    # tazinst set winboot auto
  10. Check, execute, clean up:
    # tazinst check
    # tazinst execute
    # tazinst clean

Upgrade

Upgrade an already installed SliTaz system. /etc /home /var/www are kept, all other directories are replaced. Additional packages are updated over an active Internet connection.

  1. Create an install file:
    # tazinst new
  2. Set the mode to upgrade:
    # tazinst set mode upgrade
  3. Use an ISO as source:
    # tazinst set media iso
  4. Select the ISO image:
    # tazinst set source ~/slitaz-rolling.iso
  5. Select the partition holding SliTaz to upgrade:
    # tazinst set root_uuid /dev/sda1
  6. Check, execute, clean up:
    # tazinst check
    # tazinst execute
    # tazinst clean

Tips

  1. Not all settings apply in every mode. List the ones of your mode:
    # tazinst get settings
  2. Preview the install before running it:
    # tazinst plan

FILES

INSTALL FILE

Settings are saved in the install file, then used by tazinst for an unattended installation. The default file is ./tazinst.rc, but an optional file name may be given as a parameter. The install file is self-documented. The clean command erases it.

SYSTEM FILE

The /etc/slitaz/tazinst.conf configuration file presets tazinst defaults: hostname, passwords, user login and the list of known SliTaz images (URL_ISO). Any setting may be preset by adding its name in caps with the wanted value.

Example:

To preset the system name and user for every install:

HOSTNAME="slitaz"
USER_LOGIN="tux"

LOG FILE

The file /var/log/tazinst.log holds the install log and is copied to the installed system. The clean command erases it.

MAINTAINERS

Christophe Lincoln <pankso at slitaz.org>
Dominique Corbex <domcox at slitaz.org>