slitaz-doc-wiki-data view pages/en/guides/uncommoninst.txt @ rev 7

Add pages/en folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 26 12:17:18 2011 +0000 (2011-02-26)
parents
children df9950c99d41
line source
1 ====== Unusual install methods ======
3 The //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...
5 ===== Frugal install =====
7 You don't need a special partition, the system runs in RAM like a Live CD...
9 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]]
11 ...it can be tuned to your needs a little bit.
13 See [[http://doc.slitaz.org/en:guides:frugal#tuning-the-boot-process|tune boot]]
15 You can also use a LORAM flavor created with //tazlitobox// and //The filesystem is always in RAM//...
17 ...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:
18 # blkid
19 And append the param //loram=// to the cmdline:
20 <file>
21 kernel (hd1)/boot/bzImage rw root=/dev/null vga=normal loram=LABEL=mypartition,this/directory
22 </file>
23 <note tip>
24 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.</note>
26 ===== USB key install =====
28 ==== Tazusb ====
30 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-).
31 See [[http://hg.slitaz.org/tazusb/raw-file/tip/doc/tazusb.en.html|tazusb manual]]
33 ==== Hybrid ISO ====
35 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]].
37 ===== Loop install =====
39 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)...
41 ... create a loop file and install SliTaz into it!
43 The problem is: what size? 200MB should be the minimum. Imagine, you could like it and install many more packages!
45 ==== Loopfile creation ====
47 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:
48 # dd if=/dev/zero bs=1M count=200 of=slitaz.fs
50 You now need to create a filesystem in this loopfile:
51 # yes | mke2fs -j slitaz.fs
53 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):
54 # dd if=/dev/zero bs=1M count=100 >> slitaz.fs
55 # resize2fs slitaz.fs
57 ==== Root filesystem files installation ====
59 Copy files from the rootfs.gz archive of a cdrom into the loopfile:
60 # mount /dev/cdrom /media/cdrom
61 # mount -o loop,ro slitaz.fs /media
62 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt; cpio -idmu )
63 # umount -d /mnt
64 # umount /media/cdrom
66 ==== Boot setup ====
68 Get a **preinit** iso file with same version (the kernel version must match the modules version in the root filesystem).
69 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:
70 <file>
71 title SliTaz cooking
72 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
73 map --hook
74 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
75 initrd (hd1)/boot/rootfs.gz
76 </file>
77 <note tip>The loop install does not use exotic packages from preinit. You can use any SliTaz flavor (except lorams).</note>
78 <note tip>
79 You can built an up-to-date **preinit** iso anytime with<code># tazlito get-flavor preinit
80 # tazlito gen-distro</code></note>
81 <file>
82 title SliTaz cooking in loop file
83 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
84 map --hook
85 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
86 initrd (hd1)/boot/rootfs.gz
88 title SliTaz cooking in RAM (like the Live CD)
89 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
90 map --hook
91 kernel (hd1)/boot/bzImage rw root=/dev/null autologin
92 initrd (hd1)/boot/rootfs.gz
93 </file>
94 Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:
95 <file>
96 title SliTaz cooking
97 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
98 map --hook
99 kernel (hd1)/boot/bzImage mount=a4b346ee-4c7b-46aa-9fd4-6bc39ab4fa96 loopfs=data/slitaz.fs
100 initrd (hd1)/boot/rootfs.gz
101 </file>
102 <note tip>You can extract the bzImage and rootfs.gz from the iso image to avoid map commands and defragmentation.</note>
104 ===== Subdirectory install =====
106 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...
108 ... create a subdirectory and install SliTaz into it!
110 <note important>This install method can waste some MB of RAM: it loads a ramdisk from the preinit flavor and doesn't disallocate RAM fully from the ramdisk.
111 </note>
113 ==== Root filesystem files installation ====
115 Simply install SliTaz file in a subdirectory (say /var/slitaz) of another linux partition:
116 # mkdir /mnt/var/slitaz
117 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt/var/slitaz ; cpio -idmu )
119 ==== Boot setup ====
121 Like a loop install, you need a preinit iso file with a matching version.
122 The partition (say /dev/hda1) and the path into the partition are defined by the mount and subroot arguments:
123 <file>
124 title SliTaz cooking
125 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
126 map --hook
127 kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=var/slitaz
128 initrd (hd1)/boot/rootfs.gz
129 </file>
131 Both notes in 'Loop install' section about bzImage extraction and UUID/LABEL also apply here.
132 <note tip>The subdirectory install does not use exotic packages from preinit. You can use any SliTaz flavor (except lorams). However this is not recommended because the RAM filesystem is not fully disallocated</note>
134 ===== LVM install =====
136 The Logical Volume Manager can manage (add disks, replace disks ...) and logically freeze any disks for backup (snapshots) without disrupting service.
137 See [[wp>Logical_Volume_Manager_(Linux)]]
139 ==== LVM partition setup ====
141 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.
142 Assuming we use the sda1 partition with 5% reserved for snapshots:
143 # tazpkg get-install lvm2
144 # modprobe dm-mod
145 # pvcreate /dev/sda1
146 # vgcreate slitaz /dev/sda1
147 # lvcreate -l 95%VG slitaz -n root
148 # mke2fs -j /dev/mapper/slitaz-root
149 # tune2fs -c 0 -i 0 /dev/mapper/slitaz-root
150 # mount /dev/mapper/slitaz-root /mnt
152 ==== Root filesystem files installation ====
154 Similar to a loop install:
155 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
157 ==== Boot setup ====
159 Like a loop install, you need a **preinit** iso file with a matching version. The argument **lvmroot** holds the volume name:
160 <file>
161 title SliTaz cooking
162 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
163 map --hook
164 kernel (hd1)/boot/bzImage lvmroot=slitaz-root
165 initrd (hd1)/boot/rootfs.gz
166 </file>
168 ===== RAID install =====
170 ==== Hardware RAID ====
172 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.
174 ==== Semi hardware RAID ====
176 === Creation & installation ===
178 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:
179 # tazpkg get-install lvm2
180 # tazpkg get-install dmraid
181 # dmraid -s <== shows raid infomation
182 # modprobe raid1 <== could be raid0, raid456 or raid10
183 # dmraid -ay <== activates the array in /dev/mapper
184 # mount /etc/mapper/myraid /media
185 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
187 === Boot setup ===
189 Like a loop install, you need a **preinit** iso file with a matching version. The argument **dmraid** holds the volume name:
190 <file>
191 title SliTaz cooking
192 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
193 map --hook
194 kernel (hd1)/boot/bzImage dmraid=myraid
195 initrd (hd1)/boot/rootfs.gz
196 </file>
200 ==== Software RAID ====
202 The array does not need the BIOS and can be fully administered remotely!
203 <note tip>
204 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...
205 </note>
207 === Creation & installation ===
209 Example for mirroring (raid1) devices /dev/sda3 and /dev/sdb3:
210 # tazpkg get-install lvm2
211 # tazpkg get-install mdadm
212 # echo y | mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 --bitmap=internal --assume-clean
213 # modprobe raid1
214 # mdadm --assemble --scan
215 # mount /dev/md0 /media
216 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
218 === Boot setup ===
220 Like a loop install, you need a preinit iso file with a matching version. The argument **softraid** holds the device name:
221 <file>
222 title SliTaz cooking
223 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
224 map --hook
225 kernel (hd1)/boot/bzImage softraid=/dev/md0
226 initrd (hd1)/boot/rootfs.gz
227 </file>
229 ===== Crypto install =====
231 <note>
232 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)
233 </note>
235 ==== LUKS ====
237 [[wp>LUKS]] replaces the [[wp>Cryptoloop]] and Loop-AES formats now.
239 === Creation & installation ===
241 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:
242 # mke2fs -j /dev/mapper/crypto-sda3
243 # tune2fs -c 0 -i 0 /dev/mapper/crypto-sda3
244 # mount /dev/mapper/crypto-sda3 /media
245 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
247 === Boot setup ===
249 Like a loop install, you need a preinit iso file with a matching version. The argument cryptoroot holds the volume name:
250 <file>
251 title SliTaz cooking
252 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
253 map --hook
254 kernel (hd1)/boot/bzImage cryptoroot=sda3
255 initrd (hd1)/boot/rootfs.gz
256 </file>
258 ====== TODO ======
260 ==== Loop-AES compatibility ====
262 This deprecated format needs the same __boot setup__ as LUKS.
264 ====== TODO ======
266 ===== Mixed install =====
268 You can mix several above methods using one device access and/or one filesystem access.
270 ^Device access^Filesystem access^
271 |mount=|subroot=|
272 |*raid=|loopfs=|
273 |lvmroot=|cryptoroot=|
274 |*raid= + lvmroot=|loopfs= + cryptoroot=|
276 ==== Example 1 : RAID + LVM ====
278 ==== Example 2 : Loop + crypto ====
280 ==== Possible improvements? ====
282 Add network support: nbd/iscsi + RAID 1 net&local + crypto
284 ====== TODO ======
286 ===== PXE: No install ! =====
288 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-))