====== Unusual install methods ======
The //[[http://doc.slitaz.org/en:handbook:installation|slitaz-installer]]// installs SliTaz in a partition or a hard drive as most Linux distributions do. However, there are many other ways to install SliTaz...
The following configurations are using the SliTaz 4.0 boot loader **grub4dos-linux**.
Most kernel command line arguments are processed by [[http://hg.slitaz.org/slitaz-boot-scripts/file/tip/init|/init]] during the [[/en:guides:bootguide|boot process]].
===== Frugal install =====
You don't need a special partition, the system runs in RAM like a Live CD...
See [[http://doc.slitaz.org/en:guides:frugal#traditional-frugal-install|frugal install]] and [[http://doc.slitaz.org/en:guides:frugal#iso-image-install|ISO image install]]
...it can be tuned to your needs a little bit.
See [[http://doc.slitaz.org/en:guides:frugal#tuning-the-boot-process|tune boot]]
You can also use a LORAM flavor created with //tazlitobox// and //The filesystem is always in RAM//...
...or //The filesystem may be on a small CDROM//. Install the CD-ROM files // /boot/bzImage // and // /boot/rootfs.gz // and copy the // /rootfs.gz //. Say into // /this/directory //. Now get the label of the partition. Say mypartition:
# blkid
And append the param //loram=// to the cmdline:
kernel (hd1)/boot/bzImage rw root=/dev/null vga=normal loram=LABEL=mypartition,this/directory
You can also use a device name (loram=/dev/hda2,this/directory). The device name may vary with the kernel version (hda or sda) and USB keys.
===== USB key install =====
==== Tazusb ====
This is a mix between a frugal and traditional install. The system runs fully in RAM but the // home // directory is always on the key. You can modify the system (configure, install packages) and then save the new system on the key 8-).
See [[http://hg.slitaz.org/tazusb/raw-file/tip/doc/tazusb.en.html|tazusb manual]]
You can create the USB key from the ISO image
# tazusb gen-iso2usb slitaz-cooking.iso
==== Hybrid ISO ====
This install method will **erase all of your key** and install a **unmodifiable** :-/ SliTaz. You can create a custom system with //tazlito// or //tazlitobox//. Each Slitaz ISO image is [[http://doc.slitaz.org/en:guides:dvd#hybrid-iso|hybrid]].
Use fdisk to get back the remining free space on the USB keys. Simply add a partition(s).
# dd if=slitaz-cooking.iso of=/dev/usbkey
# fdisk /dev/usbkey
===== Floppy install =====
==== The last resort install ====
Imagine you have a very old PC with a floppy drive and a hard disk. No CD-ROM, no network card, and no USB. The hard disk works only with this machine. You can't plug it into your friend's PC or into an USB disk box.
==== Prepare a floppy set ====
Get a floppy set from http://mirror.slitaz.org/floppies/. The base subset should be sufficient (6 floppies).
Your may use one floppy only with [[http://pizza.slitaz.org/tiny/|tiny slitaz]]
for a manual install (without the slitaz-installer)
Build a data floppy set from the ISO image:
# echo "slitaz.iso" | cpio -o -H newc | split -b 1440k /dev/stdin iso
# dd if=isoaa of=/dev/fd0
# dd if=isoab of=/dev/fd0
# ...
Some [[http://mirror.slitaz.org/floppies/#fdiso|data floppy sets]] can be generated on SliTaz mirrors
==== Transfer the ISO image onto hard disk ====
Boot from the slitaz floppy set, mount a hard disk partition in /mnt and restore the data floppy set in /mnt:
# cd /mnt
# dd if=/dev/fd0 of=fdiso01
# dd if=/dev/fd0 of=fdiso02
...
# cat fdiso* | cpio -i
# rm fdiso*
If space is critical, replace the last 2 lines with:
for i in fdiso*; do cat $i; rm -f $i; done | cpio -i
Now you can use any install method from an ISO image. Example:
# mount -o loop,ro slitaz.iso /media/cdrom
# slitaz-installer
With [[http://pizza.slitaz.org/tiny/|tiny slitaz]], you don't have the slitaz-installer.
You can start a frugal install:
# mkdir boot && cp /media/cdrom/boot/bzImage /media/cdrom/boot/rootfs.gz boot && rm slitaz.iso
and optionally a standard install:
# unlzma -c boot/rootfs.gz | cpio -id
The problem: you have no boot loader!
Boot the [[http://mirror.slitaz.org/boot/floppy-grub4dos|SliTaz generic boot floppy]] with the **SliTaz frugal** menu entry. Now you can install the Grub bootloader on the hard disk.
===== Loop install =====
If you want to install SliTaz on a disk (not a frugal install), and you don't want to create a partition for SliTaz, but you have enough room in a feature-poor filesystem (FAT32 or NTFS)...
... create a loop file and install SliTaz into it!
The problem is: what size? 200MB should be the minimum. Imagine, you could like it and install many more packages!
==== Loopfile creation ====
You can create the loop file with **mountbox** (click loop, enter the file name, then click create, enter the size, the units, click create) or with the command line:
# dd if=/dev/zero bs=1M count=200 of=slitaz.fs
You now need to create a filesystem in this loopfile:
# yes | mke2fs -j slitaz.fs
Later, if the loopfile is too small you can extend it (assuming you don't boot from the loopfile, but a Slitaz Live CD for example):
# dd if=/dev/zero bs=1M count=100 >> slitaz.fs
# resize2fs slitaz.fs
==== Root filesystem files installation ====
Copy files from the rootfs.gz archive of a cdrom into the loopfile:
# mount /dev/cdrom /media/cdrom
# mount -o loop,rw slitaz.fs /mnt
# unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt; cpio -idmu )
# umount -d /mnt
# umount /media/cdrom
==== Boot setup ====
Get a **preinit** iso file with same version (the kernel version must match the modules version in the root filesystem).
The partition storing the loopfile (say /dev/hda1) and its path into the partition (say /data/slitaz.fs) is defined by the **mount** and **loopfs** arguments:
title SliTaz cooking
map (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
initrd (hd1)/boot/rootfs.gz
The loop install does not use exotic packages from preinit. You can use any SliTaz flavor (except lorams).
You can built an up-to-date **preinit** iso anytime with# tazlito get-flavor preinit
# tazlito gen-distro
title SliTaz cooking in loop file
map (hd0,0)/boot/slitaz-cooking.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
initrd (hd1)/boot/rootfs.gz
title SliTaz cooking in RAM (like the Live CD)
map (hd0,0)/boot/slitaz-cooking.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage rw root=/dev/null autologin
initrd (hd1)/boot/rootfs.gz
Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:
title SliTaz cooking
map (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage mount=a4b346ee-4c7b-46aa-9fd4-6bc39ab4fa96 loopfs=data/slitaz.fs
initrd (hd1)/boot/rootfs.gz
You can extract the bzImage and rootfs.gz from the iso image to avoid map commands and defragmentation.
===== Subdirectory install in a Posix filesystem =====
If you want install SliTaz on a disk (not a frugal install), and you don't want to create a partition for SliTaz, but you have room in a filesystem for another Unix and you don't know how much space to reserve for SliTaz...
... create a subdirectory and install SliTaz into it!
==== Root filesystem files installation ====
Simply install SliTaz file in a subdirectory (say /var/slitaz) of another linux partition:
# mkdir /mnt/var/slitaz
# unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt/var/slitaz ; cpio -idmu )
==== Boot setup ====
Like a loop install, you need a preinit iso file with a matching version.
The partition (say /dev/hda1) and the path into the partition are defined by the mount and subroot arguments:
title SliTaz cooking
map (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=var/slitaz
initrd (hd1)/boot/rootfs.gz
Both notes in 'Loop install' section about bzImage extraction and UUID/LABEL also apply here.
The subdirectory install does not use exotic packages from preinit. You can use any SliTaz flavor (except lorams).
The subdirectory install can be easily tested with a [[wp>Raspberry_Pi]] running [[wp>Raspbian]] with the [[http://hg.slitaz.org/slitaz-arm/raw-file/tip/rpi/tazbian|tazbian]] script. This script creates a raspbian package from the latest SliTaz tarballs found on the [[http://mirror.slitaz.org/arm/rpi/|mirror]] . The installation of this package $ sudo dpkg -i slitaz--1_armhf.deb
will install SliTaz in /var/os/slitaz and setup a multiboot. It does not remove rasbian or alter partitions.
===== Subdirectory install in a non-Posix filesystem =====
You want to install SliTaz in a subdirectory but the filesystem ([[wp>NTFS]] or [[wp>VFAT]]) does not fully support UNIX features.
Use [[http://mirror.slitaz.org/pkgs/?package=posixovl|posixovl]] !
==== Root filesystem files installation ====
You need to mount the target subdirectory (say /slitaz) with posixovl **before** installing the files.
# mkdir /mnt/slitaz
# mount.posixovl /mnt/slitaz
# unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt/slitaz ; cpio -idmu )
Windows users can extract the archive http://mirror.slitaz.org/iso/4.0/slitaz-4.0.zip and look at the file \slitaz\boot\install.txt
==== Boot setup ====
Like a loop install, you need a preinit iso file with a matching version.
The partition (say /dev/hda1) and the path into the partition are defined by the mount, subroot and **posixovl** arguments:
title SliTaz cooking
map --mem --heads=0 --sectors-per-track=0 (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=slitaz posixovl
initrd (hd1)/boot/rootfs.gz
Both notes in 'Loop install' section about bzImage extraction and UUID/LABEL also apply here.
====== TODO ======
==== Extra setup ====
You want to see the host partition while running SliTaz like [[wp>UMSDOS]] does with /DOS.
Create the mount point:
# mkdir /mnt/slitaz/Windows
And update the boot arguments:
title SliTaz cooking
map (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=slitaz posixovl bindfs=.,slitaz/Windows
initrd (hd1)/boot/rootfs.gz
====== TODO ======
===== LVM install =====
The Logical Volume Manager can manage (add disks, replace disks ...) and logically freeze any disks for backup (snapshots) without disrupting service.
See [[wp>Logical_Volume_Manager_(Linux)]]
==== LVM partition setup ====
A small amount of storage (depending on the disk activity, likely between 1% and 15%) is used by snapshots to hold frozen data during a backup.
Assuming we use the sda1 partition with 5% reserved for snapshots:
# tazpkg get-install lvm2
# modprobe dm-mod
# pvcreate /dev/sda1
# vgcreate slitaz /dev/sda1
# lvcreate -l 95%VG slitaz -n root
# mke2fs -j /dev/mapper/slitaz-root
# tune2fs -c 0 -i 0 /dev/mapper/slitaz-root
# mount /dev/mapper/slitaz-root /mnt
==== Root filesystem files installation ====
Similar to a loop install:
# unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
==== Boot setup ====
Like a loop install, you need a **preinit** iso file with a matching version. The argument **lvmroot** holds the volume name:
title SliTaz cooking
map (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage lvmroot=slitaz-root
initrd (hd1)/boot/rootfs.gz
===== RAID install =====
==== Hardware RAID ====
Full hardware [[wp>RAID]] is transparent for SliTaz. The disk array is seen as a single disk and nothing special has to be done to install SliTaz.
==== Semi hardware RAID ====
=== Creation & installation ===
The [[wp>RAID]] array is built with the BIOS menus. SliTaz needs the driver **dmraid** to see the array and not only each hard disk:
# tazpkg get-install lvm2
# tazpkg get-install dmraid
# dmraid -s <== shows raid infomation
# modprobe raid1 <== could be raid0, raid456 or raid10
# dmraid -ay <== activates the array in /dev/mapper
# mount /etc/mapper/myraid /media
# unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
=== Boot setup ===
Like a loop install, you need a **preinit** iso file with a matching version. The argument **dmraid** holds the volume name:
title SliTaz cooking
map (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage dmraid=myraid
initrd (hd1)/boot/rootfs.gz
==== Software RAID ====
The array does not need the BIOS and can be fully administered remotely!
You should tune the **preinit** flavor to your needs. Enable the dropbear startup in /etc/rcS.conf and maybe install a VPN. If the software RAID does not start on startup, you will be able to fix it remotely...
=== Creation & installation ===
Example for mirroring (raid1) devices /dev/sda3 and /dev/sdb3:
# tazpkg get-install lvm2
# tazpkg get-install mdadm
# echo y | mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 --bitmap=internal --assume-clean
# modprobe raid1
# mdadm --assemble --scan
# mount /dev/md0 /media
# unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
=== Boot setup ===
Like a loop install, you need a preinit iso file with a matching version. The argument **softraid** holds the device name:
title SliTaz cooking
map (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage softraid=/dev/md0
initrd (hd1)/boot/rootfs.gz
===== Crypto install =====
Encrypts the whole [[wp>Disk_encryption|root filesystem]], not just the /home partition. Important, because the files in /tmp, /var/tmp may betray your work. The swap does too unless you use a file instead of a partition (like /tmp/swapfile; this will be encrypted too because this file is in the root filesystem)
==== LUKS ====
[[wp>LUKS]] replaces the [[wp>Cryptoloop]] and Loop-AES formats now.
=== Creation & installation ===
Create the encrypted device with **mountbox** (crypto button). You may have to accept the missing packages installation. Select the device (say /dev/sda3) and click the **create** button. Now you can start to format it:
# mke2fs -j /dev/mapper/crypto-sda3
# tune2fs -c 0 -i 0 /dev/mapper/crypto-sda3
# mount /dev/mapper/crypto-sda3 /media
# unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
=== Boot setup ===
Like a loop install, you need a preinit iso file with a matching version. The argument cryptoroot holds the volume name:
title SliTaz cooking
map (hd0,0)/boot/slitaz-preinit.iso (hd1)
map --hook
kernel (hd1)/boot/bzImage cryptoroot=sda3
initrd (hd1)/boot/rootfs.gz
====== TODO ======
==== Loop-AES compatibility ====
This deprecated format needs the same __boot setup__ as LUKS.
====== TODO ======
===== Mixed install =====
You can mix several above methods using one device access and/or one filesystem access.
^Device access^Filesystem access^
|mount=|subroot=|
|*raid=|loopfs=|
|lvmroot=|cryptoroot=|
|*raid= + lvmroot=|loopfs= + cryptoroot=|
==== Example 1 : RAID + LVM ====
==== Example 2 : Loop + crypto ====
==== Possible improvements? ====
Add network support: nbd/iscsi + RAID 1 net&local + crypto
====== TODO ======
===== PXE: No install ! =====
You can [[http://doc.slitaz.org/en:guides:pxe#pxe-server-set-up|setup a PXE server]] (well... you need to configure your server) or a [[http://doc.slitaz.org/en:guides:pxe#advanced-web-booting-configuration|PXE forwarder]], see the //Embedded Web Boot with PXE boot PROM// (the SliTaz team has [[http://boot.slitaz.org|configured the server for you]] 8-))