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

Update pages folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Sep 15 06:34:46 2011 +0000 (2011-09-15)
parents 6d357e98ec0b
children
line source
1 ====== Unusual install methods ======
3 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...
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]]
35 <note tip>You can create the USB key from the ISO image
36 # tazusb gen-iso2usb slitaz-cooking.iso
37 </note>
38 ==== Hybrid ISO ====
40 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]].
41 <note tip>Use fdisk to get back the remining free space on the USB keys. Simply add a partition(s).
42 # dd if=slitaz-cooking.iso of=/dev/usbkey
43 # fdisk /dev/usbkey
44 </note>
45 ===== Floppy install =====
47 ==== The last resort install ====
49 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.
51 ==== Prepare a floppy set ====
53 Get a floppy set from http://mirror.slitaz.org/floppies/. The base subset should be sufficient (5 floppies).
54 <note tip>Your may use one floppy only with [[http://pizza.slitaz.org/tiny/|tiny slitaz]]
55 for a manual install (without the slitaz-installer)</note>
57 Build a data floppy set from the ISO image:
58 <code># echo "slitaz.iso" | cpio -o -H newc | split -b 1440k /dev/stdin iso
59 # dd if=isoaa of=/dev/fd0
60 # dd if=isoab of=/dev/fd0
61 # ...</code>
63 <note tip>Some [[http://mirror.slitaz.org/floppies/#fdiso|data floppy sets]] can be generated on SliTaz mirrors</note>
64 ==== Transfer the ISO image onto hard disk ====
66 Boot from the slitaz floppy set, mount a hard disk partition in /mnt and restore the data floppy set in /mnt:
67 <code># cd /mnt
68 # dd if=/dev/fd0 of=fdiso01
69 # dd if=/dev/fd0 of=fdiso02
70 ...
71 # cat fdiso* | cpio -i
72 # rm fdiso*</code>
73 Now you can use any install method from an ISO image. Example:
74 <code># mount -o loop,ro slitaz.iso /media/cdrom
75 # slitaz-installer</code>
77 <note tip>With [[http://pizza.slitaz.org/tiny/|tiny slitaz]], you don't have the slitaz-installer.
78 You can start a frugal install:
79 <code># mkdir boot && cp /media/cdrom/boot/bzImage /media/cdrom/boot/rootfs.gz boot && rm slitaz.iso</code>and optionally a standard install:
80 <code># unlzma -c boot/rootfs.gz | cpio -id </code>
81 The problem: you have no boot loader!
83 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.
84 </note>
85 ===== Loop install =====
87 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)...
89 ... create a loop file and install SliTaz into it!
91 The problem is: what size? 200MB should be the minimum. Imagine, you could like it and install many more packages!
93 ==== Loopfile creation ====
95 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:
96 # dd if=/dev/zero bs=1M count=200 of=slitaz.fs
98 You now need to create a filesystem in this loopfile:
99 # yes | mke2fs -j slitaz.fs
101 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):
102 # dd if=/dev/zero bs=1M count=100 >> slitaz.fs
103 # resize2fs slitaz.fs
105 ==== Root filesystem files installation ====
107 Copy files from the rootfs.gz archive of a cdrom into the loopfile:
108 # mount /dev/cdrom /media/cdrom
109 # mount -o loop,rw slitaz.fs /mnt
110 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt; cpio -idmu )
111 # umount -d /mnt
112 # umount /media/cdrom
114 ==== Boot setup ====
116 Get a **preinit** iso file with same version (the kernel version must match the modules version in the root filesystem).
117 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:
118 <file>
119 title SliTaz cooking
120 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
121 map --hook
122 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
123 initrd (hd1)/boot/rootfs.gz
124 </file>
125 <note tip>The loop install does not use exotic packages from preinit. You can use any SliTaz flavor (except lorams).</note>
126 <note tip>
127 You can built an up-to-date **preinit** iso anytime with<code># tazlito get-flavor preinit
128 # tazlito gen-distro</code></note>
129 <file>
130 title SliTaz cooking in loop file
131 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
132 map --hook
133 kernel (hd1)/boot/bzImage mount=/dev/hda1 loopfs=data/slitaz.fs
134 initrd (hd1)/boot/rootfs.gz
136 title SliTaz cooking in RAM (like the Live CD)
137 map (hd0,0)/boot/slitaz-cooking.iso (hd1)
138 map --hook
139 kernel (hd1)/boot/bzImage rw root=/dev/null autologin
140 initrd (hd1)/boot/rootfs.gz
141 </file>
142 Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:
143 <file>
144 title SliTaz cooking
145 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
146 map --hook
147 kernel (hd1)/boot/bzImage mount=a4b346ee-4c7b-46aa-9fd4-6bc39ab4fa96 loopfs=data/slitaz.fs
148 initrd (hd1)/boot/rootfs.gz
149 </file>
150 <note tip>You can extract the bzImage and rootfs.gz from the iso image to avoid map commands and defragmentation.</note>
152 ===== Subdirectory install in a Posix filesystem =====
154 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...
156 ... create a subdirectory and install SliTaz into it!
158 <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.
159 </note>
161 ==== Root filesystem files installation ====
163 Simply install SliTaz file in a subdirectory (say /var/slitaz) of another linux partition:
164 # mkdir /mnt/var/slitaz
165 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt/var/slitaz ; cpio -idmu )
167 ==== Boot setup ====
169 Like a loop install, you need a preinit iso file with a matching version.
170 The partition (say /dev/hda1) and the path into the partition are defined by the mount and subroot arguments:
171 <file>
172 title SliTaz cooking
173 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
174 map --hook
175 kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=var/slitaz
176 initrd (hd1)/boot/rootfs.gz
177 </file>
179 Both notes in 'Loop install' section about bzImage extraction and UUID/LABEL also apply here.
180 <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>
182 ===== Subdirectory install in a non-Posix filesystem =====
183 You want to install SliTaz in a subdirectory but the filesystem ([[wp>NTFS]] or [[wp>VFAT]]) does not fully support UNIX features.
185 Use [[http://mirror.slitaz.org/pkgs/?package=posixovl|posixovl]] !
186 <note important>This install method can waste a few MBs of RAM: it loads a ramdisk from the preinit flavor and doesn't disallocate RAM fully from the ramdisk.
187 </note>
189 ==== Root filesystem files installation ====
191 You need to mount the target subdirectory (say /slitaz) with posixovl **before** installing the files.
192 # mkdir /mnt/slitaz
193 # mount.posixovl /mnt/slitaz
194 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt/slitaz ; cpio -idmu )
196 ==== Boot setup ====
198 Like a loop install, you need a preinit iso file with a matching version.
199 The partition (say /dev/hda1) and the path into the partition are defined by the mount, subroot and **posixovl** arguments:
200 <file>
201 title SliTaz cooking
202 map --mem --heads=0 --sectors-per-track=0 (hd0,0)/boot/slitaz-preinit.iso (hd1)
203 map --hook
204 kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=slitaz posixovl
205 initrd (hd1)/boot/rootfs.gz
206 </file>
208 Both notes in 'Loop install' section about bzImage extraction and UUID/LABEL also apply here.
210 ====== TODO ======
211 ==== Extra setup ====
212 You want to see the host partition while running SliTaz like [[wp>UMSDOS]] does with /DOS.
214 Create the mount point:
215 # mkdir /mnt/slitaz/Windows
217 And update the boot arguments:
218 <file>
219 title SliTaz cooking
220 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
221 map --hook
222 kernel (hd1)/boot/bzImage mount=/dev/hda1 subroot=slitaz posixovl bindfs=.,slitaz/Windows
223 initrd (hd1)/boot/rootfs.gz
224 </file>
225 ====== TODO ======
226 ===== LVM install =====
228 The Logical Volume Manager can manage (add disks, replace disks ...) and logically freeze any disks for backup (snapshots) without disrupting service.
229 See [[wp>Logical_Volume_Manager_(Linux)]]
231 ==== LVM partition setup ====
233 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.
234 Assuming we use the sda1 partition with 5% reserved for snapshots:
235 # tazpkg get-install lvm2
236 # modprobe dm-mod
237 # pvcreate /dev/sda1
238 # vgcreate slitaz /dev/sda1
239 # lvcreate -l 95%VG slitaz -n root
240 # mke2fs -j /dev/mapper/slitaz-root
241 # tune2fs -c 0 -i 0 /dev/mapper/slitaz-root
242 # mount /dev/mapper/slitaz-root /mnt
244 ==== Root filesystem files installation ====
246 Similar to a loop install:
247 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
249 ==== Boot setup ====
251 Like a loop install, you need a **preinit** iso file with a matching version. The argument **lvmroot** holds the volume name:
252 <file>
253 title SliTaz cooking
254 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
255 map --hook
256 kernel (hd1)/boot/bzImage lvmroot=slitaz-root
257 initrd (hd1)/boot/rootfs.gz
258 </file>
260 ===== RAID install =====
262 ==== Hardware RAID ====
264 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.
266 ==== Semi hardware RAID ====
268 === Creation & installation ===
270 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:
271 # tazpkg get-install lvm2
272 # tazpkg get-install dmraid
273 # dmraid -s <== shows raid infomation
274 # modprobe raid1 <== could be raid0, raid456 or raid10
275 # dmraid -ay <== activates the array in /dev/mapper
276 # mount /etc/mapper/myraid /media
277 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
279 === Boot setup ===
281 Like a loop install, you need a **preinit** iso file with a matching version. The argument **dmraid** holds the volume name:
282 <file>
283 title SliTaz cooking
284 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
285 map --hook
286 kernel (hd1)/boot/bzImage dmraid=myraid
287 initrd (hd1)/boot/rootfs.gz
288 </file>
292 ==== Software RAID ====
294 The array does not need the BIOS and can be fully administered remotely!
295 <note tip>
296 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...
297 </note>
299 === Creation & installation ===
301 Example for mirroring (raid1) devices /dev/sda3 and /dev/sdb3:
302 # tazpkg get-install lvm2
303 # tazpkg get-install mdadm
304 # echo y | mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 --bitmap=internal --assume-clean
305 # modprobe raid1
306 # mdadm --assemble --scan
307 # mount /dev/md0 /media
308 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
310 === Boot setup ===
312 Like a loop install, you need a preinit iso file with a matching version. The argument **softraid** holds the device name:
313 <file>
314 title SliTaz cooking
315 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
316 map --hook
317 kernel (hd1)/boot/bzImage softraid=/dev/md0
318 initrd (hd1)/boot/rootfs.gz
319 </file>
321 ===== Crypto install =====
323 <note>
324 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)
325 </note>
327 ==== LUKS ====
329 [[wp>LUKS]] replaces the [[wp>Cryptoloop]] and Loop-AES formats now.
331 === Creation & installation ===
333 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:
334 # mke2fs -j /dev/mapper/crypto-sda3
335 # tune2fs -c 0 -i 0 /dev/mapper/crypto-sda3
336 # mount /dev/mapper/crypto-sda3 /media
337 # unlzma -c /media/cdrom/boot/rootfs.gz | ( cd /mnt ; cpio -idmu )
339 === Boot setup ===
341 Like a loop install, you need a preinit iso file with a matching version. The argument cryptoroot holds the volume name:
342 <file>
343 title SliTaz cooking
344 map (hd0,0)/boot/slitaz-preinit.iso (hd1)
345 map --hook
346 kernel (hd1)/boot/bzImage cryptoroot=sda3
347 initrd (hd1)/boot/rootfs.gz
348 </file>
350 ====== TODO ======
352 ==== Loop-AES compatibility ====
354 This deprecated format needs the same __boot setup__ as LUKS.
356 ====== TODO ======
358 ===== Mixed install =====
360 You can mix several above methods using one device access and/or one filesystem access.
362 ^Device access^Filesystem access^
363 |mount=|subroot=|
364 |*raid=|loopfs=|
365 |lvmroot=|cryptoroot=|
366 |*raid= + lvmroot=|loopfs= + cryptoroot=|
368 ==== Example 1 : RAID + LVM ====
370 ==== Example 2 : Loop + crypto ====
372 ==== Possible improvements? ====
374 Add network support: nbd/iscsi + RAID 1 net&local + crypto
376 ====== TODO ======
378 ===== PXE: No install ! =====
380 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-))