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

Update index and pages on 2011-03-26.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Mar 26 19:56:08 2011 +0000 (2011-03-26)
parents df9950c99d41
children 90832bdf1ed3
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 The following configurations are using the SliTaz 4.0 boot loader **grub4dos-linux**.
7 ===== Frugal install =====
9 You don't need a special partition, the system runs in RAM like a Live CD...
11 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]]
13 ...it can be tuned to your needs a little bit.
15 See [[http://doc.slitaz.org/en:guides:frugal#tuning-the-boot-process|tune boot]]
17 You can also use a LORAM flavor created with //tazlitobox// and //The filesystem is always in RAM//...
19 ...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:
20 # blkid
21 And append the param //loram=// to the cmdline:
22 <file>
23 kernel (hd1)/boot/bzImage rw root=/dev/null vga=normal loram=LABEL=mypartition,this/directory
24 </file>
25 <note tip>
26 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>
28 ===== USB key install =====
30 ==== Tazusb ====
32 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-).
33 See [[http://hg.slitaz.org/tazusb/raw-file/tip/doc/tazusb.en.html|tazusb manual]]
35 ==== Hybrid ISO ====
37 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]].
39 ===== Floppy install =====
41 ==== The last resort install ====
43 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.
45 ==== Prepare a floppy set ====
47 Get a floppy set from http://mirror.slitaz.org/floppies/. The base subset should be sufficient (5 floppies).
48 <note tip>Your may use one floppy only with [[http://pizza.slitaz.org/tiny/|tiny slitaz]]
49 for a manual install (without the slitaz-installer)</note>
51 Build a data floppy set from the ISO image:
52 <code># echo "slitaz.iso" | cpio -o -H newc | split -b 1440k /dev/stdin iso
53 # dd if=isoaa of=/dev/fd0
54 # dd if=isoab of=/dev/fd0
55 # ...</code>
57 <note tip>Some [[http://mirror.slitaz.org/floppies/#fdiso|data floppy sets]] can be generated on SliTaz mirrors</note>
58 ==== Transfer the ISO image onto hard disk ====
60 Boot from the slitaz floppy set, mount a hard disk partition in /mnt and restore the data floppy set in /mnt:
61 <code># cd /mnt
62 # dd if=/dev/fd0 of=fdiso01
63 # dd if=/dev/fd0 of=fdiso02
64 ...
65 # cat fdiso* | cpio -i
66 # rm fdiso*</code>
67 Now you can use any install method from an ISO image. Example:
68 <code># mount -o loop,ro slitaz.iso /media/cdrom
69 # slitaz-installer</code>
71 ===== Loop install =====
73 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)...
75 ... create a loop file and install SliTaz into it!
77 The problem is: what size? 200MB should be the minimum. Imagine, you could like it and install many more packages!
79 ==== Loopfile creation ====
81 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:
82 # dd if=/dev/zero bs=1M count=200 of=slitaz.fs
84 You now need to create a filesystem in this loopfile:
85 # yes | mke2fs -j slitaz.fs
87 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):
88 # dd if=/dev/zero bs=1M count=100 >> slitaz.fs
89 # resize2fs slitaz.fs
91 ==== Root filesystem files installation ====
93 Copy files from the rootfs.gz archive of a cdrom into the loopfile:
94 # mount /dev/cdrom /media/cdrom
95 # mount -o loop,rw slitaz.fs /mnt
96 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt; cpio -idmu )
97 # umount -d /mnt
98 # umount /media/cdrom
100 ==== Boot setup ====
102 Get a **preinit** iso file with same version (the kernel version must match the modules version in the root filesystem).
103 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:
104 <file>
105 title SliTaz cooking
106 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
107 map --hook
108 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
109 initrd (hd1)/boot/rootfs.gz
110 </file>
111 <note tip>The loop install does not use exotic packages from preinit. You can use any SliTaz flavor (except lorams).</note>
112 <note tip>
113 You can built an up-to-date **preinit** iso anytime with<code># tazlito get-flavor preinit
114 # tazlito gen-distro</code></note>
115 <file>
116 title SliTaz cooking in loop file
117 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
118 map --hook
119 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
120 initrd (hd1)/boot/rootfs.gz
122 title SliTaz cooking in RAM (like the Live CD)
123 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
124 map --hook
125 kernel (hd1)/boot/bzImage rw root=/dev/null autologin
126 initrd (hd1)/boot/rootfs.gz
127 </file>
128 Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:
129 <file>
130 title SliTaz cooking
131 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
132 map --hook
133 kernel (hd1)/boot/bzImage mount=a4b346ee-4c7b-46aa-9fd4-6bc39ab4fa96 loopfs=data/slitaz.fs
134 initrd (hd1)/boot/rootfs.gz
135 </file>
136 <note tip>You can extract the bzImage and rootfs.gz from the iso image to avoid map commands and defragmentation.</note>
138 ===== Subdirectory install =====
140 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...
142 ... create a subdirectory and install SliTaz into it!
144 <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.
145 </note>
147 ==== Root filesystem files installation ====
149 Simply install SliTaz file in a subdirectory (say /var/slitaz) of another linux partition:
150 # mkdir /mnt/var/slitaz
151 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt/var/slitaz ; cpio -idmu )
153 ==== Boot setup ====
155 Like a loop install, you need a preinit iso file with a matching version.
156 The partition (say /dev/hda1) and the path into the partition are defined by the mount and subroot arguments:
157 <file>
158 title SliTaz cooking
159 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
160 map --hook
161 kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=var/slitaz
162 initrd (hd1)/boot/rootfs.gz
163 </file>
165 Both notes in 'Loop install' section about bzImage extraction and UUID/LABEL also apply here.
166 <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>
168 ===== LVM install =====
170 The Logical Volume Manager can manage (add disks, replace disks ...) and logically freeze any disks for backup (snapshots) without disrupting service.
171 See [[wp>Logical_Volume_Manager_(Linux)]]
173 ==== LVM partition setup ====
175 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.
176 Assuming we use the sda1 partition with 5% reserved for snapshots:
177 # tazpkg get-install lvm2
178 # modprobe dm-mod
179 # pvcreate /dev/sda1
180 # vgcreate slitaz /dev/sda1
181 # lvcreate -l 95%VG slitaz -n root
182 # mke2fs -j /dev/mapper/slitaz-root
183 # tune2fs -c 0 -i 0 /dev/mapper/slitaz-root
184 # mount /dev/mapper/slitaz-root /mnt
186 ==== Root filesystem files installation ====
188 Similar to a loop install:
189 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
191 ==== Boot setup ====
193 Like a loop install, you need a **preinit** iso file with a matching version. The argument **lvmroot** holds the volume name:
194 <file>
195 title SliTaz cooking
196 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
197 map --hook
198 kernel (hd1)/boot/bzImage lvmroot=slitaz-root
199 initrd (hd1)/boot/rootfs.gz
200 </file>
202 ===== RAID install =====
204 ==== Hardware RAID ====
206 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.
208 ==== Semi hardware RAID ====
210 === Creation & installation ===
212 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:
213 # tazpkg get-install lvm2
214 # tazpkg get-install dmraid
215 # dmraid -s <== shows raid infomation
216 # modprobe raid1 <== could be raid0, raid456 or raid10
217 # dmraid -ay <== activates the array in /dev/mapper
218 # mount /etc/mapper/myraid /media
219 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
221 === Boot setup ===
223 Like a loop install, you need a **preinit** iso file with a matching version. The argument **dmraid** holds the volume name:
224 <file>
225 title SliTaz cooking
226 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
227 map --hook
228 kernel (hd1)/boot/bzImage dmraid=myraid
229 initrd (hd1)/boot/rootfs.gz
230 </file>
234 ==== Software RAID ====
236 The array does not need the BIOS and can be fully administered remotely!
237 <note tip>
238 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...
239 </note>
241 === Creation & installation ===
243 Example for mirroring (raid1) devices /dev/sda3 and /dev/sdb3:
244 # tazpkg get-install lvm2
245 # tazpkg get-install mdadm
246 # echo y | mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 --bitmap=internal --assume-clean
247 # modprobe raid1
248 # mdadm --assemble --scan
249 # mount /dev/md0 /media
250 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
252 === Boot setup ===
254 Like a loop install, you need a preinit iso file with a matching version. The argument **softraid** holds the device name:
255 <file>
256 title SliTaz cooking
257 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
258 map --hook
259 kernel (hd1)/boot/bzImage softraid=/dev/md0
260 initrd (hd1)/boot/rootfs.gz
261 </file>
263 ===== Crypto install =====
265 <note>
266 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)
267 </note>
269 ==== LUKS ====
271 [[wp>LUKS]] replaces the [[wp>Cryptoloop]] and Loop-AES formats now.
273 === Creation & installation ===
275 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:
276 # mke2fs -j /dev/mapper/crypto-sda3
277 # tune2fs -c 0 -i 0 /dev/mapper/crypto-sda3
278 # mount /dev/mapper/crypto-sda3 /media
279 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
281 === Boot setup ===
283 Like a loop install, you need a preinit iso file with a matching version. The argument cryptoroot holds the volume name:
284 <file>
285 title SliTaz cooking
286 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
287 map --hook
288 kernel (hd1)/boot/bzImage cryptoroot=sda3
289 initrd (hd1)/boot/rootfs.gz
290 </file>
292 ====== TODO ======
294 ==== Loop-AES compatibility ====
296 This deprecated format needs the same __boot setup__ as LUKS.
298 ====== TODO ======
300 ===== Mixed install =====
302 You can mix several above methods using one device access and/or one filesystem access.
304 ^Device access^Filesystem access^
305 |mount=|subroot=|
306 |*raid=|loopfs=|
307 |lvmroot=|cryptoroot=|
308 |*raid= + lvmroot=|loopfs= + cryptoroot=|
310 ==== Example 1 : RAID + LVM ====
312 ==== Example 2 : Loop + crypto ====
314 ==== Possible improvements? ====
316 Add network support: nbd/iscsi + RAID 1 net&local + crypto
318 ====== TODO ======
320 ===== PXE: No install ! =====
322 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-))