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

Update pages folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun May 22 18:19:57 2011 +0000 (2011-05-22)
parents e5e969fb9e04
children a2596b780181
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 Most kernel command line arguments are processed by [[http://hg.slitaz.org/wok/file/tip/busybox/stuff/init|/init]].
8 ===== Frugal install =====
10 You don't need a special partition, the system runs in RAM like a Live CD...
12 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]]
14 ...it can be tuned to your needs a little bit.
16 See [[http://doc.slitaz.org/en:guides:frugal#tuning-the-boot-process|tune boot]]
18 You can also use a LORAM flavor created with //tazlitobox// and //The filesystem is always in RAM//...
20 ...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:
21 # blkid
22 And append the param //loram=// to the cmdline:
23 <file>
24 kernel (hd1)/boot/bzImage rw root=/dev/null vga=normal loram=LABEL=mypartition,this/directory
25 </file>
26 <note tip>
27 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>
29 ===== USB key install =====
31 ==== Tazusb ====
33 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-).
34 See [[http://hg.slitaz.org/tazusb/raw-file/tip/doc/tazusb.en.html|tazusb manual]]
36 ==== Hybrid ISO ====
38 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]].
40 ===== Floppy install =====
42 ==== The last resort install ====
44 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.
46 ==== Prepare a floppy set ====
48 Get a floppy set from http://mirror.slitaz.org/floppies/. The base subset should be sufficient (5 floppies).
49 <note tip>Your may use one floppy only with [[http://pizza.slitaz.org/tiny/|tiny slitaz]]
50 for a manual install (without the slitaz-installer)</note>
52 Build a data floppy set from the ISO image:
53 <code># echo "slitaz.iso" | cpio -o -H newc | split -b 1440k /dev/stdin iso
54 # dd if=isoaa of=/dev/fd0
55 # dd if=isoab of=/dev/fd0
56 # ...</code>
58 <note tip>Some [[http://mirror.slitaz.org/floppies/#fdiso|data floppy sets]] can be generated on SliTaz mirrors</note>
59 ==== Transfer the ISO image onto hard disk ====
61 Boot from the slitaz floppy set, mount a hard disk partition in /mnt and restore the data floppy set in /mnt:
62 <code># cd /mnt
63 # dd if=/dev/fd0 of=fdiso01
64 # dd if=/dev/fd0 of=fdiso02
65 ...
66 # cat fdiso* | cpio -i
67 # rm fdiso*</code>
68 Now you can use any install method from an ISO image. Example:
69 <code># mount -o loop,ro slitaz.iso /media/cdrom
70 # slitaz-installer</code>
72 ===== Loop install =====
74 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)...
76 ... create a loop file and install SliTaz into it!
78 The problem is: what size? 200MB should be the minimum. Imagine, you could like it and install many more packages!
80 ==== Loopfile creation ====
82 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:
83 # dd if=/dev/zero bs=1M count=200 of=slitaz.fs
85 You now need to create a filesystem in this loopfile:
86 # yes | mke2fs -j slitaz.fs
88 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):
89 # dd if=/dev/zero bs=1M count=100 >> slitaz.fs
90 # resize2fs slitaz.fs
92 ==== Root filesystem files installation ====
94 Copy files from the rootfs.gz archive of a cdrom into the loopfile:
95 # mount /dev/cdrom /media/cdrom
96 # mount -o loop,rw slitaz.fs /mnt
97 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt; cpio -idmu )
98 # umount -d /mnt
99 # umount /media/cdrom
101 ==== Boot setup ====
103 Get a **preinit** iso file with same version (the kernel version must match the modules version in the root filesystem).
104 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:
105 <file>
106 title SliTaz cooking
107 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
108 map --hook
109 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
110 initrd (hd1)/boot/rootfs.gz
111 </file>
112 <note tip>The loop install does not use exotic packages from preinit. You can use any SliTaz flavor (except lorams).</note>
113 <note tip>
114 You can built an up-to-date **preinit** iso anytime with<code># tazlito get-flavor preinit
115 # tazlito gen-distro</code></note>
116 <file>
117 title SliTaz cooking in loop file
118 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
119 map --hook
120 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
121 initrd (hd1)/boot/rootfs.gz
123 title SliTaz cooking in RAM (like the Live CD)
124 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
125 map --hook
126 kernel (hd1)/boot/bzImage rw root=/dev/null autologin
127 initrd (hd1)/boot/rootfs.gz
128 </file>
129 Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:
130 <file>
131 title SliTaz cooking
132 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
133 map --hook
134 kernel (hd1)/boot/bzImage mount=a4b346ee-4c7b-46aa-9fd4-6bc39ab4fa96 loopfs=data/slitaz.fs
135 initrd (hd1)/boot/rootfs.gz
136 </file>
137 <note tip>You can extract the bzImage and rootfs.gz from the iso image to avoid map commands and defragmentation.</note>
139 ===== Subdirectory install =====
141 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...
143 ... create a subdirectory and install SliTaz into it!
145 <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.
146 </note>
148 ==== Root filesystem files installation ====
150 Simply install SliTaz file in a subdirectory (say /var/slitaz) of another linux partition:
151 # mkdir /mnt/var/slitaz
152 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt/var/slitaz ; cpio -idmu )
154 ==== Boot setup ====
156 Like a loop install, you need a preinit iso file with a matching version.
157 The partition (say /dev/hda1) and the path into the partition are defined by the mount and subroot arguments:
158 <file>
159 title SliTaz cooking
160 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
161 map --hook
162 kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=var/slitaz
163 initrd (hd1)/boot/rootfs.gz
164 </file>
166 Both notes in 'Loop install' section about bzImage extraction and UUID/LABEL also apply here.
167 <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>
169 ===== LVM install =====
171 The Logical Volume Manager can manage (add disks, replace disks ...) and logically freeze any disks for backup (snapshots) without disrupting service.
172 See [[wp>Logical_Volume_Manager_(Linux)]]
174 ==== LVM partition setup ====
176 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.
177 Assuming we use the sda1 partition with 5% reserved for snapshots:
178 # tazpkg get-install lvm2
179 # modprobe dm-mod
180 # pvcreate /dev/sda1
181 # vgcreate slitaz /dev/sda1
182 # lvcreate -l 95%VG slitaz -n root
183 # mke2fs -j /dev/mapper/slitaz-root
184 # tune2fs -c 0 -i 0 /dev/mapper/slitaz-root
185 # mount /dev/mapper/slitaz-root /mnt
187 ==== Root filesystem files installation ====
189 Similar to a loop install:
190 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
192 ==== Boot setup ====
194 Like a loop install, you need a **preinit** iso file with a matching version. The argument **lvmroot** holds the volume name:
195 <file>
196 title SliTaz cooking
197 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
198 map --hook
199 kernel (hd1)/boot/bzImage lvmroot=slitaz-root
200 initrd (hd1)/boot/rootfs.gz
201 </file>
203 ===== RAID install =====
205 ==== Hardware RAID ====
207 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.
209 ==== Semi hardware RAID ====
211 === Creation & installation ===
213 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:
214 # tazpkg get-install lvm2
215 # tazpkg get-install dmraid
216 # dmraid -s <== shows raid infomation
217 # modprobe raid1 <== could be raid0, raid456 or raid10
218 # dmraid -ay <== activates the array in /dev/mapper
219 # mount /etc/mapper/myraid /media
220 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
222 === Boot setup ===
224 Like a loop install, you need a **preinit** iso file with a matching version. The argument **dmraid** holds the volume name:
225 <file>
226 title SliTaz cooking
227 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
228 map --hook
229 kernel (hd1)/boot/bzImage dmraid=myraid
230 initrd (hd1)/boot/rootfs.gz
231 </file>
235 ==== Software RAID ====
237 The array does not need the BIOS and can be fully administered remotely!
238 <note tip>
239 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...
240 </note>
242 === Creation & installation ===
244 Example for mirroring (raid1) devices /dev/sda3 and /dev/sdb3:
245 # tazpkg get-install lvm2
246 # tazpkg get-install mdadm
247 # echo y | mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 --bitmap=internal --assume-clean
248 # modprobe raid1
249 # mdadm --assemble --scan
250 # mount /dev/md0 /media
251 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
253 === Boot setup ===
255 Like a loop install, you need a preinit iso file with a matching version. The argument **softraid** holds the device name:
256 <file>
257 title SliTaz cooking
258 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
259 map --hook
260 kernel (hd1)/boot/bzImage softraid=/dev/md0
261 initrd (hd1)/boot/rootfs.gz
262 </file>
264 ===== Crypto install =====
266 <note>
267 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)
268 </note>
270 ==== LUKS ====
272 [[wp>LUKS]] replaces the [[wp>Cryptoloop]] and Loop-AES formats now.
274 === Creation & installation ===
276 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:
277 # mke2fs -j /dev/mapper/crypto-sda3
278 # tune2fs -c 0 -i 0 /dev/mapper/crypto-sda3
279 # mount /dev/mapper/crypto-sda3 /media
280 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
282 === Boot setup ===
284 Like a loop install, you need a preinit iso file with a matching version. The argument cryptoroot holds the volume name:
285 <file>
286 title SliTaz cooking
287 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
288 map --hook
289 kernel (hd1)/boot/bzImage cryptoroot=sda3
290 initrd (hd1)/boot/rootfs.gz
291 </file>
293 ====== TODO ======
295 ==== Loop-AES compatibility ====
297 This deprecated format needs the same __boot setup__ as LUKS.
299 ====== TODO ======
301 ===== Mixed install =====
303 You can mix several above methods using one device access and/or one filesystem access.
305 ^Device access^Filesystem access^
306 |mount=|subroot=|
307 |*raid=|loopfs=|
308 |lvmroot=|cryptoroot=|
309 |*raid= + lvmroot=|loopfs= + cryptoroot=|
311 ==== Example 1 : RAID + LVM ====
313 ==== Example 2 : Loop + crypto ====
315 ==== Possible improvements? ====
317 Add network support: nbd/iscsi + RAID 1 net&local + crypto
319 ====== TODO ======
321 ===== PXE: No install ! =====
323 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-))