/[clonezilla-sysresccd]/trunk/www/2doc/README.txt
ViewVC logotype

Contents of /trunk/www/2doc/README.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 149 - (show annotations)
Sat Dec 11 09:41:39 2010 UTC (13 years, 3 months ago) by sng
File MIME type: text/plain
File size: 205496 byte(s)
fixing USB installation instructions (windows only) \
Tahnks to Mathieu-Philippe Aubert
1 Installing on USB
2 ==============================================================================
3
4 Installation to USB made easy
5 ****************************************
6 Until recently installing Clonezilla-SysRescCD on a USB disk would not
7 be such a great idea, because of its size. But since USB devices become
8 cheaper and cheaper, it is an interesting alternative.
9
10 Starting with version 3.1.0, Clonezilla-SysRescCD provides an iso
11 file that's ISO-Hybrided. This means (as we read at the isolynux site {{
12 http://syslinux.zytor.com/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE
13 }}) that
14
15 "the iso file can be booted from either CD-ROM or from a device which BIOS
16 considers a hard disk or ZIP disk, e.g. a USB key or similar. This image can
17 then be copied using any raw disk writing tool (on Unix systems, typically
18 "dd" or "cat") to a USB disk, or written to a CD-ROM using standard CD
19 burning tools.
20
21 The ISO 9660 filesystem is encapsulated in a partition (which starts at
22 offset zero, which may confuse some systems.) This makes it possible for
23 the operating system, once booted, to use the remainder of the device for
24 persistent storage by creating a second partition."
25
26 [[ important.png ]]
27 Incorrect use of any raw disk writing tool could cause your operating system
28 (GNU/Linux / Windows) not to boot. Confirm the command before you run it.
29
30 So, from any linux box, assuming Clonezilla-SysRescCD iso file is in
31 your home directory, and your USB device name is sdc4, you just execute
32 the commands:
33
34 umount /dev/sdc4
35 dd if=~/clonezilla-sysresccd-full-mod-"myVersion".iso of=/dev/sdc bs=512
36
37 And that's it. Your usb device is ready to boot!!!
38
39 Using the extra space
40 ---------------------
41 If your usb device is more than 400MB in size, the above command will
42 leave the remaining space unused. To verify it, execute the command:
43
44 fdisk -l /dev/sdc
45
46 You should get something similar to this:
47
48 Disk /dev/sdc: 1048 MB, 1048576000 bytes
49 64 heads, 32 sectors/track, 1000 cylinders, total 2048000 sectors
50 Units = sectors of 1 * 512 = 512 bytes
51 Sector size (logical/physical): 512 bytes / 512 bytes
52 I/O size (minimum/optimal): 512 bytes / 512 bytes
53 Disk identifier: 0x77a5188f
54
55 Device Boot Start End Blocks Id System
56 /dev/sdc1 * 1 384 393216 17 Hidden HPFS/NTFS
57
58 As you can see, we are currently using 348 out of 1000 cylinders of the
59 disk. The remaining disk space (~600MB) can still be used, executing the
60 following commands:
61
62 fdisk /dev/sdc
63 command (m for help): n (create new partition)
64 command action
65 e extended
66 p primary partition (1-4)
67 p
68 partition number (1-4): 4 (create partition sdc4)
69 first cylinder (385-1000, default 385):
70 using default value 385
71 last cylinder, +cylinders or +size{k,m,g} (385-1000, default 1000):
72 using default value 1000
73
74 command (m for help): p (display partition table)
75
76 disk /dev/sdc: 1048 mb, 1048576000 bytes
77 64 heads, 32 sectors/track, 1000 cylinders
78 units = cylinders of 2048 * 512 = 1048576 bytes
79 sector size (logical/physical): 512 bytes / 512 bytes
80 i/o size (minimum/optimal): 512 bytes / 512 bytes
81 disk identifier: 0x77a5188f
82
83 device boot start end blocks id system
84 /dev/sdc1 * 1 384 393216 17 hidden hpfs/ntfs
85 /dev/sdc4 385 1000 630784 83 linux
86
87 command (m for help): t (change partition type)
88 partition number (1-4): 4
89 hex code (type l to list codes): b
90 changed system type of partition 4 to b (w95 fat32)
91
92 command (m for help): p (display partition table)
93
94 disk /dev/sdc: 1048 mb, 1048576000 bytes
95 64 heads, 32 sectors/track, 1000 cylinders
96 units = cylinders of 2048 * 512 = 1048576 bytes
97 sector size (logical/physical): 512 bytes / 512 bytes
98 i/o size (minimum/optimal): 512 bytes / 512 bytes
99 disk identifier: 0x77a5188f
100
101 device boot start end blocks id system
102 /dev/sdc1 * 1 384 393216 17 hidden hpfs/ntfs
103 /dev/sdc4 385 1000 630784 b w95 fat32
104
105 command (m for help): w (write partition table to disk and exit)
106 The partition table has been altered!
107
108 Calling ioctl() to re-read partition table.
109
110 WARNING: Re-reading the partition table failed with error 16: Device or
111 resource busy.
112 The kernel still uses the old table. The new table will be used at
113 the next reboot or after you run partprobe(8) or kpartx(8)
114 Syncing disks.
115
116 At this point you should disconnect and reconnect your usb device. When
117 it's recognised, you can format the partition you've just created
118
119 mkdosfs -F 32 /dev/sdc4
120
121 The partition is now ready for use!!!
122
123 Installing the "hard" way
124 ****************************************
125 If the "easy" way does not work there is an alternative; you will use
126 the Clonezilla-SysRescCD ISO file (or CD) to copy and modify a couple of
127 files on the USB disk, and finally make it bootable, using syslinux {{
128 http://syslinux.zytor.com }} and its configuration file syslinux.cfg.
129
130 [[ important.png ]]
131 Incorrect use of syslinux could cause your operating system (GNU/Linux /
132 Windows) not to boot. Confirm the command before you run it.
133
134 The only thing that's important is that your USB disk must contain a VFAT
135 (Windows 98 or DOS) file system. If this is not the case, refer to the
136 section "Troubleshooting", to find out how you can format it, before
137 copying files to it.
138
139 The bootable USB disk creation procedure can be performed either from
140 Linux or Windows.
141
142 [[ info.png ]]
143 If you want to create a bootable USB flash drive for this version
144 or later, remember to use the syslinux command from syslinux
145 3.71 or later. Otherwise the boot menu won't work.
146
147 Installation from Linux
148 ---------------------
149 There are two ways you can proceed, if you are going to use Linux to
150 perform the USB installation, either using a running linux box, or using
151 Clonezilla-SysRescCD.
152
153 I will assume that you have saved clonezilla-sysresccd-full-mod-3.1.0.iso
154 in your home directory (~).
155
156 Using a linux box
157 ---------------------
158 If you already have a linux box up and running, you can use it to create
159 your Clonezilla-SysRescCD USB, without even having to burn it to CD
160 beforehand. The only thing here is that you have to have syslinux {{
161 http://syslinux.zytor.com }} installed.
162
163 I will assume that your CD drive is /dev/sr0 and that your USB device
164 is /dev/sdc4. You may have to change any of them to reflect your system
165 configuration.
166
167 Boot into linux, connect your USB device and execute the following commands:
168 mkdir /mnt/mycd
169 mount ~/clonezilla-sysresccd-full-mod-3.1.0.iso /mnt/mycd -o loop
170 mkdir /mnt/usbdevice
171 mount /dev/sdc4 /mnt/usbdevice
172 cp -r /mnt/mycd/* /mnt/usbdevice
173 umount /mnt/mycd; rmdir /mnt/mycd
174 cd /mnt/usbdevice
175 rm isolinux/*.cfg
176 mv isolinux/* .
177 rmdir isolinux
178 cd; umount /dev/sdc4
179 rmdir /mnt/usbdevice
180
181 Finally make your USB device bootable, by executing
182 syslinux /dev/sdc4
183 and you are done.
184
185 > Using Clonezilla-SysRescCD
186 If you already burnt Clonezilla-SysRescCD to CD, you can use it to create
187 your Clonezilla-SysRescCD USB.
188
189 I will assume that your CD drive is /dev/sr0 and that your USB device
190 is /dev/sdc4. You may have to change any of them to reflect your system
191 configuration.
192
193 Boot SystemRescueCD using the option To RAM, and when it is fully loaded,
194 execute the following commands:
195 mkdir /mnt/mycd
196 mount /dev/sr0 /mnt/mycd
197 mkdir /mnt/usbdevice
198 mount /dev/sdc4 /mnt/usbdevice
199 cp -r /mnt/mycd/* /mnt/usbdevice
200 umount /mnt/mycd
201 cd /mnt/usbdevice
202 rm isolinux/*.cfg
203 mv isolinux/* .
204 rmdir isolinux
205 cd; umount /dev/sdc4
206
207 Finally make your USB device bootable, by executing
208 syslinux /dev/sdc4
209 and you are done.
210
211 Installation from Windows
212 ---------------------
213 Installing Clonezilla-SysRescCD from Windows is as easy as
214 it is in Linux. You have to burn Clonezilla-SysRescCD to CD
215 or use a CD/DVD ROM emulator software like Daemon Tools {{
216 http://www.daemon-tools.cc/dtcc/announcements.php }} to mount the ISO file.
217
218 I will assume that your USB device is drive K: and your CD drive or mounted
219 ISO file is drive
220 D:. You may have to change any of them, in order to reflect your system
221 configuration.
222
223 You will have to
224
225 * Copy all files from drive D: (CD or mounted ISO file) to drive K:
226 (USB disk)
227 * Delete all cfg files from K:isolinux
228 * Move all files from K:isolinux to K:
229 * Delete folder K:isolinux
230
231 Now all you have to do is make your USB disk bootable. In order to do
232 that you have to open a DOS window (in Windows XP press "Start / Run "
233 and type cmd). Then type at DOS prompt:
234 K:
235 cd bootprog
236 syslinux -ma K:
237
238 Booting from USB
239 ---------------------
240 Before trying to boot from your USB device, you have to set your boot device
241 at your BIOS. This means you have to reboot having your USB device connected,
242 get into your BIOS (usually pressing DEL) and make the appropriate settings
243 in the BOOT section.
244
245 Booting Clonezilla Live should not be a problem. Just select the desired
246 option and press ENTER to boot.
247
248 Booting SystemRescueCD has been made equally simple with SystemRescueCD
249 v 1.0.0, so you shouldn't have any problem (option cdroot is not required
250 any more).
251
252 If you have any problems here, you may try adding any of these boot
253 parameters:
254 usbstick
255 doscsi
256
257 Troubleshooting
258 ---------------------
259 Whether you can successfully boot from a USB disk or not, depends mainly on
260 your BIOS. Chances are that you will not be able to boot on an old computer,
261 with an old (and possibly buggy) BIOS. So I would recommend testing your
262 Clonezilla-SysRescCD USB on a new computer.
263
264 * I can't boot (I don't even see the splash screen)
265 or Clonezilla Live does not boot
266
267 The first thing you should do is double check your BIOS settings. Reboot
268 having your USB device connected, get into your BIOS (usually pressing DEL)
269 and make the appropriate settings in the BOOT section.
270
271 If you are on linux, check that the partition on the USB disk is active
272 (bootable), executing:
273 fdisk -l /dev/sdc
274 You should get something similar to this:
275
276 Disk /dev/sdc: 1031 MB, 1031798272 bytes
277 64 heads, 32 sectors/track, 983 cylinders
278 Units = cylinders of 2048 * 512 = 1048576 bytes
279
280 Device Boot Start End Blocks Id System
281 /dev/sdc4 * 1 983 1006576 6 FAT16
282
283 If the partition is not active (no astrisk), execute:
284 fdisk /dev/sdc
285 and issue "Command: " a (toggle a bootable flag) and "Partition number:"
286 4 (for /dev/sdc4).
287
288 If you are on Windows, this is taken care of by syslinux (parameters -ma).
289
290 If you still have problems booting, you should try to execute
291 syslinux -s /dev/sdc4
292 from Linux, or
293 syslinux -sma K:
294 from Windows (from folder K:syslinux).
295
296 syslinux man page reads:
297
298 (Option) -s
299 Install a "safe, slow and stupid" version of syslinux. This version may work
300 on some very buggy BIOSes on which syslinux would otherwise fail. If you find
301 a machine on which the -s option is required to make it boot reliably, please
302 send as much info about your machine as you can, and include the failure
303 mode.
304
305 * I still can't boot
306 In this case you will have to format your USB disk.
307
308 If you are using linux to perform the installation, execute the command:
309
310 mkdosfs -F 16 /dev/sdc4
311
312 to create a FAT16 file system, or
313
314 mkdosfs -F 32 /dev/sdc4
315
316 to create a FAT32 file system.
317
318 When you are done go back to section "Installation from Linux".
319
320 If you are on Windows, you should download the HP-USB Format tool {{
321 http://h50178.www5.hp.com/local_drivers/17550/SP27608.exe }}, install it
322 and format your USB drive using the Fat or Fat32 option. This program can
323 be used to format USB devices that won't boot properly when formatted with
324 Windows format tool.
325
326 When you are done go back to section "Installation from Windows".
327
328 * I still can't boot (after formating)
329 Things are getting tough!!! Try to format your USB disk using the option you
330 did not use previously. So, if you have created a FAT32 file system, create
331 a FAT16 file system this time, and recreate Clonezilla-SysRescCD on USB.
332
333 If nothing works, you are out of luck; you will not be able to use
334 Clonezilla-SysRescCD USB on this computer... If you do manage to boot it,
335 please send me a message.
336
337 * SystemRescueCD does not boot
338 Ok, you have managed to get to the splash screen and successfully booted
339 Clonezilla Live. But you still can't boot SystemRescueCD.
340
341 Refer to section Booting from USB to find out the boot parameters you can
342 use with SystemRescueCD.
343
344 Customizing sysresc.cfg
345 ---------------------
346 As stated previously, Clonezilla-SysRescCD USB is booted by syslinux through
347 its configuration file syslinux.cfg. This file loads sysresc.cfg in order
348 to boot SystemRescueCD.
349
350 If you have to specify any additional boot parameters for SystemRescueCD,
351 you may want to write these changes to the configuration file, so that
352 you don't have to insert them by hand every time.
353
354 The procedure to do that is the following:
355
356 Boot SystemRescueCD (or if that's not possible yet, bot Clonezilla Linux
357 and get to the command line) using the option To RAM, and when it is fully
358 loaded, execute the following commands:
359 mkdir /mnt/usbdevice
360 mount /dev/[device] /mnt/usbdevice
361 cd /mnt/usbdevice
362 cp sysresc.cfg sysresc.bak
363 sed 's|scandelay=5|scandelay=x [additional params]|'
364 sysresc.cfg > sys.cfg
365 mv sys.cfg sysresc.cfg
366 cd; umount /dev/[device]
367 syslinux /dev/[device]
368 reboot
369
370 where x is a number from 1 to 10.
371
372 After executing these commands, you will have a new sysresc.cfg file,
373 and a backup file called sysresc.bak (in case things go wrong).
374
375 If, for example, you want to increase the device scan delay to maximum,
376 the above commands would become:
377 mkdir /mnt/usbdevice
378 mount /dev/sdc4 /mnt/usbdevice
379 cd /mnt/usbdevice
380 cp sysresc.cfg sysresc.bak
381 sed 's|scandelay=5|scandelay=10|' sysresc.cfg > sys.cfg
382 mv sys.cfg sysresc.cfg
383 cd; umount /dev/sdc4
384 syslinux /dev/sdc4
385 reboot
386
387 If, in addition to that, you had to use the boot parameter usbstick,
388 then it would be:
389 mkdir /mnt/usbdevice
390 mount /dev/sdc4 /mnt/usbdevice
391 cd /mnt/usbdevice
392 cp sysresc.cfg sysresc.bak
393 sed 's|scandelay=5|scandelay=10 usbstick|' sysresc.cfg > sys.cfg
394 mv sys.cfg sysresc.cfg
395 cd; umount /dev/sdc4
396 syslinux /dev/sdc4
397 reboot
398
399 In case something goes wrong with your new settings, you can always rename
400 sysresc.bak to sysresc.cfg, either from linux or Windows.
401
402
403
404
405 Boot parameters
406 ==============================================================================
407
408 Intro
409 ****************************************
410 Booting a linux system means loading a kernel, which is actually the
411 operating system. Well, this is not exactly true, and it is not the only
412 thing that happens during boot up phase, but it is not my intension to
413 explain it here.
414
415 The kernel is loaded by Isolinux (the CD boot manager), which is able to pass
416 a number of parameters to it, through its configuration file isolinux.cfg.
417
418 These parameters, called boot parameters, are documented by the kernel
419 itself, and can differentiate its behavior dramatically. In our case,
420 each CD (SystemRescueCD and Clonezilla Live) accept a different set of
421 parameters, because they are based on gentoo {{ http://www.gentoo.org/ }}
422 and debian, respectively.
423
424 While in the splash screen of Clonezilla-SysRescCD, you can edit the boot
425 parameters by pressing TAB. They will be presented to you, and you can
426 add or remove what you want. You must be careful not to change or remove
427 the parameters that are dedicated to the CD itself, as altering them will
428 certainty make it unbootable. When you are done, just press ENTER to boot.
429
430 SystemRescueCD boot parameters
431 ****************************************
432 [[ info.png ]]
433 The following info applies to SystemRescueCD v. 1.5.5. In case
434 you need to get info for a more recent version of SystemRescueCD
435 please see the page "Sysresccd-manual-en Booting the CD-ROM {{
436 http://www.sysresccd.org/Sysresccd-manual-en_Booting_the_CD-ROM }}"
437
438 A typical sysresccd isolinux entry is:
439
440 kernel rescuecd
441 append initrd=initram.igz video=ofonly
442
443 The kernel used is rescuecd, and anything after the word append is a
444 boot parameter.
445
446 Available kernels (boot images):
447
448 * rescuecd Default for 32bit systems, with Framebuffer disabled, best choice.
449 * rescue64 Default 64 bit kernel. Use it if you want to chroot to a 64bit
450 linux system installed on your hard disk, or if you have to run 64 bit
451 programs. This kernel is able to boot with 32bit programs, and it requires
452 a processor with 64bit instructions (amd64 / em64t).
453 * altker32 an alternative kernel for 32bit systems. Boot with this kernel
454 if you have problems with rescuecd
455 * altker64 an alternative kernel for 64bit systems. Boot with this kernel
456 in case you have problems with rescue64.
457
458 The boot parameters you can use are:
459
460 General boot options
461 Press <TAB> to add additional options (in SystemRescueCd-1.5 and more recent)
462
463 * docache: causes the CD-ROM to be fully loaded into memory. A slower start
464 but once complete, programs start faster and the CD drive will be released
465 allowing normal access to other CDs. This requires 400MB of memory to cache
466 everything (including the bootdisks and isolinux directories). Add lowmem
467 if you have less that 400MB of memory of to prevent these directories from
468 being copied.
469 * setkmap=kk: which defines the keymap to load where kk (example: setkmap=de
470 for German keyboards). This way you won't be prompted for the keyboard
471 configuration during the boot.
472 * root=/dev/xdnp: the root=<device> option boots an existing linux
473 system. For example, if you have linux Gentoo installed on /dev/sda6,
474 use rescuecd root=/dev/sda6 to start it. Keep in mind that you must use a
475 64bit kernel if your system is made of 64bit programs. This option works
476 with LVM volumes. Use rescuecd root=/dev/VolGroup00/LogVol00. Support
477 is also provided for root=auto, which scans all the block devices
478 for a linux system. The first linux system found will be started. So
479 root=auto lets you start the system installed from the CD-ROM in case
480 you have problem with your boot loader or kernel. It's also possible
481 to specify a partition using its filesystem label or filesystem
482 uuid. If the label of the partition where linux is installed is
483 mylinux, then boot it using rescuecd root=LABEL=mylinux. Similarly
484 root=UUID=b3d3bec5-997a-413e-8449-0d0ec41ccba7. See more details.
485 * initscript=service:action: This option allows one to start/stop a service
486 at boot time. For instance if you need the samba service to be started,
487 you can boot with: initscript=samba:start. This does the same thing as
488 /etc/init.d/samba start. Use this option a multiple of times for different
489 services. All the actions that are supported by an initscript can be used.
490 * backstore=xxx: SystemRescueCd comes with support for the backing-stores. A
491 backing-store saves all the changes you can make. so that you keep these
492 changes the next time you boot. By default, sysresccd automatically
493 scan removable devices (eg: USB sticks) at boot time and uses the first
494 backing-store it finds. A backing-store is not mandatory and if the scan
495 fails, it will store the files which have changed in memory. To disable
496 the disks scan at boot time specify backstore=off on the boot command
497 line. If you want to save your backing-store file on a harddisk, boot with
498 backstore=alldev to scan all devices (not just removable devices). The
499 default location for a backing-stores file is any file named sysrcd.bs
500 located at the root of a disk which is often a USB stick. Change the path
501 by using backstore=/sysrcd/mybackstore.bs. See backing-stores.
502 * isoloop=xxx: Grub2 (currently in development: grub-1.98) provides a new
503 feature to boot from an ISO image which is stored on the hard disk. If you
504 put a copy of systemrescuecd-x86-x.y.z.iso on a partition that Grub2 can read
505 then you can boot SystemRescueCd directly from the ISO image stored on your
506 hard drive. This is very convenient if you frequently update SystemRescueCd
507 and you want to boot it directly from Grub2. Grub2 knows what an ISO image
508 is and it will load the kernel image (rescuecd/rescue64) and the initramfs
509 (initram.igz) from the ISO into memory. It will then do its normal job and
510 execute the kernel. The SystemRescueCd init script must then be aware that
511 its sysrcd.dat file is in an ISO and not directly on the partition. For that
512 reason, this isoloop=xxx boot option is required so you must use it in your
513 grub.cfg. This option is only supported in SystemRescueCd-1.4.0 and more
514 recent. This option specifies the path of the ISO image in the partition that
515 grub considers as its root partition. It's important to understand that the
516 path of the ISO image may be different from the path on your linux system. If
517 you have a separate boot partition mounted on /boot and if you copy this
518 ISO image to /boot/sysrcd/systemrescuecd-x86-x.y.z.iso then the option has
519 to be isoloop=/sysrcd/systemrescuecd-x86-x.y.z.iso. This is because the
520 boot partition is what Grub2 will consider as its root partition during
521 the boot process. Please read the section about isoloop for more details.
522
523 Hardware, drivers and troubleshooting options
524 * dodebug: Enables verbose messages in linuxrc
525
526 * doload=xxx: loads needed kernel modules, multiple comma separated
527 occurrences are permitted (example: doload=3c59x,e1000)
528 * noload=xxx: prevents loading kernel modules, multiple comma separated
529 occurrences are permitted (example: noload=3c59x,e1000). Use this option
530 if you have a problem when the system loads a particular module.
531 * nonet: this will disable the network auto detection at startup
532
533 * scandelay=x: pauses x seconds during the startup to allow slow devices
534 to initialize. This is required when you boot a USB device. A delay of
535 only few seconds should be enough.
536
537 * doxdetect: Since version 0.3.5 the auto-configuration is done in X.Org
538 itself, mkxf86config is disabled by default. This option forces the system to
539 run the mkxf86config startup script and to run the hardware auto-detection
540 from this script. Use this option if you have problems with the graphical
541 environment configuration. This option replaces the option noxdetect that
542 was useful in previous versions.
543 * nodetect: prevents generic hardware auto-detection. Use this option if
544 you have problems with the hardware auto-detection.
545
546 * dostartx: load the X.Org graphical environment.
547 * forcevesa: Forces X.Org to use the safe VESA driver instead of the best
548 video driver detected for your video card. Use this option if you cannot
549 get the graphical environment working with the default options.
550 * forcevesa=xxx: The startx command will load the Xvesa server instead
551 of Xorg, and use the screen resolution given as parameter (eg: 1024x768,
552 1280x1024x32).
553
554 * all-generic-ide: In case of problems related to your hard disk, try to
555 enable this option (eg rescuecd all-generic-ide)
556 * nodmraid: Disable dmraid, for some motherboards with built-in RAID
557 controller.
558 * nomdadm: Disable mdadm, for software RAID.
559
560 * acpi-off / noapic / irqpool: use these options if you have problem when
561 the kernel boots: if it hangs on a driver or if it crashes, ...
562
563 * lowmem: For systems with smaller memory, some daemons are not started
564 including sshd and nfsd.
565
566 * skipmount=/dev/xxx: The system mounts all the storage devices at boot
567 time to find the sysrcd.dat file. If your hard disk is broken it should
568 not be mounted. Boot with skipmount=/dev/sda1 skipmount=/dev/sda2 to ignore
569 these two partitions.
570
571 Network configuration and remote access
572 * nonm: to disable the Network-Manager service that conflicts with the
573 standard network command line tools such as ifconfig and ip. You can use
574 this option if you want to configure the network using these commands. This
575 option is not necessary when SystemRescueCd is booting from the network
576 since the service is automatically stopped in that case. This option
577 requires SystemRescueCd-1.5.5 or more recent.
578 * dodhcp: to request a DHCP server provide network attributes including
579 an IP address, gateway...
580 * nodhcp: never run the dhcp client in the initramfs boot script. May
581 be useful if you use PXE boot on a computer with several ethernet
582 interfaces. Support for this option is available in SystemRescueCd-1.5.5
583 and more recent
584 * ethx=ipaddr/cidr: Sets the static IP address of all the ethernet
585 interfaces on the system. The /cidr extension is optional. For instance,
586 if you use option ethx=192.168.0.1 on a machine with two ethernet adapters,
587 both eth0 and eth1 will be configured with 192.168.0.1. You can use the
588 format ethx=10.0.0.1/24 (using the cidr notation) if you don't use the
589 default netmask.
590 * eth0=ipaddr/cidr: This option is similar to ethx=ipaddr/cidr but it
591 configures only one interface at a time. To configure the network on a
592 server that has two interfaces, use, for example: eth0=192.168.10.1/24
593 eth1=192.168.20.1.
594 * dns=ipaddr: Sets the static IP address of the DNS nameserver you want
595 to use to resolve the names. For instance dns=192.168.0.254 means that
596 you want to use 192.168.0.254 as the DNS server.
597 * gateway=ipaddr: Sets the static IP address of the default route on your
598 network. For instance gateway=192.168.0.254 means that the computer can
599 connect to a computer outside of the local network via 192.168.0.254.
600 * dhcphostname=myhost: Sets the hostname that the DHCP client will send
601 to the DHCP server. This may be required if the default hostname cannot
602 be used with your DHCP configuration. This option has been introduced
603 in SystemRescueCd-1.3.5.
604 * rootpass=123456: Sets the root password of the system running on the
605 livecd to 123456. That way you can connect from the network and ssh on
606 the livecd and give 123456 password as the root password.
607 * vncserver=x:123456: The vncserver boot option has been introduced in
608 SystemRescueCd-1.0.2. This options forces the system to configure the
609 VNC-server and to start it automatically at boot time. You have to replace
610 x with the number of displays you want, and 123456 with your password. The
611 password must be between 6 and 8 characters, else the boot option will be
612 ignored. In other words the vncserver=2:MyPaSsWd option will give you access
613 to two displays (display=1 on tcp/5901 and display=2 on tcp/5902). Display
614 0 is reserved for X.Org since SystemRescueCd-1.1.0. SystemRescueCd-1.5.7 and
615 more recent accept a password longer than 8 chars (between 5 and 12 chars)
616 * nameif=xxx: You can specify what interface name to give to a particular
617 interface using the mac address. You need SystemRescueCd-1.1.0 or
618 newer to do that. Here is how you can specify which interface is
619 using which mac address on a machine with two network interfaces:
620 nameif=eth0!00:0C:29:57:D0:6E,eth1!00:0C:29:57:D0:64. Be careful, you have
621 to respect the separator (comma between the interfaces and exclamation
622 marks between the name and the mac address). You can also use the magic
623 keyword BOOTIF with SystemRescueCd-1.5.4 and more recent when you boot from
624 pxelinux. The pxeboot loader will set BOOTIF to the name of the interface
625 used to boot. You can then use something like nameif=eth0!BOOTIF if you
626 want the boot interface to be called eth0 on a computer with several
627 Ethernet interfaces.
628
629 Network boot using PXE
630 SystemRescueCd provides several options for booting from the network
631 using PXE.
632 These options can be combined with other network boot options such as ethx
633 (cf previous section). See PXE network booting to get a global overview
634 of SystemRescueCd and PXE and Manage remote servers using PXE.
635 The second stage downloads the kernel + initramfs using DHCP/TFTP.
636 The third stage of the PXE boot process acquires the root files system.
637 Several protocols are available.
638
639 * netboot=tftp://ip/path/sysrcd.dat: from a TFTP server. The filesystem
640 is loaded into memory. As a consequence computers with less than 400MB of
641 memory won't be able to boot this way. The system will continue to work
642 if the network is disconnected after the boot process.
643 * netboot=http://ip:port/path/sysrcd.dat: from a Web server. The file system
644 is loaded into memory. Computers with smaller memory won't be able to boot
645 this way. The the system continues to work if the network is disconnected
646 after the boot process.
647 * netboot=nfs://ip:/path: mount an NFSv3 directory. The NFS url must be the
648 path of the directory that contains sysrcd.dat. Only NFSv3 can be used,
649 NFSv4 is not supported. NFS allows computers with smaller memory to boot
650 SystemRescueCd from the network. After the boot process, continued network
651 connection is required or you will loose access to the root file system.
652 * netboot=nbd://ip:port: connect to an NBD server configured with sysrcd.dat
653 on ip:port. NBD is easier to configure than NFS (only one TCP port involved)
654 and it allows computers with smaller memory to boot SystemRescueCd from
655 the network. After the boot process, the network connection continues to
656 be required to access the root file system.
657
658 For information on activating speakup, see the speakup info page.
659
660 Options provided for autorun
661 * ar_source=xxx: place where the autorun are stored. It may
662 be the root directory of a partition (/dev/sda1), an nfs
663 share (nfs://192.168.1.1:/path/to/scripts), a samba share
664 (smb://192.168.1.1/path/to/scripts), or an http directory
665 (http://192.168.1.1/path/to/scripts).
666 * autoruns=[0-9]: comma separated list of the autorun scrip to be run. For
667 example autoruns=0,2,7 the autorun sc autorun0, autorun2, autorun7 are
668 run. Use autoruns=no to disable all the autorun scripts with a number.
669 * ar_ignorefail: continue to execute the scripts chain even if a script
670 failed (returned a non-zero status)
671 * ar_nodel: do not delete the temporary copy of the autorun scripts located
672 in /var/autorun/tmp after execution
673 * ar_disable: completely disable autorun, the simple autorun script will
674 not be executed
675 * ar_nowait: do not wait for a keypress after the autorun script have
676 been executed.
677
678 Clonezilla Live boot parameters
679 ****************************************
680 [[ info.png ]]
681 The following info applies to Clonezilla Live v. 1.2.5-17
682 In case you need to get info for a more recent version of Clonezilla Live
683 please see the page "The boot parameters for Clonezilla live {{
684 http://www.clonezilla.org/clonezilla-live/doc/fine-print.php?path=./99_Misc/00_live-initramfs-manual.doc#00_live-initramfs-manual.doc
685 }}"
686
687 A typical Clonezilla Live isolinux entry is:
688
689 kernel /live/vmlinuz1
690 append initrd=/live/initrd1.img boot=live union=aufs
691 ocs_live_run="ocs-live-general"
692 ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang=""
693 vga=791 nolocales
694
695 The kernel used is vmlinuz, and anything after the word append is a boot
696 parameter.
697
698 The following info comes from the
699 page titled The boot parameters for Clonezilla live {{
700 http://www.clonezilla.org/clonezilla-live/doc/fine-print.php?path=./99_Misc/00_live-initramfs-manual.doc#00_live-initramfs-manual.doc
701 }}.
702
703 Clonezilla live is based on Debian live with clonezilla installed. Therefore
704 there are 2 kinds of boot parameters:
705
706 * Boot parameters from live-initramfs. You can refer to this manual of
707 live-initramfs.
708 * Boot parameters specially for Clonezilla. All of them are named as
709 "ocs_*", e.g. ocs_live_run, ocs_live_extra_param, ocs_live_batch, ocs_lang.
710 * ocs_live_run is the main program to run in Clonezilla live to save
711 or restore. or other command. Available program: ocs-live-general,
712 ocs-live-restore or any command you write. Use the Absolute path in
713 Clonezilla live.
714 e.g. ocs_live_run="ocs-live-general"
715 //NOTE// You might have to use "sudo" command inside your own script,
716 or you can assign it like: ocs_live_run="sudo bash /my-clonezilla"
717 * ocs_live_extra_param will be used only when ocs_live_run=ocs-live-restore
718 (not for ocs-live-general or any other), then it will be passed to
719 ocs-sr. Therefore these parameters are actually those of ocs-sr.
720 e.g. ocs_live_extra_param="--batch -c restoredisk sarge-r5 hda"
721 * ocs_live_keymap is for keymap used in Clonezilla live. Man install-keymap
722 for more details.
723 e.g. ocs_live_keymap="NONE" (won't change the default layout)
724 ocs_live_keymap="/usr/share/keymaps/i386/azerty/fr-latin9.kmap.gz"
725 (French keyboard)
726 * batch mode or not (yes/no), if no, will run interactively.
727 e.g. ocs_live_batch="no"
728 * ocs_lang is the language used in Clonezilla live. Available value:
729 en_US.UTF-8, zh_TW.UTF-8... (see $DRBL_SCRIPT_PATH/lang/bash/)
730 e.g. ocs_lang="en_US.UTF-8"
731 * ocs_debug (or ocs-debug) is for you to enter command line prompt before
732 any clonezilla-related action is run. This is easier for you to debug.
733 * ocs_daemonon, ocs_daemonoff, ocs_numlk, ocs_capslk.
734 Ex. for the first 2 parameters, ocs_daemonon="ssh", then ssh service will
735 be turned on when booting. For the last 2 parameters, use "on" or "off",
736 e.g. ocs_numlk=on to turn on numberlock when booting.
737 * ocs_prerun, ocs_prerun1, ocs_prerun2... is for you to run a shell script
738 before Clonezilla is started. E.g. ocs_prerun="/live/image/myscript.sh". If
739 you have more commands to run, you can assign them in the order:
740 ocs_prerun=..., ocs_prerun1=..., ocs_prerun2=.... If more than 10
741 parameters, remember to use ocs_prerun01, ocs_prerun02..., ocs_prerun11
742 to make it in order.
743 * ocs_live_run_tty. This option allows you to specify the tty where
744 $ocs_live_run is run. By default $ocs_live_run is run on /dev/tty1
745 only. (It was also on /dev/ttyS0 before, but since Clonezilla live >=
746 1.2.3-22 no more this due to a problem). If you want to use ttyS0, for
747 example, add live-getty and console=ttyS0,38400n81 in the boot parameter.
748 //NOTE//
749 * This parameter was added in Clonezilla live 1.2.3-22 or later.
750 * If "live-getty console=ttyS0,38400n81" are assigned in the boot
751 parameters, ocs_live_run_tty will honor ttyS0, even other value is assigned
752 to ocs_live_run_tty in boot parameter.
753 * It's recommended to assign ocs_lang and ocs_live_keymap in the boot
754 parameters too.
755 * ip, this option allows you to specify the network parameters for
756 network card. In Clonezilla live a patched live-initramfs is used, which
757 is different from the original live-initramfs so that you can assign
758 DNS server, too. Its format is: ip=ethernet port,IP address, netmask,
759 gateway, DNS. E.g. If you want to assing eth0 with IP address 10.0.100.1,
760 netmask 255.255.255.0, gateway 10.0.100.254, DNS server 8.8.8.8, you can
761 assign the following in the boot parameter:
762 ip=eth0,10.0.100.1,255.255.255.0,10.0.100.254,8.8.8.8
763 If more than one network card, you can use ":" to separate them, e.g.:
764 ip=eth0,10.0.100.1,255.255.255.0,10.0.100.254,8.8.8.8:eth1,192.168.120.1,255.255.255.0,192.168.120.254,,
765 * Besides, "live-netdev" (yes, not ocs_live_netdev) can be used when
766 using PXE booting, you can force to assign the network device to get
767 filesystem.squashfs. This is useful when there are two or more NICs are
768 linked. E.g. live-netdev="eth1" allows you to force the live-initramfs
769 to use eth1 to fetch the root file system filesystem.squashfs.
770
771 With the above options, we have the following examples:
772
773 * A PXE config example for you to boot Clonezilla live via PXE, and ssh
774 service is on, the password of account "user" is assigned:
775 ----------------------------------------
776 label Clonezilla Live
777 MENU LABEL Clonezilla Live
778 MENU DEFAULT
779 kernel vmlinuz1
780 append initrd=initrd1.img boot=live union=aufs noswap noprompt vga=788
781 fetch=tftp://192.168.120.254/filesystem.squashfs usercrypted=bkuQxLqLRuDW6
782 ocs_numlk="on" ocs_daemonon="ssh"
783 ----------------------------------------
784 The usercrypted password is created by:
785 echo YOUR_PASSWORD | mkpasswd -s
786 ("mkpasswd" is from package "whois" in Debian or Ubuntu. Check your
787 GNU/Linux to see which package provides this command if you are not using
788 Debian or Ubuntu. Replace YOUR_PASSWORD with your plain text password,
789 and remember do not put any " in the boot parameters of live-initramfs
790 (while it's ok for those ocs_* boot parameters), i.e. do NOT use something
791 like usercrypted="bkuQxLqLRuDW6").
792 //NOTE// If you do not assign salt to mkpasswd, the encrypted password
793 will not be the same every time you create it.
794 For more about usercrypted discussion, please check the here.
795
796 * How to put your own binary driver in Clonezilla live without modifying
797 /live/filesystem.squashfs:
798
799 * Boot clonezilla live
800 * Become root by running "sudo su -"
801 * Copy the dir lsi, which contains a precompiled kernel module matching
802 the running kernel in Clonezilla live and a script to run it, to a working
803 dir, e.g.:
804 cp -r /live/image/lsi /home/partimag
805 * cd /home/partimag
806 * /opt/drbl/sbin/ocs-live-dev -c -s -i lsi -u lsi -x
807 "ocs_prerun=/live/image/lsi/prep-lsi.sh"
808 * /opt/drbl/sbin/ocs-iso -s -i lsi -u lsi -x
809 "ocs_prerun=/live/image/lsi/prep-lsi.sh"
810 * ///NOTE/// In this example, the 2 files in dir lsi are: megasr.ko (the
811 binary driver) and prep-lsi.sh. The contents of prep-lsi.sh:
812
813 ------------------------
814 #!/bin/bash
815 cp -f /live/image/lsi/megasr.ko /lib/modules/`uname -r`/kernel/drivers/block/
816 chown root.root /lib/modules/`uname -r`/kernel/drivers/block/megasr.ko
817 depmod -a modprobe megasr
818 sleep 1
819 ------------------------
820 * To put your customized script with a PXE version of Clonezilla live
821 (You have to use Clonezilla live version 1.2.2-2 or later):
822 In this example, we assume (1) The IP address of your PXE server is
823 192.168.120.254, (2) the customized script (custom-ocs-2) is put on
824 your PXE server's tftpd root dir (E.g. On DRBL server, the path is
825 /tftpboot/nbi_img/. It might be different in your case if you are not use
826 DRBL server as a PXE server).
827 Therefor your pxelinux.cfg/default file is like:
828 ------------------------
829 label Clonezilla Live
830 MENU DEFAULT
831 # MENU HIDE
832 MENU LABEL Clonezilla Live
833 # MENU PASSWD
834 kernel vmlinuz1
835 append initrd=initrd1.img boot=live union=aufs noswap noprompt vga=788
836 ip=frommedia fetch=tftp://192.168.120.254/filesystem.squashfs
837 ocs_prerun="busybox tftp -g -b 10240 -r custom-ocs-2 -l
838 /tmp/custom-ocs-2 192.168.120.254" ocs_live_run="bash /tmp/custom-ocs-2"
839 ocs_live_keymap="NONE" ocs_live_batch="no" ocs_lang="en_US.UTF-8" nolocales
840 TEXT HELP
841 Boot Clonezilla live via network
842 ENDTEXT
843 ------------------------
844 The content of custom-ocs-2 can be like:
845
846 ------------------------
847 #!/bin/bash
848 . /opt/drbl/sbin/drbl-conf-functions
849 . /opt/drbl/sbin/ocs-functions
850 . /etc/ocs/ocs-live.conf
851
852 # Load language file
853 ask_and_load_lang_set en_US.UTF-8
854
855 # 1. Mount the clonezilla image home.
856 # Types: local_dev, ssh_server, samba_server, nfs_server
857 prep-ocsroot -t nfs_server
858
859 # 2. Restore the image
860 if mountpoint /home/partimag/ &>/dev/null; then
861 ocs-sr -l en_US.UTF-8 -c -p choose restoredisk ask_user ask_user
862 else
863 [ "$BOOTUP" = "color" ] & $SETCOLOR_FAILURE
864 echo "Fail to find the Clonezilla image home /home/partimag!"
865 echo "Program terminated!"
866 [ "$BOOTUP" = "color" ] & $SETCOLOR_NORMAL
867 fi
868 ------------------------
869 live-initramfs manual
870 ---------------------
871 This is the manual of live-initramfs {{
872 http://www.clonezilla.org/clonezilla-live/live-initramfs-param.php }}
873
874 live-initramfs(7)
875 =================
876 :man source: 1.157.3
877 :man manual: Debian Live
878
879 Name
880 ----
881 live-initramfs - Debian Live initramfs hook
882
883 Synopsis
884 --------
885 BOOT=live
886
887 as kernel parameter at boot prompt.
888
889 Description
890 -----------
891
892 live-initramfs is a hook for the initramfs-tools, used to generate
893 a initramfs
894 capable to boot live systems, such as those created by *live-helper*(7).
895 This includes the Debian Live isos, netboot tarballs, and usb stick images.
896
897 At boot time it will look for a (read-only) media containing a "/live"
898 directory where a root filesystems (often a compressed filesystem image like
899 squashfs) is stored. If found, it will create a writable environment, using
900 aufs, for Debian like systems to boot from.
901
902 You probably do not want to install this package onto a non-live system,
903 although it will do no harm.
904
905 live-initramfs is a fork of casper.
906 casper was originally written by Tollef Fog Heen
907 &lt;tfheen@canonical.com&amp;gt;
908 and Matt Zimmerman &lt;mdz@canonical.com&amp;gt;.
909
910 Boot options
911 ------------
912
913 Here is the complete list of recognized boot parameters by live-initramfs.
914
915 access=*ACCESS*::
916
917 Set the accessibility level for physically or visually impared users. ACCESS
918 must be one of v1, v2, v3, m1, or m2. v1=lesser visual impairment,
919 v2=moderate
920 visual impairment, v3=blindness, m1=minor motor difficulties, m2=moderate
921 motor
922 difficulties.
923
924 console=*TTY,SPEED*::
925
926 Set the default console to be used with the "live-getty" option. Example:
927 "console=ttyS0,115200"
928
929 debug::
930
931 Makes initramfs boot process more verbose.
932
933 fetch=*URL*::
934
935 Another form of netboot by downloading a squashfs image from a given url,
936 copying to ram and booting it. Due to current limitations in busyboxs wget
937 and DNS resolution, an URL can not contain a hostname but an IP only.
938
939 Not working: http://example.com/path/to/your_filesystem.squashfs
940 Working: http://1.2.3.4/path/to/your_filesystem.squashfs
941
942 Also note that therefore it's currently not possible to fetch an image from a
943 namebased virtualhost of an httpd if it is sharing the ip with the main httpd
944 instance.
945
946 hostname=*HOSTNAME*, username=*USER*, userfullname=*USERFULLNAME*::
947
948 Those parameters lets you override values read from the config file.
949
950 ignore_uuid
951
952 Do not check that any UUID embedded in the initramfs matches the discovered
953 medium. live-initramfs may be told to generate a UUID by setting
954 LIVE_GENERATE_UUID=1 when building the initramfs.
955
956 integrity-check::
957
958 If specified, an MD5 sum is calculated on the live media during boot and
959 compared to the value found in md5sum.txt found in the root directory of the
960 live media.
961
962 ip=**[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]:
963 [DEVICE]:[AUTOCONF]
964 [,[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]:
965 [DEVICE]:[AUTOCONF]]***::
966
967 Let you specify the name(s) and the options of the interface(s) that
968 should be
969 configured at boot time. Do not specify this if you want to use dhcp
970 (default).
971 It will be changed in a future release to mimick official kernel boot param
972 specification
973 (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp).
974
975 ip=[**frommedia**]::
976
977 If this variable is set, dhcp and static configuration are just skipped
978 and the
979 system will use the (must be) media-preconfigured /etc/network/interfaces
980 instead.
981
982 {keyb|kbd-chooser/method}=**KEYBOARD**,
983 {klayout|console-setup/layoutcode}=**LAYOUT**,
984 {kvariant|console-setup/variantcode}=**VARIANT**,
985 {kmodel|console-setup/modelcode}=
986 **CODE**, koptions=**OPTIONS**::
987
988 Configure the running keyboard as specified, if this one misses
989 live-initramfs
990 behaves as if "keyb=us" was specified. It will be interfered from
991 "locale=" if
992 locale is only 2 lowecase letters as a special case. You could also specify
993 console layout, variant, code, and options (no defaults).
994
995 live-getty::
996
997 This changes the auto-login on virtual terminals to use the (experimental)
998 live-getty code. With this option set the standard kernel argument
999 "console=" is
1000 parsed and if a serial console is specified then live-getty is used to
1001 autologin
1002 on the serial console.
1003
1004 {live-media|bootfrom}=**DEVICE**::
1005
1006 If you specify one of this two equivalent forms, live-initramfs will
1007 first try
1008 to find this device for the "/live" directory where the read-only root
1009 filesystem should reside. If it did not find something usable, the
1010 normal scan
1011 for block devices is performed.
1012
1013 Instead of specifing an actual device name, the keyword 'removable' can
1014 be used
1015 to limit the search of acceptable live media to removable type only. Note
1016 that
1017 if you want to further restrict the media to usb mass storage only, you
1018 can use
1019 the 'removable-usb' keyword.
1020
1021 {live-media-encryption|encryption}=**TYPE**::
1022
1023 live-initramfs will mount the encrypted rootfs TYPE, asking the passphrase,
1024 useful to build paranoid live systems :-). TYPE supported so far are
1025 "aes" for
1026 loop-aes encryption type.
1027
1028 live-media-offset=**BYTES**::
1029
1030 This way you could tell live-initramfs that your image starts at offset
1031 BYTES in
1032 the above specified or autodiscovered device, this could be useful to
1033 hide the
1034 Debian Live iso or image inside another iso or image, to create "clean"
1035 images.
1036
1037 live-media-path=**PATH**::
1038
1039 Sets the path to the live filesystem on the medium. By default, it is set to
1040 '/live' and you should not change that unless you have customized your media
1041 accordingly.
1042
1043 live-media-timeout=**SECONDS**::
1044
1045 Set the timeout in seconds for the device specified by "live-media="
1046 to become
1047 ready before giving up.
1048
1049 {locale|debian-installer/locale}=**LOCALE**::
1050
1051 Configure the running locale as specified, if not present the live-media
1052 rootfs
1053 configured locale will be used and if also this one misses live-initramfs
1054 behave
1055 as "locale=en_US.UTF-8" was specified. If only 2 lowercase letter are
1056 specified
1057 (like "it"), the "maybe wanted" locale is generated (like en:EN.UTF-8),
1058 in this
1059 case if also "keyb=" is unspecified is set with those 2 lowercase letters
1060 (keyb=us). Beside that facility, only UTF8 locales are supported by
1061 live-initramfs.
1062
1063 module=**NAME**::
1064
1065 Instead of using the default optional file "filesystem.module" (see below)
1066 another file could be specified without the extension ".module"; it should be
1067 placed on "/live" directory of the live medium.
1068
1069 netboot[=**nfs**|**cifs**]::
1070
1071 This tells live-initramfs to perform a network mount. The parameter
1072 "nfsroot="
1073 (with optional "nfsopts="), should specify where is the location of the root
1074 filesystem. With no args, will try cifs first, and if it fails nfs.
1075
1076 nfsopts=::
1077
1078 This lets you specify custom nfs options.
1079
1080 noautologin::
1081
1082 This parameter disables the automatic terminal login only, not touching
1083 gdk/kdm.
1084
1085 noxautologin::
1086
1087 This parameter disables the automatic login of gdm/kdm only, not touching
1088 terminals.
1089
1090 nofastboot::
1091
1092 This parameter disables the default disabling of filesystem checks in
1093 /etc/fstab. If you have static filesystems on your harddisk and you want
1094 them to
1095 be checked at boot time, use this parameter, otherwise they are skipped.
1096
1097 nopersistent::
1098
1099 disables the "persistent" feature, useful if the bootloader (like syslinux)
1100 has
1101 been installed with persistent enabled.
1102
1103 noprompt
1104
1105 Do not prompt to eject the CD or remove the USB flash drive on reboot.
1106
1107 nosudo::
1108
1109 This parameter disables the automatic configuration of sudo.
1110
1111 swapon::
1112
1113 This parameter enables usage of local swap partitions.
1114
1115 nouser::
1116
1117 This parameter disables the creation of the default user completely.
1118
1119 noxautoconfig::
1120
1121 This parameter disables Xorg auto-reconfiguration at boot time. This
1122 is valuable
1123 if you either do the detection on your own, or, if you want to ship a custom,
1124 premade xorg.conf in your live system.
1125
1126 persistent[=nofiles]::
1127
1128 live-initramfs will look for persistent and snapshot partitions or files
1129 labeled
1130 "live-rw", "home-rw", and files called "live-sn*", "home-sn*" and will
1131 try to,
1132 in order: mount as /cow the first, mount the second in /home, and just
1133 copy the
1134 contents of the latter in appropriate locations (snapshots). Snapshots
1135 will be
1136 tried to be updated on reboot/shutdown. Look at live-snapshot(1) for more
1137 informations. If "nofiles" is specified, only filesystems with matching
1138 labels
1139 will be searched; no filesystems will be traversed looking for archives
1140 or image
1141 files. This results in shorter boot times.
1142
1143 persistent-path=PATH
1144
1145 live-initramfs will look for persistency files in the root directory of
1146 a partition,
1147 with this parameter, the path can be configured so that you can have multiple
1148 directories on the same partition to store persistency files.
1149
1150 {preseed/file|file}=**FILE**::
1151
1152 A path to a file present on the rootfs could be used to preseed debconf
1153 database.
1154
1155 package/question=**VALUE**::
1156
1157 All debian installed packages could be preseeded from command-line that way,
1158 beware of blanks spaces, they will interfere with parsing, use a preseed
1159 file in
1160 this case.
1161
1162 quickreboot::
1163
1164 This option causes live-initramfs to reboot without attempting to eject the
1165 media and without asking the user to remove the boot media.
1166
1167 showmounts::
1168
1169 This parameter will make live-initramfs to show on "/" the ro filesystems
1170 (mostly compressed) on "/live". This is not enabled by default because could
1171 lead to problems by applications like "mono" which store binary paths on
1172 installation.
1173
1174 silent
1175
1176 If you boot with the normal quiet parameter, live-initramfs hides most
1177 messages
1178 of its own. When adding silent, it hides all.
1179
1180 textonly
1181
1182 Start up to text-mode shell prompts, disabling the graphical user interface.
1183
1184 timezone=**TIMEZONE**::
1185
1186 By default, timezone is set to UTC. Using the timezone parameter, you can
1187 set it
1188 to your local zone, e.g. Europe/Zurich.
1189
1190 todisk=**DEVICE**::
1191
1192 Adding this parameter, live-initramfs will try to copy the entire read-only
1193 media to the specified device before mounting the root filesystem. It
1194 probably
1195 needs a lot of free space. Subsequent boots should then skip this step
1196 and just
1197 specify the "live-media=DEVICE" boot parameter with the same DEVICE used this
1198 time.
1199
1200 toram::
1201
1202 Adding this parameter, live-initramfs will try to copy the whole read-only
1203 media
1204 to the computer's RAM before mounting the root filesystem. This could need
1205 a lot
1206 of ram, according to the space used by the read-only media.
1207
1208 union=**aufs**|**unionfs**::
1209
1210 By default, live-initramfs uses aufs. With this parameter, you can switch to
1211 unionfs.
1212
1213 utc=**yes**|**no**::
1214
1215 By default, Debian systems do assume that the hardware clock is set to
1216 UTC. You
1217 can change or explicitly set it with this parameter.
1218
1219 xdebconf::
1220
1221 Uses xdebconfigurator, if present on the rootfs, to configure X instead
1222 of the
1223 standard procedure (experimental).
1224
1225 xvideomode=**RESOLUTION**::
1226
1227 Doesn't do xorg autodetection, but enforces a given resolution.
1228
1229 Files
1230 -----
1231
1232 /etc/live.conf
1233
1234 Some variables can be configured via this config file (inside the live
1235 system).
1236
1237 /live/filesystem.module
1238
1239 This optional file (inside the live media) contains a list of white-space or
1240 carriage-return-separated file names corresponding to disk images in the
1241 "/live"
1242 directory. If this file exists, only images listed here will be merged
1243 into the
1244 root aufs, and they will be loaded in the order listed here. The first entry
1245 in this file will be the "lowest" point in the aufs, and the last file in
1246 this list will be on the "top" of the aufs, directly below /cow. Without
1247 this file, any images in the "/live" directory are loaded in alphanumeric
1248 order.
1249
1250 /etc/live-persistence.binds
1251
1252 This optional file (which resides in the rootfs system, not in the live
1253 media)
1254 is used as a list of directories which not need be persistent: ie. their
1255 content does not need to survive reboots when using the persistence features.
1256
1257 This saves expensive writes and speeds up operations on volatile data such as
1258 web caches and temporary files (like e.g. /tmp and .mozilla) which are
1259 regenerated each time. This is achieved by bind mounting each listed
1260 directory
1261 with a tmpfs on the original path.
1262
1263 See also
1264 --------
1265
1266 live-snapshot(1), initramfs-tools(8), live-helper(7), live-initscripts(7),
1267 live-webhelper(7)
1268
1269 Bugs
1270 ----
1271
1272 Report bugs against live-initramfs
1273 http://packages.qa.debian.org/live-initramfs.
1274
1275 Homepage
1276 --------
1277
1278 More information about the Debian Live project can be found at
1279 http://debian-live.alioth.debian.org/ and
1280 http://wiki.debian.org/DebianLive/.
1281
1282 Authors
1283 -------
1284
1285 live-initramfs is maintained by Daniel Baumann &lt;daniel@debian.org&amp;gt;
1286 for the Debian project.
1287
1288 live-initramfs is a fork of casper.
1289 casper was originally written by Tollef Fog Heen
1290 &lt;tfheen@canonical.com&amp;gt;
1291 and Matt Zimmerman &lt;mdz@canonical.com&amp;gt;.
1292
1293
1294
1295
1296 About Clonezilla Live
1297 ==============================================================================
1298
1299 Intro
1300 ****************************************
1301 The DRBL-based PXEBoot Clonezilla is used to clone many computers
1302 simultaneously. It is an extremely useful tool, however, it does have several
1303 limitations. In order to use it, you must first prepare a DRBL server AND
1304 the machine to be cloned must boot from a network (e.g. PXE/Etherboot).
1305
1306 To address these limitations, the Free Software Lab at the NCHC has combined
1307 Debian Live {{ http://debian-live.alioth.debian.org/ }} with Clonezilla
1308 to produce "Clonezilla Live", a new software that can be used to easily
1309 clone individual machines.
1310
1311 Clonezilla Live provides two modes of operation:
1312
1313 * device-image
1314 In this mode of operation, a disk/partition can be saved to an
1315 image file. This image file can be used to restore the original
1316 disk/partition. With Clonezilla-SysRescCD, it can also be used to create an
1317 automated restore CD/DVD. This is the mode of operation we will discuss here.
1318
1319 * device-device (cloning)
1320 This mode of operation creates an exact copy of the original disk/partition
1321 on the fly.
1322
1323 When working in device-image mode, you will always have to specify three
1324 things:
1325
1326 * The location of the image file
1327 * The working parameters for the operation
1328 * The disk/partition that will be saved/restored
1329
1330 Clonezilla Live provides a user friendly interface in order to insert
1331 this data.
1332
1333 When Clonezilla Live is booted up, either normally or copied to RAM, the
1334 contents of the whole CD/DVD can be found in folder /live/image. This
1335 is where you will find any extra files, such as the restorecd and the
1336 doc folders.
1337
1338 Starting and stopping Clonezilla Live
1339 ****************************************
1340 When you boot into Clonezilla Live, the program (actually a script) starts
1341 automatically. There are many places where you can stop it, by selecting
1342 Cancel or answering N(o) to a question. When you do that you will probably
1343 get the following:
1344 Now you can choose to:
1345 (0) Poweroff
1346 (1) Reboot
1347 (2) Enter command line prompt
1348 (3) Start over
1349 [2]
1350
1351 Select Poweroff or Reboot, only if you haven't already mounted a disk
1352 partition. I found out by experience, it is not always safe to let any live
1353 CD automatically unmount my partitions. So if you have already specified
1354 the image partition and/or the partition to save/restore, you should enter
1355 command line prompt and type:
1356 sudo su -
1357 mount | grep /dev/[sh]d
1358 and then unmount the partitions shown by the last command. So if the
1359 results of this command is for example:
1360 /dev/hda1 on /home/partimag type vfat (rw)
1361 just type the command:
1362 umount /dev/hda1
1363 and it's now safe to Poweroff of Reboot.
1364
1365 If, on the other hand, you just want to restart the program, type:
1366 ocs-live
1367
1368 About the Image file
1369 ****************************************
1370 One thing should be made clear about the image file: it is not a file,
1371 it is a folder, containing the actual image file and some data about the
1372 disk/partition it is associated with. So when you insert the image file name,
1373 you actually insert the folder name where the image will be saved/restored.
1374
1375 Before you are able to insert the image file name, a list of partitions
1376 will be presented to you, so that you can choose where it should be
1377 saved/found. When you select one of them, it will be mounted and a list
1378 of folders will be presented to you, so you can select the base image
1379 directory (first level directory within the partition), which will then
1380 be mounted under /home/partimag. This way you can, for example, create a
1381 folder called all_my_images in one of your disk partitions, and move all
1382 your image files in there; Clonezilla Live will be able to find them!!!
1383
1384 Another thing that should be pointed out is that only unmounted partitions
1385 will be included in the above list. This means that if you have stopped
1386 the program at some point after specifying the partition where the image
1387 file resides, and it has been mounted, it will not be present in the list
1388 the next time it is presented to you, and you will not be able to use it.
1389
1390 There are two things you can do in this case; either unmount the partition,
1391 as stated above, or select
1392 skip Use existing /home/partimag
1393
1394 instead of any other option, when you restart the program. The later of
1395 course means that you still want to use the previously specified partition
1396 as the image file location.
1397
1398 Fianlly I should say that Clonezilla Live is able to use a remote
1399 disk/partition as the location of the image file, mounted through ssh,
1400 samba or nfs. Using any of these options is a more advanced topic, way
1401 beyond the scope of this presentation.
1402
1403 Scripts' options
1404 ****************************************
1405 This section presents the options which are available at the "Clonezilla
1406 advanced extra parameters" screens, if the "Expert" mode is selected. For
1407 other options, see Getting backups and Restoring data.
1408
1409 Backup options
1410 ---------------------
1411 > Imaging program priority
1412
1413 -q2 Priority: partclone > partimage > dd
1414 -q1 Priority: Only dd (supports all filesystem, but inefficient)
1415 -q Priority: ntfsclone > partimage > dd
1416 Priority: partimage > dd (no ntfsclone)
1417
1418 This option chooses which imaging programs are preferred. By default,
1419 Clonezilla Live uses partclone for nearly all filesystems, including
1420 ext2/3/4, NTFS and FAT32. If a filesystem isn't supported by partclone,
1421 but is supported by partimage (spesifically: if the filesystem is HFS,
1422 HPFS or JFS), it is cloned by partimage. If it isn't supported by either
1423 (for example Linux swap, though it doesn't make any sense to clone swap
1424 partitions), it is cloned by dd. Unlike partclone or partimage, dd copies
1425 all blocks of the partition instead of only used, resulting in slower
1426 imaging process and bigger images.
1427
1428 Normally the default option -q2 should be preferred. Try another option
1429 if you have problems and believe they are caused by the imaging program used.
1430
1431 > Various parameters
1432
1433 These options are available at the second "Clonezilla advanced extra
1434 parameters" screen.
1435 -c Client waits for confirmation before cloning
1436 This option causes Clonezilla Live to ask if you really want to clone the
1437 disk/partition just before it starts cloning. It is enabled by default.
1438
1439 -j2 Clone the hidden data between MBR and 1st partition
1440 If this option is set, the 15 hidden sectors between Master Boot Record
1441 and the first partition are copied. This area usually contains some data
1442 necessary for booting. The option is enabled by default and should be kept
1443 enabled if you are cloning a bootable disk.
1444
1445 -nogui Use text output only, no TUI/GUI output
1446 Causes Clonezilla Live to force the used programs to use only command-line
1447 interface even if text-based or graphical user interface is available.
1448
1449 -a Do NOT force to turn on HD DMA
1450 Prevents Clonezilla Live from using DMA for communicating with hard
1451 drives. Slows cloning down but in some conditions cloning without this
1452 option can be impossible.
1453
1454 -rm-win-swap-hib Remove page and hibernation files in Win if exists
1455 This option prevents Clonezilla Live from cloning your page file if you
1456 are cloning a partition containing Windows. Often the page file is big
1457 and unneeded, and skipping it may speed cloning up without causing any
1458 harm. Mind you, this option is disabled by default because sometimes the
1459 page file may be necessary.
1460
1461 -ntfs-ok Skip checking NTFS integrity, even bad sectors (ntfsclone only)
1462 This option works only if you selected the -q option and you're cloning
1463 a NTFS partition. It prevents the integrity check of NTFS partitions and
1464 speeds the cloning process up a little. However, if the check is disabled,
1465 there is a risk that the filesystem is damaged and the image created from
1466 it is useless.
1467
1468 -rescue Continue reading next one when disk blocks read errors
1469 If this option is set, Clonezilla Live continues cloning even if a read
1470 error occurs. If there is one, the disk image will be corrupted, but
1471 failing hard drives can only be cloned with this option enabled.
1472
1473 -fsck-src-part Check and repair source file system before saving
1474 This option causes Clonezilla Live to check the integrity of the partition(s)
1475 to be cloned. If the filesystem of the partition is damaged, Clonezilla Live
1476 also attempts to repair it automatically. Enabling this option reduces the
1477 risk that the image contains a damaged filesystem. However, the option is
1478 disabled by default because the automatic filesystem repair attempt may
1479 cause data loss.
1480
1481 -gm Generate image MD5 checksums
1482 Causes Clonezilla Live to calculate MD5 checksum(s) of image(s) created. If
1483 the image gets corrupted afterwards, the checksum allows to notice the
1484 corruption before the image is restored. Mind you, calculating the checksum
1485 takes some time and slows the process down a little.
1486
1487 -gs Generate image SHA1 checksums
1488 This option is identical to the above, but creates SHA1 checksum(s) instead
1489 of MD5. SHA1 is considered to be more accurate checksum algorithm than MD5,
1490 but MD5 is more popular.
1491
1492 > Compression method
1493
1494 -z1p Use parallel gzip compression (testing), for multicore/CPU
1495 -z1 gzip compression (fast with a smaller image)
1496 -z2p Use parallel bzip2 compression (testing), for multicore/CPU
1497 -z2 bzip2 compression (slowest but smallest image)
1498 -z3 lzo compression (faster with image size approx. to that of
1499 gzip)(NOTE!!)
1500 -z4
1501 lzma_compression_(slowest_but_also_small_image,_faster_decompression_than_bzip2)
1502 -z5p Use_parallel_xz_compression_(testing),_for_multicore/CPU
1503 -z5
1504 xz_compression_(slowest_but_also_small_image,_faster_decompression_than_bzip2)
1505 -z6p Use_parallel_lzip_compression_(testing),_for_multicore/CPU
1506 -z6
1507 lzip_compression_(slowest_but_also_small_image,_faster_decompression_than_bzip2)
1508 -z0 No compression (fastest but largest image size)
1509
1510 This option chooses the method which is used to compress the image while
1511 creating it.
1512
1513 If no compression is used at all, there won't be any negative speed impact
1514 caused by compression. However, the image file size is the size of all the
1515 data backed up - for example, if you clone a 160 GB hard drive containing
1516 60 gigabytes of data, the resulting disk image will be 60 gigabytes in size.
1517
1518 Gzip and lzop are fast compression methods. Lzop is many times faster than
1519 gzip, but creates slightly larger images. Clonezilla Live warns that lzop
1520 requires good-quality RAM, but I (the contributor who wrote this chapter)
1521 think other compression methods require good RAM too.
1522
1523 Bzip2, lzma, xz and lzip are powerful compression methods. Lzma creates a
1524 little smaller images than bzip2, and decompressing lzma-compressed images
1525 is faster than decompressing bzip2 images. But there is no free lunch:
1526 lzma compression method is very slow compared even to bzip2, which isn't
1527 fast method either.
1528
1529 Lzma method is becoming obsolete, and both xz and lzip are attempting to
1530 become its successor. They are a bit less powerful compression methods than
1531 lzma, but much faster. The differences between xz and lzip are virtually
1532 non-existent.
1533
1534 If you don't use the i486 version of Clonezilla-SysRescCD and your
1535 processor contains multiple cores and/or supports Hyper-Threading, parallel
1536 gzip, bzip2, xz and lzip compression methods are also available. Parallel
1537 compression means that each processor core compresses a different part of the
1538 image at a time. Without parallel compression one core compresses everything.
1539
1540 The speed impact caused by parallel compression depends on the number
1541 of processor cores available. In addition, Hyper-Threading increases the
1542 speed by about 30 % if parallel compression is used. For example, if your
1543 processor contains four cores and supports Hyper-Threading, speed with
1544 parallel compression is nearly 5,2 times as high as without. However,
1545 parallel compression is currently an experimental feature.
1546
1547 > Splitting
1548
1549 This option (command line: -i [number]) decides if the created image files
1550 are splitted into smaller pieces, and if yes, how large the pieces are. This
1551 setting doesn't usually matter, but some filesystems (most importantly
1552 FAT32) don't allow files larger than four gigabytes. If you're saving the
1553 disk image to a FAT32 partition, enter 4000 or less. (Value 0 disables
1554 splitting, so don't use it in that case.) If the filesystem allows files
1555 big enough, enter any value which isn't too small (you don't want to split
1556 the image into too many pieces, do you?)
1557
1558 Clonezilla Live warns that it is no longer safe to disable splitting because
1559 value 0 can confuse init. I (the contributor) don't know what the warning
1560 exactly means and haven't been able to reproduce the problem. Anyway,
1561 entering a very big value, for example 999999999999, is a safe way to keep
1562 the image in one piece.
1563
1564 > Postaction
1565
1566 -p true Do nothing when the clone finishes
1567 -p reboot Reboot client when the clone finishes
1568 -p poweroff Shutdown client when the clone finishes
1569
1570 In this screen you can decide what Clonezilla Live does when the
1571 disk/partition is cloned.
1572
1573 Spiros told above that he has found out that it's not always safe to allow
1574 Live CDs automatically unmount partitions, and I have lost data when trying
1575 auto-unmount with a script. So, avoid -p reboot and -p poweroff options
1576 if possible. You have been warned.
1577
1578 Restore options (script ocs-sr)
1579 ---------------------
1580 > Various parameters
1581
1582 These options are available at the first "Clonezilla advanced extra
1583 parameters" screen.
1584 -g auto Reinstall grub in client disk MBR (only if grub config exists)
1585 Causes Clonezilla Live to reinstall GRUB into the Master Boot Record
1586 of the disk if at least one partition contains GRUB config file
1587 (/boot/grub/menu.lst). The option is enabled by default and shouldn't
1588 cause any harm. However, it should be disabled if you for example have
1589 another bootloader in MBR and chainload GRUB with it.
1590
1591 -e1 auto Automatically adjust filesystem geometry for a NTFS boot partition
1592 if exists
1593 The NTLDR bootloader used by Windows isn't able to determine automatically
1594 where the files it needs are stored. It only knows their physical locations,
1595 which sometimes change when the disk or partition is copied. If the locations
1596 are changed and this option is selected, the location information of the
1597 files is changed accordingly. This option is enabled by default and if
1598 it's disabled, the cloned Windows will fail to boot.
1599
1600 -e2 sfdisk uses CHS of hard drive from EDD(for non-grub boot loader)
1601 This option requires that the -e1 auto option is selected. It causes
1602 Clonezilla Live to use disk read interface named EDD for determining the
1603 physical locations of the files when updating the location information
1604 used by NTLDR. The option is enabled by default because it reduces the
1605 risk that Windows doesn't boot.
1606
1607 -hn0 PC Change MS Win hostname (based on IP address) after clone
1608 If this option is selected and a partition containing Microsoft Windows is
1609 cloned, its IP address -based hostname is changed after cloning. Computers
1610 which are on any network simultaneously need to have different hostnames,
1611 so this option is needed if a Windows system is cloned to another computer
1612 and the original computer is still used in addition to the one where the
1613 image was restored to.
1614
1615 -hn1 PC Change MS Win hostname (based on MAC address) after clone
1616 This option causes the MAC address -based hostname of Windows to change. This
1617 option needs also be enabled in the above condition.
1618
1619 -v Prints verbose messages (especially for udpcast)
1620 Causes Clonezilla Live to tell more information of what it does.
1621
1622 -nogui Use text output only, no TUI/GUI output
1623 Causes Clonezilla Live to force the used programs to use only command-line
1624 interface even if text-based or graphical user interface is available.
1625
1626 -b Run clone in batch mode (DANGEROUS!)
1627 Causes Clonezilla Live to run in batch mode. According to Clonezilla
1628 Live reference card, this option is dangerous, though I (the contributor)
1629 don't know why.
1630
1631 -c Client waits for confirmation before cloning
1632 This option causes Clonezilla Live to ask if you really want to clone the
1633 disk/partition just before it starts cloning. It is enabled by default.
1634
1635 -t Client does not restore the MBR (Mater Boot Record)
1636 Do NOT restore the MBR (Mater Boot Record) when restoring image. If this
1637 option is set, you must make sure there is an existing MBR in the current
1638 restored harddisk. Default is Yes.
1639
1640 -t1 Client restores the prebuilt MBR from syslinux (For Windows only)
1641 If this option is set, the MBR is overwritten by prebuilt one which
1642 chainloads Windows. Use this option if you have to restore Windows and
1643 make it bootable, but don't have the original MBR or backup of it.
1644
1645 -r Try to resize the filesystem to fit partition size
1646 This option is useful if you are cloning a small disk to larger one. It
1647 tries to resize the restored filesystem to the size of the partition where
1648 it was restored to. It allows you to use the whole size of your new disk
1649 without resizing the partition afterwards. The option requires that the
1650 disk where the image is copied already contains a partition where the
1651 image is restored or that the option -k1 is enabled.
1652
1653 -e sfdisk uses the CHS value of hard drive from the saved image
1654 Force to use the saved CHS (cylinders, heads, sectors) when using sfdisk. Of
1655 cource, there is no use of it when using any of -j0, -k or -k2 options.
1656
1657 -icrc Ignore CRC checking of partclone
1658 This option causes partclone to skip checking the CRC32 checksums of
1659 the image. Enabling this option speeds the restore process up. However,
1660 if this option is enabled and the -cm and -cs options are disabled, there
1661 is no way to notice if the image has corrupted.
1662
1663 -j1 Write MBR (512 B) again after image is restored. Not OK for partition
1664 table diffe
1665 When a disk image is restored, the partition table must be updated to
1666 reflect the actual partitions in the disk. If you don't want it to happen,
1667 enable this option. Then the Master Boot Record (including the partition
1668 table) is restored again after restoring the image. Note that using this
1669 option can destroy all the data in the target drive.
1670
1671 -j2 Clone the hidden data between MBR and 1st partition
1672 If this option is set, the 15 hidden sectors between Master Boot Record
1673 and the first partition are restored. This area usually contains some data
1674 necessary for booting. The option is enabled by default and should be kept
1675 enabled if you are cloning a bootable disk.
1676
1677 -cm Check image by MD5 checksums
1678 If the image folder contains MD5 checksum(s), this option causes Clonezilla
1679 Live to check if the image has corrupted by calculating its checksum and
1680 comparing it to the precalculated one. Mind you, calculating the checksum
1681 takes some time and slows the process down a little.
1682
1683 -cs Check image by SHA1 checksums
1684 This option is identical to the above, but checks SHA1 checksum(s) instead
1685 of MD5.
1686
1687 -a Do NOT force to turn on HD DMA
1688 Prevents Clonezilla Live from using DMA for communicating with hard
1689 drives. Slows cloning down but in some conditions cloning without this
1690 option can be impossible.
1691
1692 -o0 Run script in $OCS_PRERUN_DIR before clone starts
1693 Run the scripts in the directory $OCS_PRERUN_DIR before clone is
1694 started. The location of the directory can be determined by editing the
1695 file drbl-ocs.conf. By default it is /opt/drbl/share/ocs/prerun.
1696
1697 -o1 Run script in $OCS_POSTRUN_DIR as clone finishes
1698 Run the scripts in the directory $OCS_POSTRUN_DIR when clone is
1699 finished. The location of the directory can be determined by editing the
1700 file drbl-ocs.conf. By default it is /opt/drbl/share/ocs/postrun. The
1701 command will be run before that assigned in -p.
1702
1703 The scripts will be executed by the program "run-parts". run-parts only
1704 accepts that the name of the scripts must consist entirely of upper and
1705 lower case letters, digits and underscores. So if your file name has an
1706 illegal character ".", run-parts won't run it. You can test which files
1707 will be executed by entering the command:
1708 run-parts --test /opt/drbl/share/ocs/postrun
1709
1710 > Partition table
1711
1712 This option decides what is done to the partition table of the target drive.
1713 Use the partition table from the image
1714 This option causes Clonezilla Live to copy the partition table from the
1715 image. Use this option if you are cloning a whole disk or somehow know that
1716 the partition tables are identical (for example, if you are restoring a
1717 partition to the same disk where it was copied from and haven't repartitioned
1718 the drive after creating the backup). This is the default option.
1719
1720 -k Do NOT create a partition table on the target disk
1721 Do NOT create partition in target harddisk. If this option is set,
1722 you must make sure there is an existing partition table in the current
1723 restored harddisk.
1724
1725 -k1 Create partition table proportionally (OK for MRB format, not GPT)
1726 Causes Clonezilla Live to create the partition table automatically using
1727 sfdisk after restoring the images. This option works nearly always, but
1728 sometimes cloned Windows don't boot. Note that this option doesn't work if
1729 you have GUID Partition Table on your disk. (Most likely you don't have one.)
1730
1731 -k2 Enter command line prompt to create partition manually later
1732 Like the -k option, this option doesn't create the partition table
1733 automatically. However, after restoring the image you are led to command
1734 line prompt where you can create the partition table manually. Don't use
1735 this option if you don't know how the partition table can be created.
1736
1737 -j0 Use dd to create partition (NOT OK if logical drives exist)
1738 Use dd to dump the partition table from saved image instead of sfdisk.
1739
1740 We read in DRBL FAQ/Q&A {{
1741 http://drbl.sourceforge.net/faq/fine-print.php?path=./2_System/23_Missing_OS.faq#23_Missing_OS.faq
1742 }}:
1743
1744 When I use clonezilla to clone M$ windows, there is no any problem
1745 when saving an image from template machine. However, after the image
1746 is restored to another machine, it fails to boot, the error message is
1747 "Missing Operating System". What's going on ?
1748
1749 Usually this is because GNU/Linux and M$ windows interpret the CHS (cylinder,
1750 head, sector) value of harddrive differently. Some possible solutions:
1751 1. Maybe you can change the IDE harddrive setting in BIOS, try to use
1752 LBA instead of auto mode.
1753 2. Try to choose
1754 [ ] -j0 Use dd to create partition table instead of sfdisk
1755 and
1756 [ ] -t1 Client restores the prebuilt MBR from syslinux (For Windows only)
1757 when you restore the image.
1758 3. You can try to boot the machine with MS Windows 9x bootable floppy,
1759 and in the DOS command prompt, run: "fdisk /mbr".
1760 4. You can try to boot the machine with MS Windows XP installation
1761 CD, enter recovery mode (by pressing F10 key in MS XP, for example),
1762 then in the console, run "fixmbr" to fix it. Maybe another command
1763 "fixboot" will help, too. For more info, refer to this doc {{
1764 http://support.microsoft.com/?scid=kb%3Ben-us%3B314058&x=7&y=14 }}
1765 5. Use ntfsreloc to adjust FS geometry on NTFS partitions. For more info,
1766 refer to http://www.linux-ntfs.org/doku.php?id=contrib:ntfsreloc
1767
1768 It has been confirmed that activating the -j0 option, fixes the problem.
1769
1770 This option doesn't work if you use LVM (Logical Volume Manager).
1771
1772 exit Exit
1773 This option ends the restore process and enters command line prompt.
1774
1775 > Postaction
1776
1777 -p true Do nothing when the clone finishes
1778 -p reboot Reboot client when the clone finishes
1779 -p poweroff Shutdown client when the clone finishes
1780
1781 When image restoration finishes, do one of the following: choose action
1782 (default), poweroff or reboot.
1783
1784 Saving image files in NTFS partitions
1785 ****************************************
1786 Although not recomended, you may find yourself having to save your image
1787 file in a NTFS (Windows XP) partition. You may never have a problem doing
1788 this, but you may get a message like the following one, when the partition
1789 gets mounted:
1790 Volume is scheduled for check
1791 Please boot into Windows TWICE, or use 'force' mount option"
1792 and the backup procedure fails. There are two things you can do here:
1793
1794 * Exit the program, reboot and use Windows XP Recovery Console to fix the
1795 NTFS file system. From Recovery Console
1796 prompt, execute the command:
1797 chkdsk /f X:
1798
1799 where X: is the drive letter of the disk. When done, boot back into
1800 Clonezilla Live and repeat the backup procedure.
1801
1802 If the disk/partition you are trying to backup is not the Windows System
1803 disk (usually C:), you can boot Windows, and execute the command in a DOS
1804 window. To open a DOS window click Start / Run... and at the prompt Open:
1805 type cmd.
1806
1807 If the Windows version you use is not XP and you're trying to backup the
1808 Windows System drive, boot into SystemRescueCD (graphical mode is not
1809 needed) and run the following command:
1810 ntfsfix /dev/hda1
1811
1812 where /dev/hda1 is the partition name in GNU/Linux. When done, boot back
1813 into Clonezilla Live and repeat the backup procedure.
1814
1815 * If Windows XP Recovery Console is not available, you don't have the time
1816 to execute the procedure described above, or even if you have executed it
1817 but you still get the same message, and you are absolutely sure that you
1818 get this message because the NTFS partition is really scheduled for check,
1819 and it's not because Windows crushed or have become corrupt, you can mount
1820 the patririon by hand and tell Clonezilla Live to use it. Assuming the
1821 partition is /dev/hda1, exit the program and execute the commands:
1822 sudo su -
1823 ntfs-3g -o force /dev/hda1 /home/partimag
1824 ocs-live
1825
1826 and when you get to the screen "Mount clonezilla image directory", select
1827 skip Use existing /home/partimag
1828
1829
1830
1831
1832 Getting backups
1833 ==============================================================================
1834
1835 Intro
1836 ****************************************
1837 In this page I will demonstrate the creation of an image file by getting
1838 a backup of a virtual partition (/dev/sdb1). The image file will be saved
1839 in another virtual partition (/dev/sda1).
1840
1841 The first thing you do when you want to get a backup of a disk/partition,
1842 is make sure both the souce (to be backed up) and target (to hold the
1843 image file) partitions are in excellent condition (error free). This is the
1844 logical thing to do, cause I wouldn't want to backup a corrupt partition,
1845 or end up with a corrupt image file.
1846
1847 There is one more step I would want to take: I should check that my BIOS
1848 boot settings are correct, in order to boot from my CD/DVD drive.
1849
1850 Having done all of the above, I am ready to boot from Clonezilla-SysRescCD.
1851
1852 [[ info.png ]]
1853 The following pressentation has been made usingClonezilla Live v 1.2.5-35
1854
1855 Getting the backup
1856 ****************************************
1857 Clonezilla-SysRescCD starting screen
1858 ---------------------
1859 If you're fine with US keymap and English language (available languages are
1860 English, Spanish, French, Italian, Japanese and Chinese [both simplified
1861 and traditional]) or don't mind editing the boot parameters, just select
1862 Clonezilla Live at the starting screen and press ENTER. When the system
1863 comes up, it will load the program that will preform the backup. After
1864 that continue from this step.
1865
1866 If you need to change these settings, select one of the available Clonezilla
1867 Live menu entries, and press TAB. The current boot parameters will be
1868 displayed.
1869
1870 The default parameters for booting Clonezilla Live on a 1024x768 screen,
1871 are the following:
1872
1873 append initrd=/live/initrd1.img boot=live union=aufs
1874 ocs_live_run="ocs-live-general" ocs_live_extra_param=""
1875 ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no"
1876 ocs_lang="en_US.UTF-8" ocs_live_keymap="NONE" vga=791 nolocales
1877
1878 By deleting the words in red, you instruct Clonezilla Live to ask you the
1879 values of these parameters. When the appropriate changes have been done
1880 (as shown bellow), just press ENTER to boot.
1881
1882 append initrd=/live/initrd1.img boot=live union=aufs
1883 ocs_live_run="ocs-live-general" ocs_live_extra_param=""
1884 ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no"
1885 ocs_lang="" ocs_live_keymap="" vga=791 nolocales
1886
1887 Screen "Choose Language"
1888 ---------------------
1889 [[ backup-00.png ]]
1890 I select "en_US.UTF-8 English" and press ENTER.
1891
1892 Screen "Configuring console-data"
1893 ---------------------
1894 [[ backup-01.png ]]
1895 I select "Select keymap from full list" and press ENTER. If you're using
1896 US keymap, the default option "Don't touch keymap" is a better choice.
1897
1898 Screen "Configuring console-data"
1899 ---------------------
1900 [[ backup-02.png ]]
1901 As I (the contributor who wrote a great deal of this page) use Finnish
1902 keyboard, I select "pc / qwerty / Finnish / Standard / Standard". Because
1903 you most likely use a different keyboard, choose the one you use.
1904
1905 Screen "Start Clonezilla"
1906 ---------------------
1907 [[ backup-03.png ]]
1908 I select "Start Clonezilla" and press ENTER.
1909
1910 Screen "Clonezilla"
1911 ---------------------
1912 [[ backup-04.png ]]
1913 I select "device-image" and press ENTER.
1914
1915 Screen "Mount clonezilla image directory"
1916 ---------------------
1917 In this screen I can select the way the image file directory will be saved.
1918 Available options are local directory, remote directory through ssh,
1919 samba or nfs and skip, to use the previously used directory. More info
1920 about the image file can be found at section "About the Image file".
1921
1922 [[ backup-05.png ]]
1923 I select "local_dev" and press ENTER.
1924
1925 Next screen
1926 ---------------------
1927 This is where I choose the location of the image file. It will be saved
1928 at the root directory of the selected partition.
1929
1930 [[ backup-06.png ]]
1931 I select partition sda1 and press ENTER.
1932
1933 [[ backup-07.png ]]
1934 and then ENTER again.
1935
1936 [[ backup-08.png ]]
1937 This screen displays the mounting result.
1938 As we can see, /dev/sda1 has been successfully mounted under /tmp/local-dev.
1939
1940 Next Screen
1941 ---------------------
1942 [[ backup-09.png ]]
1943 I select Beginer mode to accept the default backup options. If you select
1944 Expert mode, you can choose the options yourself. More details can be
1945 found here.
1946
1947 Screen "Select mode"
1948 ---------------------
1949 Here I can select the desired operation.
1950
1951 [[ backup-10.png ]]
1952 I select "savedisk" and press ENTER.
1953
1954 Next Screen
1955 ---------------------
1956 [[ backup-11.png ]]
1957 In this screen I select the image name.
1958 I type "Backup_32-2010_sdb", which in my opinion is more informative name
1959 than the default.
1960
1961 Next Screen
1962 ---------------------
1963 [[ backup-12.png ]]
1964 Finally I am asked to select the partition to save.
1965 I just press ENTER again.
1966
1967 Starting the backup
1968 ---------------------
1969 [[ backup-13.png ]]
1970 Then the program will display the command that will be executed and will
1971 ask me to press ENTER.
1972 Then I will be asked to confirm the operation by pressing y and ENTER.
1973
1974 [[ backup-14.png ]]
1975 After that, the backup begins
1976
1977 [[ backup-15.png ]]
1978 and when it's successfully completed, I press ENTER to get to the
1979 shell. Then, I execute the commands:
1980 sudo su -
1981 cd
1982 umount -a
1983 reboot
1984
1985 to reboot the system.
1986
1987
1988
1989
1990 Getting backups on Samba
1991 ==============================================================================
1992
1993 Intro
1994 ****************************************
1995 What if you don't have a spare local disk or partition or a USB disk? How
1996 will you be able to get a backup of your system? Well, if your PC is on
1997 the same LAN with another PC running Windows (or linux), you can use Samba
1998 to save your image file on that remote PC (which we will call Samba server
1999 from now on).
2000
2001 Using Samba you will be able to mount a Windows share resource (or
2002 Samba share resource), from within Clonezilla Live, and save the image
2003 file there. Then you can boot that PC using SystemRescueCD and create a
2004 restore DVD.
2005
2006 In this page I will demonstrate the creation of an image file by getting
2007 a backup of my second disk (/dev/sdb). The image file will be save in my
2008 Samba server which is my laptop (ip: 10.0.0.3, Windows share resource name:
2009 all_my_images).
2010
2011 What is Samba?
2012 ---------------------
2013 We read at http://us1.samba.org/samba/:
2014
2015 Samba is an Open Source/Free Software suite that provides seamless file
2016 and print services to SMB/CIFS clients. Samba is freely available, unlike
2017 other SMB/CIFS implementations, and allows for interoperability between
2018 Linux/Unix servers and Windows-based clients.
2019
2020 Samba is software that can be run on a platform other than Microsoft
2021 Windows, for example, UNIX, Linux, IBM System 390, OpenVMS, and other
2022 operating systems. Samba uses the TCP/IP protocol that is installed on the
2023 host server. When correctly configured, it allows that host to interact
2024 with a Microsoft Windows client or server as if it is a Windows file and
2025 print server.
2026
2027 Gathering info
2028 ****************************************
2029 Before you can use this approach to get a backup, you have to get some
2030 info about the Samba server.
2031
2032 The Samba server I have used for this example was my laptop, so I already
2033 knew most of the info required. If this is not the case for you, just ask
2034 the owner, user or system admin.
2035
2036 The info required is:
2037
2038 * The IP address of the Samba server
2039 * The domain on the Samba server
2040 This may exist if your PC is connected to a larger LAN (a corporation
2041 network, for example). In my case this is empty.
2042 * The user name and password you can use
2043 * The directory on the Samba server you can use to save your backup
2044 This is the name of the Windows share resource (Samba share resource)
2045 as it is known in the network, which is not necessarily the same as the
2046 local directory name. The user whose account will be used to login to the
2047 Samba server, must have write permission to this directory.
2048
2049 Getting the backup
2050 ****************************************
2051 If you're fine with US keymap and English language (available languages are
2052 English, Spanish, French, Italian, Japanese and Chinese [both simplified
2053 and traditional]) or don't mind editing the boot parameters, just select
2054 Clonezilla Live at the starting screen and press ENTER. When the system
2055 comes up, it will load the program that will preform the backup.
2056
2057 If you need to change these settings, go to the Getting backups page for
2058 instructions .
2059
2060 Screen "Start Clonezilla"
2061 ---------------------
2062 [[ backup-03.png ]]
2063 I select "Start Clonezilla" and press ENTER.
2064
2065 Screen "Clonezilla"
2066 ---------------------
2067 [[ backup-04.png ]]
2068 I select "device-image" and press ENTER.
2069
2070 Screen "Mount clonezilla image directory"
2071 ---------------------
2072 In this screen I can select the way the image file directory will be saved.
2073 Available options are local directory, remote directory through ssh,
2074 samba or nfs and skip, to use the previously used directory. More info
2075 about the image file can be found at section "About the Image file".
2076
2077 [[ backup-smb-05.png ]]
2078 I select "samba server" and press ENTER.
2079
2080 Screen "Mount Samba Server"
2081 ---------------------
2082 This is where I have to enter the IP address of my Samba server.
2083 [[ backup-smb-06.png ]]
2084 I type "10.0.0.3" and press ENTER.
2085
2086 Screen "Mount Samba Server" (second time)
2087 ---------------------
2088 This is where I have to enter the domain name on my Samba server.
2089 [[ backup-smb-07.png ]]
2090 I just press ENTER, as there is no domain in my LAN. If there is a domain
2091 in your network, you have to type its name (something like my_company.com)
2092 and press ENTER.
2093
2094 Screen "Mount Samba Server" (third time)
2095 ---------------------
2096 This is where I have to enter the account (user) name on my Samba server.
2097 [[ backup-smb-08.png ]]
2098 I type "spiros" and press ENTER.
2099
2100 Screen "Mount Samba Server" (fourth time)
2101 ---------------------
2102 This is where I have to enter the directory name on my Samba server, in
2103 which the image file will be saved. I type "/all_my_images" and press ENTER.
2104 [[ backup-smb-09.png ]]
2105
2106 At this point I'm informed I'm going to be asked for the password for
2107 user spiros.
2108 [[ backup-smb-10.png ]]
2109 I will be able to continue only after entering it correctly.
2110 [[ backup-smb-11.png ]]
2111
2112 Screen "Clonezilla - Opensource Clone System (OCS)"
2113 ---------------------
2114 [[ backup-09.png ]]
2115 I select Beginer mode to accept the default backup options. If you select
2116 Expert mode, you can choose the options yourself. More details can be
2117 found here.
2118
2119 Screen "Select mode"
2120 ---------------------
2121 Here I can select the desired operation.
2122
2123 [[ backup-10.png ]]
2124 I select "savedisk" and press ENTER.
2125
2126 Next Screen
2127 ---------------------
2128 [[ backup-11.png ]]
2129 In this screen I select the image name.
2130 I type "Backup_32-2010_sdb", which in my opinion is more informative name
2131 than the default.
2132
2133 Next Screen
2134 ---------------------
2135 [[ backup-12.png ]]
2136 Finally I am asked to select the partition to save.
2137 I just press ENTER again.
2138
2139 Starting the backup
2140 ---------------------
2141 [[ backup-13.png ]]
2142 Then the program will display the command that will be executed and will
2143 ask me to press ENTER.
2144 Then I will be asked to confirm the operation by pressing y and ENTER.
2145
2146 [[ backup-14.png ]]
2147 After that, the backup begins
2148
2149 [[ backup-15.png ]]
2150 and when it's successfully completed, I press ENTER to get to the
2151 shell. Then, I execute the commands:
2152 sudo su -
2153 cd
2154 umount -a
2155 reboot
2156
2157 to reboot the system.
2158
2159
2160
2161
2162 Restoring data
2163 ==============================================================================
2164
2165 Intro
2166 ****************************************
2167 Image files are always created for one purpose: restoring the data they
2168 contain. Images can be, for example, a backup solution: as long as hardware
2169 works, the computer can be restored to the state it was when creating the
2170 image. Another usage scenario is changing the hard drive: files can be
2171 copy-pasted from the old drive to the new, but that method doesn't make
2172 the new drive bootable. Disk images do.
2173
2174 This page contains a demonstration of the latter case. On the Getting backups
2175 page, a 500 MB virtual disk containing 160 megabytes of data was copied
2176 to a 2 GB virtual disk which was empty. Now the 500 MB disk is changed to
2177 an empty 2 GB disk (still virtual) and I'll restore the data to that disk.
2178
2179 When creating a disk image, one needs to check that both the source and
2180 target partitions are error free. That's not required when the image is
2181 restored, because restoration process can't damage the disk image. Note,
2182 however, that restoring an image erases all the data in the target
2183 disk/partition.
2184
2185 You also need to check the BIOS settings to be able to boot from
2186 Clonezilla-SysRescCD. Some BIOSes contain a boot menu, others require
2187 editing settings pernamently. Details can be found on the manual of the
2188 motherboard or laptop.
2189
2190 Now let's boot.
2191
2192 [[ important.png ]]
2193 Restore process erases all the data on the target disk/partition.Before
2194 restoring make sure you have backup of all the data on the target
2195 disk/partition, even if the filesystem is corrupted.
2196
2197 [[ info.png ]]
2198 The following pressentation has been made usingClonezilla Live v 1.2.5-35
2199
2200 Restoring data
2201 ****************************************
2202 Clonezilla-SysRescCD starting screen
2203 ---------------------
2204 If you're fine with US keymap and English language (available languages are
2205 English, Spanish, French, Italian, Japanese and Chinese [both simplified
2206 and traditional]) or don't mind editing the boot parameters, just select
2207 Clonezilla Live at the starting screen and press ENTER. When the system
2208 comes up, it will load the program that will preform the backup. After
2209 that continue from this step.
2210
2211 If you need to change these settings, select one of the available Clonezilla
2212 Live menu entries, and press TAB. The current boot parameters will be
2213 displayed.
2214
2215 The default parameters for booting Clonezilla Live on a 1024x768 screen,
2216 are the following:
2217
2218 append initrd=/live/initrd1.img boot=live union=aufs
2219 ocs_live_run="ocs-live-general" ocs_live_extra_param=""
2220 ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no"
2221 ocs_lang="en_US.UTF-8" ocs_live_keymap="NONE" vga=791 nolocales
2222
2223 By deleting the words in red, you instruct Clonezilla Live to ask you the
2224 values of these parameters. When the appropriate changes have been done
2225 (as shown bellow), just press ENTER to boot.
2226
2227 append initrd=/live/initrd1.img boot=live union=aufs
2228 ocs_live_run="ocs-live-general" ocs_live_extra_param=""
2229 ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no"
2230 ocs_lang="" ocs_live_keymap="" vga=791 nolocales
2231
2232 Screen "Choose Language"
2233 ---------------------
2234 [[ backup-00.png ]]
2235 This is where the language can be selected. I select "en_US.UTF-8 English"
2236 and press ENTER.
2237
2238 Screen "Configuring console-data"
2239 ---------------------
2240 [[ backup-01.png ]]
2241 I select "Select keymap from full list" and press ENTER. If you're using
2242 US keymap, the default option "Don't touch keymap" is a better choice.
2243
2244 Screen "Configuring console-data"
2245 ---------------------
2246 [[ backup-02.png ]]
2247 Because I haven't changed my keyboard, I select "pc / qwerty / Finnish /
2248 Standard / Standard". Because you most likely use a different keyboard,
2249 choose the one you use.
2250
2251 Screen "Start Clonezilla"
2252 ---------------------
2253 [[ backup-03.png ]]
2254 I select "Start Clonezilla" and press ENTER.
2255
2256 Screen "Clonezilla"
2257 ---------------------
2258 [[ backup-04.png ]]
2259 I select "device-image" and press ENTER.
2260
2261 Screen "Mount clonezilla image directory"
2262 ---------------------
2263 In this screen I can select the way the image file directory has been saved.
2264 Available options are local directory, remote directory through ssh,
2265 samba or nfs and skip, to use the previously used directory. More info
2266 about the image file can be found at section "About the Image file".
2267
2268 [[ backup-05.png ]]
2269 I select "local_dev" and press ENTER.
2270
2271 Next screen
2272 ---------------------
2273 This is where I choose the location of the image file.
2274 [[ restoration-06.png ]]
2275 I select partition sda1 and press ENTER.
2276
2277 [[ backup-07.png ]]
2278
2279 [[ restoration-08.png ]]
2280 This screen displays the mounting result.
2281 As we can see, /dev/sda1 has been successfully mounted under /tmp/local-dev.
2282
2283 Next Screen
2284 ---------------------
2285 [[ backup-09.png ]]
2286 I select Beginer mode to accept the default restore options. If you select
2287 Expert mode, you can choose the options yourself. More details can be
2288 found here.
2289
2290 Screen "Select mode"
2291 ---------------------
2292 Here I can select the desired operation.
2293
2294 [[ restoration-10.png ]]
2295 I select "restoredisk" and press ENTER.
2296
2297 Next Screen
2298 ---------------------
2299 [[ restoration-11.png ]]
2300 In this screen I select the image folder. This partition contains only
2301 one image.
2302
2303 Next Screen
2304 ---------------------
2305 [[ restoration-12.png ]]
2306 Finally I am asked to select which partition the image will be restored
2307 to. After double-checking the disk doesn't contain anything important,
2308 I press ENTER.
2309
2310 Starting the restoration
2311 ---------------------
2312 [[ restoration-13.png ]]
2313 Then the program will display the command that will be executed and will
2314 ask me to press ENTER.
2315 Then I will be asked to confirm the operation by pressing y and ENTER.
2316
2317 [[ restoration-14.png ]]
2318
2319 [[ important.png ]]
2320 This is the last confirmation Clonezilla Live asks.After this step there
2321 is no coming back.
2322 Then my confirmation is asked one last time. After checking one more time
2323 the disk doesn't contain any important data, I press y and ENTER.
2324
2325 [[ restoration-15.png ]]
2326 After that, the restore process begins
2327
2328 [[ restoration-16.png ]]
2329 and when it's successfully completed, I press ENTER to get to the
2330 shell. Then, I execute the commands:
2331 sudo su -
2332 cd
2333 umount -a
2334 reboot
2335
2336 to reboot the system.
2337
2338
2339
2340
2341 Creating a Restore DVD - Part 1
2342 ==============================================================================
2343
2344 Intro
2345 ****************************************
2346 Assuming you have used Clonezilla Live to make a backup of your Windows
2347 XP system (partition /dev/sda1), you will probably be wondering what to
2348 do with it now. Well, one option would be to keep it to the disk you used
2349 to save it in, store the disk, and use it whenever you need it. Another
2350 option would be to create a DVD you can use to restore this image.
2351
2352 Before, up to Clonezilla-SysRescCD 2.6.0, the process to create an automated
2353 restore DVD required entering command line prompt and writing some commands,
2354 that can be uncomfortable or even difficult for many people.
2355
2356 Later, a TUI option to create an automated recovery disc was added to
2357 Clonezilla Live, and ocs-iso script included in Clonezilla-SysRescCD
2358 3.1.0 and newer has a TUI too. Old command-line options are no longer
2359 supported. This page walks you through the creation of an automated restore
2360 DVD via TUI.
2361
2362 You have to boot Clonezilla Live, using Clonezilla-SysRescCD.
2363
2364 [[ info.png ]]
2365 The following pressentation has been made usingClonezilla Live v 1.2.5-17
2366
2367 Creating the disk image
2368 ****************************************
2369 Clonezilla-SysRescCD starting screen
2370 ---------------------
2371 If you're fine with US keymap and English language (available languages are
2372 English, Spanish, French, Italian, Japanese and Chinese [both simplified
2373 and traditional]) or don't mind editing the boot parameters, just select
2374 Clonezilla Live at the starting screen and press ENTER. When the system
2375 comes up, it will load the program that will preform the backup. After
2376 that continue from this step.
2377
2378 If you need to change these settings, select one of the available Clonezilla
2379 Live menu entries, and press TAB. The current boot parameters will be
2380 displayed.
2381
2382 The default parameters for booting Clonezilla Live on a 1024x768 screen,
2383 are the following:
2384
2385 append initrd=/live/initrd1.img boot=live union=aufs
2386 ocs_live_run="ocs-live-general" ocs_live_extra_param=""
2387 ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no"
2388 ocs_lang="en_US.UTF-8" ocs_live_keymap="NONE" vga=791 nolocales
2389
2390 By deleting the words in red, you instruct Clonezilla Live to ask you the
2391 values of these parameters. When the appropriate changes have been done
2392 (as shown bellow), just press ENTER to boot.
2393
2394 append initrd=/live/initrd1.img boot=live union=aufs
2395 ocs_live_run="ocs-live-general" ocs_live_extra_param=""
2396 ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no"
2397 ocs_lang="" ocs_live_keymap="" vga=791 nolocales
2398
2399 Screen "Choose Language"
2400 ---------------------
2401 [[ backup-00.png ]]
2402 I select "en_US.UTF-8 English" and press ENTER.
2403
2404 Screen "Configuring console-data"
2405 ---------------------
2406 [[ backup-01.png ]]
2407 I select "Select keymap from full list" and press ENTER. If you're using
2408 US keymap, the default option "Don't touch keymap" is a better choice.
2409
2410 Screen "Configuring console-data"
2411 ---------------------
2412 [[ backup-02.png ]]
2413 Because I haven't changed my keyboard, I select "pc / qwerty / Finnish /
2414 Standard / Standard". Because you most likely use a different keyboard,
2415 choose the one you use.
2416
2417 Screen "Start Clonezilla"
2418 ---------------------
2419 [[ backup-03.png ]]
2420 I select "Start Clonezilla" and press ENTER.
2421
2422 Screen "Clonezilla"
2423 ---------------------
2424 [[ backup-04.png ]]
2425 I select "device-image" and press ENTER.
2426
2427 Screen "Mount clonezilla image directory"
2428 ---------------------
2429 In this screen I can select the way the image file directory has been saved.
2430 Available options are local directory, remote directory through ssh,
2431 samba or nfs and skip, to use the previously used directory. More info
2432 about the image file can be found at section "About the Image file".
2433
2434 [[ backup-05.png ]]
2435 I select "local_dev" and press ENTER.
2436
2437 Next screen
2438 ---------------------
2439 This is where I choose the location of the image file.
2440 [[ restore-06.png ]]
2441 I select partition sda1 and press ENTER.
2442
2443 [[ backup-07.png ]]
2444 and then ENTER again.
2445
2446 [[ restore-08.png ]]
2447 This screen displays the mounting result.
2448 As we can see, /dev/sda1 has been successfully mounted under /tmp/local-dev.
2449
2450 Next Screen
2451 ---------------------
2452 [[ backup-09.png ]]
2453 I select Beginer mode to accept the default restore options, which are
2454 used if the recovery disk is ever used. If you select Expert mode, you
2455 can choose the options yourself. More details can be found here.
2456
2457 Screen "Clonezilla: Select mode"
2458 ---------------------
2459 Here I can select the desired operation.
2460
2461 [[ restore-10.png ]]
2462 I select "recovery-iso-zip" and press ENTER.
2463
2464 Next Screen
2465 ---------------------
2466 [[ restore-11.png ]]
2467 In this screen I select the image folder. This partition contains only
2468 one image.
2469
2470 Next Screen
2471 ---------------------
2472 [[ restore-12.png ]]
2473 Now I am asked to select which disk the image will be restored to, if the
2474 recovery disc is used. Because this image is a backup, I choose the same
2475 disk where the original data resides. If you're upgrading your hard drive,
2476 choose the new drive.
2477
2478 Next Screen
2479 ---------------------
2480 [[ restore-13.png ]]
2481 In this screen I can select the language that the recovery disc uses. I
2482 choose "en_US.UTF-8".
2483
2484 Next Screen
2485 ---------------------
2486 [[ restore-14.png ]]
2487 This screen allows me to select the keymap that the recovery disc
2488 uses. Unfortunately, changing the keymap requires knowing where the keymap
2489 file resides in Debian GNU/Linux. Because I don't know it, I just press
2490 ENTER to accept US keymap.
2491
2492 Next Screen
2493 ---------------------
2494 [[ restore-15.png ]]
2495 I select "iso" to create a CD/DVD disk image which I can burn to a recordable
2496 CD/DVD disc. The good thing about recordable discs is that overwriting
2497 the backup by accident is impossible. The "zip" option creates a ZIP file
2498 which can be used to create a bootable pendrive or external hard drive.
2499
2500 [[ restore-16.png ]]
2501 Then the program will display the command that will be executed and will
2502 ask me to press ENTER.
2503
2504 Screen "Excessive Image Size"
2505 ---------------------
2506 [[ restore-16a.png ]]
2507 You will see this screen if the image file you're about to create is larger
2508 than a single layer DVD. The screen warns that mkisofs or genisoimage
2509 (the programs which actually create the image) might be unable to process
2510 a disk image that big. However, even bigger problem is that you need a
2511 dual layer DVD or Blu-ray disc to burn the image.
2512
2513 Screen "Customization section"
2514 ---------------------
2515 [[ cust-menu-02.png ]]
2516 Now I am asked if I want to customize the boot menu of the disc. I answer
2517 "Yes". If you don't want to customize the menu, continue from this step.
2518
2519 Screen "DVD Title"
2520 ---------------------
2521 [[ cust-menu-03.png ]]
2522 In this screen I select the title of the boot menu. I type "Home PC
2523 Restore DVD".
2524
2525 Screen "Menu Items Caption"
2526 ---------------------
2527 [[ cust-menu-04.png ]]
2528 This screen allows me to select the caption for all menu items. I enter
2529 "Restore Win XP".
2530
2531 Screen "Boot delay"
2532 ---------------------
2533 [[ cust-menu-05.png ]]
2534 I press ENTER to accept the default delay of 30 seconds. It means that
2535 when a computer is booted from the restore disc, it waits 30 seconds
2536 before choosing the default option automatically. You may want to reduce
2537 this delay if, for example, your keyboard doesn't work in boot menu and
2538 you must wait until the delay ends.
2539
2540 Screen "Default Boot Item"
2541 ---------------------
2542 [[ cust-menu-06.png ]]
2543 In this screen I can select the default option of the menu. Selecting one
2544 of the options that restore the image makes using the disc even easier,
2545 but also raises the risk that the image is restored accidentally. Another
2546 reason to select such option may be that your keyboard doesn't work in
2547 boot menu, preventing you from choosing any non-default option. I select
2548 the first option that restores the image using pixel dimensions of 1024*768.
2549
2550 Screen "Boot Screen Image"
2551 ---------------------
2552 [[ cust-menu-07.png ]]
2553 This screen allows me to select the background picture of the menu. Note
2554 that the picture must be in the same partition that contains the disk
2555 image, if you don't mind entering command line and mounting the right
2556 partition manually. I choose picture mysplash.png in the root of the
2557 partition. Because the partition has been mounted in /home/partimag,
2558 the full path of the picture is /home/partimag/mysplash.png.
2559
2560 Screen "ISO Label"
2561 ---------------------
2562 [[ cust-menu-08.png ]]
2563 In this screen I can select the volume label of the disc. Volume label is
2564 the name of the disc you may see in various situations, for example in the
2565 notification you see when you insert the disc into your DVD writer. I type
2566 "Backup_52-2009_hdb".
2567
2568 Screen "Publisher ID"
2569 ---------------------
2570 [[ cust-menu-09.png ]]
2571 This is where I choose the publisher ID of the ISO file
2572 and the disc. Publisher ID means the person or company who
2573 created the disc. However, at least in GNU/Linux reading
2574 the publisher ID is, strictly speaking, a challenge. Here {{
2575 http://www.cyberciti.biz/faq/getting-volume-information-from-cds-iso- }}
2576 are instructions to read the publisher ID of a ISO file. I didn't find
2577 any working instructions to read the ID from the disc.
2578
2579 Starting the creation of the disk image
2580 ---------------------
2581 [[ restore-17.png ]]
2582 After that, creation of the disk image begins. Note that no confirmation
2583 is asked it the disk image is small enough to fit to a CD.
2584
2585 [[ restore-18.png ]]
2586 When the disk image is successfully created, I must reboot in order to
2587 burn the disc because my DVD burner is still in use. Clonezilla Live can
2588 be loaded into computer memory during boot in order to be able to burn
2589 disc(s) within it. However, due to a known bug, the disk image can't
2590 be created if Clonezilla Live has been loaded into memory. (source {{
2591 http://free.nchc.org.tw/clonezilla-live/stable/Known-issues-Clonezilla-live.txt
2592 }}) Thus, I press 1 and ENTER to reboot to another operating system and
2593 burn the image using graphical burning program. Follow this link for
2594 instructions. If you've created a ZIP file, follow this one instead.
2595
2596
2597
2598
2599 Creating a Restore DVD - Part 2
2600 ==============================================================================
2601
2602 What to do with the disk image
2603 ****************************************
2604 The previous page contains partial instructions to create an automated
2605 recovery DVD. They're partial because they only tell how the disk image
2606 can be created, not what one should do with the image. Of course, partial
2607 instructions are not enough, but don't worry - this page is the other part.
2608
2609 Earlier versions of Clonezilla Live allowed creating the DVD without
2610 reboot, but it's no longer possible due to a known bug. The disk image
2611 can't be created if Clonezilla Live has been loaded into memory (source {{
2612 http://free.nchc.org.tw/clonezilla-live/stable/Known-issues-Clonezilla-live.txt
2613 }}) and the image can't be burned to disc if Clonezilla Live isn't in
2614 memory. And if the computer must be rebooted anyway, it's a good idea to
2615 use one's favorite operating system and a graphical burning program for
2616 burning the disc. Doing so also allows reading these instructions while
2617 burning the disc.
2618
2619 This page walks through burning the disc by using ImgBurn and K3b. The
2620 instructions can be adapted for many other burning programs as well. If
2621 your burning program is too different, download either of the programs
2622 mentioned - they both can be downloaded for free.
2623
2624 In addition to a DVD, bootable pendrive or external hard drive can be
2625 created as well. If you want to do so, follow instructions below.
2626
2627 Before following these instructions, insert a writable DVD or Blu-ray disc
2628 to your burner.
2629
2630 Burning the disc
2631 ****************************************
2632 Using ImgBurn
2633 ---------------------
2634 ImgBurn {{ http://www.imgburn.com/ }} is a lightweight but very feature-rich
2635 disc burning program. It only requires about two megabytes disk space
2636 and contains a lot of settings. ImgBurn is closed-source freeware and -
2637 unfortunately - Windows-only software. I (Jyrki) personally use ImgBurn
2638 when burning discs within Windows.
2639
2640 Launch ImgBurn and press Write image file to disc. Select the disk image
2641 you just created.
2642
2643 At the settings window, keep Test Mode disabled. I also recommend
2644 keeping the Verify option enabled. Verifying the integrity of the disc
2645 after burning requires time and doesn't prevent the disc from becoming a
2646 so-called coaster, but it allows you to know immediately if the burning
2647 attempt failed, so you can try burning the disc again.
2648
2649 Keep the number of copies as 1 (or increase it, if you really
2650 want multiple copies of the disc). Use your best judgment while
2651 choosing the burning speed: according to this forum thread {{
2652 http://club.myce.com/f33/high-speed-vs-low-speed-burning-69698/ }} lowering
2653 the burning speed gives very mixed results in quality. I personally use
2654 ¾ of the maximum speed of the disc, for example 12x on a disc rated 16x.
2655
2656 After choosing the settings, press the big picture at the bottom-left of
2657 the window. Don't do anything that requires much computer resources while
2658 burning, because doing so increases the likelihood of burning failure.
2659
2660 That's it. You own now an automated recovery disc.
2661
2662 Using K3b
2663 ---------------------
2664 K3b (KDE Burn Baby Burn) is the disc burning program included in KDE
2665 Software Compilation. It comes with most, if not all, KDE-based GNU/Linux
2666 distributions. It can also be installed on other distributions, but I
2667 recommend against doing so - K3b requires KDE base packages to be installed,
2668 and it doesn't make much sense to install KDE base only for K3b.
2669
2670 [[ k3b-00.png ]]
2671 I launch K3b and navigate to the folder where the disk image resides.
2672
2673 [[ k3b-01.png ]]
2674 I double-click the file clonezilla-live-Backup_5-2010_hda.iso.
2675
2676 [[ k3b-02.png ]]
2677 This window allows me to choose burning settings. I don't touch Image Type or
2678 Burn Medium, because they're auto-detected anyway. The maximum burning speed
2679 allowed by the disc is 16x, so I choose speed 12x. According to this forum
2680 thread {{ http://club.myce.com/f33/high-speed-vs-low-speed-burning-69698/
2681 }} low burning speed can decrease burning quality, so I always use speed
2682 near the maximum speed of the disc.
2683
2684 I keep Writing Mode as Auto and number of copies as 1. I also keep the
2685 Simulate option disabled and enable the Verify written data option. The
2686 latter allows me to notice immediately if the burning attempt failed, so
2687 I can try burning the disc again, rather than owning a so-called coaster
2688 and relying on it if something happens to my data...
2689
2690 [[ k3b-03.png ]]
2691 I click Start and the burning process begins.
2692
2693 [[ k3b-04.png ]]
2694 Because I enabled the Verify written data option, K3b starts verifying
2695 the integrity of the disc right after burning.
2696
2697 [[ k3b-05.png ]]
2698 The burning attempt succeeded.
2699
2700 [[ restore-20.png ]]
2701 Here we can see the boot menu of the disc.
2702
2703 ZIP file instructions
2704 ****************************************
2705 Often the image file is way too big to fit to even 8 GB DVD. Some people may
2706 also want to be able to overwrite the backup when it becomes outdated. In
2707 addition, netbooks don't have optical drives at all.
2708
2709 One option is using recovery thumb drive or external hard drive instead
2710 of DVD. If the external HD is big enough, the disk image can be even over
2711 a terabyte in size. Recovery USB drive can also be used on netbooks and
2712 overwritten at will.
2713
2714 Clonezilla Live allows creating a ZIP file instead of disk image. If you
2715 want to do so, follow this step-by-step guide.
2716
2717 Before creating the disk image, make sure it is split to pieces of four
2718 gigabytes or less. It is split automatically if you use Beginner mode,
2719 and if you use Expert mode, you should already know how the splitting
2720 setting can be changed.
2721
2722 Using GNU/Linux
2723 ---------------------
2724 After creating the disk image and booting into GNU/Linux, make sure that the
2725 filesystem of the partition where you plan to put the disk image is FAT32. If
2726 you don't know the filesystem, open terminal and run this command as root:
2727
2728 parted -l
2729
2730 Note: How a command can be run as root depends on the GNU/Linux distribution
2731 you use. If it's Ubuntu or a distro based on it, simply put "sudo" above
2732 the command. For example, the above command can be executed by typing
2733 "sudo parted -l"
2734 Note: The l in parameter -l is lowercase L, not number 1.
2735
2736 If your disk doesn't contain any FAT32 partition, but it contains a
2737 partition which is big enough and doesn't contain any important data,
2738 format the partition as FAT32. The command below needs root access too.
2739
2740 [[ important.png ]]
2741 The command below erases all the data on the target partition.Make sure
2742 you don't format a wrong partition by accident.
2743
2744 mkfs.vfat -F 32 /dev/sdc1
2745
2746 Note: In the command replace /dev/sdc1 with the partition you wish to format.
2747
2748 After formatting the partition or noticing that it was already FAT32,
2749 extract the ZIP archive to the root of the partition. Also these commands
2750 need root rights.
2751
2752 mount /dev/sdc1 /media/usb
2753 unzip clonezilla-live-Backup_5-2010_hdb.zip -d /media/usb/
2754
2755 Note: In the last command I have assumed your image file is
2756 clonezilla-live-Backup_5-2010_hdb.zip. You will have to replace this with
2757 the actual name of the file.
2758
2759 ZIP package contains a script to make the USB drive bootable. Let's run
2760 it. The latter of these commands needs root access.
2761
2762 [[ important.png ]]
2763 The latter of the commands below replaces theexisting bootloader of the
2764 target disk, if there is one.Make sure you don't select a wrong disk
2765 by accident.
2766
2767 cd /media/usb/utils/linux
2768 ./makeboot.sh /dev/sdc1
2769
2770 That's all. Your thumb drive or external hard drive should be now an
2771 automatic recovery disk.
2772
2773 Using Windows
2774 ---------------------
2775 If the Windows version you use is not Vista or 7, you need to be logged in
2776 as administrator. If you're not, but you have access to an admin account,
2777 log out and then log again in as admin.
2778
2779 If you don't have admin rights at all, boot into SystemRescueCD (you don't
2780 need graphical mode this time) and follow the instructions for GNU/Linux. In
2781 SystemRescueCD all commands are run as root, so you don't need to add any
2782 prefix to the commands.
2783
2784 After creating the disk image and booting into Windows, make sure that
2785 the filesystem of the partition where you plan to put the disk image is
2786 FAT32. If you don't know the filesystem, open My Computer, right-click the
2787 partition and select Properties. Then read the "File system" column. If
2788 there reads anything but FAT32, check other partitions of the disk too,
2789 if the disk contains multiple partitions. If you have a suitable FAT32
2790 partition, continue from this step.
2791
2792 If your disk doesn't contain any FAT32 partition, but it contains a
2793 partition which is big enough and doesn't contain any important data,
2794 format the partition as FAT32.
2795
2796 [[ important.png ]]
2797 Formatting erases all the data on the target partition.Make sure the
2798 partition contains nothing important.
2799
2800 Right-click the partition and select Format.... If the Windows version
2801 you use is Vista or 7, an UAC prompt asks for admin password. Enter it.
2802
2803 At the format window, choose the FAT32 filesystem. You can enter any volume
2804 label (it means the name of the partition you can see next to the partition
2805 letter) and enable Quick Format if you're in a hurry. If Quick Format is
2806 disabled, Windows checks if the partition is physically OK after formatting
2807 it. Enabling Quick Format makes the formatting process many times faster
2808 and, contrary to popular belief, hardly ever causes any harm.
2809
2810 After formatting the partition or noticing that it was already FAT32, extract
2811 the ZIP archive to the root of the partition. Navigate to the folder where
2812 you've saved the ZIP file and right-click it. Choose Extract all..., and when
2813 you're asked for location where the archive is extracted, enter the letter
2814 of the partition, for example H:\. Do NOT choose any folder in the partition!
2815
2816 After that, browse to the folder X:\utils\win32, where X: is the letter
2817 of the partition. Then, double-click makeboot.bat. If the Windows version
2818 you use is Vista or 7, another UAC prompt appears. Enter the password
2819 again. Then just follow the prompts to make the USB drive bootable.
2820
2821 Now you're done. Your thumb drive or external hard drive should be an
2822 automatic recovery disk.
2823
2824
2825
2826
2827 Restoring to a different location
2828 ==============================================================================
2829
2830 Intro
2831 ****************************************
2832 In the past restoring to a different location was not supported by
2833 Clonezilla Live at all. Because of that, a script called reloc-img was
2834 added to Clonezilla-SysRescCD, which would help the user perform this task.
2835
2836 Recent versions of Clonezilla Live partly support restoring to a
2837 different location, so the reloc-img script is obsolete, and has been
2838 removed. Clonezilla Live now supports:
2839
2840 * Relocation of a disk image (restoring a whole disk)
2841 * Relocation of a partition image (restoring a partition)
2842
2843 Clonezilla Live does not support:
2844
2845 * Relocation of a single partition contained into a disk image.
2846
2847 Imagine you have a disk backup image named hda-2009-02-02. The image
2848 contains three partitions, hda1 (operating system), hda2 (user data)
2849 and hda3 (other data).
2850
2851 You want to restore your other data partition (hda3), to a different system
2852 (partition sdb2) but there is no way to restore (extract) a single partition
2853 from a disk image - you can only restore the whole disk.
2854
2855 In order to address this situation, two new scripts have been written for
2856 Clonezilla-SysRescCD: imginfo and imgconvert
2857
2858 Script imginfo
2859 ****************************************
2860 The script will be used to print info about existing image files.
2861
2862 Its help screen is:
2863
2864 # imginfo -h
2865 Clonezilla Live Image Information
2866 imginfo v. 0.1 - (C) 2009 S. Georgaras <sng@hellug.gr>
2867
2868 Usage: imginfo <options> <directory>
2869
2870 Available options:
2871 s Search in sub-directories too
2872 i [name] Pring info for image [name]
2873 v Print version info and exit
2874 h Print this screen and exit
2875
2876 Script imgconvert
2877 ****************************************
2878 The script will be used to convert an existing disk image file to a new
2879 partition image file.
2880
2881 imgconvert can create two type of images:
2882
2883 * Temporary image
2884 This type of image is created by linking the data files of the existing
2885 disk image to the new partition image. This means that the original image
2886 must be present for the new image to be used. This is the default image
2887 type created by imgconvert.
2888
2889 * Permanent image
2890 This type of image is created by copying the data files from the existing
2891 disk image to the new partition image. This means that the original image is
2892 not needed in order to use the new one. Permenant image files are created
2893 using the command line parameter -p.
2894
2895 Its help screen is:
2896
2897 # imgconvert -h
2898 Clonezilla Live Image Conversion
2899 imgconvert v. 0.1 - (C) 2009 S. Georgaras <sng@hellug.gr>
2900
2901 Usage: imgconvert <options> [image] [partition] <new partition>
2902
2903 Parameters are:
2904 [image] Disk image to be converted to partition image
2905 [partition] Partition name to convert. It must be a valid device name
2906
2907 Available options:
2908 o [image] Save new imag as [image]
2909 p Save new partition instead of making a link to the old one
2910 v Print version info and exit
2911 h Print this screen and exit
2912
2913 Using the scripts
2914 ****************************************
2915 Restoring to a partition
2916 ---------------------
2917 After booting into Clonezilla Live, I select
2918
2919 Enter_shell Enter command line prompt
2920
2921 when the menu is displayed and then I press 2 to exit to the shell.
2922
2923 At this point I will mount my images partition (in this example /dev/sdc4),
2924 and use script imginfo to get info about my image files.
2925
2926 $ sudo su -
2927 # mount /dev/sdc4 /home/partimag
2928 # cd /home/partimag
2929 # imginfo
2930 Image files found in: /home/partimag
2931 Image: usb250-img, disk: sda, size: 259MB, parts: 1
2932 part: sda4, size: 247.00MB, type: FAT16
2933 Image: sys-bck, disk: hda, size: 320.0GB, parts: 3
2934 part: hda1, size: 22.36GB, type: Linux
2935 part: hda2, size: 39.06GB, type: Linux
2936 part: hda3, size: 233.87GB, type: Linux
2937
2938 As you can see there are two disk images under /home/partimag: usb250-img
2939 and sys-bck.
2940
2941 sys-bck is a backup of my old system, which had three partitions. What
2942 I need to do now is "copy" the hda3 partition to my current system, by
2943 transfering its data to partition sdb2.
2944
2945 The way to proceed is:
2946
2947 * Create a new partition image (containing hda3's data) based on the
2948 existing disk image file, by executing the command:
2949
2950 # imgconvert sys-bck hda3 sdb2
2951 Clonezilla Live Image Conversion
2952 imgconvert v. 0.1 - (C) 2009 S. Georgaras
2953
2954 Determining input image
2955 Input image: "/home/partimag/sys-bck"
2956 Validating image... ok
2957 Determining input partition
2958 Input partition: "hda3"
2959 Validating input partition... ok
2960 Determining output image
2961 Output image: "/home/partimag/sys-bck-cnv"
2962 Validating output image... ok
2963 Checking permissions... ok
2964 Determining output partition
2965 Output partition: "sda2"
2966 Validating output partition... ok
2967 Creating output image: /home/partimag/sys-bck-cnv
2968 Linking files... done
2969 Fixing info files... done
2970
2971 This command will create a temporary partition image file (automatically
2972 named sys-bck-cnv), which contains sdb2 only, as you can see by executing:
2973
2974 # imginfo -i sys-bck-cnv
2975 Image: sys-bck-cnv, part: sdb2, size: 233.87GB, type: Linux
2976
2977 * Restart Clonezilla Live by pressing Control-D twice.
2978
2979 * Restore the new image file into sdb2, by selecting
2980
2981 Screen 1: Start_Clonezilla Start Clonezilla
2982
2983 Screen 2: device-image disk/partition to/from image
2984
2985 Screen 3: skip use existing /home/partimag
2986
2987 Screen 4: Beginer / Expert
2988
2989 Screen 5: restoreparts
2990 Restore_an_image_to_local_partition
2991
2992 and continue as usual to restore the partition.
2993
2994 Converting image files
2995 ---------------------
2996 # imgconvert -p -o other_data sys-bck hda3 sdb2
2997 Clonezilla Live Image Conversion
2998 imgconvert v. 0.1 - (C) 2009 S. Georgaras
2999
3000 Determining input image
3001 Input image: "/home/partimag/sys-bck"
3002 Validating image... ok
3003 Determining input partition
3004 Input partition: "hda3"
3005 Validating input partition... ok
3006 Determining output image
3007 Output image: "/home/partimag/other_data"
3008 Validating output image... ok
3009 Checking permissions... ok
3010 Determining output partition
3011 Output partition: "sda2"
3012 Validating output partition... ok
3013 Creating output image: /home/partimag/other_data
3014 Copying files... done
3015 Fixing info files... done
3016
3017 # imginfo -i other_data
3018 Image: other_data, part: sdb2, size: 233.87GB, type: Linux
3019
3020 # ls -la sys-bck
3021 total 1111972
3022 drwxr-xr-x 2 root root 4096 2007-11-22 03:21 .
3023 drwxr-xr-x. 34 root root 4096 2009-04-06 21:28 ..
3024 -rw-r--r-- 1 root root 4 2007-11-20 20:33 disk
3025 -rw-r--r-- 1 root root 1081716736 2007-11-20 20:32 hda1.aa
3026 -rw-r--r-- 1 root root 45453312 2007-11-20 20:33 hda2.aa
3027 -rw-r--r-- 1 root root 10317824 2007-11-20 20:33 hda3.aa
3028 -rw-r--r-- 1 root root 37 2007-11-21 18:56 hda-chs.sf
3029 -rw-r--r-- 1 root root 37 2007-11-21 18:50 hda-chs.sf.orig
3030 -rw-r--r-- 1 root root 512 2007-11-20 20:31 hda-mbr
3031 -rw-r--r-- 1 root root 259 2007-11-21 18:59 hda-pt.sf
3032 -rw-r--r-- 1 root root 259 2007-11-21 18:50 hda-pt.sf.orig
3033 -rw-r--r-- 1 root root 15 2007-11-20 20:33 parts
3034 -rw-r--r-- 1 root root 17 2007-11-20 20:33 swappt-hda4.info
3035 #
3036 #
3037 # ls -la other_data
3038 total 24
3039 drwxr-xr-x 2 root root 4096 2009-04-06 21:27 .
3040 drwxr-xr-x. 35 root root 4096 2009-04-06 21:27 ..
3041 -rw-r--r-- 1 root root 5 2009-04-06 21:27 parts
3042 -rw-r--r-- 1 root root 10317824 2009-04-06 21:27 sdb2.aa
3043 -rw-r--r-- 1 root root 37 2009-04-06 21:27 sdb-chs.sf
3044 -rw-r--r-- 1 root root 106 2009-04-06 21:27 sdb-pt.sf
3045
3046 Booting a restored Linux system
3047 ****************************************
3048 A Linux system that has been restored to a new disk/partition, is usually
3049 not ready to be booted right after the restoration procedure is finished.
3050
3051 There are two more steps that you may have to take:
3052
3053 * Fix /etc/fstab
3054 * Reinstall GRUB.
3055 I will assume GRUB is your boot manager, as it is the usual case nowadays.
3056
3057 For this example I will assume that you have restored a Linux system
3058 (that used to be in sdb), to a new disk (hda), and that it contains three
3059 partitions, / (the root partition), /home (user's partition) and a swap
3060 partition. You must be really careful here, as the name of the new disk
3061 depends on the system to be booted. If it uses one of the newest Linux
3062 kernels (using the libata disk driver), ALL your disks will be recognised
3063 as SCSI. More info: "Identifying devices in Linux" section "SCSI disks
3064 when there are none!!!".
3065
3066 This is what we have:
3067
3068 root partition home partition swap partition
3069 Old system /dev/sdb1 /dev/sdb2 /dev/sdb3
3070 New system /dev/hda1 /dev/hda2 /dev/hda3
3071
3072 Fixing /etc/fstab
3073 ---------------------
3074 Since we are still in Clonezilla Live, right after the restore procedure
3075 has finished, we will use it to mount our restored root partition, and
3076 edit its /etc/fstab. We issue the commands:
3077
3078 mkdir /new-root
3079 mount /dev/hda1 /new-root
3080 vi /new-root/etc/fstab
3081
3082 The contents of /etc/fstab could be something like
3083
3084 /dev/sdb1 / reiserfs acl,user_xattr 1 1
3085 /dev/sdb2 /home reiserfs defaults 1 2
3086 /dev/sdb3 swap swap defaults 0 0
3087
3088 and we have to change ti to
3089
3090 /dev/hda1 / reiserfs acl,user_xattr 1 1
3091 /dev/hda2 /home reiserfs defaults 1 2
3092 /dev/hda3 swap swap defaults 0 0
3093
3094 Finally, we unmount the partition, and we are ready to reboot
3095
3096 umount /new-root
3097 reboot
3098
3099 Reinstalling GRUB
3100 ---------------------
3101 When Clonezilla-SysRescCD menu appears, we select Tools > Super Grub Disk
3102
3103 Then we select Super Grub Disk > Super Grub Disk (WITH HELP) > English
3104 Super Grub Disk > Gnu/Linux > Fix Boot of Gnu/Linux (GRUB). From this
3105 entry we will be able to reinstall GRUB to our hard disk.
3106
3107 You may also want to have a look at Super Grub Disk "documentation {{
3108 http://www.supergrubdisk.org/wiki/SuperGrubDiskDocumentation }}".
3109
3110
3111
3112
3113 Fixing boot problems
3114 ==============================================================================
3115
3116 Intro
3117 ****************************************
3118 Boot problems are probably the most feared computer problems. Without an
3119 operating system you can't access your data, get the work done or even
3120 google for help. That's why it's often a good idea to have an alternative
3121 operating system available for searching help if the main OS doesn't
3122 work. Also a copy of Clonezilla-SysRescCD can be invaluable help.
3123
3124 Actually, the initial reason why I (Jyrki) installed GNU/Linux at all was
3125 that I wanted to be able to fix Windows boot problems if they occur. I
3126 installed both GNU/Linux and GRUB to my external hard drive, completely
3127 separating operating systems. Even if either bootloader stopped working,
3128 I'd still be able to boot one of my OSes.
3129
3130 But such configuration is not easy to create, and when I installed GNU/Linux,
3131 I knew very little about it. If I didn't read the instructions I found
3132 here and there very carefully, I probably would have done a common mistake:
3133 installing GRUB to my internal hard drive. Such mistake would have caused
3134 two problems:
3135
3136 * Inability to boot GNU/Linux at any computer expect the one which was
3137 used for installing
3138 * Inability to boot Windows when the external drive isn't connected
3139
3140 In this page, I simulate that situation in a virtual machine and fix
3141 both problems.
3142
3143 Symptoms
3144 ****************************************
3145 What happens when I try to boot the external hard drive on another computer
3146 depends on the BIOS of the computer. For example, on my computer I see a
3147 Black Screen of Death {{ http://en.wikipedia.org/wiki/Black_Screen_of_Death
3148 }} when I try booting from a disk with empty Master Boot Record. Other
3149 BIOSes may boot the local operating system or display an error message
3150 (for example "Disk boot failure", "Missing operating system" or "Operating
3151 system not found").
3152
3153 The other problem is very easy to determine. When external drive is
3154 disconnected and I try to boot, I'll see this:
3155
3156 [[ error-21.png ]]
3157
3158 Goals
3159 ****************************************
3160 Because I still want to separate my operating systems completely,
3161 I try to restore NTLDR to the Master Boot Record of the internal disk,
3162 if possible. If that's not possible, I install there another bootloader
3163 that chainloads Windows.
3164
3165 I could reinstall GNU/Linux completely and make sure that the GRUB is
3166 installed to the right disk this time, but it's not a good idea if I only
3167 need to overwrite the first 446 bytes (yes, bytes, not kilo- or megabytes)
3168 of the disk. So, I only install GRUB to the external disk, by using Super
3169 Grub Disk.
3170
3171 Your problem (if you have one at all) most likely is different, but goals
3172 are often the same.
3173
3174 You need to restore NTLDR if you...
3175
3176 * ...just installed GNU/Linux, but the boot menu doesn't mention Windows
3177 at all. You're not willing to learn how Windows can be added to the boot
3178 menu, you just need to make your computer to boot Windows again right now.
3179 * ...cloned your Windows partition to your brand new computer but didn't
3180 clone the Master Boot Record.
3181 * ...are about to uninstall GNU/Linux and aren't willing to use GRUB as
3182 your bootloader.
3183
3184 You need to install GRUB if you...
3185
3186 * ...just installed Windows and want to make GNU/Linux bootable again.
3187 * ...cloned your GNU/Linux partition to your brand new computer but didn't
3188 clone the Master Boot Record.
3189 * ...just installed GNU/Linux but installed GRUB to a non-first hard drive
3190 by accident. (The symptom is that your computer still boots to the operating
3191 system you had installed already.)
3192
3193 [[ info.png ]]
3194 The following pressentation has been made usingSuper Grub Disk v0.9799
3195
3196 Restoring NTLDR
3197 ****************************************
3198 There are a lot of ways to restore NTLDR. However, sometimes there is no
3199 legal way to restore it, and I'm NOT telling about the illegal ones. The
3200 last resort is using syslinux to chainload Windows; there is usually no
3201 way to notice that syslinux is used instead of NTLDR.
3202
3203 I've listed here the most important options in order I'd use them.
3204
3205 Restoring NTLDR from a backup
3206 ---------------------
3207 If you've been smart enough to use Clonezilla Live to create a disk image
3208 of your first hard drive, it's very easy to restore NTLDR.
3209
3210 Your NTLDR is safe in a file called hda-mbr or sda-mbr. You can use dd to
3211 overwrite your existing Master Boot Record.
3212
3213 [[ important.png ]]
3214 Don't restore all 512 bytes of your Master Boot Record.The MBR contains
3215 your partition table and restoring it afterrepartitioning your disk erases
3216 all the data on the disk.
3217
3218 If you normally use GNU/Linux, open terminal and run these commands as root:
3219
3220 mount /dev/sdc1 /mnt/usb
3221 dd if=/mnt/usb/Backup/sda-mbr of=/dev/sda bs=446 count=1
3222
3223 Note: In the commands I have assumed that your first hard drive is /dev/sda
3224 and that your disk image resides in the folder Backup in partition
3225 /dev/sdc1. You will have to replace them with the correct pieces of
3226 information.
3227
3228 Note: How a command can be run as root depends on the GNU/Linux distribution
3229 you use. If it's Ubuntu or a distro based on it, simply put "sudo" above
3230 the command. For example, the latter of the above commands can be executed
3231 by typing "sudo dd if=/mnt/usb/Backup/sda-mbr of=/dev/sda bs=446 count=1"
3232
3233 If you normally use another operating system, boot into SystemRescueCD and
3234 run the above commands. In SystemRescueCD all commands are run as root,
3235 so you don't need to add any prefix to the commands.
3236
3237 If you don't know the name of the partition, run this command as root:
3238
3239 fdisk -l
3240
3241 It tells how many hard drives you have, how many partitions they contain
3242 and what filesystems the partitions use. If you know, for example, that
3243 the disk where you've saved the disk image contains only one partition,
3244 look for such disks.
3245
3246 Using Bootrec.exe (Windows Vista/7 only)
3247 ---------------------
3248 You need Windows Vista/7 install disc for this. If you don't have one (for
3249 example, if you bought a laptop that was bundled with preinstalled Windows
3250 and manufacturer's recovery disc), download a recovery disc from here.
3251
3252 Then boot from the disc. After selecting language, time, currency and
3253 keyboard, click Repair your computer. You'll get a list of operating systems
3254 you're able to repair. Choose any of them; that choice doesn't matter.
3255
3256 After that, you'll see a dialog box named System Recovery Options. Click
3257 Command Prompt. Then you only need to execute one command:
3258
3259 Bootrec /FixMbr
3260
3261 Note: The command is case-insensitive. You can type, for example,
3262 "bootrec /fixmbr".
3263
3264 Using FIXMBR (Windows XP only)
3265 ---------------------
3266 You need Windows XP install disc. Boot from it, and when you see the screen
3267 "Windows XP Home Edition Setup" or "Windows XP Professional Setup", press
3268 R to enter the Recovery Console. Then choose the Windows installation you
3269 want to log onto. If you have only one copy of Windows installed, press
3270 1 and ENTER. After that, enter the administator password and press ENTER.
3271
3272 There is only one command to run:
3273
3274 FIXMBR
3275
3276 Note: The command is case-insensitive. You can type, for example, "fixmbr".
3277
3278 Using FDISK (Windows 95/98/Me only)
3279 ---------------------
3280 For this, you need a floppy drive. You also need to run a Windows-only
3281 program, so your first challenge is to boot Windows without NTLDR.
3282
3283 Don't worry, Super Grub Disk makes it possible. Boot into it.
3284
3285 [[ supergrubdisk-01.png ]]
3286 Just choose the option "!WIN! :(((" and press ENTER.
3287
3288 When you have Windows up and running, download the boot disk
3289 image appropriate to your version of Windows from Bootdisk.Com {{
3290 http://www.bootdisk.com/bootdisk.htm }}. Then put a floppy to your floppy
3291 drive.
3292
3293 If the floppy isn't already formatted, open My Computer, right-click the
3294 floppy drive and select Format....
3295
3296 At the format window, choose the capacity of 1,44 megabytes and Full format
3297 type. You can enter any label (it means the name of the floppy you can see
3298 next to the floppy drive letter) and disable the summary if you wish. Keep
3299 the Copy system files option disabled.
3300
3301 When you have a formatted floppy in your drive, double-click the boot disk
3302 image you downloaded. When it's done, shut Windows down and check your
3303 BIOS settings to be able to boot from the floppy. Some BIOSes contain a
3304 boot menu, others require editing settings pernamently. Details can be
3305 found on the manual of the motherboard or laptop.
3306
3307 Then boot from the floppy. When you're given three boot options, choose
3308 the option 2. Start computer without CD-ROM support. Wait a moment to
3309 enter command line and run this command:
3310
3311 FDISK /MBR
3312
3313 Note: The command is case-insensitive. You can type, for example,
3314 "fdisk /mbr".
3315
3316 Installing syslinux using Super Grub Disk
3317 ---------------------
3318 The above four are the only legal ways I know to restore NTLDR to the
3319 Master Boot Record. Unfortunately, sometimes none of them can be used. If
3320 that's the case, it's time to switch bootloader. GRUB can be configured to
3321 chainload Windows, and usually it even does that automatically, but this
3322 page isn't intended to help configuring GRUB. I assume that if you're
3323 primarily a Windows user and reading this page, you don't want to learn
3324 how to use GNU/Linux, you just want to make Windows bootable again.
3325
3326 Maybe the easiest way to do so is installing syslinux using Super Grub
3327 Disk. Super Grub Disk configures it automatically to chainload the first
3328 active partition. The partition should contain Windows, Windows can't boot
3329 if its partition isn't active.
3330
3331 Boot into Super Grub Disk.
3332
3333 [[ supergrubdisk-01a.png ]]
3334 Choose the option "WIN => MBR & !WIN! :(((((((((((((((((((((" and
3335 press ENTER. Windows will be booted automatically right after installing
3336 syslinux.
3337
3338 Installing GRUB
3339 ****************************************
3340 Contrary to various ways to restore NTLDR, there is only one way to install
3341 GRUB I recommend. That's Super Grub Disk, because it contains GRUB no
3342 matter what has happened to the hard drive(s). First, I boot into it.
3343
3344 [[ supergrubdisk-01b.png ]]
3345 I select "Choose Language & HELP :-)))" and press ENTER.
3346
3347 Screen "S.G.D. Language Selection."
3348 ---------------------
3349 [[ supergrubdisk-02.png ]]
3350 I select "English Super Grub Disk" and press ENTER.
3351
3352 [[ supergrubdisk-03.png ]]
3353 I press ENTER...
3354
3355 [[ supergrubdisk-04.png ]]
3356 ...and then ENTER again...
3357
3358 [[ supergrubdisk-05.png ]]
3359 ...and then ENTER once again...
3360
3361 [[ supergrubdisk-06.png ]]
3362 ...and finally ENTER one more time.
3363
3364 Screen "English Super Grub Disk (Help)"
3365 ---------------------
3366 [[ supergrubdisk-07.png ]]
3367 I select "Advanced".
3368
3369 Screen "Advanced (Help)"
3370 ---------------------
3371 [[ supergrubdisk-08.png ]]
3372 I select "GRUB" and press ENTER.
3373
3374 Screen "GRUB (Help)"
3375 ---------------------
3376 [[ supergrubdisk-09.png ]]
3377 I select "Restore GRUB in Hard Disk (MBR)" and press ENTER...
3378
3379 [[ supergrubdisk-10.png ]]
3380 ...and ENTER.
3381
3382 Screen "Restore GRUB in Hard Disk (MBR) (Help)"
3383 ---------------------
3384 [[ supergrubdisk-11.png ]]
3385 I select "Manual Restore GRUB in Hard Disk (MBR)" and press ENTER. If you
3386 want to install GRUB to the Master Boot Record of the first hard drive,
3387 "Automatically Install" is a better choice. If you don't know if you
3388 want GRUB to the first or some other disk, you most likely want it to the
3389 first disk.
3390
3391 Screen "Manual Restore GRUB in Hard Disk (MBR) (Help)"
3392 ---------------------
3393 [[ supergrubdisk-12.png ]]
3394 I confirm my decision by selecting "Manual Restore GRUB in Hard Disk (MBR)"
3395 again and pressing ENTER.
3396
3397 Screen "Partition of GRUB"
3398 ---------------------
3399 [[ supergrubdisk-13.png ]]
3400 In this screen I can select the disk that contains the partition that
3401 contains the files needed by GRUB. In this case, that disk is the external
3402 hard drive. As you can see, the disk is only three megabytes in size -
3403 because the computer used for screenshots is still virtual. Actually, the
3404 "disk" where I'm installing GRUB is just a file.
3405
3406 Next Screen
3407 ---------------------
3408 [[ supergrubdisk-14.png ]]
3409 This is where I choose the partition where GRUB files reside. This disk
3410 contains only one partition.
3411
3412 Screen "Restore to MBR of Hard Disk"
3413 ---------------------
3414 [[ supergrubdisk-15.png ]]
3415 I select the external hard drive to install GRUB to its Master Boot Record.
3416
3417 [[ supergrubdisk-12.png ]]
3418 Some text scrolled in the screen (too fast to read or take a screenshot)
3419 and I was back at this screen. I rebooted the computer. (In this situation,
3420 you can safely do a "hard reboot" by pressing reset button once or power
3421 button twice.)
3422
3423 [[ grub-loading.png ]]
3424 GRUB booted successfully.
3425
3426
3427
3428
3429 Booting an old PC
3430 ==============================================================================
3431
3432 Intro
3433 ****************************************
3434 Have you ever tried to boot an old PC off a CD-ROM, and found out it
3435 wouldn't, because its BIOS does not support it, or it's faulty or for any
3436 other reason? Well, I have. So this page is an effort to solve this problem.
3437
3438 The only way to do it, is to boot of a floppy disk which will help me
3439 "load" whatever operation system I want from a CD. This means that I will
3440 have to write a boot loader to the floppy disk.
3441
3442 The software I will use is Smart Boot Manager {{
3443 http://sourceforge.net/projects/btmgr/ }}, a small boot manager with a
3444 nice TUI (Text User Interface). Its floppy image, already accessible from
3445 the "Tools" menu, can be found in the bootdisk folder of the CD under the
3446 name sbm.img.
3447
3448 Writing the image to a floppy disk
3449 ****************************************
3450 All you have to do is get to a PC equipped with a floppy drive, get a
3451 floppy disk which is in excellent condition (no bad sectors/blocks),
3452 and copy the image file to it.
3453
3454 1. From Linux
3455 ---------------------
3456 You can either boot Clonezilla Live or SystemRescueCD, and when the system
3457 is fully up, execute the command:
3458
3459 dd if=/path/to/sbm.img of=/dev/fd0
3460
3461 where /path/to is
3462 /live/image/bootdisk for Clonezilla Live
3463 /mnt/livecd/bootdisk for SystemRescueCD
3464
3465 2. From DOS
3466 ---------------------
3467 You can get into any DOS (boot FreeDOS from the CD, for example), and use
3468 any of the following programs found in the rawrite folder of the CD:
3469
3470 * rawrite.exe: is just here for completeness, as it may be needed for someone
3471 * rawrite2.exe: should be the fastest
3472 * rawrite3.com: should work if rawrite2 fails for some reason
3473 * fdimage.exe: rawrite alternative
3474
3475 I found these programms at the FreeDOS web site {{
3476 http://www.fdos.org/ripcord/rawrite/ }}, where the following info is
3477 included:
3478
3479 Basic Usage (Rawrite):
3480 Depending on the exact version, the output and command line support may
3481 vary, i.e. not work
3482 Usage:
3483 MS-DOS prompt> RAWRITE
3484 and follow the prompts, -or-
3485
3486 MS-DOS prompt> RAWRITE [-f ] [-d ] [-n(owait)] [-h(elp)]
3487 where: -f - name of disk image file
3488 -d - diskette drive to use, must be A or B
3489 -n - don't prompt for user to insert diskette
3490 -h - print usage information to stdout
3491
3492 The diskette must be formatted or rawrite will not work.
3493 The contents of the disk do not matter and will be overwritten.
3494 When ran interactively (without command line options) you will be prompted
3495 for the disk image filename (you must remember this as there is no file
3496 chooser).
3497 You will also be prompted for the target/destination drive, either A or
3498 B for A: or B: respectively.
3499 Basic Usage (FDImage):
3500 fdimage is an updated DOS program meant to replace rawrite. It does not
3501 require a pre-formatted floppy diskette.
3502
3503 FDIMAGE - Write disk image to floppy disk
3504 Version 1.5 Copyright (c) 1996-7 Robert Nordier
3505
3506 Usage: fdimage [-dqsv] [-f size] [-r count] file drive
3507
3508 -d Debug mode
3509 -f size Specify the floppy disk format by capacity, eg:
3510 160K, 180K, 320K, 360K, 720K, 1.2M, 1.44M, 2.88M
3511 -q Quick mode: don't format the disk
3512 -r count Retry count for format/write operations
3513 -s Single-sector I/O
3514 -v Verbose
3515
3516 In order to write the image file to a pre-formatted diskette, execute
3517 the commands:
3518
3519 X:
3520 cd rawrite
3521 rawrite2 -f X:bootdisksbm.img -d b:
3522
3523 In order to write the image file and format the diskette at the same time,
3524 execute the commands:
3525
3526 X:
3527 cd rawrite
3528 fdimage -f 1.44M X:bootdisksbm.img b:
3529
3530 where X: is the drive name in DOS
3531
3532 3. From Windows
3533 ---------------------
3534 The final alternative is to use Windows program rawwritewin.exe (found in
3535 the utils\rawrite folder of the CD), as shown in the following image:
3536
3537 [[ rawwritewin.png ]]
3538
3539
3540
3541
3542 Using SystemRescueCD
3543 ==============================================================================
3544
3545 Intro
3546 ****************************************
3547 SystemRescueCD is an excellent Live CD. It contains cloning software too
3548 (FSArchiver {{ http://www.fsarchiver.org/Main_Page }} and partimage,
3549 to be spesific), but is unable to clone a whole disk, instead of only
3550 individual partitions.
3551
3552 Clonezilla Live is a great cloning solution, but it is unable to do anything
3553 but clone. For general system administration, you need a lot more functions
3554 - like these offered by SystemRescueCD.
3555
3556 Clonezilla-SysRescCD has all of the functions of both discs. It's a
3557 multi boot CD, so switching between CDs requires a reboot, but using
3558 both individual discs requires switching the physical disc - in addition
3559 to rebooting.
3560
3561 But, of course, to be able to use SystemRescueCD's functions, you need to
3562 know how to use them. We don't have permission to redistribute SystemRescueCD
3563 documentation, so this page contains only just enough information to allow
3564 you to look for more help in SystemRescueCD documentation.
3565
3566 Which boot option to pick?
3567 ****************************************
3568 You may be confused because of the number of boot options you have. After
3569 choosing "CD 2: System Rescue CD" you have a total of 15 options to boot
3570 SystemRescueCD. Here is a table of them.
3571
3572 kernel Normal To RAM Graphical Environment VESA Mini Shell
3573 32-bit xxx +++
3574 32-bit (alt)
3575 64-bit xxx +++
3576
3577 In the table, I have marked the options you most likely need. You should
3578 choose either of the options marked with a '+++' if you have no idea and/or
3579 time to read the next sections.
3580
3581 Choosing the column
3582 ---------------------
3583 If you're accustomed to graphical environment, choose Graphical
3584 Environment. In Graphical Environment you're able to use graphical programs,
3585 like GParted and Mozilla Firefox. Terminals are also available, so using
3586 Graphical Environment doesn't prevent using command line. The only negative
3587 thing of Graphical Environment is that it slows booting process down a bit -
3588 and it's often just plain unneeded.
3589
3590 Try VESA, if normal Graphical Environment doesn't work. VESA uses Xvesa
3591 graphical environment instead of X.Org that sometimes doesn't work. The
3592 drawback of Xvesa compared to X.Org is that Xvesa isn't optimized to any
3593 hardware, which means poorer performance.
3594
3595 If you're accustomed to command line and know already that you're not going
3596 to use any graphical program, choose one of the normal options (just below
3597 "System Rescue CD Menu"). Booting to command line is a bit faster process
3598 than booting to graphical environment, and you can start X manually later.
3599
3600 You need the option To RAM if you plan to burn discs while using
3601 SystemRescueCD. The option copies the whole SystemRescueCD to the memory of
3602 the computer during the boot process, allowing you to put another disc to
3603 your CD/DVD writer while using SystemRescueCD. The negative thing is that
3604 reading all the contents of the disc slows boot process down a lot. There
3605 is no option which copies the disc to the memory and starts graphical
3606 environment automatically, but you can easily start it manually.
3607
3608 Mini Shell is probably the least used option. It enters BusyBox
3609 shell after booting. BusyBox is an application that "combines
3610 tiny versions of many common UNIX utilities into a single small
3611 executable." However, SystemRescueCD contains most of these utilities
3612 anyway, so there is not much need to use this option. some information {{
3613 http://www.busybox.net/about.html }} about BusyBox
3614
3615 Choosing the row (kernel)
3616 ---------------------
3617 After having chosen the column of the above table, you still have three
3618 options. Now you need to choose the kernel.
3619
3620 The optimal kernel depends on the processor of your computer. If it's an
3621 IA-32 processor, like Intel Pentium 4 or AMD Athlon XP, you should choose
3622 32-bit kernel, because 64-bit kernel doesn't work at all. If you have
3623 a x86-64 processor, like AMD Athlon 64 or Intel Core 2, you can choose
3624 any kernel - the processor can run all of them. 64-bit kernel should be
3625 preferred, because it allows chrooting on an existing GNU/Linux partition
3626 containing 64-bit programs.
3627
3628 If you don't know your processor architecture, try 64-bit kernel. If your
3629 processor architecture is IA-32, you'll see the following error message:
3630
3631 This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable
3632 to boot - please use a kernel appropriate for your CPU.
3633
3634 At this stage, simply press Ctrl-Alt-Del to reboot and use always 32-bit
3635 kernel on the machine.
3636
3637 There is one more kernel - 32-bit kernel (alternative). It's designed to
3638 support more recent hardware than the regular kernel. Try it if standard
3639 32-bit kernel doesn't work.
3640
3641 After booting
3642 ****************************************
3643 HELP!!! Where are the desktop and Start menu?
3644 ---------------------
3645 You should have read this section if you're looking for them. However,
3646 you don't need to reboot in order to enter graphical environment. Simply
3647 type this command and press ENTER:
3648
3649 wizard
3650
3651 The command asks you to choose a graphical environment. Try first X.Org,
3652 and if it fails, run the command again and choose Xvesa.
3653
3654 Connecting to the Internet
3655 ---------------------
3656 The CD doesn't contain any SystemRescueCD documentation, because we don't
3657 have permission to redistribute it. In addition, our time is limited and
3658 we can't rewrite it all. So, you need to connect to the Internet to be
3659 able to read SystemRescueCD's official online documentation.
3660
3661 Luckily, establishing Internet connection should be easy, if you're in a
3662 network using DHCP. Nowadays, most people are. If you're using graphical
3663 mode and terminal isn't already open, open it via the menu that opens when
3664 you click the leftmost icon in the bottom pane.
3665
3666 Then, type this command and press ENTER:
3667
3668 dhcpcd eth0
3669
3670 If the network doesn't use DHCP, you can also configure Internet settings
3671 by hand. You should be able to do so if you've previously configured your
3672 settings in the operating system you normally use. The command to run is
3673
3674 net-setup
3675
3676 When you're done
3677 ****************************************
3678 When you're done, you naturally want to either shut the computer down or
3679 reboot. Wait! Don't do it yet!
3680
3681 Both I and Spiros have found out that letting a live CD to automatically
3682 unmount partitions is often a bad idea. It can damage the filesystems
3683 of the partitions which were mounted when the computer was shut down and
3684 destroy any files in the partitions, even them you didn't use within the CD.
3685
3686 So, I recommend unmounting them refore shutdown or reboot. Just run these
3687 commands when you're done.
3688
3689 If you want to reboot:
3690
3691 cd
3692 umount -a
3693 reboot
3694
3695 If you want to shut down:
3696 cd
3697 umount -a
3698 poweroff
3699
3700 More info
3701 ****************************************
3702 Here are some links to the official SystemRescueCD resources.
3703
3704 SystemRescueCD - http://www.sysresccd.org/Main_Page
3705 Detailed packages list- http://www.sysresccd.org/Detailed-packages-list
3706 Manual - http://www.sysresccd.org/Online-Manual-EN
3707 FAQ - http://www.sysresccd.org/FAQ
3708 Howto - http://www.sysresccd.org/Howto
3709 Forum - http://www.sysresccd.org/forums/
3710
3711
3712
3713
3714 Managing partitions
3715 ==============================================================================
3716
3717 Intro
3718 ****************************************
3719 One of the most important maintenance tasks that can only be done by using
3720 a live CD is partitioning. No operating system allows partitioning the
3721 same disk where the OS itself resides. Trying to do so is like attempting
3722 to repair a car while its engine is turned on.
3723
3724 Of course, SystemRescueCD contains multiple programs that are related to
3725 partitioning. Most important are GParted (graphical partitioning program),
3726 GNU Parted (text-based partitioning program), fdisk and sfdisk (partition
3727 table editors) and various filesystem tools (like ntfsprogs and e2fsprogs).
3728
3729 This page contains some theory about partitions and filesystems, advice for
3730 choosing the right filesystem and a partitioning example by using GParted.
3731
3732 [[ important.png ]]
3733 While partitioning, an user error or a bug can damage your
3734 partitions.Creating a disk image of the disk to bepartitioned beforehand
3735 is highly recommended.
3736
3737 [[ info.png ]]
3738 The following pressentation has been made usingSystemRescueCD v 1.5.8
3739
3740 Some theory
3741 ****************************************
3742 What is a partition?
3743 ---------------------
3744 A partition is a logical division of a hard disk created so that you can
3745 have different operating systems on the same hard disk or to create the
3746 appearance of having separate hard drives for file management, multiple
3747 users, or other purposes.
3748
3749 In Windows, a one-partition hard disk is labelled the "C:" drive ("A:" and
3750 "B:" are typically reserved for diskette drives). A two-partition hard drive
3751 would typically contain "C:" and "D:" drives. (CD-ROM drives typically are
3752 assigned the last letter in whatever sequence of letters have been used
3753 as a result of hard disk formatting, or typically with a two-partition,
3754 the "E:" drive.).
3755
3756 In UNIX-based systems, a partition is used to host the / (root) file system,
3757 and optionally the /opt, /usr and /home file systems. There may also be
3758 a swap partition, which doesn't host any file system.
3759
3760 Each operatin system provides some kind of tool to create and manage
3761 partitions. Examples of such tools are fdisk in DOS/Windows, fdisk, sfdisk
3762 and parted in Linux, etc.
3763
3764 What is the difference between primary, extended and logical partitions?
3765 ---------------------
3766 Information about partitions is saved in so-called partition table
3767 in Master Boot Record. MBR itself is only 512 bytes in size,
3768 and only 64 bytes are reserved for partition table. That's not
3769 enough, and there are many workarounds to bypass limitations
3770 caused by the size, for example logical block addressing {{
3771 http://en.wikipedia.org/wiki/Logical_block_addressing#LBA.2C_ATA_devices_and_Enhanced_BIOS
3772 }}. Extended partitions are another workaround.
3773
3774 Partition table can only store information about four partitions. If one
3775 has, for example, two GNU/Linux distributions on the same disk, both of
3776 them having separate root partitions, shared /home and shared swap, the
3777 partition number limit has been hit already.
3778
3779 A partition that is mentioned in the partition table is called primary
3780 partition. Because of the limit, one disk can only contain 1-4 primary
3781 partitions.
3782
3783 An extended partition fixes the problem simply by containing more boot
3784 records, called Extended Boot Records (EBR). Each EBR contains information
3785 about one logical partition and, if the extended partition contains multiple
3786 logical partitions, link to the next EBR. Thus, an extended partition can
3787 contain unlimited amount of logical partitions.
3788
3789 Extended partition contains only EBRs and logical partitions (and maybe
3790 unallocated space). Extended partition doesn't contain any filesystem and
3791 files can't be stored in it. Of course, logical partition can contain any
3792 filesystem (or be unformatted).
3793
3794 Logical partitions can always be used for storing data: any operating
3795 system can see logical partitions. GNU/Linux supports both multiple primary
3796 extended partitions and extended partitions within each other, while
3797 Windows supports only the latter. GNU/Linux distributions can be installed
3798 to logical partitions as well, but Windows requires a lot of tweaking. See
3799 this outdated guide {{ http://www.goodells.net/multiboot/index.htm }}.
3800
3801 What is LVM?
3802 ---------------------
3803 LVM means "Logical Volume Manager". It allows creating volume groups on top
3804 of hard drives and logical volumes within volume groups. Logical volumes
3805 are NOT the same thing as logical partitions!
3806
3807 Volume groups can be created very flexibly: a volume group can allocate,
3808 for example, the first half of the first hard drive and the second half
3809 of the third drive. One can even create a massive volume group containing
3810 all storage he/she has.
3811
3812 The computer sees a logical volume as a partition: logical volume can be
3813 left unformatted or contain any filesystem.
3814
3815 LVM has many benefits: for example, if one has three hard drives 60 gigabytes
3816 each, he/she can create a 160-gigabyte partition for storing massive files
3817 and/or saving some disk space. In addition, logical volumes can be resized
3818 even when they're in use, so when creating logical volumes one doesn't need
3819 to worry if they're too small or big - if they are, he/she can resize them
3820 at any time.
3821
3822 However, resizing a logical volume doesn't resize the filesystem in
3823 it, so using a filesystem that can be resized in use (online resizing)
3824 is recommended. Very few filesystems can be shrinked online, but most
3825 GNU/Linux filesystems (including ext3/4, ReiserFS, XFS and btrfs) can be
3826 grown online. It's generally a good idea to leave unallocated space within
3827 volume group, so logical volumes can later be grown without shrinking any
3828 other logical volume.
3829
3830 Here come bad news for people who dualboot: Windows doesn't support LVM, it
3831 sees volume groups as unformatted partitions. If you try to access volume
3832 group within Windows, you're just prompted to format the partition. That
3833 prompt is annoying at best and dangerous at worst.
3834
3835 More information about LVM can be found here (almost everything about LVM
3836 in a single page) and here (official SystemRescueCD documentation about LVM).
3837
3838 What is a file system?
3839 ---------------------
3840 A file system is the way in which files are named and where they are placed
3841 logically for storage and retrieval. The DOS, Windows, OS/2, Macintosh,
3842 and UNIX-based operating systems all have file systems in which files are
3843 placed somewhere in a hierarchical (tree) structure. A file is placed in
3844 a directory (folder in Windows) or subdirectory at the desired place in
3845 the tree structure.
3846
3847 The most important difference between filesystems is operating system
3848 support. Some filesystems are supported by all modern operating systems,
3849 but especially the newest filesystems are very rarely supported. Other
3850 important limits are maximum file size, journaling support and file
3851 permission metadata support.
3852
3853 The reason that file size limits exist is that all filesystems reserve a
3854 fixed number of bits for storing the file size. If the size of the file,
3855 in bytes, is bigger than the biggest number that can be stored in file
3856 size bits, the operating system must refuse to store the file at all in
3857 order to prevent data corruption.
3858
3859 File permission metadata means that the filesystem stores in the metadata
3860 of the file, among other things, information about who owns the file and
3861 what different users are allowed to do with the file. That metadata is
3862 especially useful in multi-user environment because it mostly prevents
3863 users from reading each other's files. Permissions can be bypassed, however.
3864
3865 What is journaling?
3866 ---------------------
3867 Ideally, data in a partition never corrupts. But, in the real world,
3868 there are power failures and operating system freezes. And if a computer
3869 is forcefully shut down while something is written to the drive, the write
3870 operation can't be finished. That can damage the filesystem and destroy
3871 any files in the partition.
3872
3873 Journaling partially fixes that problem by writing most changes to the
3874 disk twice: first to a special area called journal and, after that, to
3875 the filesystem itself. If power is lost while writing to the journal was
3876 in progress, the partial change is just ignored and never committed to the
3877 filesystem itself. If power failure or OS freeze happened while writing to
3878 filesystem itself, the write operation is finished by using the information
3879 in journal.
3880
3881 Journaling is always a trade-off between reliability and performance. In
3882 fact, the ext3 and ext4 filesystems support multiple journaling modes in
3883 order to allow the user to choose the optimal compromise. The most popular
3884 choices are ordered and writeback.
3885
3886 Both modes only write metadata changes to the journal before committing
3887 them: data itself is written directly to the main filesystem. The difference
3888 between the modes is that ordered mode guarantees that the data is written
3889 before the change is marked as committed. The difference may sound small, but
3890 in some cases ordered mode causes horrible performance. In Linux 2.6.30, the
3891 default journaling mode was changed to writeback - and it was quickly found
3892 out that writeback mode may cause massive data loss. See this forum post {{
3893 http://forums.raiden.net/viewtopic.php?p=155912#155912 }} for details. Most
3894 GNU/Linux distributions are now using ordered mode as the default again.
3895
3896 In addition, on SSDs (Solid State Drives) and thumb drives write speed is
3897 much slower than read speed. They also have a limited number of writing
3898 cycles, so journaling reduces their lifetime. Thus, I (Jyrki) recommend
3899 against using journaling fileystems on such drives.
3900
3901 What are the differences between most popular filesystems?
3902 ---------------------
3903 The following table quickly describes the most important differences
3904 between them.
3905
3906 Operating system support
3907 #############################################################################
3908 Under Under Maximum Journaling Permissions
3909 Windows GNU/Linux file size
3910 #############################################################################
3911 FAT32 Native Built-in 4 GB No No
3912 NTFS Native Included 16 EB Yes Yes
3913 ext2 3rd party driver Native 16 GB-2 TB* No Yes
3914 ext3 3rd party driver Native 16 GB-2 TB* Yes Yes
3915 ext4 No*** Native 16 GB-16 TB* Yes Yes
3916 exFAT Built-in (Vista/7)** Driver 64 ZB No Yes
3917
3918 * Depends on cluster size
3919 ** This update {{ http://support.microsoft.com/kb/955704 }} adds exFAT
3920 support to Windows XP
3921 *** Ext2read makes accessing ext4 partitions possible, but it's not a
3922 driver and the access is read-only
3923
3924 Operating system support:
3925
3926 * "Native" means that the kernel supports the filesystem and the OS can
3927 boot from a partition using that FS.
3928 * "Built-in" means that the kernel supports the filesystem, but booting
3929 from a partition containing such FS is very difficult.
3930 * "Driver included" means that ntfs-3g (the driver that adds NTFS support
3931 to Linux) comes with most GNU/Linux distributions.
3932 * "3rd party driver" means that drivers to add filesystem support are
3933 available, but must be downloaded and installed separately. The ext2/3
3934 drivers are Ext2 IFS and Ext2fsd and the exFAT driver is exfat {{
3935 http://code.google.com/p/exfat/ }}.
3936 * "No" means that there is no way to get read-write filesystem support.
3937
3938 Filesystems
3939 ****************************************
3940 This section contains more information about most popular filesystems.
3941
3942 FAT32
3943 ---------------------
3944 The initial version of FAT (File Allocation Table), now referred as
3945 FAT12, was designed for floppy disks. A FAT12 partition can only be up
3946 to 32 megabytes in size. After that, PCs equipped with hard drives were
3947 introcuded by IBM and the sizes of hard drives began growing. Microsoft
3948 answered the need by developing first initial FAT16 and then final FAT16.
3949
3950 FAT16 partition can be up to two gigabytes in size. In the middle of 1990s,
3951 that limit was becoming a problem. Microsoft pushed the limit up by updating
3952 FAT again.
3953
3954 FAT32 was first introduced with Windows 95 OSR2. Windows 98,
3955 Windows Me, Windows 2000 and newer support FAT32 too. Linux
3956 kernel has supported FAT32 almost as long as Windows, but
3957 booting GNU/Linux from FAT32 partition is difficult and actually
3958 requires DOS to be installed in the partition as well. (more information {{
3959 http://en.wikipedia.org/wiki/FAT_filesystem_and_Linux#Installing_Linux_on_and_booting_it_from_FAT_volumes_using_umsdos
3960 }})
3961
3962 FAT32 partition can be up to two terabytes in size. As of now (July 2010),
3963 there are hard drives that hit the limit, but don't exceed it. A single
3964 file within FAT32 partition can be up to four gigabytes in size.
3965
3966 Because FAT32 is, in the end, based on FAT12, it has very few features. It
3967 doesn't support file permissions, hard/symbolic links, encryption,
3968 compression, alternative data streams, journaling... It lacks support for
3969 nearly anything that defines a modern filesystem. However, due to very
3970 few features, FAT32 is very fast filesystem if it's not fragmented or on
3971 a Flash-based drive. Mind you, FAT32 fragments very fast.
3972
3973 Due to excellent operating system support, I recommend FAT32 for storing
3974 files which should be accessible in both Windows and GNU/Linux. FAT32
3975 is also a good filesystem on Solid State Drives and thumb drives due to
3976 its performance.
3977
3978 ext2
3979 ---------------------
3980 Ext2 or ext2fs is the successor of extfs (extended file system). Extfs
3981 didn't support separated timestamps for access, data modification and inode
3982 modification. In order to add support for them, and make the filesystem
3983 extendable, a new filesystem had to be created.
3984
3985 Ext2 was developed in January 1993, earlier than any other filesystem
3986 mentioned in this page.
3987
3988 Because ext2 is designed for GNU/Linux, support in Linux kernel was
3989 implemented immediately. The first Windows driver supporting ext2,
3990 Ext2fsd 0.01, was released on 25 January 2002. Both Windows drivers
3991 for ext2 work only on Windows NT operating systems (NT 4.0 up to Vista,
3992 7 isn't supported yet).
3993
3994 The best property of ext2 is extensibility. The superblock contains
3995 information about which version the filesystem is (ext2, ext3 or ext4)
3996 and which extensions and features are in use. By using these pieces of
3997 information, the operating system or driver can decide whether or not
3998 mounting the partition is safe. That's the most important reason why most
3999 GNU/Linux distributions still use successors of ext2 as default filesystems.
4000
4001 Depending on cluster size, ext2 partition can be up to 2-32 terabytes in
4002 size. File size limit is 16 GB-2 TB.
4003
4004 Ext2 supports file permissions, both hard and symbolic links and extended
4005 file attributes. Encryption, compression and journaling are unsupported.
4006
4007 Due to lack of journaling support and existence of Windows drivers, I
4008 recommend using ext2 if you're going to install GNU/Linux on a SSD drive
4009 and want to be able to access files within Windows too.
4010
4011 However, lack of journaling support is the worst limitation of ext2. And
4012 what was done in order to get rid of the limitation?
4013
4014 ext3
4015 ---------------------
4016 Ext3, the successor of ext2, was introduced in Linux kernel on November
4017 2001. It supports journaling, can be grown online and optionally indexes
4018 large directories.
4019
4020 Ext2 IFS and Ext2fsd can mount ext3 partition as ext2 if the journal
4021 is empty. (If it's not, something is wrong - journal is always emptied
4022 when the partition is unmounted or the computer is shut down.) Thus,
4023 ext3 support under Windows is just as good/bad as ext2 support.
4024
4025 Partition and file size limits are the same as in ext2: partition size
4026 limit is 2-32 TB and file size limit 16 GB-2 TB, depending on cluster size.
4027
4028 Due to journaling support and existence of Windows drivers, ext3 is a good
4029 choice if you're going to install GNU/Linux on a mechanical hard drive
4030 and want to be able to access files within Windows.
4031
4032 ext4
4033 ---------------------
4034 Linux kernel support for ext4, the successor of ext3, was marked stable
4035 code on October 2008. Ext4 contains multiple performance and stability
4036 improvements over ext3.
4037
4038 The most important new feature is extents. An extent is a contiguous area of
4039 storage that has been reserved for a file. When a process starts to write
4040 to a file, the whole extent is allocated even before the write operation
4041 begins. The idea is that even if the file is larger than expected, it
4042 doesn't fragment if it doesn't exceed the size of the extent.
4043
4044 Another important improvement is larger partition size limit: an ext4
4045 partition can be even one exabyte in size. (An exabyte is a million
4046 terabytes.) In addition, a directory within an ext4 partition can contain up
4047 to 64 000 subdirectories (instead of 32 000, as in ext2/3) and timestamps
4048 are much more accurate. The file size limit is 16 GB-16 TB, depending on
4049 cluster size.
4050
4051 Unfortunately, Ext2 IFS and Ext2Fsd don't support ext4 and are unable
4052 to mount ext4 partition if extents are enabled. They can be disabled,
4053 but other improvements of ext4 aren't that important for most people -
4054 using ext2 or ext3 is just easier. It is also possible to keep extents
4055 enabled and browse the partition using Ext2read, but Ext2read doesn't
4056 allow the user to write to the partition.
4057
4058 Due to its features, ext4 is a good filesystem on computers that only have
4059 GNU/Linux installed. Because journaling can be disabled, it is suitable
4060 for Solid State Drives and thumb drives too.
4061
4062 NTFS
4063 ---------------------
4064 At the end of 1980s, IBM and Microsoft were developing OS/2 operating
4065 system. Both companies expected OS/2 1.1, released on 1988, to be the first
4066 popular operating system having a GUI, Presentation Manager. Even though it
4067 didn't become too popular during its first years, Microsoft didn't complain:
4068 Windows 2 didn't sell any better.
4069
4070 But on May 1990, Microsoft released Windows 3.0. Millions of copies of it
4071 were sold during its first year, and Microsoft began to believe that OS/2
4072 had failed due to decisions of IBM. At autumn 1990, Microsoft stopped
4073 cooperating with IBM, recasted OS/2 3.0 as Windows NT and continued
4074 developing it alone, leaving IBM alone with OS/2.
4075
4076 Windows NT was targeted for network file servers, and there were already
4077 competition, most importantly Novell NetWare and OS/2. Among other things,
4078 the filesystem of Windows NT had to be fast, space efficient and reliable.
4079
4080 NTFS (New Technology File System) was introcuded with Windows NT 3.1. Newer
4081 versions of NTFS have been introduced with newer versions of Windows NT,
4082 and the filesystem is most likely still under development. All versions
4083 of Windows NT support NTFS, but support in Linux kernel was implemented
4084 as late as on December 2003.
4085
4086 NTFS is still, in my opinion, the most feature-filled filesystem around. It
4087 supports file permissions, both hard and symbolic links, encryption,
4088 compression, alternative data streams, journaling... There are very few
4089 features NTFS doesn't support.
4090
4091 Depending on cluster size, a NTFS partition can be up to 8 ZB-1 YB in
4092 size. (A zettabyte (ZB) is a milliard terabytes and a yottabyte (YB)
4093 a billion terabytes.) File size limit is 16 EB.
4094
4095 Windows 7 can only be installed on a NTFS
4096 partition, and Vista requires a work-around {{
4097 http://www.computersplace.com/install-windows-vista-on-a-fat32-partition/windows-vista
4098 }} if one wants to install it on a FAT32 partition. Of course NTFS partitions
4099 can be used for data storage as well: due to features of NTFS, I recommend
4100 doing so on mechanical hard drives on Windows-only computers.
4101
4102 exFAT
4103 ---------------------
4104 NTFS is a great filesystem, but due to its complexity and journaling, it's
4105 not suitable for Flash-based drives. Even Microsoft itself has recommended
4106 using FAT32 on removable Flash media.
4107
4108 However, FAT32 only allows files up to four gigabytes in size. The limit
4109 is already becoming too small, for example a DVD disc image can exceed
4110 that limit. In addition, FAT32 lacks file permission support. In order
4111 to get rid of these limitations, Microsoft took FAT from its grave and
4112 updated it one more time.
4113
4114 ExFAT (extended FAT), also known as FAT64, was introduced with Windows CE
4115 6.0, on November 2006. Windows Vista SP1, Windows 7 and newer support exFAT
4116 too, and by installing this update {{ http://support.microsoft.com/kb/955704
4117 }} Windows XP can be extended to support exFAT as well. GNU/Linux drivers
4118 are available too, but currently none of them are both stable and free. The
4119 best option seems to be exfat, an open-source driver in beta stage.
4120
4121 The partition and file size limits of exFAT are the same: 64
4122 zettabytes. Another important improvement is file permission support that,
4123 oddly, is lacking in Windows Vista. In addition, a directory within an
4124 exFAT partition can contain up to 2 796 202 files (instead of 65 536,
4125 as in FAT32) and timestamps have become more accurate.
4126
4127 No operating system can be installed to an exFAT partition, so such
4128 partitions can only be used for data storage. Due to lack of journaling
4129 and support for huge files, exFAT is a good filesystem on Solid State
4130 Drives and thumb drives that are only used within Windows Vista and/or 7.
4131
4132 Partition list
4133 ---------------------
4134 The following table presents known partition types along with their IDs:
4135
4136 0 Empty 80 Old Minix
4137 1 FAT12 81 Minix / old Linux
4138 2 XENIX root 82 Linux swap / Solaris
4139 3 XENIX usr 83 Linux
4140 4 FAT16 <32M 84 OS/2 hidden C: drive
4141 5 Extended 85 Linux extended
4142 6 FAT16 86 NTFS volume set
4143 7 HPFS/NTFS 87 NTFS volume set
4144 8 AIX 88 Linux plaintext
4145 9 AIX bootable 8e Linux LVM
4146 a OS/2 Boot Manager 93 Amoeba
4147 b W95 FAT32 94 Amoeba BBT
4148 c W95 FAT32 (LBA) 9f BSD/OS
4149 e W95 FAT16 (LBA) a0 IBM Thinkpad hibernation
4150 f W95 Ext'd (LBA) a5 FreeBSD
4151 10 OPUS a6 OpenBSD
4152 11 Hidden FAT12 a7 NeXTSTEP
4153 12 Compaq diagnostics a8 Darwin UFS
4154 14 Hidden FAT16 <32M a9 NetBSD
4155 16 Hidden FAT16 ab Darwin boot
4156 17 Hidden HPFS/NTFS b7 BSDI fs
4157 18 AST SmartSleep b8 BSDI swap
4158 1b Hidden W95 FAT32 bb Boot Wizard hidden
4159 1c Hidden W95 FAT32 (LBA) be Solaris boot
4160 1e Hidden W95 FAT16 (LBA) bf Solaris
4161 24 NEC DOS c1 DRDOS/sec (FAT-12)
4162 39 Plan 9 c4 DRDOS/sec (FAT-16
4163 3c PartitionMagic recovery c6 DRDOS/sec (FAT-16)
4164 40 Venix 80286 c7 Syrinx
4165 41 PPC PReP Boot da Non-FS data
4166 42 SFS db CP/M / CTOS / ...
4167 4d QNX4.x de Dell Utility
4168 4e QNX4.x 2nd part df BootIt
4169 4f QNX4.x 3rd part e1 DOS access
4170 50 OnTrack DM e3 DOS R/O
4171 51 OnTrack DM6 Aux1 e4 SpeedStor
4172 52 CP/M eb BeOS fs
4173 53 OnTrack DM6 Aux3 ee EFI GPT
4174 54 OnTrackDM6 ef EFI (FAT-12/16/32)
4175 55 EZ-Drive f0 Linux/PA-RISC boot
4176 56 Golden Bow f1 SpeedStor
4177 5c Priam Edisk f4 SpeedStor
4178 61 SpeedStor f2 DOS secondary
4179 63 GNU HURD or SysV fd Linux raid autodetect
4180 64 Novell Netware 286 fe LANstep
4181 65 Novell Netware 386 ff BBT
4182 70 DiskSecure Multi-Boot
4183 75 PC/IX
4184
4185 The partitions you are most likely to see in use, are:
4186
4187 * HPFS/NTFS (ID = 7)
4188 This is the Windows XP partition, also known as NTFS
4189
4190 * W95 FAT32 (LBA) (ID = c)
4191 This is the Windows 95 - 98 partition
4192 It is used in any kind of disk and large USB devices (1 GB and more)
4193
4194 * W95 Ext'd (LBA) (ID = f)
4195 Extended partition. It acts as a container for other partitions
4196
4197 * Extended (ID = 5)
4198 Another extended partition type. It acts as a container for other partitions
4199 There is one more extended partition type (ID = 85), but Windows doesn't
4200 recognise it
4201
4202 * Linux swap / Solaris (ID = 82)
4203 Swap partition, acting as Virtual Memory
4204 Modern computers with 1 - 2 GB of memory may not use it at all
4205
4206 * Linux (ID = 83)
4207 Linux partitions, such as ext2, ext3 and reiserfs
4208
4209 Partitioning example
4210 ****************************************
4211 This section contains a partitioning example. I simulate the following
4212 situation in a virtual machine:
4213
4214 I have two partitions in my disk: /dev/sda1 that contains a GNU/Linux
4215 distribution, and /dev/sda2 that is a swap partition. Here we can see the
4216 output of fdisk:
4217
4218 root@sysresccd /root % fdisk -l
4219
4220 Disk /dev/sda: 2097 MB, 2097152000 bytes
4221 64 heads, 63 sectors/track, 1015 cylinders
4222 Units = cylinders of 4032 * 512 = 2064384 bytes
4223 Disk identifier: 0x00058a4a
4224
4225 Device Boot Start End Blocks Id System
4226 /dev/sda1 * 1 812 1636960+ 83 Linux
4227 /dev/sda2 813 1015 409248 82 Linux swap / Solaris
4228
4229 Now I'm going to install another distribution on the same disk. First of
4230 all, I need one more partition, because only one distro can be installed on
4231 one partition. In addition, I want to separate /home to its own partition
4232 in order to be able to share it between distributions.
4233
4234 Because the whole disk is already allocated, I must shrink at least one
4235 existing partition in order to create new partitions. I'll shrink both of
4236 them to half (/dev/sda1 from 1,6 gigabytes to 800 megabytes, and /dev/sda2
4237 from 400 MB to 200 MB). In addition, I'll move /dev/sda2 right next to
4238 /dev/sda1 to keep the partitions in order.
4239
4240 But how many partitions there will be in total? One, two,
4241 three... four! Phew, I was near to paint myself into a corner. If I created
4242 only primary partitions, I'd be unable to create any more partitions on
4243 the disk. Thus, I'll create an extended partition instead and two logical
4244 partitions within it. Then I'll be able to create more logical partitions
4245 later if required.
4246
4247 There is one more challenge: moving /home to a separate partition. It's
4248 very easy to move the folder itself, but the distro in /dev/sda1 will
4249 surely be confused if it doesn't find /home when it boots next time. Thus,
4250 I must edit its /etc/fstab and configure it to mount the /home partition
4251 automatically - before booting the distro itself.
4252
4253 Now there are only two decisions left: the numbers and sizes of the new
4254 partitions. I decide to install the new distro to /dev/sda5 and move /home
4255 to /dev/sda6. Let /dev/sda5 be 800 megabytes and /dev/sda6 200 MB in size.
4256
4257 Now it's time to boot into SystemRescueCD. Graphical mode is required
4258 this time.
4259 [[ systemrescuecd.png ]]
4260 I close the terminal and open GParted by clicking the third icon in the
4261 bottom pane.
4262 [[ gparted-00.png ]]
4263 I right-click the partition /dev/sda1 and select Resize/Move.
4264 [[ gparted-01.png ]]
4265 I enter 799 MB as the new size, click the Free Space Following (MiB)
4266 combo box and press Resize/Move.
4267 [[ gparted-02.png ]]
4268 I right-click now /dev/sda2 and select Resize/Move.
4269 [[ gparted-03.png ]]
4270 I enter 0 MB as preceding free space and 200 MB as partition size, click
4271 the Free Space Following (MiB) combo box and press Resize/Move.
4272 [[ gparted-04.png ]]
4273 I right-click the unallocated area and select New.
4274 [[ gparted-05.png ]]
4275 I select Extended Partition as the partition type. The size was already
4276 1000 megabytes (the maximum) and as said, an extended partition doesn't
4277 contain any filesystem. I click Add.
4278 [[ gparted-06.png ]]
4279 I right-click the unallocated area within the extended partition and
4280 select New.
4281 [[ gparted-07.png ]]
4282 I choose the ext4 filesystem and enter 799 MB as the partition size. After
4283 that, I click first the Free Space Following (MiB) combo box and then Add.
4284 [[ gparted-08.png ]]
4285 I right-click the remaining unallocated space and select New one more time.
4286 [[ gparted-09.png ]]
4287 I choose the ext4 filesystem again. The partition size setting was already
4288 200 megabytes (the whole available space), so I just press Add.
4289 [[ gparted-10.png ]]
4290 [[ important.png ]]
4291 The next step is to commit the changes.After that some operations, for
4292 examplepartition deletion, can no longer be undone.
4293
4294 Finally I commit the changes by pressing the rightmost icon in the main bar.
4295 [[ gparted-11.png ]]
4296 After slowly reading the warning, I confirm my decisions by pressing Apply.
4297 [[ gparted-12.png ]]
4298 GParted begins to commit the changes...
4299 [[ gparted-13.png ]]
4300 ...and when everything is done, it shows me this window that I close.
4301 [[ gparted-14.png ]]
4302 Then I can see the brand new partitions.
4303
4304 Moving /home
4305 ---------------------
4306 I close GParted and launch Terminal by pressing the second icon in the
4307 bottom pane.
4308
4309 I create directories as mount points:
4310
4311 mkdir /mnt/sda1
4312 mkdir /mnt/sda6
4313
4314 Then I mount the partitions:
4315
4316 mount /dev/sda1 /mnt/sda1
4317 mount /dev/sda6 /mnt/sda6
4318
4319 I copy the directory to the new partition:
4320
4321 cd /mnt/sda1
4322 rsync -aAPSX home/ /mnt/sda6
4323
4324 I move the original directory out of my way and create a new directory in
4325 place of it:
4326
4327 mv home home-old
4328 mkdir home
4329
4330 After that, I unmount /dev/sda6, because it no longer needs to be mounted:
4331
4332 umount /dev/sda6
4333 [[ terminal.png ]]
4334 Now I close Terminal and launch Geany by pressing the fourth icon in the
4335 bottom pane.
4336 [[ geany-00.png ]]
4337 I select File -> Open.
4338 [[ geany-01.png ]]
4339 I press File System and navigate to folder /mnt/sda1/etc.
4340 [[ geany-02.png ]]
4341 I double-click the file fstab.
4342 [[ geany-03.png ]]
4343 I add the following line:
4344
4345 /dev/sda6 /home ext4 defaults 0 2
4346
4347 Finally, I select File -> Save.
4348 [[ geany-04.png ]]
4349 It's a good idea to reboot the computer now and check if the distribution
4350 in /dev/sda1 still works. If yes, the /home-old directory can be removed
4351 and the disk is ready for the new distro.
4352
4353
4354
4355
4356 Data Recovery
4357 ==============================================================================
4358
4359 Intro
4360 ****************************************
4361 Deleted or "lost" files can be recovered from failed or formatted drives
4362 and partitions, cdroms and memory cards using the software available in
4363 SystemRescueCD.
4364
4365 Unless you can rule out hardware failure, you must not write to the failed
4366 device. The following software will passively try to recover your data
4367 from failed or failing hardware. If your data is not replaceable, do not
4368 attempt to write to the failed device if the following applications do
4369 not work but seek professional advice instead.
4370
4371 If your device is damaged, it is advisable to image the device and work on
4372 the image file for data recovery. If hardware failure is not the problem,
4373 you can recover data directly from the device.
4374
4375 To recover data from a failed device, you will need another device of equal
4376 or greater storage capacity onto which to save your data. If you need to make
4377 an image of the failed device, you will need yet another quantity of space.
4378
4379 I should state here, that I haven't used any of these tools recently (other
4380 than plain and simple dd, a long time ago, which I found to be very slow),
4381 so I couldn't recommend any of them. Any comments on a tool's usability
4382 found in this page, is just what I found on the Net.
4383
4384 Partition recovery
4385 ****************************************
4386 If you made a mistake while partitioning and the partition no longer appears
4387 in the partition table, so long as you have not written data in that space,
4388 all your data is still there and can be restored.
4389
4390 When changing the partition table on your hard drive, you must ensure that
4391 no partition on the disk is mounted. This includes swap space. In order
4392 to restore your partition, execute:
4393
4394 swapoff -a
4395 parted /dev/old_disk
4396
4397 Then, use the rescue option:
4398
4399 rescue START END
4400
4401 where START is the area of the disk where you believe the partition began
4402 and END is it's end. If parted finds a potential partition, it will ask
4403 you if you want to add it to the partition table.
4404
4405 Note: TestDisk can also be used to recover a "lost" partition.
4406
4407 Disk / files recovery
4408 ****************************************
4409 Using dd
4410 ---------------------
4411 In order to duplicate a disk to another disk, execute
4412
4413 dd if=/dev/old_disk of=/dev/new_disk conv=noerror,sync
4414
4415 or to create an image file
4416
4417 dd if=/dev/old_disk of=image_file conv=noerror
4418
4419 Be careful, if you are copying a disk, the destination must also be a disk,
4420 not a partition. If you are copying a partition, the destination partition
4421 must be large enough. Copying the whole disk is recommended.
4422
4423 To speed up the copy process, you can append bs=8k, it will read/write
4424 the disk by 16 sectors at a time.
4425
4426 Using dd_rescue
4427 ---------------------
4428 Like dd, dd_rescue {{ http://www.garloff.de/kurt/linux/ddrescue/ }} does
4429 copy data from one file or block device to another. You can specify file
4430 positions (called seek and skip in dd). There are several differences:
4431
4432 * dd_rescue does not provide character conversions.
4433 * The command syntax is different. Call dd_rescue -h.
4434 * dd_rescue does not abort on errors on the input file, unless you specify a
4435 maximum error number. Then dd_rescue will abort when this number is reached.
4436 * dd_rescue does not truncate the output file, unless asked to.
4437 * You can tell dd_rescue to start from the end of a file and move backwards.
4438 * It uses two block sizes, a large (soft) block size and a small (hard)
4439 block size. In case of errors, the size falls back to the small one and
4440 is promoted again after a while without errors.
4441 * It does not (yet) support non-seekable in- or output.
4442
4443 In order to duplicate a disk to another disk, execute
4444
4445 dd_rescue -A -v /dev/old_disk /dev/new_disk
4446
4447 or to create an image file
4448
4449 dd_rescue -A -v /dev/old_disk image_file
4450
4451 The copying should go very quickly until it hits a bad sector and then it
4452 will slow down to take smaller chunks of data. People have reported very
4453 good results with this technique.
4454
4455 Using GNU ddrescue
4456 ---------------------
4457 The GNU site describes GNU ddrescue as a data recovery tool, and lists
4458 these features:
4459
4460 * It copies data from one file or block device (hard disc, CD-ROM, etc)
4461 to another, trying hard to rescue data in case of read errors.
4462 * It does not truncate the output file if not asked to, so every time you
4463 run it on the same output file, it tries to fill in the gaps.
4464 * It is designed to be fully automatic.
4465 * If you use the log file feature of GNU ddrescue, the data is rescued very
4466 efficiently (only the needed blocks are read). Also you can interrupt the
4467 rescue at any time and resume it later at the same point.
4468 * The log file is periodically saved to disc. So in case of a crash you
4469 can resume the rescue with little recopying.
4470 * If you have two or more damaged copies of a file, CD-ROM, etc, and run
4471 GNU ddrescue on all of them, one at a time, with the same output file,
4472 you will probably obtain a complete and error-free file. The probability
4473 of having damaged areas at the same places on different input files is
4474 very low. Using the log file, only the needed blocks are read from the
4475 second and successive copies.
4476 * The same log file can be used for multiple commands that copy different
4477 areas of the file, and for multiple recovery attempts over different subsets.
4478
4479 The algorithm of GNU ddrescue is as follows:
4480
4481 * Optionally read a log file describing the status of a multi-part or
4482 previously interrupted rescue.
4483 * Read the non-damaged parts of the input file, skipping the damaged areas,
4484 until the requested size is reached, or until interrupted by the user.
4485 * Try to read the damaged areas, splitting them into smaller pieces and
4486 reading the non-damaged pieces, until the hardware block size is reached,
4487 or until interrupted by the user.
4488 * Try to read the damaged hardware blocks until the specified number of
4489 retries is reached, or until interrupted by the user.
4490 * Optionally write a log file for later use.
4491
4492 Note: GNU ddrescue is considered to be the best recovery tool available.
4493
4494 In order to duplicate a disk to another disk, execute
4495
4496 ddrescue -vr3 /dev/old_disk /dev/new_disk logfile
4497
4498 or to create an image file
4499
4500 ddrescue -vr3 /dev/old_disk image_file logfile
4501
4502 If the disk is failing fast and you want to get the most data out of it
4503 on the first try, you should probably use "-n" on the first run. This
4504 will avoid splitting error areas. Subsequent runs can use "-r1" or "-r3",
4505 without "-n", to retry those error areas.
4506
4507 To summarise, we execute:
4508
4509 ddrescue -vn /dev/old_disk image_file logfile
4510 ddrescue -v -r3 -C /dev/old_disk image_file logfile
4511
4512 Note: When working with CD-ROMs you should probably specific "-b 2048"
4513
4514 Using Foremost
4515 ---------------------
4516 Foremost {{ http://foremost.sourceforge.net/ }} is a console program
4517 to recover files based on their headers, footers, and internal data
4518 structures. This process is commonly referred to as data carving. Foremost
4519 can work on image files, such as those generated by dd, Safeback, Encase,
4520 etc, or directly on a drive. The headers and footers can be specified
4521 by a configuration file or you can use command line switches to specify
4522 built-in file types. These built-in types look at the data structures of
4523 a given file format allowing for a more reliable and faster recovery.
4524
4525 It can be run on an image file created with any of the above tools, to
4526 extract files:
4527
4528 foremost -i image -o /recovery/foremost
4529
4530 Foremost can be instructed to recover only specific file types, using the
4531 -t command line parameter. In the following example Foremost will extract
4532 only jpg files:
4533
4534 foremost -t jpg -i image -o /recovery/foremost
4535
4536 Available types are: jpg, gif, png, bmp, avi, exe (Windows binaries and
4537 DLLs), wav, riff, wmv (will extract wma also), mov, pdf, ole (will extract
4538 any file using the OLE file structure; this includes PowerPoint, Word,
4539 Excel, Access, and StarWriter), doc, zip (will extract .jar files and Open
4540 Office docs as well; this includes SXW, SXC, SXI, and SX? for undetermined
4541 OpenOffice files), rar, html and cpp.
4542
4543 Using TestDisk
4544 ---------------------
4545 TestDisk {{ http://www.cgsecurity.org/wiki/TestDisk }} was primarily
4546 designed to help recover "lost" partitions and/or make non-booting disks
4547 bootable again when these symptoms are caused by faulty software, certain
4548 types of viruses or human error (such as accidentally deleting a Partition
4549 Table). Partition table recovery using TestDisk is really easy.
4550
4551 TestDisk can
4552
4553 * Fix partition table, recover deleted partition
4554 * Recover FAT32 boot sector from its backup
4555 * Rebuild FAT12/FAT16/FAT32 boot sector
4556 * Fix FAT tables
4557 * Rebuild NTFS boot sector
4558 * Recover NTFS boot sector from its backup
4559 * Fix MFT using MFT mirror
4560 * Locate ext2/ext3 Backup SuperBlock
4561
4562 Some great tutorials are available at TestDisk's site: "TestDisk Step
4563 By Step {{ http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step }}",
4564 "Running TestDisk", "Data Recovery Examples" etc.
4565
4566 Using PhotoRec
4567 ---------------------
4568 PhotoRec {{ http://www.cgsecurity.org/wiki/PhotoRec }} is file data recovery
4569 software designed to recover "lost" files including video, documents
4570 and archives from Hard Disks and CDRom and "lost" pictures (thus, its
4571 'Photo Recovery' name) from digital camera memory. PhotoRec ignores the
4572 filesystem and goes after the underlying data, so it will still work even
4573 if your media's filesystem has been severely damaged or re-formatted.
4574
4575 For more safety, PhotoRec uses read-only access to handle the drive or
4576 memory support you are about to recover "lost" data from.
4577
4578 Important: As soon as a pic or file is accidentally deleted, or you discover
4579 any missing, do NOT save any more pics or files to that memory device or
4580 hard disk drive; otherwise you may overwrite your "lost" data. This means
4581 that even using PhotoRec, you must not choose to write the recovered files
4582 to the same partition they were stored on.
4583
4584 A great tutorial titled "PhotoRec Step By Step {{
4585 http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step }}" can be found at
4586 PhotoRec's site.
4587
4588 Links & resources
4589 ****************************************
4590 This page is a compilation of the following pages:
4591
4592 DataRecovery
4593 https://help.ubuntu.com/community/DataRecovery
4594
4595 Hard Drive Recovery, Ubuntu-Style
4596 http://blogs.sun.com/superpat/tags/ddrescue
4597
4598 Recover Data and (deleted) Partition with Linux from Hard Drives, CD-ROMs
4599 or DVDs
4600 http://sysblogd.wordpress.com/2008/01/05/data-recovery-with-linux-from-hard-drives-cd-roms-or-dvds/
4601
4602 dd_rescue
4603 http://www.garloff.de/kurt/linux/ddrescue/
4604
4605 gddrescue: a tool for recovering data from damaged media
4606 http://debaday.debian.net/2007/12/12/gddrescue-a-tool-for-recovering-data-from-damaged-media/
4607
4608 Foremost
4609 http://foremost.sourceforge.net/
4610
4611 TestDisk
4612 http://www.cgsecurity.org/wiki/TestDisk
4613
4614 PhotoRec
4615 http://www.cgsecurity.org/wiki/PhotoRec
4616
4617
4618
4619
4620 Clonezilla-SysRescCD own scripts
4621 ==============================================================================
4622
4623 Intro
4624 ****************************************
4625 In this page I will present the scripts I have ever written for
4626 Clonezilla-SysRescCD
4627
4628 what-cd
4629 ****************************************
4630 Included in: SystemRescueCD
4631
4632 This script determines the device names for your CDs/DVDs, and whether
4633 they can read/write CD/DVD-ROMs
4634
4635 Its help screen is the following:
4636
4637 # what-cd -h
4638 what-cd - v 1.0.0 - S. Georgaras <sng@hellug.gr>
4639
4640 what-cd will try to identify your CD/DVDs
4641 You can use it to identify the device name of your CD-Reader (default),
4642 CD-Writer, DVD-Reader, and DVD-Writer.
4643
4644 Usage: what-cd [options]
4645 Availabe options are:
4646 d Print info about DVDs
4647 w Print info about writers
4648 b Batch mode. Only print one device name.
4649 If more than one device is found, print
4650 nothing. For use with scripts
4651 e deviceID Eject device deviceID
4652 Accecpable values: -1...num of devices
4653 Use -1 when in batch mode
4654 v Print version info and exit
4655 h Print this screen and exit
4656
4657 Its typical usage would be to identify the DVD writer:
4658
4659 # what-cd -dw
4660 Device /dev/hdd (id=0) can not write DVDs
4661 Device /dev/hdc (id=1) can write DVDs
4662
4663 When used in batch mode, it will only print a device name. This is
4664 especially useful in scripts, but also in the command line, as shown in
4665 section "Burning the DVD".
4666
4667 # what-cd -dwb
4668 /dev/hdc
4669
4670 continue-multi-cd
4671 ****************************************
4672 Included in: SystemRescueCD
4673
4674 continue-multi-cd helps you append data to a multi session CD; that is
4675 it helps you prepare and burn any consecutive sessions to it. It may lack
4676 some of the functionality you would have had if you used the command line
4677 tools themselves (mksiofs and cdrecord), but because of it, it keeps you
4678 away from writing a lot of parameters.
4679
4680 You could use it for example, to burn some extra documentation to
4681 Clonezilla-SysRescCD CD, but you cannot use it to change the configuration
4682 files of isolinux, as it just reads the first session when booting.
4683
4684 Its help screen is the following:
4685
4686 # continue-multi-cd -h
4687 continue-multi-cd - v 2.0.0 - S. Georgaras <sng@hellug.gr>
4688
4689 Usage: continue-multi-cd [options] <path to be added to CD>
4690
4691 Available options are:
4692 d Specify write device (in case auto detection does
4693 not work)
4694 c Close the CD. No more burning will be possible
4695 Default is to leave it open
4696 l Don't burn the CD after image creation
4697 o <image name> Save the image file as <image name>
4698 r Remove the image file after burning
4699 f On the fly burning of the CD. No image file will
4700 be created
4701 v Print version info and exit
4702 h Print this screen and exit
4703
4704 You have to note one thing though: the folder <path to be added to CD>
4705 will not be present on the CD; only its contents will.
4706
4707 Let's suppose that you want to add to the CD the folder extra-doc,
4708 which contains q-a.html and faq.html, and that its full path is
4709 /home/user/extra-doc. If you issue the command
4710
4711 continue-multi-cd -mwr /home/user/extra-doc
4712
4713 you will not have a extra-doc folder on the root of your CD, but the files
4714 q-a.html and faq.html will be present there.
4715
4716 In order to have extra-doc on the CD, you have to copy it to a temporary
4717 location and pass that path to continue-multi-cd. Let's see how it's done:
4718
4719 mkdir -p /tmp/for-the-cd
4720 cp -r /home/user/extra-doc /tmp/for-the-cd
4721 continue-multi-cd -r /tmp/for-the-cd
4722 rm -rf /tmp/for-the-cd
4723
4724
4725
4726
4727 Identifying devices in Linux
4728 ==============================================================================
4729
4730 Intro
4731 ****************************************
4732 This page is intended to help new Linux users and Windows users identify
4733 their hard disks / CD ROMs in a Linux box.
4734
4735 Linux disks and partition names may be different from other operating
4736 systems. You need to know the names that Linux uses when you format,
4737 mount or select partitions or disks.
4738
4739 Linux uses the so called device name to access disks and partitions. You
4740 can think of it as a link to the actual driver of the disk. All available
4741 devices have a corresponding file in /dev (e.g. /dev/hda1).
4742
4743 In general, each disk / CD-ROM has a three letter name, for example hda. Each
4744 partition in such a disk has a number associated with it, starting from 1. So
4745 the first partition of disk hda would be hda1, the second hda2 and so on.
4746
4747 Depending on the device type, Linux gives the following names to devices:
4748
4749 * IDE (ATA) floppies
4750 The first floppy drive is named /dev/fd0.
4751 The second floppy drive is named /dev/fd1.
4752
4753 * IDE (ATA) disks /CD-ROMs
4754 The master disk on IDE primary controller is named /dev/hda.
4755 The slave disk on IDE primary controller is named /dev/hdb.
4756 The master and slave disks of the secondary controller can be called
4757 /dev/hdc and /dev/hdd, respectively.
4758
4759 Linux represents the primary partitions as the drive name, plus the numbers
4760 1 through 4. For example, the first primary partition on the first IDE
4761 drive is /dev/hda1. The logical partitions are numbered starting at 5,
4762 so the first logical partition on that same drive is /dev/hda5. Remember
4763 that the extended partition, that is, the primary partition holding the
4764 logical partitions, is not usable by itself. This applies to SCSI disks
4765 as well as IDE disks.
4766
4767 * SCSI disks
4768 The first SCSI disk (SCSI ID address-wise) is named /dev/sda.
4769 The second SCSI disk (address-wise) is named /dev/sdb, and so on.
4770
4771 * SCSI CD-ROMs
4772 The first SCSI CD-ROM is named /dev/scd0, also known as /dev/sr0.
4773 The second SCSI CD-ROM is named /dev/scd1, also known as /dev/sr1, and so on.
4774
4775 * USB disks
4776 They are named just like SCSI disks. The only difference is that the
4777 partition number has to do with the file system on the disk. If it's
4778 /dev/sdx4, then it's a VFAT file system and if it's /dev/sdx1 it's probably
4779 a linux (ext2, ext3) file system.
4780
4781 Examples
4782 ****************************************
4783 In order to identify the disks of a system you have to work with, a basic
4784 knowledge of its configuration (how many disks it has, whether it's a
4785 dual-boot system etc.) is welcomed but not required. A more experienced
4786 user will not have to worry about it, though.
4787
4788 Linux systems based on a 2.6.x kernel (like Clonezilla Live and
4789 SystemRescueCD) provide all the necessary support to identify a system's
4790 disk configuration, with just a couple of commands.
4791
4792 Example 1
4793 ---------------------
4794 The first system I have to work with is a dual-boot system (Windows -
4795 Linux), with two disks and two DVD-ROMs.
4796
4797 The first command will tell me what disks and partitions exist in the
4798 system. So here it is:
4799
4800 # cat /proc/partitions
4801 major minor #blocks name
4802
4803 3 0 312571224 hda
4804 3 1 23446836 hda1
4805 3 2 40957717 hda2
4806 3 3 245240257 hda3
4807 3 4 2923830 hda4
4808 3 64 244198584 hdb
4809 3 65 41945683 hdb1
4810 3 66 2104515 hdb2
4811 3 67 1 hdb3
4812 3 68 125909437 hdb4
4813 3 69 74236333 hdb5
4814
4815 The output of this command tells me that the system has two disks (hda
4816 and hdb) which are the primary master and slave devices.
4817
4818 The first disk contains four primary partitions (hda1-hda4) and the second
4819 one four primary partitions (hdb1-hdb4) and a logical one (hdb5). Wait a
4820 minute!!! this can't be right... In order to have a logical partition, I
4821 must have a primary that contains it, which means that in this case I can't
4822 have four primary partitions. So what is really happening here is that I have
4823 two primary and two logical, plus an extended primary which contains them.
4824
4825 What remains to be found is what type of partitions they are. I will find
4826 that out by executing the following commands:
4827
4828 # fdisk -l /dev/hda
4829
4830 Disk /dev/hda: 320.0 GB, 320072933376 bytes
4831 255 heads, 63 sectors/track, 38913 cylinders
4832 Units = cylinders of 16065 * 512 = 8225280 bytes
4833
4834 Device Boot Start End Blocks Id System
4835 /dev/hda1 * 1 2919 23446836 7 HPFS/NTFS
4836 /dev/hda2 2920 8018 40957717+ 7 HPFS/NTFS
4837 /dev/hda3 8019 38549 245240257+ 7 HPFS/NTFS
4838 /dev/hda4 38550 38913 2923830 82 Linux swap / Solaris
4839
4840 # fdisk -l /dev/hdb
4841
4842 Disk /dev/hdb: 250.0 GB, 250059350016 bytes
4843 255 heads, 63 sectors/track, 30401 cylinders
4844 Units = cylinders of 16065 * 512 = 8225280 bytes
4845
4846 Device Boot Start End Blocks Id System
4847 /dev/hdb1 * 1 5222 41945683+ 83 Linux
4848 /dev/hdb2 5223 5484 2104515 82 Linux swap / Solaris
4849 /dev/hdb3 5485 14726 74236365 f W95 Ext'd (LBA)
4850 /dev/hdb4 14727 30401 125909437+ 83 Linux
4851 /dev/hdb5 5485 14726 74236333+ 83 Linux
4852
4853 Ok, this clears things up. The first disk contains three Windows XP
4854 partitions (NTFS) and a Linux Swap partition. In fact, /dev/hda1 is the
4855 system "disk" for Windows, since Windows will always be installed in the
4856 first partition of the primary master disk.
4857
4858 The second disk, on the other hand, contains a Linux partition (/dev/hdb1),
4859 a Linux Swap partition /dev/hdb2, and an extended partition /dev/hdb3
4860 which contains two more Linux partitions (/dev/hdb4 and /dev/hdb5).
4861
4862 The final thing we need to know about this system is what CD/DVD-ROMs it
4863 has. So I execute the command:
4864
4865 # cat /proc/sys/dev/cdrom/info
4866 CD-ROM information, Id: cdrom.c 3.20 2003/12/17
4867
4868 drive name: hdd hdc
4869 drive speed: 0 126
4870 drive # of slots: 1 1
4871 Can close tray: 1 1
4872 Can open tray: 1 1
4873 Can lock tray: 1 1
4874 Can change speed: 1 1
4875 Can select disk: 0 0
4876 Can read multisession: 1 1
4877 Can read MCN: 1 1
4878 Reports media changed: 1 1
4879 Can play audio: 1 1
4880 Can write CD-R: 0 1
4881 Can write CD-RW: 0 1
4882 Can read DVD: 1 1
4883 Can write DVD-R: 0 1
4884 Can write DVD-RAM: 0 1
4885 Can read MRW: 1 0
4886 Can write MRW: 1 0
4887 Can write RAM: 0 1
4888
4889 The system has two DVD-ROMs, hdc which is the secondary master and is a
4890 DVD writer, and hdd which is the secondary slave and is a DVD reader.
4891
4892 At this point I will connect my USB stick, wait for a while and execute
4893 the command:
4894
4895 # cat /proc/partitions
4896 major minor #blocks name
4897
4898 3 0 312571224 hda
4899 3 1 23446836 hda1
4900 3 2 40957717 hda2
4901 3 3 245240257 hda3
4902 3 4 2923830 hda4
4903 3 64 244198584 hdb
4904 3 65 41945683 hdb1
4905 3 66 2104515 hdb2
4906 3 67 1 hdb3
4907 3 68 125909437 hdb4
4908 3 69 74236333 hdb5
4909 8 0 1007615 sda
4910 8 4 1006576 sda4
4911
4912 As you can see, we have two more lines here, that reflect the changes to
4913 our system (the connection of the USB device). So my USB stick is recognized
4914 by the system as sda, and the disk itself contains a VFAT file system.
4915
4916 Example 2
4917 ---------------------
4918 The second system is a Linux box with one SCSI disk and a CD-ROM. Again
4919 I issue the command:
4920
4921 # cat /proc/partitions
4922 major minor #blocks name
4923
4924 8 0 156290904 sda
4925 8 1 64228 sda1
4926 8 2 15735667 sda2
4927 8 3 15735667 sda3
4928 8 4 124744725 sda4
4929
4930 From its output I see I only have one disk sda, which contains four
4931 partitions.
4932
4933 Then I execute fdisk, which shows me that the disk contains one DOS and
4934 three Linux partitions.
4935
4936 # fdisk -l /dev/sda
4937 Disk /dev/sda: 160.0 GB, 160041885696 bytes
4938 255 heads, 63 sectors/track, 19457 cylinders
4939 Units = cylinders of 16065 * 512 = 8225280 bytes
4940
4941 Device Boot Start End Blocks Id System
4942 /dev/sda1 1 8 64228+ 6 FAT16
4943 /dev/sda2 9 1967 15735667+ 83 Linux
4944 /dev/sda3 1968 3926 15735667+ 83 Linux
4945 /dev/sda4 3927 19456 124744725 83 Linux
4946
4947 Finally I query its CD-ROMs, by executing the command:
4948
4949 # cat /proc/sys/dev/cdrom/info
4950 CD-ROM information, Id: cdrom.c 3.20 2003/12/17
4951
4952 drive name: hda
4953 drive speed: 0
4954 drive # of slots: 1
4955 Can close tray: 1
4956 Can open tray: 1
4957 Can lock tray: 1
4958 Can change speed: 1
4959 Can select disk: 0
4960 Can read multisession: 1
4961 Can read MCN: 1
4962 Reports media changed: 1
4963 Can play audio: 1
4964 Can write CD-R: 1
4965 Can write CD-RW: 1
4966 Can read DVD: 1
4967 Can write DVD-R: 0
4968 Can write DVD-RAM: 0
4969 Can read MRW: 1
4970 Can write MRW: 1
4971 Can write RAM: 0
4972
4973 Which tells me that I only have an IDE CD-ROM, (hda), which is actually
4974 a CD writer.
4975
4976 Then I connect my USB stick, and I get:
4977
4978 # cat /proc/partitions
4979 major minor #blocks name
4980
4981 8 0 156290904 sda
4982 8 1 64228 sda1
4983 8 2 15735667 sda2
4984 8 3 15735667 sda3
4985 8 4 124744725 sda4
4986 8 16 1007615 sdb
4987 8 20 1006576 sdb4
4988
4989 Although it's the same stick I used with the previous system, which was
4990 recognized as sda there, now its name is sdb. So, its name depends on the
4991 system it is connected to, and will not always be the same.
4992
4993 SCSI disks when there are none!!!
4994 ****************************************
4995 I am confused!!! I am on a disk with two ATA (PATA) disks, but when I
4996 query the partition list, this is what I get:
4997
4998 # cat /proc/partitions
4999 major minor #blocks name
5000
5001 3 0 312571224 sda
5002 3 1 23446836 sda1
5003 3 2 40957717 sda2
5004 3 3 245240257 sda3
5005 3 4 2923830 sda4
5006 3 64 244198584 sdb
5007 3 65 41945683 sdb1
5008 3 66 2104515 sdb2
5009 3 67 1 sdb3
5010 3 68 125909437 sdb4
5011 3 69 74236333 sdb5
5012
5013 According to what's discussed up to now, the system seems to have two SCSI
5014 disks, but I know it actually has two ATA (PATA) disks. What's going on?.
5015
5016 What is really happening here is that you have one of the newest Linux
5017 kernels (using the libata disk driver), which shows ALL disks as SCSI. That
5018 does not mean that the system thinks it has SCSI disks, it just names them
5019 as such.
5020
5021 To make is clear, execute the commands:
5022
5023 # hdparm -i /dev/sda
5024
5025 /dev/sda:
5026
5027 Model=WDC WD3200AAJB-00TYA0, FwRev=00.02C01, SerialNo= WD-WCAPZ0648927
5028 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
5029 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
5030 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
5031 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
5032 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
5033 PIO modes: pio0 pio3 pio4
5034 DMA modes: mdma0 mdma1 mdma2
5035 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
5036 AdvancedPM=no WriteCache=enabled
5037 Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6,7
5038
5039 * signifies the current active mode
5040
5041 # hdparm -i /dev/sdb
5042
5043 /dev/sdb:
5044
5045 Model=WDC WD2500JB-00GVC0, FwRev=08.02D08, SerialNo= WD-WCAL76141931
5046 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
5047 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74
5048 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
5049 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
5050 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
5051 PIO modes: pio0 pio1 pio2 pio3 pio4
5052 DMA modes: mdma0 mdma1 mdma2
5053 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
5054 AdvancedPM=no WriteCache=enabled
5055 Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6
5056
5057 * signifies the current active mode
5058
5059 This is also valid for the CDs/DVDs of the system:
5060
5061 # cat /proc/sys/dev/cdrom/info
5062 CD-ROM information, Id: cdrom.c 3.20 2003/12/17
5063
5064 drive name: sr1 sr0
5065 drive speed: 0 126
5066 drive # of slots: 1 1
5067 Can close tray: 1 1
5068 Can open tray: 1 1
5069 Can lock tray: 1 1
5070 Can change speed: 1 1
5071 Can select disk: 0 0
5072 Can read multisession: 1 1
5073 Can read MCN: 1 1
5074 Reports media changed: 1 1
5075 Can play audio: 1 1
5076 Can write CD-R: 0 1
5077 Can write CD-RW: 0 1
5078 Can read DVD: 1 1
5079 Can write DVD-R: 0 1
5080 Can write DVD-RAM: 0 1
5081 Can read MRW: 1 0
5082 Can write MRW: 1 0
5083 Can write RAM: 0 1
5084
5085 While the hdparm shows they are ATA devices:
5086
5087 # hdparm -i /dev/sr0
5088
5089 /dev/sr0:
5090
5091 Model=HL-DT-ST DVDRAM GSA-H42L, FwRev=SL01 , SerialNo=K286CQF2231
5092 Config={ Fixed Removeable DTR10Mbs nonMagnetic }
5093 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
5094 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
5095 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
5096 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
5097 PIO modes: pio0 pio3 pio4
5098 DMA modes: mdma0 mdma1 mdma2
5099 UDMA modes: udma0 udma1 *udma2 udma3 udma4
5100 AdvancedPM=no
5101 Drive conforms to: unknown: ATA/ATAPI-4,5,6,7
5102
5103 * signifies the current active mode
5104
5105
5106
5107

Properties

Name Value
svn:executable *

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26