TazUSB - SliTaz LiveUSB utility
tazusb [command] [compression|device|file]
TazUSB is a utility designed for installing SliTaz to a USB drive. Unlike a hard drive install, the filesystem is kept in a compressed "rootfs.gz" file. The filesystem is loaded entirely into memory upon boot. This should increase responsiveness, protect the filesystem against accidental corruption and reduce read/writes to the USB drive. Once setup, this utility can also rewrite the root filesystem with any changes you have made since booting up, giving the effective benefits of a hard drive install.
TazUSB supports FAT32/EXT3/EXT2 formatted drives using SYSLINUX and EXTLINUX respectively. "/home" is mounted on boot using the UUID of your particular flash drive. Unlike a device name, the UUID has the benefit of never changing from machine to machine.
The command 'usage' will display a short summary of all available commands.
# tazusb usage
The command 'writefs' will take the current memory resident filesystem and create a "rootfs.gz" file. If your flash drive is mounted as /home (as it should be), the new filesystem will be copied to the drive for you, otherwise it is left on the root of the drive. Your previous filesystem will be renamed to "previous.gz" and can be accessed on bootup by typing "previous" at the "boot:" prompt. All previous filesystems are renamed to rootfs.gz.unixtimestamp. These are not removed automatically, so you should periodically delete these to keep disk usage down.
Filesystem compression is supported in the form of lzma, gzip or none. Using no compression is very quick (under 5 seconds) and useful if you are experimenting with a lot of changes. By comparison, using lzma or gzip takes a few minutes but will dramatically reduce file size. This is recommended when committing permanent changes to the filesystem.
# tazusb writefs compression
# tazusb writefs lzma
The command 'format' is used for formatting a device for use as a LiveUSB device. Currently, it supports formatting as EXT2, EXT3 and FAT32.
# tazusb format /dev/name
# tazusb format /dev/sda1
"gen-liveusb" will install a fresh MBR, set your partition as bootable and install syslinux/extlinux depending on the detected filesystem. It will then copy the kernel and filesystem from the CDROM drive, and place this on the target USB drive. This will leave you with a bootable USB copy of SliTaz.
# tazusb gen-liveusb /dev/name
# tazusb gen-liveusb /dev/sda1
The 'gen-swap' command re/creates a virtual swap file and places it in the /home directory to be activated on each boot. This is useful for old systems with low memory.
# tazusb gen-swap
This command performs the same task as gen-liveusb, only copying the Kernel and filesystem from a downloaded ISO image instead of the CDROM drive.
# tazusb gen-iso2usb /path/to/iso
# tazusb gen-iso2usb /home/tux/slitaz.iso
"clean" removes old rootfs.gz.unixtimestamp filesystems (see writefs) to keep disk usage down.
# tazusb clean
Eric Joseph-Alexandre <erjo at slitaz.org>