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

Update pages folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Jul 03 03:07:31 2011 +0000 (2011-07-03)
parents 90832bdf1ed3
children ace065d7b076
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 <note tip>With [[http://pizza.slitaz.org/tiny/|tiny slitaz]], you don't have the slitaz-installer.
73 You can start a frugal install:
74 <code># mkdir boot && cp /media/cdrom/boot/bzImage /media/cdrom/boot/rootfs.gz boot && rm slitaz.iso</code>and optionally a standard install:
75 <code># unlzma -c boot/rootfs.gz | cpio -id </code>
76 The problem: you have no boot loader!
78 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.
79 </note>
80 ===== Loop install =====
82 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)...
84 ... create a loop file and install SliTaz into it!
86 The problem is: what size? 200MB should be the minimum. Imagine, you could like it and install many more packages!
88 ==== Loopfile creation ====
90 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:
91 # dd if=/dev/zero bs=1M count=200 of=slitaz.fs
93 You now need to create a filesystem in this loopfile:
94 # yes | mke2fs -j slitaz.fs
96 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):
97 # dd if=/dev/zero bs=1M count=100 >> slitaz.fs
98 # resize2fs slitaz.fs
100 ==== Root filesystem files installation ====
102 Copy files from the rootfs.gz archive of a cdrom into the loopfile:
103 # mount /dev/cdrom /media/cdrom
104 # mount -o loop,rw slitaz.fs /mnt
105 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt; cpio -idmu )
106 # umount -d /mnt
107 # umount /media/cdrom
109 ==== Boot setup ====
111 Get a **preinit** iso file with same version (the kernel version must match the modules version in the root filesystem).
112 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:
113 <file>
114 title SliTaz cooking
115 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
116 map --hook
117 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
118 initrd (hd1)/boot/rootfs.gz
119 </file>
120 <note tip>The loop install does not use exotic packages from preinit. You can use any SliTaz flavor (except lorams).</note>
121 <note tip>
122 You can built an up-to-date **preinit** iso anytime with<code># tazlito get-flavor preinit
123 # tazlito gen-distro</code></note>
124 <file>
125 title SliTaz cooking in loop file
126 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
127 map --hook
128 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
129 initrd (hd1)/boot/rootfs.gz
131 title SliTaz cooking in RAM (like the Live CD)
132 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
133 map --hook
134 kernel (hd1)/boot/bzImage rw root=/dev/null autologin
135 initrd (hd1)/boot/rootfs.gz
136 </file>
137 Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:
138 <file>
139 title SliTaz cooking
140 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
141 map --hook
142 kernel (hd1)/boot/bzImage mount=a4b346ee-4c7b-46aa-9fd4-6bc39ab4fa96 loopfs=data/slitaz.fs
143 initrd (hd1)/boot/rootfs.gz
144 </file>
145 <note tip>You can extract the bzImage and rootfs.gz from the iso image to avoid map commands and defragmentation.</note>
147 ===== Subdirectory install =====
149 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...
151 ... create a subdirectory and install SliTaz into it!
153 <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.
154 </note>
156 ==== Root filesystem files installation ====
158 Simply install SliTaz file in a subdirectory (say /var/slitaz) of another linux partition:
159 # mkdir /mnt/var/slitaz
160 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt/var/slitaz ; cpio -idmu )
162 ==== Boot setup ====
164 Like a loop install, you need a preinit iso file with a matching version.
165 The partition (say /dev/hda1) and the path into the partition are defined by the mount and subroot arguments:
166 <file>
167 title SliTaz cooking
168 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
169 map --hook
170 kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=var/slitaz
171 initrd (hd1)/boot/rootfs.gz
172 </file>
174 Both notes in 'Loop install' section about bzImage extraction and UUID/LABEL also apply here.
175 <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>
177 ===== LVM install =====
179 The Logical Volume Manager can manage (add disks, replace disks ...) and logically freeze any disks for backup (snapshots) without disrupting service.
180 See [[wp>Logical_Volume_Manager_(Linux)]]
182 ==== LVM partition setup ====
184 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.
185 Assuming we use the sda1 partition with 5% reserved for snapshots:
186 # tazpkg get-install lvm2
187 # modprobe dm-mod
188 # pvcreate /dev/sda1
189 # vgcreate slitaz /dev/sda1
190 # lvcreate -l 95%VG slitaz -n root
191 # mke2fs -j /dev/mapper/slitaz-root
192 # tune2fs -c 0 -i 0 /dev/mapper/slitaz-root
193 # mount /dev/mapper/slitaz-root /mnt
195 ==== Root filesystem files installation ====
197 Similar to a loop install:
198 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
200 ==== Boot setup ====
202 Like a loop install, you need a **preinit** iso file with a matching version. The argument **lvmroot** holds the volume name:
203 <file>
204 title SliTaz cooking
205 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
206 map --hook
207 kernel (hd1)/boot/bzImage lvmroot=slitaz-root
208 initrd (hd1)/boot/rootfs.gz
209 </file>
211 ===== RAID install =====
213 ==== Hardware RAID ====
215 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.
217 ==== Semi hardware RAID ====
219 === Creation & installation ===
221 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:
222 # tazpkg get-install lvm2
223 # tazpkg get-install dmraid
224 # dmraid -s <== shows raid infomation
225 # modprobe raid1 <== could be raid0, raid456 or raid10
226 # dmraid -ay <== activates the array in /dev/mapper
227 # mount /etc/mapper/myraid /media
228 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
230 === Boot setup ===
232 Like a loop install, you need a **preinit** iso file with a matching version. The argument **dmraid** holds the volume name:
233 <file>
234 title SliTaz cooking
235 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
236 map --hook
237 kernel (hd1)/boot/bzImage dmraid=myraid
238 initrd (hd1)/boot/rootfs.gz
239 </file>
243 ==== Software RAID ====
245 The array does not need the BIOS and can be fully administered remotely!
246 <note tip>
247 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...
248 </note>
250 === Creation & installation ===
252 Example for mirroring (raid1) devices /dev/sda3 and /dev/sdb3:
253 # tazpkg get-install lvm2
254 # tazpkg get-install mdadm
255 # echo y | mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 --bitmap=internal --assume-clean
256 # modprobe raid1
257 # mdadm --assemble --scan
258 # mount /dev/md0 /media
259 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
261 === Boot setup ===
263 Like a loop install, you need a preinit iso file with a matching version. The argument **softraid** holds the device name:
264 <file>
265 title SliTaz cooking
266 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
267 map --hook
268 kernel (hd1)/boot/bzImage softraid=/dev/md0
269 initrd (hd1)/boot/rootfs.gz
270 </file>
272 ===== Crypto install =====
274 <note>
275 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)
276 </note>
278 ==== LUKS ====
280 [[wp>LUKS]] replaces the [[wp>Cryptoloop]] and Loop-AES formats now.
282 === Creation & installation ===
284 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:
285 # mke2fs -j /dev/mapper/crypto-sda3
286 # tune2fs -c 0 -i 0 /dev/mapper/crypto-sda3
287 # mount /dev/mapper/crypto-sda3 /media
288 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
290 === Boot setup ===
292 Like a loop install, you need a preinit iso file with a matching version. The argument cryptoroot holds the volume name:
293 <file>
294 title SliTaz cooking
295 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
296 map --hook
297 kernel (hd1)/boot/bzImage cryptoroot=sda3
298 initrd (hd1)/boot/rootfs.gz
299 </file>
301 ====== TODO ======
303 ==== Loop-AES compatibility ====
305 This deprecated format needs the same __boot setup__ as LUKS.
307 ====== TODO ======
309 ===== Mixed install =====
311 You can mix several above methods using one device access and/or one filesystem access.
313 ^Device access^Filesystem access^
314 |mount=|subroot=|
315 |*raid=|loopfs=|
316 |lvmroot=|cryptoroot=|
317 |*raid= + lvmroot=|loopfs= + cryptoroot=|
319 ==== Example 1 : RAID + LVM ====
321 ==== Example 2 : Loop + crypto ====
323 ==== Possible improvements? ====
325 Add network support: nbd/iscsi + RAID 1 net&local + crypto
327 ====== TODO ======
329 ===== PXE: No install ! =====
331 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-))