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