1 |
|
2 |
Clonezilla-SysRescCD - Installing on USB - 08/02/2009 - v 3.1.0 |
3 |
|
4 |
|
5 |
|
6 |
Intro |
7 |
------------------------------------------------------------------------------ |
8 |
Until recently installing Clonezilla-SysRescCD on a USB disk would not |
9 |
be such a great idea, because of its size. But since USB devices become |
10 |
cheaper and cheaper, it is an interesting alternative. |
11 |
|
12 |
In order to install it to a USB disk, you will use the Clonezilla-SysRescCD |
13 |
ISO file (or CD). You will copy and modify a couple of files on the USB |
14 |
disk, and finally make it bootable, using syslinux and its configuration |
15 |
file syslinux.cfg. |
16 |
|
17 |
Incorrect use of syslinux could cause your operating system (GNU/Linux / |
18 |
Windows) not to boot. Confirm the command before you run it. |
19 |
|
20 |
The only thing that's important is that your USB disk must contain a VFAT |
21 |
(Windows 98 or DOS) file system. If this is not the case, refer to the |
22 |
section "Troubleshooting", to find out how you can format it, before |
23 |
copying files to it. |
24 |
|
25 |
The bootable USB disk creation procedure can be performed either from |
26 |
Linux or Windows. |
27 |
|
28 |
If you want to create a bootable USB flash drive for this version |
29 |
or later, remember to use the syslinux command from syslinux |
30 |
3.71 or later. Otherwise the boot menu won't work. |
31 |
|
32 |
Installation from Linux |
33 |
------------------------------------------------------------------------------ |
34 |
There are two ways you can proceed, if you are going to use Linux to |
35 |
perform the USB installation, either using a running linux box, or using |
36 |
Clonezilla-SysRescCD. |
37 |
|
38 |
I will assume that you have saved clonezilla-sysresccd-full-mod-3.1.0.iso |
39 |
in your home directory (~). |
40 |
|
41 |
Using a linux box |
42 |
--------------------- |
43 |
If you already have a linux box up and running, you can use it to create |
44 |
your Clonezilla-SysRescCD USB, without even having to burn it to CD |
45 |
beforehand. The only thing here is that you have to have syslinux installed. |
46 |
|
47 |
I will assume that your CD drive is /dev/sr0 and that your USB device |
48 |
is /dev/sdc4. You may have to change any of them to reflect your system |
49 |
configuration. |
50 |
|
51 |
Boot into linux, connect your USB device and execute the following commands: |
52 |
mkdir /mnt/mycd |
53 |
mount ~/clonezilla-sysresccd-full-mod-3.1.0.iso /mnt/mycd -o loop |
54 |
mkdir /mnt/usbdevice |
55 |
mount /dev/sdc4 /mnt/usbdevice |
56 |
cp -r /mnt/mycd/* /mnt/usbdevice |
57 |
umount /mnt/mycd; rmdir /mnt/mycd |
58 |
cd /mnt/usbdevice |
59 |
rm isolinux/*.cfg |
60 |
mv isolinux/* . |
61 |
rmdir isolinux |
62 |
cd; umount /dev/sdc4 |
63 |
rmdir /mnt/usbdevice |
64 |
|
65 |
Finally make your USB device bootable, by executing |
66 |
syslinux /dev/sdc4 |
67 |
and you are done. |
68 |
|
69 |
Using Clonezilla-SysRescCD |
70 |
--------------------- |
71 |
If you already burnt Clonezilla-SysRescCD to CD, you can use it to create |
72 |
your Clonezilla-SysRescCD USB. |
73 |
|
74 |
I will assume that your CD drive is /dev/sr0 and that your USB device |
75 |
is /dev/sdc4. You may have to change any of them to reflect your system |
76 |
configuration. |
77 |
|
78 |
Boot SystemRescueCD using the option To RAM, and when it is fully loaded, |
79 |
execute the following commands: |
80 |
mkdir /mnt/mycd |
81 |
mount /dev/sr0 /mnt/mycd |
82 |
mkdir /mnt/usbdevice |
83 |
mount /dev/sdc4 /mnt/usbdevice |
84 |
cp -r /mnt/mycd/* /mnt/usbdevice |
85 |
umount /mnt/mycd |
86 |
cd /mnt/usbdevice |
87 |
rm isolinux/*.cfg |
88 |
mv isolinux/* . |
89 |
rmdir isolinux |
90 |
cd; umount /dev/sdc4 |
91 |
|
92 |
Finally make your USB device bootable, by executing |
93 |
syslinux /dev/sdc4 |
94 |
and you are done. |
95 |
|
96 |
Installation from Windows |
97 |
------------------------------------------------------------------------------ |
98 |
Installing Clonezilla-SysRescCD from Windows is as easy as it is in |
99 |
Linux. You have to burn Clonezilla-SysRescCD to CD or use a CD/DVD ROM |
100 |
emulator software like Daemon Tools to mount the ISO file. |
101 |
|
102 |
I will assume that your USB device is drive K:\ and your CD drive or |
103 |
mounted ISO file is drive |
104 |
D:\. You may have to change any of them, in order to reflect your system |
105 |
configuration. |
106 |
|
107 |
You will have to |
108 |
|
109 |
* Copy all files from drive D:\ (CD or mounted ISO file) to drive K:\ |
110 |
(USB disk) |
111 |
* Delete all cfg files from K:\isolinux |
112 |
* Move all files from K:\isolinux to K:\ |
113 |
* Delete folder K:\isolinux |
114 |
|
115 |
Now all you have to do is make your USB disk bootable. In order to do |
116 |
that you have to open a DOS window (in Windows XP press "Start / Run " |
117 |
and type cmd). Then type at DOS prompt: |
118 |
K: |
119 |
cd bootprog |
120 |
syslinux -ma K: |
121 |
|
122 |
Booting from USB |
123 |
------------------------------------------------------------------------------ |
124 |
Before trying to boot from your USB device, you have to set your boot device |
125 |
at your BIOS. This means you have to reboot having your USB device connected, |
126 |
get into your BIOS (usually pressing DEL) and make the appropriate settings |
127 |
in the BOOT section. |
128 |
|
129 |
Booting Clonezilla Live should not be a problem. Just select the desired |
130 |
option and press ENTER to boot. |
131 |
|
132 |
Booting SystemRescueCD has been made equally simple with SystemRescueCD |
133 |
v 1.0.0, so you shouldn't have any problem (option cdroot is not required |
134 |
any more). |
135 |
|
136 |
If you have any problems here, you may try adding any of these boot |
137 |
parameters: |
138 |
usbstick |
139 |
doscsi |
140 |
|
141 |
Troubleshooting |
142 |
------------------------------------------------------------------------------ |
143 |
Whether you can successfully boot from a USB disk or not, depends mainly on |
144 |
your BIOS. Chances are that you will not be able to boot on an old computer, |
145 |
with an old (and possibly buggy) BIOS. So I would recommend testing your |
146 |
Clonezilla-SysRescCD USB on a new computer. |
147 |
|
148 |
* I can't boot (I don't even see the splash screen) |
149 |
or Clonezilla Live does not boot |
150 |
|
151 |
The first thing you should do is double check your BIOS settings. Reboot |
152 |
having your USB device connected, get into your BIOS (usually pressing DEL) |
153 |
and make the appropriate settings in the BOOT section. |
154 |
|
155 |
If you are on linux, check that the partition on the USB disk is active |
156 |
(bootable), executing: |
157 |
fdisk -l /dev/sdc |
158 |
You should get something similar to this: |
159 |
|
160 |
Disk /dev/sdc: 1031 MB, 1031798272 bytes |
161 |
64 heads, 32 sectors/track, 983 cylinders |
162 |
Units = cylinders of 2048 * 512 = 1048576 bytes |
163 |
|
164 |
Device Boot Start End Blocks Id System |
165 |
/dev/sdc4 * 1 983 1006576 6 FAT16 |
166 |
|
167 |
If the partition is not active (no astrisk), execute: |
168 |
fdisk /dev/sdc |
169 |
and issue "Command: " a (toggle a bootable flag) and "Partition number:" |
170 |
4 (for /dev/sdc4). |
171 |
|
172 |
If you are on Windows, this is taken care of by syslinux (parameters -ma). |
173 |
|
174 |
If you still have problems booting, you should try to execute |
175 |
syslinux -s /dev/sdc4 |
176 |
from Linux, or |
177 |
syslinux -sma K: |
178 |
from Windows (from folder K:\syslinux). |
179 |
|
180 |
syslinux man page reads: |
181 |
|
182 |
(Option) -s |
183 |
Install a "safe, slow and stupid" version of syslinux. This version may work |
184 |
on some very buggy BIOSes on which syslinux would otherwise fail. If you find |
185 |
a machine on which the -s option is required to make it boot reliably, please |
186 |
send as much info about your machine as you can, and include the failure |
187 |
mode. |
188 |
|
189 |
* I still can't boot |
190 |
In this case you will have to format your USB disk. |
191 |
|
192 |
If you are using linux to perform the installation, execute the command: |
193 |
mkdosfs -F 16 /dev/sdc4 |
194 |
to create a FAT16 file system, or |
195 |
mkdosfs -F 32 /dev/sdc4 |
196 |
to create a FAT32 file system. |
197 |
|
198 |
When you are done go back to section "Installation from Linux". |
199 |
|
200 |
If you are on Windows, you should download the HP-USB Format tool, install |
201 |
it and format your USB drive using the Fat or Fat32 option. This program |
202 |
can be used to format USB devices that won't boot properly when formatted |
203 |
with Windows format tool. |
204 |
|
205 |
When you are done go back to section "Installation from Windows". |
206 |
|
207 |
* I still can't boot (after formating) |
208 |
Things are getting tough!!! Try to format your USB disk using the option you |
209 |
did not use previously. So, if you have created a FAT32 file system, create |
210 |
a FAT16 file system this time, and recreate Clonezilla-SysRescCD on USB. |
211 |
|
212 |
If nothing works, you are out of luck; you will not be able to use |
213 |
Clonezilla-SysRescCD USB on this computer... If you do manage to boot it, |
214 |
please send me a message. |
215 |
|
216 |
* SystemRescueCD does not boot |
217 |
Ok, you have managed to get to the splash screen and successfully booted |
218 |
Clonezilla Live. But you still can't boot SystemRescueCD. |
219 |
|
220 |
Refer to section Booting from USB to find out the boot parameters you can |
221 |
you with SystemRescueCD. |
222 |
|
223 |
Customizing sysresc.cfg |
224 |
------------------------------------------------------------------------------ |
225 |
As stated previously, Clonezilla-SysRescCD USB is booted by syslinux through |
226 |
its configuration file syslinux.cfg. This file loads sysresc.cfg in order |
227 |
to boot SystemRescueCD. |
228 |
|
229 |
If you have to specify any additional boot parameters for SystemRescueCD, |
230 |
you may want to write these changes to the configuration file, so that |
231 |
you don't have to insert them by hand every time. |
232 |
|
233 |
The procedure to do that is the following: |
234 |
|
235 |
Boot SystemRescueCD (or if that's not possible yet, bot Clonezilla Linux |
236 |
and get to the command line) using the option To RAM, and when it is fully |
237 |
loaded, execute the following commands: |
238 |
mkdir /mnt/usbdevice |
239 |
mount /dev/[device] /mnt/usbdevice |
240 |
cd /mnt/usbdevice |
241 |
cp sysresc.cfg sysresc.bak |
242 |
sed 's|scandelay=5|scandelay=x [additional params]|' \ |
243 |
sysresc.cfg > sys.cfg |
244 |
mv sys.cfg sysresc.cfg |
245 |
cd; umount /dev/[device] |
246 |
syslinux /dev/[device] |
247 |
reboot |
248 |
|
249 |
where x is a number from 1 to 10. |
250 |
|
251 |
After executing these commands, you will have a new sysresc.cfg file, |
252 |
and a backup file called sysresc.bak (in case things go wrong). |
253 |
|
254 |
If, for example, you want to increase the device scan delay to maximum, |
255 |
the above commands would become: |
256 |
mkdir /mnt/usbdevice |
257 |
mount /dev/sdc4 /mnt/usbdevice |
258 |
cd /mnt/usbdevice |
259 |
cp sysresc.cfg sysresc.bak |
260 |
sed 's|scandelay=5|scandelay=10|' sysresc.cfg > sys.cfg |
261 |
mv sys.cfg sysresc.cfg |
262 |
cd; umount /dev/sdc4 |
263 |
syslinux /dev/sdc4 |
264 |
reboot |
265 |
|
266 |
If, in addition to that, you had to use the boot parameter usbstick, |
267 |
then it would be: |
268 |
mkdir /mnt/usbdevice |
269 |
mount /dev/sdc4 /mnt/usbdevice |
270 |
cd /mnt/usbdevice |
271 |
cp sysresc.cfg sysresc.bak |
272 |
sed 's|scandelay=5|scandelay=10 usbstick|' sysresc.cfg > sys.cfg |
273 |
mv sys.cfg sysresc.cfg |
274 |
cd; umount /dev/sdc4 |
275 |
syslinux /dev/sdc4 |
276 |
reboot |
277 |
|
278 |
In case something goes wrong with your new settings, you can always rename |
279 |
sysresc.bak to sysresc.cfg, either from linux or Windows. |
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
Clonezilla-SysRescCD - Boot parameters - 08/02/2009 - v 3.1.0 |
286 |
|
287 |
|
288 |
|
289 |
Intro |
290 |
------------------------------------------------------------------------------ |
291 |
Booting a linux system means loading a kernel, which is actually the |
292 |
operating system. Well, this is not exactly true, and it is not the only |
293 |
thing that happens during boot up phase, but it is not my intension to |
294 |
explain it here. |
295 |
|
296 |
The kernel is loaded by Isolinux (the CD boot manager), which is able to pass |
297 |
a number of parameters to it, through its configuration file isolinux.cfg. |
298 |
|
299 |
These parameters, called boot parameters, are documented by the kernel |
300 |
itself, and can differentiate its behavior dramatically. In our case, |
301 |
each CD (SystemRescueCD and Clonezilla Live) accept a different set of |
302 |
parameters, because they are based on gentoo and debian, respectively. |
303 |
|
304 |
While in the splash screen of Clonezilla-SysRescCD, you can edit the boot |
305 |
parameters by pressing TAB. They will be presented to you, and you can |
306 |
add or remove what you want. You must be careful not to change or remove |
307 |
the parameters that are dedicated to the CD itself, as altering them will |
308 |
certainty make it unbootable. When you are done, just press ENTER to boot. |
309 |
|
310 |
SystemRescueCD boot parameters |
311 |
------------------------------------------------------------------------------ |
312 |
|
313 |
The following info applies to SystemRescueCD v. 1.3.3. In case |
314 |
you need to get info for a more recent version of SystemRescueCD |
315 |
please see the page "Sysresccd-manual-en Booting the CD-ROM" |
316 |
|
317 |
A typical sysresccd isolinux entry is: |
318 |
|
319 |
kernel rescuecd |
320 |
append initrd=initram.igz video=ofonly |
321 |
|
322 |
The kernel used is rescuecd, and anything after the word append is a |
323 |
boot parameter. |
324 |
|
325 |
Available kernels (boot images): |
326 |
|
327 |
* rescuecd This is the default choice for 32bits systems, with Framebuffer |
328 |
disabled, best choice. |
329 |
* altker32 This is an alternative kernel for 32bits systems. Boot with |
330 |
this kernel in case you have problems with rescuecd. altker32 was named |
331 |
vmlinuz2 in versions prior to SystemRescueCd-1.0.0. |
332 |
* rescue64 This is the default 64 bits kernel. Use it if you want to chroot |
333 |
to a 64bits linux system installed on your hard disk, or if you have to run |
334 |
64 bits programs. This kernel is able to boot SystemRescueCd from the cdrom |
335 |
with 32bits programs, and it required a processor with 64bits instructions |
336 |
(amd64 / em64t). |
337 |
* altker64 This is an alternative kernel for 64bits systems. Boot with |
338 |
this kernel in case you have problems with rescue64. Only available from |
339 |
SystemRescueCd-1.0.0 and newer. |
340 |
|
341 |
The boot parameters you can use are: |
342 |
|
343 |
General boot options |
344 |
|
345 |
* setkmap=xx: if you don't want to be asked for the keymap, you can |
346 |
choose which keymap to load automatically. Replace xx with your keymap |
347 |
(for example: setkmap=de for german keyboards) |
348 |
* docache: this option is very useful if you need to insert another disc |
349 |
in the CD drive after booting. The CD-ROM will be fully loaded into memory, |
350 |
and you will be able to remove the disc from the drive. The docache option |
351 |
requires 400MB of memory if you want to cache everything (including the |
352 |
bootdisks and isolinux directories). You can add the lowmem option if you |
353 |
have less that 400MB of memory of to prevent these directories to be copied |
354 |
into memory. |
355 |
* root=xxx: the root=<device> option lets you boot an existing |
356 |
linux system. For example, if you have a linux gentoo installed on |
357 |
/dev/sda6, you can type rescuecd root=/dev/sda6 and Gentoo Linux will |
358 |
be started instead of the system that is on the CD-ROM. Keep in mind |
359 |
that you must use a 64bits kernel if your system is made of 64bits |
360 |
programs. For instance, you can boot a 64bits linux system installed |
361 |
on /dev/sda6 with rescue64 root=/dev/sda6. From SystemRescueCd-1.0.4, |
362 |
this option works with LVM disks, so you can write something like rescuecd |
363 |
root=/dev/VolGroup00/LogVol00. SystemRescueCd-1.0.4 and newer versions also |
364 |
supports root=auto, that will scan all the block devices of the computer |
365 |
to find a linux system. The first linux system found on the disks will |
366 |
be started. So with root=auto let you start the system installed from the |
367 |
CD-ROM in case you have problem with your boot loader or with your kernel |
368 |
for instance. You can have more details about that option. |
369 |
* initscript=service:action: This options allows you to automatically |
370 |
start/stop a service at boot time. For instance if you need the |
371 |
samba service to be started, you can boot with the following option: |
372 |
initscript=samba:start. This does the same thing as /etc/init.d/samba |
373 |
start. You can use this option several times with different services. All |
374 |
the action that are supported by an initscript can be used. This option |
375 |
is available with SystemRescueCd-1.0.2 and newer. |
376 |
* backstore=xxx: SystemRescueCd-1.1.x comes with support for the |
377 |
backing-stores. Basically, a backing-store is a loopback filesystem |
378 |
which saves all the changes you can make in SystemRescueCd when you use |
379 |
it. In other words it allows you to save all the files which changes in |
380 |
SystemRescueCd while you use it, so that you keep these changes the next time |
381 |
you boot it. By default, sysresccd automatically scan all your removable |
382 |
devices (eg: usb sticks) at boot time and uses the first backing-store it |
383 |
finds if there is one. A backing-store is not mandatory and it the scan fails |
384 |
it will just store the files which change in memory. To disable the disks |
385 |
scan at boot time you can specify backstore=off on the boot command line. If |
386 |
you want to save your backing-store file on an harddisk, you will have to |
387 |
boot with backstore=alldev so that it scans all devices not just removable |
388 |
devices. The default place for backing-stores file is any file named |
389 |
sysrcd.bs located at the root of a disk which is often an USB key. You can |
390 |
change the path by using an option such as backstore=/sysrcd/mybackstore.bs |
391 |
and then sysresccd will try to find a file named mybackstore.bs located |
392 |
in /sysrcd in any block-device (partition, USB-stick, ...). You can find |
393 |
more information about on the page about backing-stores. |
394 |
|
395 |
Hardware, drivers and troubleshooting options |
396 |
|
397 |
* nonet: this will disable the network auto detection at startup |
398 |
* scandelay=x: pauses x seconds during the startup to allow slow devices |
399 |
to initialize. This is required when you boot an usb device. A delay of |
400 |
only few seconds should be enough. |
401 |
* doxdetect: Since version 0.3.5 the auto-configuration is done in X.Org |
402 |
itself, and then mkxf86config is disabled by default. This option forces |
403 |
the system to run the mkxf86config startup script to run the hardware |
404 |
auto-detection from this script. Use this option if you have problems with |
405 |
the graphical environment configuration. This option replaces the option |
406 |
noxdetect that was useful in previous versions. |
407 |
* nodetect: prevents the generic hardware auto-detection. Use this option |
408 |
if you have problems with the hardware auto-detection. |
409 |
* doload=xxx: forces to load one/several modules at startup (example: |
410 |
doload=3c59x) |
411 |
* noload=xxx: prevents the system to load one/several modules at startup |
412 |
(example: noload=3c59x). Use this option if you have a problem when the |
413 |
system loads a particular module at boot time. |
414 |
* dostartx: This option will force the system to load the X.Org graphical |
415 |
environment at boot time. You won't have to type startx by hand to get it. |
416 |
* forcevesa: Forces X.Org to work with the safe vesa driver instead of |
417 |
the best video driver detected for your video card. Use this option if |
418 |
you cannot get the graphical environment working with the default options. |
419 |
* forcevesa=xxx: The startx command will load the Xvesa server instead of |
420 |
Xorg, and Xvesa will use the screen resolution given as parameter (eg: |
421 |
1024x768, 1280x1024x32). The forcevesa option can take a parameter from |
422 |
SystemRescueCd-1.0.0 and more recent. |
423 |
* all-generic-ide: In case of problems related to your hard disk, try to |
424 |
enable this option (eg rescuecd all-generic-ide) |
425 |
* acpi-off / noapic / irqpool: use these options if you have any problem |
426 |
when the kernel boots: if it hangs on a driver or if it crashes, ... |
427 |
* dodebug: Enables verbose messages in the linuxrc script. |
428 |
* lowmem: Prevents non critical things to be loaded into memory (like the |
429 |
sshd and nfsd services) |
430 |
* skipmount=/dev/xxx: The system mounts all the storage devices at boot |
431 |
time to find the sysrcd.dat file. You may not want it to mount a device, |
432 |
for instance if your hard disk is broken because it would crash the |
433 |
system. You can just boot with skipmount=/dev/sda1 skipmount=/dev/sda2 if |
434 |
you want SystemRescueCd to ignore these two partitions. This boot option |
435 |
requires SystemRescueCd-1.0.1 or more recent. |
436 |
* nodmraid: Disable dmraid, which is the program that drives RAID disks |
437 |
based on cheap RAID controller built-in motherboards. |
438 |
* nomdadm: Disable mdadm, which is the program that drives software RAID. |
439 |
|
440 |
Network auto-configuration and remote access |
441 |
|
442 |
* dodhcp: Use dodhcp if you have a DHCP server on your network and you |
443 |
want the system to get a dynamic IP address at boot time. |
444 |
* ethx=ipaddr/cidr: Sets the static IP address of all the ethernet interfaces |
445 |
found on the system. The /cidr extension is optional. For instance, if |
446 |
you use option ethx=192.168.0.1 on a machine with two ethernet adapters, |
447 |
both eth0 and eth1 will be configured with 192.168.0.1. You can also write |
448 |
something like ethx=10.0.0.1/24 (using the cidr notation) if you don't |
449 |
use the default netmask. |
450 |
* eth0=ipaddr/cidr: This option is similar to ethx=ipaddr/cidr but it |
451 |
configures only one interface at a time. Of course, you can use the |
452 |
eth0=ipaddr/cidr option it for all the ethernet interfaces, not just |
453 |
eth0. For instance if you want to configure the network on a server that |
454 |
has two interfaces, you can write something like this: eth0=192.168.10.1/24 |
455 |
eth1=192.168.20.1. This option requires SystemRescueCd-1.0.2 or newer. |
456 |
* dns=ipaddr: Sets the static IP address of the DNS nameserver you want |
457 |
to use to resolve the names. For instance dns=192.168.0.254 means that |
458 |
you want to use 192.168.0.254 as the DNS server. |
459 |
* gateway=ipaddr: Sets the static IP address of the default route on your |
460 |
network. For instance gateway=192.168.0.254 means that the computer can |
461 |
connect to a computer outside of the local network via 192.168.0.254. |
462 |
* rootpass=123456: Sets the root password of the system running on the |
463 |
livecd to 1234. That way you can connect from the network and ssh on the |
464 |
livecd and give 123456 password as the root password. |
465 |
* vncserver=x:123456: The vncserver boot option has been introduced in |
466 |
SystemRescueCd-1.0.2. This options forces the system to configure the |
467 |
VNC-server and to start it automatically at boot time. You have to replace |
468 |
x with the number of displays you want, and 123456 with your password The |
469 |
password must be between 5 and 8 characters, else the boot option will be |
470 |
ignored. In other words the vncserver=2:MyPaSsWd option will give you access |
471 |
to two displays (display=1 on tcp/5901 and display=2 on tcp/5902). Display |
472 |
0 is reserved for X.Org since SystemRescueCd-1.1.0. |
473 |
* nameif=xxx: You can can specify what interface name to give to a |
474 |
particular interface using the mac address. You need SystemRescueCd-1.1.0 |
475 |
or newer to do that. Here is how you can specify which interface |
476 |
is using which mac address on a machine with two network interfaces: |
477 |
nameif=eth0!00:0C:29:57:D0:6E,eth1!00:0C:29:57:D0:64. Be careful, you have |
478 |
to respect the separator (comma between the interfaces and exclamation |
479 |
marks between the name and the mac address). |
480 |
|
481 |
Options provided by the autorun |
482 |
|
483 |
* ar_source=xxx: place where the autorun are stored. It may |
484 |
be the root directory of a partition (/dev/sda1), an nfs |
485 |
share (nfs://192.168.1.1:/path/to/scripts), a samba share |
486 |
(smb://192.168.1.1/path/to/scripts), or an http directory |
487 |
(http://192.168.1.1/path/to/scripts). |
488 |
* autoruns=[0-9]: comma separated list of the autorun script that have to |
489 |
be run. For instance if you use autoruns=0,2,7 then the following autorun |
490 |
scripts will be executed: autorun0, autorun2, autorun7. Use autoruns=no |
491 |
to disable all the autorun scripts with a number. |
492 |
* ar_ignorefail: continue to execute the scripts chain even if a script |
493 |
failed (returned a non-zero status) |
494 |
* ar_nodel: do not delete the temporary copy of the autorun scripts located |
495 |
in /var/autorun/tmp after execution |
496 |
* ar_disable: completely disable autorun, the simple autorun script will |
497 |
not be executed |
498 |
* ar_nowait: do not wait for a keypress after the autorun script have |
499 |
been executed. |
500 |
|
501 |
Clonezilla Live boot parameters |
502 |
------------------------------------------------------------------------------ |
503 |
|
504 |
The following info applies to Clonezilla Live v. 1.2.2-31 |
505 |
In case you need to get info for a more recent version of Clonezilla Live |
506 |
please see the page "The boot parameters for Clonezilla live" |
507 |
|
508 |
A typical Clonezilla Live isolinux entry is: |
509 |
|
510 |
kernel /live/vmlinuz1 |
511 |
append initrd=/live/initrd1.img boot=live union=aufs |
512 |
ocs_live_run="ocs-live-general" |
513 |
ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" |
514 |
vga=791 nolocales |
515 |
|
516 |
The kernel used is vmlinuz, and anything after the word append is a boot |
517 |
parameter. |
518 |
|
519 |
The following info comes from the page titled The boot parameters for |
520 |
Clonezilla live. |
521 |
|
522 |
Clonezilla live is based on Debian live with clonezilla installed. Therefore |
523 |
there are 2 kinds of boot parameters: |
524 |
|
525 |
* Boot parameters from live-initramfs. You can refer to this manual of |
526 |
live-initramfs. |
527 |
* Boot parameters specially for Clonezilla. All of them are named as |
528 |
"ocs_*", e.g. ocs_live_run, ocs_live_extra_param, ocs_live_batch, ocs_lang. |
529 |
|
530 |
* ocs_live_run is the main program to run in Clonezilla live to save |
531 |
or restore. or other command. Available program: ocs-live-general, |
532 |
ocs-live-restore or any command you write. Use the Absolute path in |
533 |
Clonezilla live. |
534 |
e.g. ocs_live_run="ocs-live-general" |
535 |
* ocs_live_extra_param will be used only when ocs_live_run=ocs-live-restore |
536 |
(not for ocs-live-general or any other), then it will be passed to |
537 |
ocs-sr. Therefore these parameters are actually those of ocs-sr. |
538 |
e.g. ocs_live_extra_param="-b -c restoredisk sarge-r5 hda" |
539 |
* ocs_live_keymap is for keymap used in Clonezilla live. Man install-keymap |
540 |
for more details. |
541 |
e.g. ocs_live_keymap="NONE" (won't change the default layout) |
542 |
ocs_live_keymap="/usr/share/keymaps/i386/azerty/fr-latin9.kmap.gz" |
543 |
(French keyboard) |
544 |
* batch mode or not (yes/no), if no, will run interactively. |
545 |
e.g. ocs_live_batch="no" |
546 |
* ocs_lang is the language used in Clonezilla live. Available value: |
547 |
en_US.UTF-8, zh_TW.UTF-8... (see $DRBL_SCRIPT_PATH/lang/bash/) |
548 |
e.g. ocs_lang="en_US.UTF-8" |
549 |
* ocs_debug (or ocs-debug) is for you to enter command line prompt before |
550 |
any clonezilla-related action is run. This is easier for you to debug. |
551 |
* ocs_daemonon, ocs_daemonoff, ocs_numlk, ocs_capslk. |
552 |
Ex. for the first 2 parameters, ocs_daemonon="ssh", then ssh service will |
553 |
be turned on when booting. For the last 2 parameters, use "on" or "off", |
554 |
e.g. ocs_numlk=on to turn on numberlock when booting. |
555 |
* ocs_prerun, ocs_prerun1, ocs_prerun2... is for you to run a shell script |
556 |
before Clonezilla is started. E.g. ocs_prerun="/live/image/myscript.sh". If |
557 |
you have more commands to run, you can assign them in the order: |
558 |
ocs_prerun=..., ocs_prerun1=..., ocs_prerun2=.... If more than 10 |
559 |
parameters, remember to use ocs_prerun01, ocs_prerun02..., ocs_prerun11 |
560 |
to make it in order. |
561 |
* Besides, "live-netdev" (yes, not ocs_live_netdev) can be used when |
562 |
using PXE booting, you can force to assign the network device to get |
563 |
filesystem.squashfs. This is useful when there are two or more NICs are |
564 |
linked. E.g. live-netdev="eth1" allows you to force the live-initramfs |
565 |
to use eth1 to fetch the root file system filesystem.squashfs. |
566 |
|
567 |
With the above options, we have the following examples: |
568 |
|
569 |
* A PXE config example for you to boot Clonezilla live via PXE, and ssh |
570 |
service is on, the password of account "user" is assigned: |
571 |
---------------------------------------- |
572 |
label Clonezilla Live |
573 |
MENU LABEL Clonezilla Live |
574 |
MENU DEFAULT |
575 |
kernel vmlinuz1 |
576 |
append initrd=initrd1.img boot=live union=aufs noswap noprompt vga=788 |
577 |
fetch=tftp://192.168.120.254/filesystem.squashfs usercrypted=bkuQxLqLRuDW6 |
578 |
ocs_numlk="on" ocs_daemonon="ssh" |
579 |
---------------------------------------- |
580 |
|
581 |
The usercrypted password is created by: |
582 |
echo YOUR_PASSWORD | mkpasswd -s |
583 |
("mkpasswd" is from package "whois" in Debian or Ubuntu. Check your |
584 |
GNU/Linux to see which package provides this command if you are not using |
585 |
Debian or Ubuntu. Replace YOUR_PASSWORD with your plain text password, |
586 |
and remember do not put any " in the boot parameters of live-initramfs |
587 |
(while it's ok for those ocs_* boot parameters), i.e. do NOT use something |
588 |
like usercrypted="bkuQxLqLRuDW6"). |
589 |
//NOTE// If you do not assign salt to mkpasswd, the encrypted password |
590 |
will not be the same every time you create it. |
591 |
For more about usercrypted discussion, please check the here. |
592 |
|
593 |
* How to put your own binary driver in Clonezilla live without modifying |
594 |
/live/filesystem.squashfs: |
595 |
|
596 |
* Boot clonezilla live |
597 |
* Become root by running "sudo su -" |
598 |
* Copy the dir lsi, which contains a precompiled kernel module matching |
599 |
the running kernel in Clonezilla live and a script to run it, to a working |
600 |
dir, e.g.: |
601 |
cp -r /live/image/lsi /home/partimag |
602 |
* cd /home/partimag |
603 |
* /opt/drbl/sbin/ocs-live-dev -c -s -i lsi -u lsi -x |
604 |
"ocs_prerun=/live/image/lsi/prep-lsi.sh" |
605 |
* /opt/drbl/sbin/ocs-iso -s -i lsi -u lsi -x |
606 |
"ocs_prerun=/live/image/lsi/prep-lsi.sh" |
607 |
* ///NOTE/// In this example, the 2 files in dir lsi are: megasr.ko (the |
608 |
binary driver) and prep-lsi.sh. The contents of prep-lsi.sh: |
609 |
|
610 |
------------------------ |
611 |
#!/bin/bash |
612 |
cp -f /live/image/lsi/megasr.ko /lib/modules/`uname -r`/kernel/drivers/block/ |
613 |
chown root.root /lib/modules/`uname -r`/kernel/drivers/block/megasr.ko |
614 |
depmod -a modprobe megasr |
615 |
sleep 1 |
616 |
------------------------ |
617 |
|
618 |
* To put your customized script with a PXE version of Clonezilla live |
619 |
(You have to use Clonezilla live version 1.2.2-2 or later): |
620 |
In this example, we assume (1) The IP address of your PXE server is |
621 |
192.168.120.254, (2) the customized script (custom-ocs-2) is put on |
622 |
your PXE server's tftpd root dir (E.g. On DRBL server, the path is |
623 |
/tftpboot/nbi_img/. It might be different in your case if you are not use |
624 |
DRBL server as a PXE server). |
625 |
Therefor your pxelinux.cfg/default file is like: |
626 |
------------------------ |
627 |
label Clonezilla Live |
628 |
MENU DEFAULT |
629 |
# MENU HIDE |
630 |
MENU LABEL Clonezilla Live |
631 |
# MENU PASSWD |
632 |
kernel vmlinuz1 |
633 |
append initrd=initrd1.img boot=live union=aufs noswap noprompt vga=788 |
634 |
ip=frommedia fetch=tftp://192.168.120.254/filesystem.squashfs |
635 |
ocs_prerun="busybox tftp -g -b 10240 -r custom-ocs-2 -l |
636 |
/tmp/custom-ocs-2 192.168.120.254" ocs_live_run="bash /tmp/custom-ocs-2" |
637 |
ocs_live_keymap="NONE" ocs_live_batch="no" ocs_lang="en_US.UTF-8" nolocales |
638 |
TEXT HELP |
639 |
Boot Clonezilla live via network |
640 |
ENDTEXT |
641 |
------------------------ |
642 |
The content of custom-ocs-2 can be like: |
643 |
|
644 |
------------------------ |
645 |
#!/bin/bash |
646 |
. /opt/drbl/sbin/drbl-conf-functions |
647 |
. /opt/drbl/sbin/ocs-functions |
648 |
. /etc/ocs/ocs-live.conf |
649 |
|
650 |
# Load language file |
651 |
ask_and_load_lang_set en_US.UTF-8 |
652 |
|
653 |
# 1. Mount the clonezilla image home. |
654 |
# Types: local_dev, ssh_server, samba_server, nfs_server |
655 |
prep-ocsroot -t nfs_server |
656 |
|
657 |
# 2. Restore the image |
658 |
if mountpoint /home/partimag/ &>/dev/null; then |
659 |
ocs-sr -l en_US.UTF-8 -c -p choose restoredisk ask_user ask_user |
660 |
else |
661 |
[ "$BOOTUP" = "color" ] & $SETCOLOR_FAILURE |
662 |
echo "Fail to find the Clonezilla image home /home/partimag!" |
663 |
echo "Program terminated!" |
664 |
[ "$BOOTUP" = "color" ] & $SETCOLOR_NORMAL |
665 |
fi |
666 |
------------------------ |
667 |
|
668 |
live-initramfs manual |
669 |
--------------------- |
670 |
|
671 |
This is the manual of live-initramfs |
672 |
|
673 |
live-initramfs(7) |
674 |
================= |
675 |
|
676 |
Name |
677 |
---- |
678 |
live-initramfs - Debian Live initramfs hook |
679 |
|
680 |
Synopsis |
681 |
-------- |
682 |
BOOT=live |
683 |
|
684 |
as kernel parameter at boot prompt. |
685 |
|
686 |
Description |
687 |
----------- |
688 |
|
689 |
live-initramfs is a hook for the initramfs-tools, used to generate |
690 |
a initramfs |
691 |
capable to boot live systems, such as those created by *live-helper*(7). |
692 |
This includes the Debian Live isos, netboot tarballs, and usb stick images. |
693 |
|
694 |
At boot time it will look for a (read-only) media containing a "/live" |
695 |
directory where a root filesystems (often a compressed filesystem image like |
696 |
squashfs) is stored. If found, it will create a writable environment, using |
697 |
aufs, for Debian like systems to boot from. |
698 |
|
699 |
You probably do not want to install this package onto a non-live system, |
700 |
although it will do no harm. |
701 |
|
702 |
live-initramfs is a fork of link:http://packages.ubuntu.com/casper/[casper]. |
703 |
casper was originally written by Tollef Fog Heen <tfheen@canonical.com> |
704 |
and Matt Zimmerman <mdz@canonical.com>. |
705 |
|
706 |
Boot options |
707 |
------------ |
708 |
|
709 |
Here is the complete list of recognized boot parameters by live-initramfs. |
710 |
|
711 |
access=*ACCESS*:: |
712 |
|
713 |
Set the accessibility level for physically or visually impared users. ACCESS |
714 |
must be one of v1, v2, v3, m1, or m2. v1=lesser visual impairment, |
715 |
v2=moderate |
716 |
visual impairment, v3=blindness, m1=minor motor difficulties, m2=moderate |
717 |
motor |
718 |
difficulties. |
719 |
|
720 |
console=*TTY,SPEED*:: |
721 |
|
722 |
Set the default console to be used with the "live-getty" option. Example: |
723 |
"console=ttyS0,115200" |
724 |
|
725 |
debug:: |
726 |
|
727 |
Makes initramfs boot process more verbose. |
728 |
|
729 |
fetch=*URL*:: |
730 |
|
731 |
Another form of netboot by downloading a squashfs image from a given url, |
732 |
copying to ram and booting it. |
733 |
|
734 |
hostname=*HOSTNAME*, username=*USER*, userfullname=*USERFULLNAME*:: |
735 |
|
736 |
Those parameters lets you override values read from the config file. |
737 |
|
738 |
ignore_uuid |
739 |
|
740 |
Do not check that any UUID embedded in the initramfs matches the discovered |
741 |
medium. live-initramfs may be told to generate a UUID by setting |
742 |
LIVE_GENERATE_UUID=1 when building the initramfs. |
743 |
|
744 |
integrity-check:: |
745 |
|
746 |
If specified, an MD5 sum is calculated on the live media during boot and |
747 |
compared to the value found in md5sum.txt found in the root directory of the |
748 |
live media. |
749 |
|
750 |
ip=**[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]:[DEVICE]:[AUTOCONF] |
751 |
[,[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]:[DEVICE]:[AUTOCONF]]***:: |
752 |
|
753 |
Let you specify the name(s) and the options of the interface(s) that |
754 |
should be |
755 |
configured at boot time. Do not specify this if you want to use dhcp |
756 |
(default). |
757 |
It will be changed in a future release to mimick official kernel boot param |
758 |
specification |
759 |
(e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp). |
760 |
|
761 |
ip[=**frommedia**]:: |
762 |
|
763 |
If this variable is set, dhcp and static configuration are just skipped |
764 |
and the |
765 |
system will use the (must be) media-preconfigured /etc/network/interfaces |
766 |
instead. |
767 |
|
768 |
{keyb|kbd-chooser/method}=**KEYBOARD**, |
769 |
{klayout|console-setup/layoutcode}=**LAYOUT**, |
770 |
{kvariant|console-setup/variantcode}=**VARIANT**, |
771 |
{kmodel|console-setup/modelcode}=**CODE**, koptions=**OPTIONS**:: |
772 |
|
773 |
Configure the running keyboard as specified, if this one misses |
774 |
live-initramfs |
775 |
behaves as if "keyb=us" was specified. It will be interfered from |
776 |
"locale=" if |
777 |
locale is only 2 lowecase letters as a special case. You could also specify |
778 |
console layout, variant, code, and options (no defaults). |
779 |
|
780 |
live-getty:: |
781 |
|
782 |
This changes the auto-login on virtual terminals to use the (experimental) |
783 |
live-getty code. With this option set the standard kernel argument |
784 |
"console=" is |
785 |
parsed and if a serial console is specified then live-getty is used to |
786 |
autologin |
787 |
on the serial console. |
788 |
|
789 |
{live-media|bootfrom}=**DEVICE**:: |
790 |
|
791 |
If you specify one of this two equivalent forms, live-initramfs will |
792 |
first try |
793 |
to find this device for the "/live" directory where the read-only root |
794 |
filesystem should reside. If it did not find something usable, the |
795 |
normal scan |
796 |
for block devices is performed. |
797 |
|
798 |
{live-media-encryption|encryption}=**TYPE**:: |
799 |
|
800 |
live-initramfs will mount the encrypted rootfs TYPE, asking the passphrase, |
801 |
useful to build paranoid live systems :-). TYPE supported so far are |
802 |
"aes" for |
803 |
loop-aes encryption type. |
804 |
|
805 |
live-media-offset=**BYTES**:: |
806 |
|
807 |
This way you could tell live-initramfs that your image starts at offset |
808 |
BYTES in |
809 |
the above specified or autodiscovered device, this could be useful to |
810 |
hide the |
811 |
Debian Live iso or image inside another iso or image, to create "clean" |
812 |
images. |
813 |
|
814 |
live-media-path=**PATH**:: |
815 |
|
816 |
Sets the path to the live filesystem on the medium. By default, it is set to |
817 |
'/live' and you should not change that unless you have customized your media |
818 |
accordingly. |
819 |
|
820 |
live-media-timeout=**SECONDS**:: |
821 |
|
822 |
Set the timeout in seconds for the device specified by "live-media=" |
823 |
to become |
824 |
ready before giving up. |
825 |
|
826 |
{locale|debian-installer/locale}=**LOCALE**:: |
827 |
|
828 |
Configure the running locale as specified, if not present the live-media |
829 |
rootfs |
830 |
configured locale will be used and if also this one misses live-initramfs |
831 |
behave |
832 |
as "locale=en_US.UTF-8" was specified. If only 2 lowercase letter are |
833 |
specified |
834 |
(like "it"), the "maybe wanted" locale is generated (like en:EN.UTF-8), |
835 |
in this |
836 |
case if also "keyb=" is unspecified is set with those 2 lowercase letters |
837 |
(keyb=us). Beside that facility, only UTF8 locales are supported by |
838 |
live-initramfs. |
839 |
|
840 |
module=**NAME**:: |
841 |
|
842 |
Instead of using the default optional file "filesystem.module" (see below) |
843 |
another file could be specified without the extension ".module"; it should be |
844 |
placed on "/live" directory of the live medium. |
845 |
|
846 |
netboot[=**nfs**|**cifs**]:: |
847 |
|
848 |
This tells live-initramfs to perform a network mount. The parameter |
849 |
"nfsroot=" |
850 |
(with optional "nfsopts="), should specify where is the location of the root |
851 |
filesystem. With no args, will try cifs first, and if it fails nfs. |
852 |
|
853 |
nfsopts=:: |
854 |
|
855 |
This lets you specify custom nfs options. |
856 |
|
857 |
noautologin:: |
858 |
|
859 |
This parameter disables the automatic terminal login only, not touching |
860 |
gdk/kdm. |
861 |
|
862 |
noxautologin:: |
863 |
|
864 |
This parameter disables the automatic login of gdm/kdm only, not touching |
865 |
terminals. |
866 |
|
867 |
nofastboot:: |
868 |
|
869 |
This parameter disables the default disabling of filesystem checks in |
870 |
/etc/fstab. If you have static filesystems on your harddisk and you want |
871 |
them to |
872 |
be checked at boot time, use this parameter, otherwise they are skipped. |
873 |
|
874 |
nopersistent:: |
875 |
|
876 |
disables the "persistent" feature, useful if the bootloader (like syslinux) |
877 |
has |
878 |
been installed with persistent enabled. |
879 |
|
880 |
noprompt |
881 |
|
882 |
Do not prompt to eject the CD on reboot. |
883 |
|
884 |
nosudo:: |
885 |
|
886 |
This parameter disables the automatic configuration of sudo. |
887 |
|
888 |
swapon:: |
889 |
|
890 |
This parameter enables usage of local swap partitions. |
891 |
|
892 |
nouser:: |
893 |
|
894 |
This parameter disables the creation of the default user completely. |
895 |
|
896 |
noxautoconfig:: |
897 |
|
898 |
This parameter disables Xorg auto-reconfiguration at boot time. This |
899 |
is valuable |
900 |
if you either do the detection on your own, or, if you want to ship a custom, |
901 |
premade xorg.conf in your live system. |
902 |
|
903 |
persistent[=nofiles]:: |
904 |
|
905 |
live-initramfs will look for persistent and snapshot partitions or files |
906 |
labeled |
907 |
"live-rw", "home-rw", and files called "live-sn*", "home-sn*" and will |
908 |
try to, |
909 |
in order: mount as /cow the first, mount the second in /home, and just |
910 |
copy the |
911 |
contents of the latter in appropriate locations (snapshots). Snapshots |
912 |
will be |
913 |
tried to be updated on reboot/shutdown. Look at live-snapshot(1) for more |
914 |
informations. If "nofiles" is specified, only filesystems with matching |
915 |
labels |
916 |
will be searched; no filesystems will be traversed looking for archives |
917 |
or image |
918 |
files. This results in shorter boot times. |
919 |
|
920 |
{preseed/file|file}=**FILE**:: |
921 |
|
922 |
A path to a file present on the rootfs could be used to preseed debconf |
923 |
database. |
924 |
|
925 |
package/question=**VALUE**:: |
926 |
|
927 |
All debian installed packages could be preseeded from command-line that way, |
928 |
beware of blanks spaces, they will interfere with parsing, use a preseed |
929 |
file in |
930 |
this case. |
931 |
|
932 |
quickreboot:: |
933 |
|
934 |
This option causes live-initramfs to reboot without attempting to eject the |
935 |
media and without asking the user to remove the boot media. |
936 |
|
937 |
showmounts:: |
938 |
|
939 |
This parameter will make live-initramfs to show on "/" the ro filesystems |
940 |
(mostly compressed) on "/live". This is not enabled by default because could |
941 |
lead to problems by applications like "mono" which store binary paths on |
942 |
installation. |
943 |
|
944 |
textonly |
945 |
|
946 |
Start up to text-mode shell prompts, disabling the graphical user interface. |
947 |
|
948 |
timezone=**TIMEZONE**:: |
949 |
|
950 |
By default, timezone is set to UTC. Using the timezone parameter, you can |
951 |
set it |
952 |
to your local zone, e.g. Europe/Zurich. |
953 |
|
954 |
todisk=**DEVICE**:: |
955 |
|
956 |
Adding this parameter, live-initramfs will try to copy the entire read-only |
957 |
media to the specified device before mounting the root filesystem. It |
958 |
probably |
959 |
needs a lot of free space. Subsequent boots should then skip this step |
960 |
and just |
961 |
specify the "live-media=DEVICE" boot parameter with the same DEVICE used this |
962 |
time. |
963 |
|
964 |
toram:: |
965 |
|
966 |
Adding this parameter, live-initramfs will try to copy the whole read-only |
967 |
media |
968 |
to the computer's RAM before mounting the root filesystem. This could need |
969 |
a lot |
970 |
of ram, according to the space used by the read-only media. |
971 |
|
972 |
union=**aufs**|**unionfs**:: |
973 |
|
974 |
By default, live-initramfs uses aufs. With this parameter, you can switch to |
975 |
unionfs. |
976 |
|
977 |
utc=**yes**|**no**:: |
978 |
|
979 |
By default, Debian systems do assume that the hardware clock is set to |
980 |
UTC. You |
981 |
can change or explicitly set it with this parameter. |
982 |
|
983 |
xdebconf:: |
984 |
|
985 |
Uses xdebconfigurator, if present on the rootfs, to configure X instead |
986 |
of the |
987 |
standard procedure (experimental). |
988 |
|
989 |
xvideomode=**RESOLUTION**:: |
990 |
|
991 |
Doesn't do xorg autodetection, but enforces a given resolution. |
992 |
|
993 |
Files |
994 |
----- |
995 |
|
996 |
/etc/live.conf |
997 |
|
998 |
Some variables can be configured via this config file (inside the live |
999 |
system). |
1000 |
|
1001 |
/live/filesystem.module |
1002 |
|
1003 |
This optional file (inside the live media) contains a list of white-space or |
1004 |
carriage-return-separated file names corresponding to disk images in the |
1005 |
"/live" |
1006 |
directory. If this file exists, only images listed here will be merged |
1007 |
into the |
1008 |
root aufs, and they will be loaded in the order listed here. The first entry |
1009 |
in this file will be the "lowest" point in the aufs, and the last file in |
1010 |
this list will be on the "top" of the aufs, directly below /cow. Without |
1011 |
this file, any images in the "/live" directory are loaded in alphanumeric |
1012 |
order. |
1013 |
|
1014 |
/etc/live-persistence.binds |
1015 |
|
1016 |
This optional file (which resides in the rootfs system, not in the live |
1017 |
media) |
1018 |
is used as a list of directories which not need be persistent: ie. their |
1019 |
content does not need to survive reboots when using the persistence features. |
1020 |
|
1021 |
This saves expensive writes and speeds up operations on volatile data such as |
1022 |
web caches and temporary files (like e.g. /tmp and .mozilla) which are |
1023 |
regenerated each time. This is achieved by bind mounting each listed |
1024 |
directory |
1025 |
with a tmpfs on the original path. |
1026 |
|
1027 |
See also |
1028 |
-------- |
1029 |
|
1030 |
live-snapshot(1), initramfs-tools(8), live-helper(7), live-initscripts(7), |
1031 |
live-webhelper(7) |
1032 |
|
1033 |
Bugs |
1034 |
---- |
1035 |
|
1036 |
Report bugs against live-initramfs |
1037 |
link:http://packages.qa.debian.org/live-initramfs[http://packages.qa.debian.org/live-initramfs]. |
1038 |
|
1039 |
Homepage |
1040 |
-------- |
1041 |
|
1042 |
More information about the Debian Live project can be found at |
1043 |
link:http://debian-live.alioth.debian.org/[http://debian-live.alioth.debian.org/] |
1044 |
and |
1045 |
link:http://wiki.debian.org/DebianLive/[http://wiki.debian.org/DebianLive/]. |
1046 |
|
1047 |
Authors |
1048 |
------- |
1049 |
|
1050 |
live-initramfs is maintained by Daniel Baumann <daniel@debian.org> |
1051 |
for the Debian project. |
1052 |
|
1053 |
live-initramfs is a fork of link:http://packages.ubuntu.com/casper/[casper]. |
1054 |
casper was originally written by Tollef Fog Heen <tfheen@canonical.com> |
1055 |
and Matt Zimmerman <mdz@canonical.com>. |
1056 |
|
1057 |
|
1058 |
|
1059 |
|
1060 |
|
1061 |
Clonezilla-SysRescCD - About Clonezilla Live - 08/02/2009 - v 3.1.0 |
1062 |
|
1063 |
|
1064 |
|
1065 |
Intro |
1066 |
------------------------------------------------------------------------------ |
1067 |
The DRBL-based PXEBoot Clonezilla is used to clone many computers |
1068 |
simultaneously. It is an extremely useful tool, however, it does have several |
1069 |
limitations. In order to use it, you must first prepare a DRBL server AND |
1070 |
the machine to be cloned must boot from a network (e.g. PXE/Etherboot). |
1071 |
|
1072 |
To address these limitations, the Free Software Lab at the NCHC has combined |
1073 |
Debian Live with Clonezilla to produce "Clonezilla Live", a new software |
1074 |
that can be used to easily clone individual machines. |
1075 |
|
1076 |
Clonezilla Live provides two modes of operation: |
1077 |
|
1078 |
* device-image |
1079 |
In this mode of operation, a disk/partition can be saved to an |
1080 |
image file. This image file can be used to restore the original |
1081 |
disk/partition. With Clonezilla-SysRescCD, it can also be used to create an |
1082 |
automated restore CD/DVD. This is the mode of operation we will discuss here. |
1083 |
|
1084 |
* device-device (cloning) |
1085 |
This mode of operation creates an exact copy of the original disk/partition |
1086 |
on the fly. |
1087 |
|
1088 |
When working in device-image mode, you will always have to specify three |
1089 |
things: |
1090 |
|
1091 |
* The location of the image file |
1092 |
* The working parameters for the operation |
1093 |
* The disk/partition that will be saved/restored |
1094 |
|
1095 |
Clonezilla Live provides a user friendly interface in order to insert |
1096 |
this data. |
1097 |
|
1098 |
When Clonezilla Live is booted up, either normally or copied to RAM, the |
1099 |
contents of the whole CD/DVD can be found in folder /live/image. This |
1100 |
is where you will find any extra files, such as the restorecd and the |
1101 |
doc folders. |
1102 |
|
1103 |
Starting and stopping Clonezilla Live |
1104 |
------------------------------------------------------------------------------ |
1105 |
When you boot into Clonezilla Live, the program (actually a script) starts |
1106 |
automatically. There are many places where you can stop it, by selecting |
1107 |
Cancel or answering N(o) to a question. When you do that you will probably |
1108 |
get the following: |
1109 |
Now you can choose to: |
1110 |
(0) Poweroff |
1111 |
(1) Reboot |
1112 |
(2) Enter command line prompt |
1113 |
(3) Start over |
1114 |
[2] |
1115 |
|
1116 |
Select Poweroff or Reboot, only if you haven't already mounted a disk |
1117 |
partition. I found out by experience, it is not always safe to let any live |
1118 |
CD automatically unmount my partitions. So if you have already specified |
1119 |
the image partition and/or the partition to save/restore, you should enter |
1120 |
command line prompt and type: |
1121 |
sudo su - |
1122 |
mount | grep /dev/[sh]d |
1123 |
and then unmount the partitions shown by the last command. So if the |
1124 |
results of this command is for example: |
1125 |
/dev/hda1 on /home/partimag type vfat (rw) |
1126 |
just type the command: |
1127 |
umount /dev/hda1 |
1128 |
and it's now safe to Poweroff of Reboot. |
1129 |
|
1130 |
If, on the other hand, you just want to restart the program, type: |
1131 |
ocs-live |
1132 |
|
1133 |
About the Image file |
1134 |
------------------------------------------------------------------------------ |
1135 |
One thing should be made clear about the image file: it is not a file, |
1136 |
it is a folder, containing the actual image file and some data about the |
1137 |
disk/partition it is associated with. So when you insert the image file name, |
1138 |
you actually insert the folder name where the image will be saved/restored. |
1139 |
|
1140 |
Before you are able to insert the image file name, a list of partitions |
1141 |
will be presented to you, so that you can choose where it should be |
1142 |
saved/found. When you select one of them, it will be mounted under |
1143 |
/home/partimag. |
1144 |
|
1145 |
This folder is very important for Clonezilla Live; the image file must be |
1146 |
located under this directory, which means that the image file must be on |
1147 |
the root directory of the mounted partition. So you can not, for example, |
1148 |
create a folder called all_my_images and move all your image files in there; |
1149 |
Clonezilla Live will not be able to find them!!! |
1150 |
|
1151 |
Another thing that should be pointed out is that only unmounted partitions |
1152 |
will be included in the above list. This means that if you have stopped |
1153 |
the program at some point after specifying the partition where the image |
1154 |
file resides, and it has been mounted, it will not be present in the list |
1155 |
the next time it is presented to you, and you will not be able to use it. |
1156 |
|
1157 |
There are two things you can do in this case; either unmount the partition, |
1158 |
as stated above, or select |
1159 |
skip Use existing /home/partimag |
1160 |
|
1161 |
instead of any other option, when you restart the program. The later of |
1162 |
course means that you still want to use the previously specified partition |
1163 |
as the image file location. |
1164 |
|
1165 |
Fianlly I should say that Clonezilla Live is able to use a remote |
1166 |
disk/partition as the location of the image file, mounted through ssh, |
1167 |
samba or nfs. Using any of these options is a more advanced topic, way |
1168 |
beyond the scope of this presentation. |
1169 |
|
1170 |
Scripts' options |
1171 |
------------------------------------------------------------------------------ |
1172 |
This section presents the options which are available at the "Clonezilla |
1173 |
advanced extra parameters" screens, if the "Expert" mode is selected. For |
1174 |
other options, see Getting backups and Restoring data. |
1175 |
|
1176 |
Backup options |
1177 |
--------------------- |
1178 |
|
1179 |
> Imaging program priority |
1180 |
|
1181 |
-q2 Priority: partclone > partimage > dd |
1182 |
-q1 Priority: Only dd (supports all filesystem, but inefficient) |
1183 |
-q Priority: ntfsclone > partimage > dd |
1184 |
Priority: partimage > dd (no ntfsclone) |
1185 |
|
1186 |
This option chooses which imaging programs are preferred. By default, |
1187 |
Clonezilla Live uses partclone for nearly all filesystems, including |
1188 |
ext2/3/4, NTFS and FAT32. If a filesystem isn't supported by partclone, |
1189 |
but is supported by partimage (spesifically: if the filesystem is HFS, |
1190 |
HPFS or JFS), it is cloned by partimage. If it isn't supported by either |
1191 |
(for example Linux swap, though it doesn't make any sense to clone swap |
1192 |
partitions), it is cloned by dd. Unlike partclone or partimage, dd copies |
1193 |
all blocks of the partition instead of only used, resulting in slower |
1194 |
imaging process and bigger images. |
1195 |
|
1196 |
Normally the default option -q2 should be preferred. Try another option |
1197 |
if you have problems and believe they are caused by the imaging program used. |
1198 |
|
1199 |
> Various parameters |
1200 |
|
1201 |
These options are available at the second "Clonezilla advanced extra |
1202 |
parameters" screen. |
1203 |
-c Client waits for confirmation before cloning |
1204 |
This option causes Clonezilla Live to ask if you really want to clone the |
1205 |
disk/partition just before it starts cloning. It is enabled by default. |
1206 |
|
1207 |
-j2 Clone the hidden data between MBR and 1st partition |
1208 |
If this option is set, the 15 hidden sectors between Master Boot Record |
1209 |
and the first partition are copied. This area usually contains some data |
1210 |
necessary for booting. The option is enabled by default and should be kept |
1211 |
enabled if you are cloning a bootable disk. |
1212 |
|
1213 |
-nogui Use text output only, no TUI/GUI output |
1214 |
Causes Clonezilla Live to force the used programs to use only command-line |
1215 |
interface even if text-based or graphical user interface is available. |
1216 |
|
1217 |
-a Do NOT force to turn on HD DMA |
1218 |
Prevents Clonezilla Live from using DMA for communicating with hard |
1219 |
drives. Slows cloning down but in some conditions cloning without this |
1220 |
option can be impossible. |
1221 |
|
1222 |
-rm-win-swap-hib Remove page and hibernation files in Win if exists |
1223 |
This option prevents Clonezilla Live from cloning your page file if you |
1224 |
are cloning a partition containing Windows. Often the page file is big |
1225 |
and unneeded, and skipping it may speed cloning up without causing any |
1226 |
harm. Mind you, this option is disabled by default because sometimes the |
1227 |
page file may be necessary. |
1228 |
|
1229 |
-ntfs-ok Skip checking NTFS integrity, even bad sectors (ntfsclone only) |
1230 |
This option works only if you selected the -q option and you're cloning |
1231 |
a NTFS partition. It prevents the integrity check of NTFS partitions and |
1232 |
speeds the cloning process up a little. However, if the check is disabled, |
1233 |
there is a risk that the filesystem is damaged and the image created from |
1234 |
it is useless. |
1235 |
|
1236 |
-gm Generate image MD5 checksums |
1237 |
Causes Clonezilla Live to calculate MD5 checksum(s) of image(s) created. If |
1238 |
the image cets corrupted afterwards, the checksum allows to notice the |
1239 |
corruption before the image is restored. Mind you, calculating the checksum |
1240 |
takes some time and slows the process down a little. |
1241 |
|
1242 |
-gs Generate image SHA1 checksums |
1243 |
This option is identical to the above, but creates SHA1 checksum(s) instead |
1244 |
of MD5. SHA1 is considered to be more accurate checksum algorithm than MD5, |
1245 |
but MD5 is more popular. |
1246 |
|
1247 |
> Compression method |
1248 |
|
1249 |
-z1 gzip compression (fast with a smaller image) |
1250 |
-z2 bzip2 compression (slowest but smallest image) |
1251 |
-z3 lzo compression (faster with image size approx. to that of |
1252 |
gzip)(NOTE!!) |
1253 |
-z4 lzma compression (slowest but also small image, faster |
1254 |
decompression than bzip2) |
1255 |
-z0 No compression (fastest but largest image size) |
1256 |
|
1257 |
This option chooses the method which is used to compress the image while |
1258 |
creating it. |
1259 |
|
1260 |
If no compression is used at all, there won't be any negative speed impact |
1261 |
caused by compression. However, the image file size is the size of all the |
1262 |
data backed up - for example, if you clone a 160 GB hard drive containing |
1263 |
60 gigabytes of data, the resulting disk image will be 60 gigabytes in size. |
1264 |
|
1265 |
Gzip and lzop are fast compression methods. Lzop is many times faster than |
1266 |
gzip, but creates slightly larger images. Clonezilla Live warns that lzop |
1267 |
requires good-quality RAM, but I (the contributor who wrote this chapter) |
1268 |
think other compression methods require good RAM too. |
1269 |
|
1270 |
Bzip2 and lzma are powerful compression methods. Lzma creates a little |
1271 |
smaller images than bzip2, and decompressing lzma-compressed images is faster |
1272 |
than decompressing bzip2 images. But there is no free lunch: lzma compression |
1273 |
method is very slow compared even to bzip2, which isn't fast method either. |
1274 |
|
1275 |
> Splitting |
1276 |
|
1277 |
This option (command line: -i [number]) decides if the created image files |
1278 |
are splitted into smaller pieces, and if yes, how large the pieces are. This |
1279 |
setting doesn't usually matter, but some filesystems (most importantly |
1280 |
FAT32) don't allow files larger than four gigabytes. If you're saving the |
1281 |
disk image to a FAT32 partition, enter 4000 or less. (Value 0 disables |
1282 |
splitting, so don't use it in that case.) If the filesystem allows files |
1283 |
big enough, enter any value which isn't too small (you don't want to split |
1284 |
the image into too many pieces, do you?) |
1285 |
|
1286 |
> Postaction |
1287 |
|
1288 |
-p true Do nothing when the clone finishes |
1289 |
-p reboot Reboot client when the clone finishes |
1290 |
-p poweroff Shutdown client when the clone finishes |
1291 |
|
1292 |
In this screen you can decide what Clonezilla Live does when the |
1293 |
disk/partition is cloned. |
1294 |
|
1295 |
Spiros told above that he has found out that it's not always safe to allow |
1296 |
Live CDs automatically unmount partitions, and I have lost data when trying |
1297 |
auto-unmount with a script. So, avoid -p reboot and -p poweroff options |
1298 |
if possible. You have been warned. |
1299 |
|
1300 |
Restore options (script ocs-sr) |
1301 |
--------------------- |
1302 |
|
1303 |
> Various parameters |
1304 |
|
1305 |
These options are available at the first "Clonezilla advanced extra |
1306 |
parameters" screen. |
1307 |
-g auto Reinstall grub in client disk MBR (only if grub config exists) |
1308 |
Causes Clonezilla Live to reinstall GRUB into the Master Boot Record |
1309 |
of the disk if at least one partition contains GRUB config file |
1310 |
(/boot/grub/menu.lst). The option is enabled by default and shouldn't |
1311 |
cause any harm. However, it should be disabled if you for example have |
1312 |
another bootloader in MBR and chainload GRUB with it. |
1313 |
|
1314 |
-e1 auto Automatically adjust filesystem geometry for a NTFS boot partition |
1315 |
if exists |
1316 |
The NTLDR bootloader used by Windows isn't able to determine automatically |
1317 |
where the files it needs are stored. It only knows their physical locations, |
1318 |
which sometimes change when the disk or partition is copied. If the locations |
1319 |
are changed and this option is selected, the location information of the |
1320 |
files is changed accordingly. This option is enabled by default and if |
1321 |
it's disabled, the cloned Windows will fail to boot. |
1322 |
|
1323 |
-e2 sfdisk uses CHS of hard drive from EDD(for non-grub boot loader) |
1324 |
This option requires that the -e1 auto option is selected. It causes |
1325 |
Clonezilla Live to use disk read interface named EDD for determining the |
1326 |
physical locations of the files when updating the location information |
1327 |
used by NTLDR. The option is enabled by default because it reduces the |
1328 |
risk that Windows doesn't boot. |
1329 |
|
1330 |
-hn0 PC Change MS Win hostname (based on IP address) after clone |
1331 |
If this option is selected and a partition containing Microsoft Windows is |
1332 |
cloned, its IP address -based hostname is changed after cloning. Computers |
1333 |
which are on any network simultaneously need to have different hostnames, |
1334 |
so this option is needed if a Windows system is cloned to another computer |
1335 |
and the original computer is still used in addition to the one where the |
1336 |
image was restored to. |
1337 |
|
1338 |
-hn1 PC Change MS Win hostname (based on MAC address) after clone |
1339 |
This option causes the MAC address -based hostname of Windows to change. This |
1340 |
option needs also be enabled in the above condition. |
1341 |
|
1342 |
-v Prints verbose messages (especially for udpcast) |
1343 |
Causes Clonezilla Live to tell more information of what it does. |
1344 |
|
1345 |
-nogui Use text output only, no TUI/GUI output |
1346 |
Causes Clonezilla Live to force the used programs to use only command-line |
1347 |
interface even if text-based or graphical user interface is available. |
1348 |
|
1349 |
-b Run clone in batch mode (DANGEROUS!) |
1350 |
Causes Clonezilla Live to run in batch mode. According to Clonezilla |
1351 |
Live reference card, this option is dangerous, though I (the contributor) |
1352 |
don't know why. |
1353 |
|
1354 |
-c Client waits for confirmation before cloning |
1355 |
This option causes Clonezilla Live to ask if you really want to clone the |
1356 |
disk/partition just before it starts cloning. It is enabled by default. |
1357 |
|
1358 |
-t Client does not restore the MBR (Mater Boot Record) |
1359 |
Do NOT restore the MBR (Mater Boot Record) when restoring image. If this |
1360 |
option is set, you must make sure there is an existing MBR in the current |
1361 |
restored harddisk. Default is Yes. |
1362 |
|
1363 |
-t1 Client restores the prebuilt MBR from syslinux (For Windows only) |
1364 |
If this option is set, the MBR is overwritten by prebuilt one which |
1365 |
chainloads Windows. Use this option if you have to restore Windows and |
1366 |
make it bootable, but don't have the original MBR or backup of it. |
1367 |
|
1368 |
-r Try to resize the filesystem to fit partition size |
1369 |
This option is useful if you are cloning a small disk to larger one. It |
1370 |
tries to resize the restored filesystem to the size of the partition where |
1371 |
it was restored to. It allows you to use the whole size of your new disk |
1372 |
without resizing the partition afterwards. The option requires that the |
1373 |
disk where the image is copied already contains a partition where the |
1374 |
image is restored or that the option -k1 is enabled. |
1375 |
|
1376 |
-e sfdisk uses the CHS value of hard drive from the saved image |
1377 |
Force to use the saved CHS (cylinders, heads, sectors) when using sfdisk. Of |
1378 |
cource, there is no use of it when using any of -j0, -k or -k2 options. |
1379 |
|
1380 |
-j1 Write MBR (512 B) again after image is restored. Not OK for partition |
1381 |
table diffe |
1382 |
When a disk image is restored, the partition table must be updated to |
1383 |
reflect the actual partitions in the disk. If you don't want it to happen, |
1384 |
enable this option. Then the Master Boot Record (including the partition |
1385 |
table) is restored again after restoring the image. Note that using this |
1386 |
option can destroy all the data in the target drive. |
1387 |
|
1388 |
-j2 Clone the hidden data between MBR and 1st partition |
1389 |
If this option is set, the 15 hidden sectors between Master Boot Record |
1390 |
and the first partition are restored. This area usually contains some data |
1391 |
necessary for booting. The option is enabled by default and should be kept |
1392 |
enabled if you are cloning a bootable disk. |
1393 |
|
1394 |
-cm Check image by MD5 checksums |
1395 |
If the image folder contains MD5 checksum(s), this option causes Clonezilla |
1396 |
Live to check if the image has corrupted by calculating its checksum and |
1397 |
comparing it to the precalculated one. Mind you, calculating the checksum |
1398 |
takes some time and slows the process down a little. |
1399 |
|
1400 |
-cs Check image by SHA1 checksums |
1401 |
This option is identical to the above, but checks SHA1 checksum(s) instead |
1402 |
of MD5. |
1403 |
|
1404 |
-a Do NOT force to turn on HD DMA |
1405 |
Prevents Clonezilla Live from using DMA for communicating with hard |
1406 |
drives. Slows cloning down but in some conditions cloning without this |
1407 |
option can be impossible. |
1408 |
|
1409 |
-o0 Run script in $OCS_PRERUN_DIR before clone starts |
1410 |
Run the scripts in the directory $OCS_PRERUN_DIR before clone is |
1411 |
started. The location of the directory can be determined by editing the |
1412 |
file drbl-ocs.conf. By default it is /opt/drbl/share/ocs/prerun. |
1413 |
|
1414 |
-o1 Run script in $OCS_POSTRUN_DIR as clone finishes |
1415 |
Run the scripts in the directory $OCS_POSTRUN_DIR when clone is |
1416 |
finished. The location of the directory can be determined by editing the |
1417 |
file drbl-ocs.conf. By default it is /opt/drbl/share/ocs/postrun. The |
1418 |
command will be run before that assigned in -p. |
1419 |
|
1420 |
The scripts will be executed by the program "run-parts". run-parts only |
1421 |
accepts that the name of the scripts must consist entirely of upper and |
1422 |
lower case letters, digits and underscores. So if your file name has an |
1423 |
illegal character ".", run-parts won't run it. You can test which files |
1424 |
will be executed by entering the command: |
1425 |
run-parts --test /opt/drbl/share/ocs/postrun |
1426 |
|
1427 |
> Partition table |
1428 |
|
1429 |
This option decides what is done to the partition table of the target drive. |
1430 |
Use the partition table from the image |
1431 |
This option causes Clonezilla Live to copy the partition table from the |
1432 |
image. Use this option if you are cloning a whole disk or somehow know that |
1433 |
the partition tables are identical (for example, if you are restoring a |
1434 |
partition to the same disk where it was copied from and haven't repartitioned |
1435 |
the drive after creating the backup). This is the default option. |
1436 |
|
1437 |
-k Do NOT create a partition table on the target disk |
1438 |
Do NOT create partition in target harddisk. If this option is set, |
1439 |
you must make sure there is an existing partition table in the current |
1440 |
restored harddisk. |
1441 |
|
1442 |
-k1 Create partition table proportionally (OK for MRB format, not GPT) |
1443 |
Causes Clonezilla Live to create the partition table automatically using |
1444 |
sfdisk after restoring the images. This option works nearly always, but |
1445 |
sometimes cloned Windows don't boot. Note that this option doesn't work if |
1446 |
you have GUID Partition Table on your disk. (Most likely you don't have one.) |
1447 |
|
1448 |
-k2 Enter command line prompt to create partition manually later |
1449 |
Like the -k option, this option doesn't create the partition table |
1450 |
automatically. However, after restoring the image you are led to command |
1451 |
line prompt where you can create the partition table manually. Don't use |
1452 |
this option if you don't know how the partition table can be created. |
1453 |
|
1454 |
-j0 Use dd to create partition (NOT OK if logical drives exist) |
1455 |
Use dd to dump the partition table from saved image instead of sfdisk. |
1456 |
|
1457 |
We read in DRBL FAQ/Q&A: |
1458 |
|
1459 |
When I use clonezilla to clone M$ windows, there is no any problem |
1460 |
when saving an image from template machine. However, after the image |
1461 |
is restored to another machine, it fails to boot, the error message is |
1462 |
"Missing Operating System". What's going on ? |
1463 |
|
1464 |
Usually this is because GNU/Linux and M$ windows interpret the CHS (cylinder, |
1465 |
head, sector) value of harddrive differently. Some possible solutions: |
1466 |
1. Maybe you can change the IDE harddrive setting in BIOS, try to use |
1467 |
LBA instead of auto mode. |
1468 |
2. Try to choose |
1469 |
[ ] -j0 Use dd to create partition table instead of sfdisk |
1470 |
and |
1471 |
[ ] -t1 Client restores the prebuilt MBR from syslinux (For Windows only) |
1472 |
when you restore the image. |
1473 |
3. You can try to boot the machine with MS Windows 9x bootable floppy, |
1474 |
and in the DOS command prompt, run: "fdisk /mbr". |
1475 |
4. You can try to boot the machine with MS Windows XP installation CD, |
1476 |
enter recovery mode (by pressing F10 key in MS XP, for example), then |
1477 |
in the console, run "fixmbr" to fix it. Maybe another command "fixboot" |
1478 |
will help, too. For more info, refer to this doc |
1479 |
5. Use ntfsreloc to adjust FS geometry on NTFS partitions. For more info, |
1480 |
refer to http://www.linux-ntfs.org/doku.php?id=contrib:ntfsreloc |
1481 |
|
1482 |
It has been confirmed that activating the -j0 option, fixes the problem. |
1483 |
|
1484 |
This option doesn't work if you use LVM (Logical Volume Manager). |
1485 |
|
1486 |
exit Exit |
1487 |
This option ends the restore process and enters command line prompt. |
1488 |
|
1489 |
> Postaction |
1490 |
|
1491 |
-p true Do nothing when the clone finishes |
1492 |
-p reboot Reboot client when the clone finishes |
1493 |
-p poweroff Shutdown client when the clone finishes |
1494 |
|
1495 |
When image restoration finishes, do one of the following: choose action |
1496 |
(default), poweroff or reboot. |
1497 |
|
1498 |
Saving image files in NTFS partitions |
1499 |
------------------------------------------------------------------------------ |
1500 |
Although not recomended, you may find yourself having to save your image |
1501 |
file in a NTFS (Windows XP) partition. You may never have a problem doing |
1502 |
this, but you may get a message like the following one, when the partition |
1503 |
gets mounted: |
1504 |
Volume is scheduled for check |
1505 |
Please boot into Windows TWICE, or use 'force' mount option" |
1506 |
and the backup procedure fails. There are two things you can do here: |
1507 |
|
1508 |
* Exit the program, reboot and use Windows XP Recovery Console to fix the |
1509 |
NTFS file system. From Recovery Console |
1510 |
prompt, execute the command: |
1511 |
chkdsk /f X: |
1512 |
|
1513 |
where X: is the drive letter of the disk. When done, boot back into |
1514 |
Clonezilla Live and repeat the backup procedure. |
1515 |
|
1516 |
If the Windows version you use is not XP, boot into SystemRescueCD |
1517 |
(graphical mode is not needed) and run the following command: |
1518 |
ntfsfix /dev/hda1 |
1519 |
|
1520 |
where /dev/hda1 is the partition name in GNU/Linux. When done, boot back |
1521 |
into Clonezilla Live and repeat the backup procedure. |
1522 |
|
1523 |
If the disk/partition you are trying to backup is not the Windows System |
1524 |
disk (usually C:\), you can boot Windows, and execute the command in a DOS |
1525 |
window. To open a DOS window click Start / Run... and at the prompt Open: |
1526 |
type cmd. |
1527 |
|
1528 |
* If Windows XP Recovery Console is not available, you don't have the time |
1529 |
to execute the procedure described above, or even if you have executed it |
1530 |
but you still get the same message, and you are absolutely sure that you |
1531 |
get this message because the NTFS partition is really scheduled for check, |
1532 |
and it's not because Windows crushed or have become corrupt, you can mount |
1533 |
the patririon by hand and tell Clonezilla Live to use it. Assuming the |
1534 |
partition is /dev/hda1, exit the program and execute the commands: |
1535 |
sudo su - |
1536 |
ntfs-3g -o force /dev/hda1 /home/partimag |
1537 |
ocs-live |
1538 |
|
1539 |
and when you get to the screen "Mount clonezilla image directory", select |
1540 |
skip Use existing /home/partimag |
1541 |
|
1542 |
|
1543 |
|
1544 |
|
1545 |
|
1546 |
Clonezilla-SysRescCD - Getting backups - 08/02/2009 - v 3.1.0 |
1547 |
|
1548 |
Intro |
1549 |
------------------------------------------------------------------------------ |
1550 |
|
1551 |
In this page I will demonstrate the creation of an image file by getting |
1552 |
a backup of a virtual partition (/dev/hdb1). The image file will be saved |
1553 |
in another virtual partition (/dev/hda1). |
1554 |
|
1555 |
The first thing you do when you want to get a backup of a disk/partition, |
1556 |
is make sure both the souce (to be backed up) and target (to hold the |
1557 |
image file) partitions are in excellent condition (error free). This is the |
1558 |
logical thing to do, cause I wouldn't want to backup a corrupt partition, |
1559 |
or end up with a corrupt image file. |
1560 |
|
1561 |
There is one more step I would want to take: I should check that my BIOS |
1562 |
boot settings are correct, in order to boot from my CD/DVD drive. |
1563 |
|
1564 |
Having done all of the above, I am ready to boot from Clonezilla-SysRescCD. |
1565 |
|
1566 |
|
1567 |
The following pressentation has been made usingClonezilla Live v 1.2.2-31 |
1568 |
|
1569 |
Getting the backup |
1570 |
------------------------------------------------------------------------------ |
1571 |
|
1572 |
Clonezilla-SysRescCD starting screen |
1573 |
--------------------- |
1574 |
|
1575 |
If you're fine with US keymap and English language (available languages are |
1576 |
English, Spanish, French, Italian, Japanese and Chinese [both simplified |
1577 |
and traditional]) or don't mind editing the boot parameters, just select |
1578 |
Clonezilla Live at the starting screen and press ENTER. When the system |
1579 |
comes up, it will load the program that will preform the backup. After |
1580 |
that continue from this step. |
1581 |
|
1582 |
If you need to change these settings, select one of the available Clonezilla |
1583 |
Live menu entries, and press TAB. The current boot parameters will be |
1584 |
displayed. |
1585 |
|
1586 |
The default parameters for booting Clonezilla Live on a 1024x768 screen, |
1587 |
are the following: |
1588 |
|
1589 |
append initrd=/live/initrd1.img boot=live union=aufs |
1590 |
ocs_live_run="ocs-live-general" ocs_live_extra_param="" |
1591 |
ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no" |
1592 |
ocs_lang="en_US.UTF-8" ocs_live_keymap="NONE" vga=791 nolocales |
1593 |
|
1594 |
By deleting the words in red, you instruct Clonezilla Live to ask you the |
1595 |
values of these parameters. When the appropriate changes have been done |
1596 |
(as shown bellow), just press ENTER to boot. |
1597 |
|
1598 |
append initrd=/live/initrd1.img boot=live union=aufs |
1599 |
ocs_live_run="ocs-live-general" ocs_live_extra_param="" |
1600 |
ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no" |
1601 |
ocs_lang="" ocs_live_keymap="" vga=791 nolocales |
1602 |
|
1603 |
Screen "Choose Language" |
1604 |
--------------------- |
1605 |
|
1606 |
This is where the language can be selected. I select "en_US.UTF-8 English" |
1607 |
and press ENTER. |
1608 |
|
1609 |
Screen "Configuring console-data" |
1610 |
--------------------- |
1611 |
|
1612 |
I select "Select keymap from full list" and press ENTER. If you're using |
1613 |
US keymap, the default option "Don't touch keymap" is a better choice. |
1614 |
|
1615 |
Screen "Configuring console-data" |
1616 |
--------------------- |
1617 |
|
1618 |
As I (the contributor who wrote a great deal of this page) use Finnish |
1619 |
keyboard, I select "pc / qwerty / Finnish / Standard / Standard". Because |
1620 |
you most likely use a different keyboard, choose the one you use. |
1621 |
|
1622 |
Screen "Start Clonezilla" |
1623 |
--------------------- |
1624 |
|
1625 |
I select "Start Clonezilla" and press ENTER. |
1626 |
|
1627 |
Screen "Clonezilla" |
1628 |
--------------------- |
1629 |
|
1630 |
I select "device-image" and press ENTER. |
1631 |
|
1632 |
Screen "Mount clonezilla image directory" |
1633 |
--------------------- |
1634 |
|
1635 |
In this screen I can select the way the image file directory will be saved. |
1636 |
Available options are local directory, remote directory through ssh, |
1637 |
samba or nfs and skip, to use the previously used directory. More info |
1638 |
about the image file can be found at section "About the Image file". |
1639 |
|
1640 |
I select "local_dev" and press ENTER. |
1641 |
|
1642 |
Next screen |
1643 |
--------------------- |
1644 |
|
1645 |
This is where I choose the location of the image file. It will be saved |
1646 |
at the root directory of the selected partition. |
1647 |
I select partition hda1 and press ENTER. |
1648 |
|
1649 |
and then ENTER again. |
1650 |
|
1651 |
This screen displays the mounting result. |
1652 |
As we can see, /dev/hda1 has been successfully mounted under /tmp/local-dev. |
1653 |
|
1654 |
Next Screen |
1655 |
--------------------- |
1656 |
|
1657 |
I select Beginer mode to accept the default backup options. If you select |
1658 |
Expert mode, you can choose the options yourself. More details can be |
1659 |
found here. |
1660 |
|
1661 |
Screen "Select mode" |
1662 |
--------------------- |
1663 |
|
1664 |
Here I can select the desired operation. |
1665 |
|
1666 |
I select "savedisk" and press ENTER. |
1667 |
|
1668 |
Next Screen |
1669 |
--------------------- |
1670 |
|
1671 |
In this screen I select the image name. |
1672 |
I type "Backup_52-2009_hdb", which in my opinion is more informative name |
1673 |
than the default. |
1674 |
|
1675 |
Next Screen |
1676 |
--------------------- |
1677 |
|
1678 |
Finally I am asked to select the partition to save. |
1679 |
I just press ENTER again. |
1680 |
|
1681 |
Starting the backup |
1682 |
--------------------- |
1683 |
|
1684 |
Then the program will display the command that will be executed and will |
1685 |
ask me to press ENTER. |
1686 |
Then I will be asked to confirm the operation by pressing y and ENTER. |
1687 |
After that, the backup begins |
1688 |
|
1689 |
and when it's successfully completed, I will be able to reboot the system |
1690 |
by pressing 1 and ENTER. |
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
Clonezilla-SysRescCD - Getting backups on Samba - 08/02/2009 - v 3.1.0 |
1697 |
|
1698 |
Intro |
1699 |
------------------------------------------------------------------------------ |
1700 |
|
1701 |
What if you don't have a spare local disk or partition or a USB disk? How |
1702 |
will you be able to get a backup of your system? Well, if your PC is on |
1703 |
the same LAN with another PC running Windows (or linux), you can use Samba |
1704 |
to save your image file on that remote PC (which we will call Samba server |
1705 |
from now on). |
1706 |
|
1707 |
Using Samba you will be able to mount a Windows share resource (or |
1708 |
Samba share resource), from within Clonezilla Live, and save the image |
1709 |
file there. Then you can boot that PC using SystemRescueCD and create a |
1710 |
restore DVD. |
1711 |
|
1712 |
In this page I will demonstrate the creation of an image file by getting a |
1713 |
backup of my Windows partition (/dev/hda1). The image file will be save in |
1714 |
my Samba server which is my laptop (ip: 10.0.0.2, Windows share resource |
1715 |
name: data). |
1716 |
|
1717 |
What is Samba? |
1718 |
--------------------- |
1719 |
We read at http://us1.samba.org/samba/: |
1720 |
|
1721 |
Samba is an Open Source/Free Software suite that provides seamless file |
1722 |
and print services to SMB/CIFS clients. Samba is freely available, unlike |
1723 |
other SMB/CIFS implementations, and allows for interoperability between |
1724 |
Linux/Unix servers and Windows-based clients. |
1725 |
|
1726 |
Samba is software that can be run on a platform other than Microsoft |
1727 |
Windows, for example, UNIX, Linux, IBM System 390, OpenVMS, and other |
1728 |
operating systems. Samba uses the TCP/IP protocol that is installed on the |
1729 |
host server. When correctly configured, it allows that host to interact |
1730 |
with a Microsoft Windows client or server as if it is a Windows file and |
1731 |
print server. |
1732 |
|
1733 |
Gathering info |
1734 |
------------------------------------------------------------------------------ |
1735 |
Before you can use this approach to get a backup, you have to get some |
1736 |
info about the Samba server. |
1737 |
|
1738 |
The Samba server I have used for this example was my laptop, so I already |
1739 |
knew most of the info required. If this is not the case for you, just ask |
1740 |
the owner, user or system admin. |
1741 |
|
1742 |
The info required is: |
1743 |
|
1744 |
* The IP address of the Samba server |
1745 |
* The domain on the Samba server |
1746 |
This may exist if your PC is connected to a larger LAN (a corporation |
1747 |
network, for example). In my case this is empty. |
1748 |
* The user name and password you can use |
1749 |
* The directory on the Samba server you can use to save your backup |
1750 |
This is the name of the Windows share resource (Samba share resource) |
1751 |
as it is known in the network, which is not necessarily the same as the |
1752 |
local directory name. The user whose account will be used to login to the |
1753 |
Samba server, must have write permission to this directory. |
1754 |
|
1755 |
Getting the backup |
1756 |
------------------------------------------------------------------------------ |
1757 |
If you're fine with US keymap and English language (available languages are |
1758 |
English, Spanish, French, Italian, Japanese and Chinese [both simplified |
1759 |
and traditional]) or don't mind editing the boot parameters, just select |
1760 |
Clonezilla Live at the starting screen and press ENTER. When the system |
1761 |
comes up, it will load the program that will preform the backup. |
1762 |
|
1763 |
If you need to change these settings, go to the Getting backups page for |
1764 |
instructions . |
1765 |
Screen "Start Clonezilla" |
1766 |
--------------------- |
1767 |
I select "Start Clonezilla" and press ENTER. |
1768 |
|
1769 |
Screen "Clonezilla" |
1770 |
--------------------- |
1771 |
I select "device-image" and press ENTER. |
1772 |
|
1773 |
Screen "Mount clonezilla image directory" |
1774 |
--------------------- |
1775 |
In this screen I can select the way the image file directory will be saved. |
1776 |
Available options are local directory, remote directory through ssh, |
1777 |
samba or nfs and skip, to use the previously used directory. More info |
1778 |
about the image file can be found at section "About the Image file". |
1779 |
|
1780 |
I select "samba server" and press ENTER. |
1781 |
|
1782 |
Screen "Mount Samba Server" |
1783 |
--------------------- |
1784 |
This is where I have to enter the IP address of my Samba server. I type |
1785 |
"10.0.0.2" and press ENTER. |
1786 |
|
1787 |
Screen "Mount Samba Server" (second time) |
1788 |
--------------------- |
1789 |
This is where I have to enter the account (user) name on my Samba server. I |
1790 |
type "spiros" and press ENTER. |
1791 |
|
1792 |
Screen "Mount Samba Server" (third time) |
1793 |
--------------------- |
1794 |
This is where I have to enter the domain name on my Samba server. I select |
1795 |
"Cancel" and press ENTER, as there is no domain in my LAN. If there |
1796 |
is a domain in your network, you have to type its name (something like |
1797 |
my_company.com) and press ENTER. |
1798 |
|
1799 |
Screen "Mount Samba Server" (fourth time) |
1800 |
--------------------- |
1801 |
This is where I have to enter the directory name on my Samba server, |
1802 |
in which the image file will be saved. I type "/data" and press ENTER. |
1803 |
|
1804 |
At this point I will be asked for the password for user spiros. I will be |
1805 |
able to continue only after entering it correctly. |
1806 |
|
1807 |
Screen "Clonezilla - Opensource Clone System (OCS)" |
1808 |
--------------------- |
1809 |
|
1810 |
I select Beginner mode to accept the default backup options. If you select |
1811 |
Expert mode, you can choose the options yourself. More details can be |
1812 |
found here. |
1813 |
Screen "Clonezilla: Select mode" |
1814 |
--------------------- |
1815 |
Here I can select the desired operation. Available options are: |
1816 |
|
1817 |
savedisk |
1818 |
Save entire disk to image |
1819 |
|
1820 |
restoredisk |
1821 |
Restore entire disk from image |
1822 |
|
1823 |
saveparts |
1824 |
Save partition to image |
1825 |
|
1826 |
restoreparts |
1827 |
Restore partition from image |
1828 |
|
1829 |
recovery-iso-zip |
1830 |
Create an automated restore CD/DVD/USB drive |
1831 |
I select "saveparts" and press ENTER. |
1832 |
|
1833 |
Screen "Clonezilla - Opensource Clone System (OCS) | Mode: saveparts" |
1834 |
--------------------- |
1835 |
This is the name of the image file. You can insert anything you like, |
1836 |
as long as it makes sence to you, so that you can distinguish the image |
1837 |
file afterwards. |
1838 |
|
1839 |
I insert "win_img" and press ENTER. |
1840 |
|
1841 |
Next screen |
1842 |
--------------------- |
1843 |
Here I can select the partition that will be backed up. I select "( ) hda1 |
1844 |
ntfs" by pressing SPACE and press ENTER, and ENTER again. Then a message |
1845 |
is displayed asking for confirmation in order to continue. I just press y, |
1846 |
and the backup procedure begins. |
1847 |
|
1848 |
Rebooting the system |
1849 |
------------------------------------------------------------------------------ |
1850 |
When the backup is done, I get the following: |
1851 |
(0) Poweroff |
1852 |
(1) Reboot |
1853 |
(2) Enter command line prompt |
1854 |
(3) Start over |
1855 |
[2] |
1856 |
|
1857 |
Then I press ENTER and get to the shell. I execute the commands: |
1858 |
sudo su - |
1859 |
cd |
1860 |
umount -a |
1861 |
reboot |
1862 |
|
1863 |
|
1864 |
|
1865 |
|
1866 |
|
1867 |
Clonezilla-SysRescCD - Creating a Restore DVD - 08/02/2009 - v 3.1.0 |
1868 |
|
1869 |
|
1870 |
|
1871 |
Intro |
1872 |
------------------------------------------------------------------------------ |
1873 |
Assuming you have used Clonezilla Live to make a backup of your Windows XP |
1874 |
system (partition /dev/hda1), which you have saved as win_img, you will |
1875 |
probably be wondering what to do with it now. Well, one option would be |
1876 |
to keep it to the disk you used to save it in, store the disk, and use it |
1877 |
whenever you need it. |
1878 |
|
1879 |
Another option would be to create a DVD you can use to restore this |
1880 |
image. This procedure will be explained here. |
1881 |
|
1882 |
You will use Clonezilla-SysRescCD to create a restore Clonezilla Live |
1883 |
System, and burn it to DVD along with your win_img image. Depending on |
1884 |
the size of the image and the free disk space, you have three alternatives: |
1885 |
|
1886 |
* You can create a restore DVD, containing a restore Clonezilla Live System |
1887 |
and one or more image files. |
1888 |
It can be either a 4.4GB or a 8GB DVD, and it is ideal for packing a number |
1889 |
of small image files together. It can be used to restore any of these image |
1890 |
files when needed, but the restoration procedure will then be done manually. |
1891 |
|
1892 |
* You can create an automated restore DVD with a maximum size of 4.4GB |
1893 |
This DVD will hold only one image file, which will be automatically restored |
1894 |
to its source disk/partition when the corresponding boot menu entry is |
1895 |
selected. The drawback is that the working partition (the partition used |
1896 |
to create the ISO file) must have an amount of free space equal to the |
1897 |
size of the image file plus the Clonezilla Live System size. |
1898 |
|
1899 |
* You can create an automated restore DVD with a maximum size of 8GB |
1900 |
This DVD will hold only one image file, which will be automatically restored |
1901 |
to its source disk/partition when the corresponding boot menu entry is |
1902 |
selected. You only need to have about 90MB of free space to create it, |
1903 |
but there are more commands to be executed to finalise DVD. |
1904 |
|
1905 |
Creating a restore DVD |
1906 |
------------------------------------------------------------------------------ |
1907 |
|
1908 |
Assuming you have saved your image file win_img in partition hdb4, you |
1909 |
have to boot Clonezilla Live to RAM, using Clonezilla-SysRescCD, and when |
1910 |
the system is fully up select Enter_shell and type 2 to get to the shell. |
1911 |
|
1912 |
Then you mount the partition in /home/partimag |
1913 |
sudo su - |
1914 |
rm /home/partimag |
1915 |
mkdir /home/partimag |
1916 |
mount /dev/hdb4 /home/partimag |
1917 |
cd /home/partimag |
1918 |
|
1919 |
Note: It /dev/hdb4 is a NTFS (Windows XP) partition, you will have to use |
1920 |
ntfs-3g to mount it, since you need write access to it. In this case you |
1921 |
type the commands: |
1922 |
sudo su - |
1923 |
ntfs-3g /dev/hdb4 /home/partimag |
1924 |
cd /home/partimag |
1925 |
|
1926 |
If you have problems mounting the partition, refer to section "Saving |
1927 |
image files in NTFS partitions". |
1928 |
|
1929 |
Create the ISO file by executing the command: |
1930 |
|
1931 |
/opt/drbl/sbin/ocs-iso -a restore -V "Win XP Restore" \ |
1932 |
-P "Spiros Georgaras <sng@hellug.gr>" -s |
1933 |
|
1934 |
All tha's left to do is burn the DVD. Remove the CD from the DVD writer, |
1935 |
insert a writable DVD disk and burn the ISO file: |
1936 |
|
1937 |
growisofs -Z /dev/hdc=restore.iso |
1938 |
eject /dev/hdc |
1939 |
|
1940 |
If the computer has only one DVD writer, you can use the following command, |
1941 |
which will auto detect it |
1942 |
growisofs -Z $(what-cd -dwb)=restore.iso |
1943 |
eject $(what-cd -dwb) |
1944 |
|
1945 |
Finally, add the image file to the DVD, by typing: |
1946 |
|
1947 |
growisofs -M /dev/hdc -R -J \ |
1948 |
-V "Win XP Restore" --publisher "Spiros Georgaras <sng@hellug.gr>" \ |
1949 |
-graft-points /win_img/=/home/partimag/win_img |
1950 |
|
1951 |
If the computer has only one DVD writer, you can use the following command, |
1952 |
which will auto detect it |
1953 |
growisofs -M $(what-cd -dwb) -R -J \ |
1954 |
-V "Win XP Restore" --publisher "Spiros Georgaras <sng@hellug.gr>" \ |
1955 |
-graft-points /win_img/=/home/partimag/win_img |
1956 |
|
1957 |
Note: In the last commands I have assumed your writer is /dev/hdc. You |
1958 |
will have to replace this with the device name of your writer. |
1959 |
|
1960 |
Automated restore |
1961 |
------------------------------------------------------------------------------ |
1962 |
Working parameters can be passed to the Clonezilla Live restore script at |
1963 |
DVD mastering time. This is very useful if we want to create an "automated" |
1964 |
restore DVD. The restore script (osc-sr) can accept the following parameters: |
1965 |
|
1966 |
* -b -c --nogui -e restoredisk <image-file> <disk> |
1967 |
Example: -b -c --nogui -e restoredisk win_img hda |
1968 |
This tells the restore script to run in batch mode (-b), to ask for |
1969 |
confirmation (-c) and preform a disk restore of image win_img to the first |
1970 |
hard disk (hda) |
1971 |
|
1972 |
* -b -c --nogui -e restoreparts <image-file> <partition> |
1973 |
Example: -b -c --nogui -e restoreparts win_img hda1 |
1974 |
This tells the restore script to run in batch mode (-b), to ask for |
1975 |
confirmation (-c) and preform a partition restore of image win_img to the |
1976 |
first partition of the first hard disk (hda1) |
1977 |
|
1978 |
We will use these commands when mastering our restore DVD. According to |
1979 |
Clonezilla's documentation, since we will use mkisofs (actually genisoimage) |
1980 |
coming with Clonezilla Live, the ISO file must not be over 4.4GB. |
1981 |
|
1982 |
Note: The restore DVD will use a 800x600 screen by dafault; if you have |
1983 |
to use 640x480, you have to edit the isolinux/isolinux.cfg file manually. |
1984 |
|
1985 |
You can get more info about the available restore script options by executing |
1986 |
/opt/drbl/sbin/ocs-sr -h 2>&1 | less |
1987 |
|
1988 |
Caution: It is not possible to concatenate the options, as it usually happens |
1989 |
in linux. That is, if you write -bc... instead of -b -c --nogui..., the |
1990 |
result will be that the automatic restore will not work. This is because |
1991 |
of the way the original restore script was written. |
1992 |
|
1993 |
Creating a 4.4GB automated restore DVD |
1994 |
------------------------------------------------------------------------------ |
1995 |
|
1996 |
Assuming you have saved your image file win_img in partition hdb4, you |
1997 |
have to boot Clonezilla Live to RAM, using Clonezilla-SysRescCD, and when |
1998 |
the system is fully up select Enter_shell and type 2 to get to the shell. |
1999 |
|
2000 |
Then you mount the partition in /home/partimag |
2001 |
sudo su - |
2002 |
rm /home/partimag |
2003 |
mkdir /home/partimag |
2004 |
mount /dev/hdb4 /home/partimag |
2005 |
cd /home/partimag |
2006 |
|
2007 |
Note: It /dev/hdb4 is a NTFS (Windows XP) partition, you will have to use |
2008 |
ntfs-3g to mount it, since you need write access to it. In this case you |
2009 |
type the commands: |
2010 |
sudo su - |
2011 |
ntfs-3g /dev/hdb4 /home/partimag |
2012 |
cd /home/partimag |
2013 |
|
2014 |
If you have problems mounting the partition, refer to section "Saving |
2015 |
image files in NTFS partitions". |
2016 |
|
2017 |
Assuming the image file is the backup of partition hda1, create the ISO |
2018 |
file by executing the command: |
2019 |
|
2020 |
/opt/drbl/sbin/ocs-iso -a clonezilla-44-restore-dvd \ |
2021 |
-I "Restore Windows XP (Home PC) - hda1" \ |
2022 |
-V "Win XP Restore" -P "Spiros Georgaras <sng@hellug.gr>" \ |
2023 |
-W "-j0 -b -c --nogui restoreparts win_img hda1" win_img |
2024 |
|
2025 |
All tha's left to do is burn the DVD. Remove the CD from the DVD writer, |
2026 |
insert a writable DVD disk and burn the ISO file: |
2027 |
|
2028 |
growisofs -Z /dev/hdc=clonezilla-44-restore-dvd |
2029 |
eject /dev/hdc |
2030 |
|
2031 |
Note: In the last commands I have assumed your writer is /dev/hdc. You |
2032 |
will have to replace this with the device name of your writer. |
2033 |
|
2034 |
If the computer has only one DVD writer, you can use the following command, |
2035 |
which will auto detect it |
2036 |
|
2037 |
growisofs -Z $(what-cd -dwb)=clonezilla-44-restore-dvd.iso |
2038 |
eject $(what-cd -dwb) |
2039 |
|
2040 |
Creating a 8GB automated restore DVD |
2041 |
------------------------------------------------------------------------------ |
2042 |
|
2043 |
Assuming you have saved your image file win_img in partition hdb4, |
2044 |
you have to boot Clonezilla Live normally (no copy to RAM), using |
2045 |
Clonezilla-SysRescCD, and when the system is fully up select Enter_shell |
2046 |
and type 2 to get to the shell. |
2047 |
|
2048 |
Then you mount the partition in /home/partimag |
2049 |
sudo su - |
2050 |
mount /dev/hdb4 /home/partimag |
2051 |
cd /home/partimag |
2052 |
|
2053 |
Note: It /dev/hdb4 is a NTFS (Windows XP) partition, you will have to use |
2054 |
ntfs-3g to mount it, since you need write access to it. In this case you |
2055 |
type the commands: |
2056 |
sudo su - |
2057 |
ntfs-3g /dev/hdb4 /home/partimag |
2058 |
cd /home/partimag |
2059 |
|
2060 |
If you have problems mounting the partition, refer to section "Saving |
2061 |
image files in NTFS partitions". |
2062 |
|
2063 |
Assuming the image file is the backup of partition hda1, create the ISO |
2064 |
file by executing the command: |
2065 |
|
2066 |
/opt/drbl/sbin/ocs-iso -a clonezilla-8-rescue-dvd \ |
2067 |
-I "Restore Windows XP (Home PC) - hda1" \ |
2068 |
-V "Win XP Restore" -P "Spiros Georgaras <sng@hellug.gr>" \ |
2069 |
-A "-j0 -b -c --nogui restoreparts win_img hda1" |
2070 |
|
2071 |
At this point you have to reboot the system, and boot Clonezilla Live to |
2072 |
RAM, in order to burn the DVD. |
2073 |
|
2074 |
When the system is fully up, select Enter_shell and type 2 to get to the |
2075 |
shell and execute the commands: |
2076 |
|
2077 |
sudo su - |
2078 |
mount /dev/hdb4 /home/partimag |
2079 |
cd /home/partimag |
2080 |
|
2081 |
Note: At this point you don't need write access to /dev/hdb4, so it makes |
2082 |
no difference whether it is a NTFS (Windows XP) partition or not. |
2083 |
|
2084 |
Remove the CD from the DVD writer, insert a writable DVD disk and burn |
2085 |
the ISO file: |
2086 |
|
2087 |
growisofs -Z /dev/hdc=clonezilla-8-rescue-dvd.iso |
2088 |
eject /dev/hdc |
2089 |
|
2090 |
If the computer has only one DVD writer, you can use the following command, |
2091 |
which will auto detect it |
2092 |
|
2093 |
growisofs -Z $(what-cd -dwb)=clonezilla-8-rescue-dvd.iso |
2094 |
eject $(what-cd -dwb) |
2095 |
|
2096 |
Finally, add the image file to the DVD, by typing: |
2097 |
|
2098 |
growisofs -M /dev/hdc -R -J \ |
2099 |
-V "Win XP Restore" --publisher "Spiros Georgaras <sng@hellug.gr>" \ |
2100 |
-graft-points /win_img/=/home/partimag/win_img |
2101 |
|
2102 |
If the computer has only one DVD writer, you can use the following command, |
2103 |
which will auto detect it |
2104 |
|
2105 |
growisofs -M $(what-cd -dwb) -R -J \ |
2106 |
-V "Win XP Restore" --publisher "Spiros Georgaras <sng@hellug.gr>" \ |
2107 |
-graft-points /win_img/=/home/partimag/win_img |
2108 |
|
2109 |
Note: In this section I have assumed your writer is /dev/hdc. You will |
2110 |
have to replace this with the device name of your writer. |
2111 |
|
2112 |
Working with a USB keyboard |
2113 |
------------------------------------------------------------------------------ |
2114 |
|
2115 |
Systems equipped witη a USB keyboard, have a problem starting Clonezilla |
2116 |
Live, SystemRescueCD or any of the tools in the CD, since the keyboard |
2117 |
does not work while in boot menu, and the default boot menu action is to |
2118 |
boot from the first hard disc. |
2119 |
|
2120 |
One solution would be to connect to the system a PS2 keyboard before |
2121 |
booting Clonezilla-SysRescCD. The problem that still remains has to do |
2122 |
with systems not equipped with a PS2 connector at all. |
2123 |
|
2124 |
In order to use Clonezilla-SysRescCD in such a system, the CD should be |
2125 |
remastered changing the default boot menu entries as desired. |
2126 |
|
2127 |
In order to use Clonezilla Live on such a system, one could use the network |
2128 |
to get a backup, or perform a restore. Creating a restore DVD for such a |
2129 |
system, would obviously have to be an auto restore DVD. |
2130 |
|
2131 |
The problem of booting an auto restore DVD and performing the restore is |
2132 |
still there, since the default boot menu action is again to boot from the |
2133 |
first hard disc. |
2134 |
|
2135 |
To address this problem, some new parameters have been added to the ISO |
2136 |
mastering script (ocs-iso): |
2137 |
|
2138 |
* --noKeyboard |
2139 |
Using this parameter, the default boot menu action is assigned to the |
2140 |
first menu entry, which will start the restore operation. |
2141 |
* --defaultItem [item number] |
2142 |
Using this parameter, you can specify the menu entry which will be assigned |
2143 |
to the default boot menu action. The value of [item number] can be |
2144 |
1 - 1024x768 screen |
2145 |
2 - 800x600 screen |
2146 |
3 - 640x480 screen |
2147 |
4 - Safe graphic settings |
2148 |
5 - Failsafe mode |
2149 |
As you can see, using --defaultItem 1 is equivelant to --noKeyboard |
2150 |
* --bootDelay [number of seconds] |
2151 |
Using this parameter, the value of the boot timeout (default is 30 secs) |
2152 |
can be changed so that the restore operation starts sooner. |
2153 |
|
2154 |
In order to use these parameters to master the auto restore DVD, the user |
2155 |
has to modify the ISO mastering commands. |
2156 |
|
2157 |
The command for a 4.4GB DVD would be: |
2158 |
|
2159 |
/opt/drbl/sbin/ocs-iso -a clonezilla-44-restore-dvd \ |
2160 |
-I "Restore Windows XP (Home PC) - hda1" \ |
2161 |
-V "Win XP Restore" -P "Spiros Georgaras <sng@hellug.gr>" \ |
2162 |
--noKeyboard --bootDelay 10 \ |
2163 |
-W "-j0 -b -c --nogui restoreparts win_img hda1" win_img |
2164 |
|
2165 |
The command for a 8GB DVD would be: |
2166 |
|
2167 |
/opt/drbl/sbin/ocs-iso -a clonezilla-8-rescue-dvd \ |
2168 |
-I "Restore Windows XP (Home PC) - hda1" \ |
2169 |
-V "Win XP Restore" -P "Spiros Georgaras <sng@hellug.gr>" \ |
2170 |
--noKeyboard --bootDelay 10 \ |
2171 |
-A "-j0 -b -c --nogui restoreparts win_img hda1" |
2172 |
|
2173 |
Using an auto restore DVD mastered using these parameters, is very simple; |
2174 |
at system start-up the boot menu is displayed and after [number of seconds], |
2175 |
the restore operation will start automatically. |
2176 |
|
2177 |
Menu modification parameters |
2178 |
------------------------------------------------------------------------------ |
2179 |
|
2180 |
When using any of the -W and -A parameters, you can use two more paremeters |
2181 |
to modify the text displayed at the CD/DVD title and the menu items. These |
2182 |
parameters are: |
2183 |
|
2184 |
* -T or --isolinux-title [title text] |
2185 |
This parameter will change the CD/DVD title from Clonezilla-SysRescCD v |
2186 |
3.1.0 to [title text] |
2187 |
|
2188 |
* -I or ---isolinux-menu-item [items' text] |
2189 |
This parameter will change the menu items text from Clonezilla Live - |
2190 |
XXXXxYYYY to [items' text] - XXXXxYYYY. For example, Clonezilla Live - |
2191 |
1024x768 will be changed to [items' text] - 1024x768. |
2192 |
|
2193 |
|
2194 |
|
2195 |
|
2196 |
|
2197 |
|
2198 |
|
2199 |
|
2200 |
|
2201 |
|
2202 |
Clonezilla-SysRescCD - Restoring data - 08/02/2009 - v 3.1.0 |
2203 |
|
2204 |
|
2205 |
|
2206 |
|
2207 |
Intro |
2208 |
------------------------------------------------------------------------------ |
2209 |
|
2210 |
Image files are always created for one purpose: restoring the data they |
2211 |
contain. Images can be, for example, a backup solution: as long as hardware |
2212 |
works, the computer can be restored to the state it was when creating the |
2213 |
image. Another usage scenario is changing the hard drive: files can be |
2214 |
copy-pasted from the old drive to the new, but that method doesn't make |
2215 |
the new drive bootable. Disk images do. |
2216 |
|
2217 |
This page contains a demonstration of the latter case. On the Getting backups |
2218 |
page, a 500 MB virtual disk containing 300 megabytes of data was copied |
2219 |
to a 2 GB virtual disk which was empty. Now the 500 MB disk is changed to |
2220 |
an empty 2 GB disk (still virtual) and I'll restore the data to that disk. |
2221 |
|
2222 |
When creating a disk image, one needs to check that both the source and |
2223 |
target partitions are error free. That's not required when the image is |
2224 |
restored, because restoration process can't damage the disk image. Note, |
2225 |
however, that restoring an image erases all the data in the target |
2226 |
disk/partition. |
2227 |
|
2228 |
You also need to check the BIOS settings to be able to boot from |
2229 |
Clonezilla-SysRescCD. Some BIOSes contain a boot menu, others require |
2230 |
editing settings pernamently. Details can be found on the manual of the |
2231 |
motherboard or laptop. |
2232 |
|
2233 |
Now let's boot. |
2234 |
|
2235 |
|
2236 |
Restore process erases all the data on the target disk/partition.Before |
2237 |
restoring make sure you have backup of all the data on the target |
2238 |
disk/partition, even if the filesystem is corrupted. |
2239 |
|
2240 |
|
2241 |
The following pressentation has been made usingClonezilla Live v 1.2.2-31 |
2242 |
|
2243 |
|
2244 |
|
2245 |
Restoring data |
2246 |
------------------------------------------------------------------------------ |
2247 |
|
2248 |
Clonezilla-SysRescCD starting screen |
2249 |
--------------------- |
2250 |
|
2251 |
If you're fine with US keymap and English language (available languages are |
2252 |
English, Spanish, French, Italian, Japanese and Chinese [both simplified |
2253 |
and traditional]) or don't mind editing the boot parameters, just select |
2254 |
Clonezilla Live at the starting screen and press ENTER. When the system |
2255 |
comes up, it will load the program that will preform the backup. After |
2256 |
that continue from this step. |
2257 |
|
2258 |
If you need to change these settings, select one of the available Clonezilla |
2259 |
Live menu entries, and press TAB. The current boot parameters will be |
2260 |
displayed. |
2261 |
|
2262 |
The default parameters for booting Clonezilla Live on a 1024x768 screen, |
2263 |
are the following: |
2264 |
|
2265 |
append initrd=/live/initrd1.img boot=live union=aufs |
2266 |
ocs_live_run="ocs-live-general" ocs_live_extra_param="" |
2267 |
ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no" |
2268 |
ocs_lang="en_US.UTF-8" ocs_live_keymap="NONE" vga=791 nolocales |
2269 |
|
2270 |
By deleting the words in red, you instruct Clonezilla Live to ask you the |
2271 |
values of these parameters. When the appropriate changes have been done |
2272 |
(as shown bellow), just press ENTER to boot. |
2273 |
|
2274 |
append initrd=/live/initrd1.img boot=live union=aufs |
2275 |
ocs_live_run="ocs-live-general" ocs_live_extra_param="" |
2276 |
ocs_prerun="/live/image/restorecd/prerun.normal" ocs_live_batch="no" |
2277 |
ocs_lang="" ocs_live_keymap="" vga=791 nolocales |
2278 |
|
2279 |
|
2280 |
Screen "Choose Language" |
2281 |
--------------------- |
2282 |
|
2283 |
This is where the language can be selected. I select "en_US.UTF-8 English" |
2284 |
and press ENTER. |
2285 |
|
2286 |
Screen "Configuring console-data" |
2287 |
--------------------- |
2288 |
|
2289 |
I select "Select keymap from full list" and press ENTER. If you're using |
2290 |
US keymap, the default option "Don't touch keymap" is a better choice. |
2291 |
|
2292 |
Screen "Configuring console-data" |
2293 |
--------------------- |
2294 |
|
2295 |
Because I haven't changed my keyboard, I select "pc / qwerty / Finnish / |
2296 |
Standard / Standard". Because you most likely use a different keyboard, |
2297 |
choose the one you use. |
2298 |
|
2299 |
Screen "Start Clonezilla" |
2300 |
--------------------- |
2301 |
|
2302 |
I select "Start Clonezilla" and press ENTER. |
2303 |
|
2304 |
|
2305 |
Screen "Clonezilla" |
2306 |
--------------------- |
2307 |
|
2308 |
I select "device-image" and press ENTER. |
2309 |
|
2310 |
|
2311 |
Screen "Mount clonezilla image directory" |
2312 |
--------------------- |
2313 |
|
2314 |
In this screen I can select the way the image file directory has been saved. |
2315 |
Available options are local directory, remote directory through ssh, |
2316 |
samba or nfs and skip, to use the previously used directory. More info |
2317 |
about the image file can be found at section "About the Image file". |
2318 |
|
2319 |
I select "local_dev" and press ENTER. |
2320 |
|
2321 |
|
2322 |
Next screen |
2323 |
--------------------- |
2324 |
|
2325 |
This is where I choose the location of the image file. |
2326 |
I select partition hda1 and press ENTER. |
2327 |
|
2328 |
and then ENTER again. |
2329 |
|
2330 |
This screen displays the mounting result. |
2331 |
As we can see, /dev/hda1 has been successfully mounted under /tmp/local-dev. |
2332 |
|
2333 |
Next Screen |
2334 |
--------------------- |
2335 |
|
2336 |
I select Beginer mode to accept the default restore options. If you select |
2337 |
Expert mode, you can choose the options yourself. More details can be |
2338 |
found here. |
2339 |
|
2340 |
Screen "Select mode" |
2341 |
--------------------- |
2342 |
|
2343 |
Here I can select the desired operation. |
2344 |
|
2345 |
I select "restoredisk" and press ENTER. |
2346 |
|
2347 |
Next Screen |
2348 |
--------------------- |
2349 |
|
2350 |
In this screen I select the image folder. This partition contains only |
2351 |
one image. |
2352 |
|
2353 |
Next Screen |
2354 |
--------------------- |
2355 |
|
2356 |
Finally I am asked to select which partition the image will be restored |
2357 |
to. After double-checking the disk doesn't contain anything important, |
2358 |
I press ENTER. |
2359 |
|
2360 |
Starting the restoration |
2361 |
--------------------- |
2362 |
|
2363 |
Then the program will display the command that will be executed and will |
2364 |
ask me to press ENTER. |
2365 |
Then I will be asked to confirm the operation by pressing y and ENTER. |
2366 |
|
2367 |
This is the last confirmation Clonezilla Live asks.After this step there |
2368 |
is no coming back. |
2369 |
Then my confirmation is asked one last time. After checking one more time |
2370 |
the disk doesn't contain any important data, I press y and ENTER. |
2371 |
|
2372 |
After that, the restore process begins |
2373 |
|
2374 |
|
2375 |
|
2376 |
and when it's successfully completed, I will be able to reboot the system |
2377 |
by pressing 1 and ENTER. |
2378 |
|
2379 |
|
2380 |
|
2381 |
|
2382 |
|
2383 |
|
2384 |
|
2385 |
|
2386 |
|
2387 |
Clonezilla-SysRescCD - Restoring to a different location - 08/02/2009 - |
2388 |
v 3.1.0 |
2389 |
|
2390 |
|
2391 |
|
2392 |
Intro |
2393 |
------------------------------------------------------------------------------ |
2394 |
|
2395 |
In the past restoring to a different location was not supported by |
2396 |
Clonezilla Live at all. Because of that, a script called reloc-img was |
2397 |
added to Clonezilla-SysRescCD, which would help the user perform this task. |
2398 |
|
2399 |
Recent versions of Clonezilla Live partly support restoring to a different |
2400 |
location, so the reloc-img script is obsolete. Clonezilla Live now supports: |
2401 |
|
2402 |
* Relocation of a disk image (restoring a whole disk) |
2403 |
* Relocation of a partition image (restoring a partition) |
2404 |
|
2405 |
Clonezilla Live does not support: |
2406 |
|
2407 |
* Relocation of a single partition contained into a disk image. |
2408 |
|
2409 |
Imagine you have a disk backup image named hda-2009-02-02. The image |
2410 |
contains three partitions, hda1 (operating system), hda2 (user data) |
2411 |
and hda3 (other data). |
2412 |
|
2413 |
You want to restore your other data partition (hda3), to a different system |
2414 |
(partition sdb2) but there is no way to restore (extract) a single partition |
2415 |
from a disk image - you can only restore the whole disk. |
2416 |
|
2417 |
In order to address this situation, two new scripts have been written for |
2418 |
Clonezilla-SysRescCD: imginfo and imgconvert |
2419 |
|
2420 |
Script imginfo |
2421 |
------------------------------------------------------------------------------ |
2422 |
|
2423 |
The script will be used to print info about existing image files. |
2424 |
|
2425 |
Its help screen is: |
2426 |
|
2427 |
# imginfo -h |
2428 |
Clonezilla Live Image Information |
2429 |
imginfo v. 0.1 - (C) 2009 S. Georgaras <sng@hellug.gr> |
2430 |
|
2431 |
Usage: imginfo <options> <directory> |
2432 |
|
2433 |
Available options: |
2434 |
s Search in sub-directories too |
2435 |
i [name] Pring info for image [name] |
2436 |
v Print version info and exit |
2437 |
h Print this screen and exit |
2438 |
|
2439 |
Script imgconvert |
2440 |
------------------------------------------------------------------------------ |
2441 |
|
2442 |
The script will be used to convert an existing disk image file to a new |
2443 |
partition image file. |
2444 |
|
2445 |
imgconvert can create two type of images: |
2446 |
|
2447 |
* Temporary image |
2448 |
This type of image is created by linking the data files of the existing |
2449 |
disk image to the new partition image. This means that the original image |
2450 |
must be present for the new image to be used. This is the default image |
2451 |
type created by imgconvert. |
2452 |
|
2453 |
* Permanent image |
2454 |
This type of image is created by copying the data files from the existing |
2455 |
disk image to the new partition image. This means that the original image is |
2456 |
not needed in order to use the new one. Permenant image files are created |
2457 |
using the command line parameter -p. |
2458 |
|
2459 |
Its help screen is: |
2460 |
|
2461 |
# imgconvert -h |
2462 |
Clonezilla Live Image Conversion |
2463 |
imgconvert v. 0.1 - (C) 2009 S. Georgaras <sng@hellug.gr> |
2464 |
|
2465 |
Usage: imgconvert <options> [image] [partition] <new partition> |
2466 |
|
2467 |
Parameters are: |
2468 |
[image] Disk image to be converted to partition image |
2469 |
[partition] Partition name to convert. It must be a valid device name |
2470 |
|
2471 |
Available options: |
2472 |
o [image] Save new imag as [image] |
2473 |
p Save new partition instead of making a link to the old one |
2474 |
v Print version info and exit |
2475 |
h Print this screen and exit |
2476 |
|
2477 |
Using the scripts |
2478 |
------------------------------------------------------------------------------ |
2479 |
|
2480 |
Restoring to a partition |
2481 |
--------------------- |
2482 |
|
2483 |
After booting into Clonezilla Live, I select |
2484 |
|
2485 |
Enter_shell Enter command line prompt |
2486 |
|
2487 |
when the menu is displayed and then I press 2 to exit to the shell. |
2488 |
|
2489 |
At this point I will mount my images partition (in this example /dev/sdc4), |
2490 |
and use script imginfo to get info about my image files. |
2491 |
|
2492 |
$ sudo su - |
2493 |
# mount /dev/sdc4 /home/partimag |
2494 |
# cd /home/partimag |
2495 |
# imginfo |
2496 |
Image files found in: /home/partimag |
2497 |
Image: usb250-img, disk: sda, size: 259MB, parts: 1 |
2498 |
part: sda4, size: 247.00MB, type: FAT16 |
2499 |
Image: sys-bck, disk: hda, size: 320.0GB, parts: 3 |
2500 |
part: hda1, size: 22.36GB, type: Linux |
2501 |
part: hda2, size: 39.06GB, type: Linux |
2502 |
part: hda3, size: 233.87GB, type: Linux |
2503 |
|
2504 |
As you can see there are two disk images under /home/partimag: usb250-img |
2505 |
and sys-bck. |
2506 |
|
2507 |
sys-bck is a backup of my old system, which had three partitions. What |
2508 |
I need to do now is "copy" the hda3 partition to my current system, by |
2509 |
transfering its data to partition sdb2. |
2510 |
|
2511 |
The way to proceed is: |
2512 |
|
2513 |
* Create a new partition image (containing hda3's data) based on the |
2514 |
existing disk image file, by executing the command: |
2515 |
|
2516 |
# imgconvert sys-bck hda3 sdb2 |
2517 |
Clonezilla Live Image Conversion |
2518 |
imgconvert v. 0.1 - (C) 2009 S. Georgaras |
2519 |
|
2520 |
Determining input image |
2521 |
Input image: "/home/partimag/sys-bck" |
2522 |
Validating image... ok |
2523 |
Determining input partition |
2524 |
Input partition: "hda3" |
2525 |
Validating input partition... ok |
2526 |
Determining output image |
2527 |
Output image: "/home/partimag/sys-bck-cnv" |
2528 |
Validating output image... ok |
2529 |
Checking permissions... ok |
2530 |
Determining output partition |
2531 |
Output partition: "sda2" |
2532 |
Validating output partition... ok |
2533 |
Creating output image: /home/partimag/sys-bck-cnv |
2534 |
Linking files... done |
2535 |
Fixing info files... done |
2536 |
|
2537 |
This command will create a temporary partition image file (automatically |
2538 |
named sys-bck-cnv), which contains sdb2 only, as you can see by executing: |
2539 |
|
2540 |
# imginfo -i sys-bck-cnv |
2541 |
Image: sys-bck-cnv, part: sdb2, size: 233.87GB, type: Linux |
2542 |
|
2543 |
* Restart Clonezilla Live by pressing Control-D twice. |
2544 |
|
2545 |
* Restore the new image file into sdb2, by selecting |
2546 |
|
2547 |
Screen 1: Start_Clonezilla Start Clonezilla |
2548 |
|
2549 |
Screen 2: device-image disk/partition to/from image |
2550 |
|
2551 |
Screen 3: skip use existing /home/partimag |
2552 |
|
2553 |
Screen 4: Beginer / Expert |
2554 |
|
2555 |
Screen 5: restoreparts Restore_an_image_to_local_partition |
2556 |
|
2557 |
and continue as usual to restore the partition. |
2558 |
|
2559 |
Converting image files |
2560 |
--------------------- |
2561 |
|
2562 |
# imgconvert -p -o other_data sys-bck hda3 sdb2 |
2563 |
Clonezilla Live Image Conversion |
2564 |
imgconvert v. 0.1 - (C) 2009 S. Georgaras |
2565 |
|
2566 |
Determining input image |
2567 |
Input image: "/home/partimag/sys-bck" |
2568 |
Validating image... ok |
2569 |
Determining input partition |
2570 |
Input partition: "hda3" |
2571 |
Validating input partition... ok |
2572 |
Determining output image |
2573 |
Output image: "/home/partimag/other_data" |
2574 |
Validating output image... ok |
2575 |
Checking permissions... ok |
2576 |
Determining output partition |
2577 |
Output partition: "sda2" |
2578 |
Validating output partition... ok |
2579 |
Creating output image: /home/partimag/other_data |
2580 |
Copying files... done |
2581 |
Fixing info files... done |
2582 |
|
2583 |
# imginfo -i other_data |
2584 |
Image: other_data, part: sdb2, size: 233.87GB, type: Linux |
2585 |
|
2586 |
# ls -la sys-bck |
2587 |
total 1111972 |
2588 |
drwxr-xr-x 2 root root 4096 2007-11-22 03:21 . |
2589 |
drwxr-xr-x. 34 root root 4096 2009-04-06 21:28 .. |
2590 |
-rw-r--r-- 1 root root 4 2007-11-20 20:33 disk |
2591 |
-rw-r--r-- 1 root root 1081716736 2007-11-20 20:32 hda1.aa |
2592 |
-rw-r--r-- 1 root root 45453312 2007-11-20 20:33 hda2.aa |
2593 |
-rw-r--r-- 1 root root 10317824 2007-11-20 20:33 hda3.aa |
2594 |
-rw-r--r-- 1 root root 37 2007-11-21 18:56 hda-chs.sf |
2595 |
-rw-r--r-- 1 root root 37 2007-11-21 18:50 hda-chs.sf.orig |
2596 |
-rw-r--r-- 1 root root 512 2007-11-20 20:31 hda-mbr |
2597 |
-rw-r--r-- 1 root root 259 2007-11-21 18:59 hda-pt.sf |
2598 |
-rw-r--r-- 1 root root 259 2007-11-21 18:50 hda-pt.sf.orig |
2599 |
-rw-r--r-- 1 root root 15 2007-11-20 20:33 parts |
2600 |
-rw-r--r-- 1 root root 17 2007-11-20 20:33 swappt-hda4.info |
2601 |
# |
2602 |
# |
2603 |
# ls -la other_data |
2604 |
total 24 |
2605 |
drwxr-xr-x 2 root root 4096 2009-04-06 21:27 . |
2606 |
drwxr-xr-x. 35 root root 4096 2009-04-06 21:27 .. |
2607 |
-rw-r--r-- 1 root root 5 2009-04-06 21:27 parts |
2608 |
-rw-r--r-- 1 root root 10317824 2009-04-06 21:27 sdb2.aa |
2609 |
-rw-r--r-- 1 root root 37 2009-04-06 21:27 sdb-chs.sf |
2610 |
-rw-r--r-- 1 root root 106 2009-04-06 21:27 sdb-pt.sf |
2611 |
|
2612 |
Booting a restored Linux system |
2613 |
------------------------------------------------------------------------------ |
2614 |
|
2615 |
A Linux system that has been restored to a new disk/partition, using |
2616 |
reloc-img is usually not ready to be booted right after the restoration |
2617 |
procedure is finished. |
2618 |
|
2619 |
There are two more steps that you may have to take: |
2620 |
|
2621 |
* Fix /etc/fstab |
2622 |
* Reinstall GRUB. |
2623 |
I will assume GRUB is your boot manager, as it is the usual case nowadays. |
2624 |
|
2625 |
For this example I will assume that you have restored a Linux system |
2626 |
(that used to be in sdb), to a new disk (hda), and that it contains three |
2627 |
partitions, / (the root partition), /home (user's partition) and a swap |
2628 |
partition. You must be really careful here, as the name of the new disk |
2629 |
depends on the system to be booted. If it uses one of the newest Linux |
2630 |
kernels (using the libata disk driver), ALL your disks will be recognised |
2631 |
as SCSI. More info: "Identifying devices in Linux" section "SCSI disks |
2632 |
when there are none!!!". |
2633 |
|
2634 |
This is what we have: |
2635 |
|
2636 |
root partition home partition swap partition |
2637 |
Old system /dev/sdb1 /dev/sdb2 /dev/sdb3 |
2638 |
New system /dev/hda1 /dev/hda2 /dev/hda3 |
2639 |
|
2640 |
Fixing /etc/fstab |
2641 |
--------------------- |
2642 |
|
2643 |
Since we are still in Clonezilla Live, right after reloc-img has finished, we |
2644 |
will use it to mount our restored root partition, and edit its /etc/fstab. We |
2645 |
issue the commands: |
2646 |
|
2647 |
mkdir /new-root |
2648 |
mount /dev/hda1 /new-root |
2649 |
vi /new-root/etc/fstab |
2650 |
|
2651 |
The contents of /etc/fstab could be something like |
2652 |
|
2653 |
/dev/sdb1 / reiserfs acl,user_xattr 1 1 |
2654 |
/dev/sdb2 /home reiserfs defaults 1 2 |
2655 |
/dev/sdb3 swap swap defaults 0 0 |
2656 |
|
2657 |
and we have to change ti to |
2658 |
|
2659 |
/dev/hda1 / reiserfs acl,user_xattr 1 1 |
2660 |
/dev/hda2 /home reiserfs defaults 1 2 |
2661 |
/dev/hda3 swap swap defaults 0 0 |
2662 |
|
2663 |
Finally, we unmount the partition, and we are ready to reboot |
2664 |
|
2665 |
umount /new-root |
2666 |
reboot |
2667 |
|
2668 |
Reinstalling GRUB |
2669 |
--------------------- |
2670 |
|
2671 |
When Clonezilla-SysRescCD menu appears, we select Tools > Super Grub Disk |
2672 |
|
2673 |
Then we select Super Grub Disk > Super Grub Disk (WITH HELP) > English |
2674 |
Super Grub Disk > Gnu/Linux > Fix Boot of Gnu/Linux (GRUB). From this |
2675 |
entry we will be able to reinstall GRUB to our hard disk. |
2676 |
|
2677 |
You may also want to have a look at Super Grub Disk "documentation". |
2678 |
|
2679 |
|
2680 |
|
2681 |
|
2682 |
|
2683 |
Clonezilla-SysRescCD - Data Recovery - 08/02/2009 - v 3.1.0 |
2684 |
|
2685 |
|
2686 |
|
2687 |
Intro |
2688 |
------------------------------------------------------------------------------ |
2689 |
|
2690 |
Deleted or "lost" files can be recovered from failed or formatted drives |
2691 |
and partitions, cdroms and memory cards using the software available in |
2692 |
SystemRescueCD. |
2693 |
|
2694 |
Unless you can rule out hardware failure, you must not write to the failed |
2695 |
device. The following software will passively try to recover your data |
2696 |
from failed or failing hardware. If your data is not replaceable, do not |
2697 |
attempt to write to the failed device if the following applications do |
2698 |
not work but seek professional advice instead. |
2699 |
|
2700 |
If your device is damaged, it is advisable to image the device and work on |
2701 |
the image file for data recovery. If hardware failure is not the problem, |
2702 |
you can recover data directly from the device. |
2703 |
|
2704 |
To recover data from a failed device, you will need another device of equal |
2705 |
or greater storage capacity onto which to save your data. If you need to make |
2706 |
an image of the failed device, you will need yet another quantity of space. |
2707 |
|
2708 |
I should state here, that I haven't used any of these tools recently (other |
2709 |
than plain and simple dd, a long time ago, which I found to be very slow), |
2710 |
so I couldn't recommend any of them. Any comments on a tool's usability |
2711 |
found in this page, is just what I found on the Net. |
2712 |
|
2713 |
Partition recovery |
2714 |
------------------------------------------------------------------------------ |
2715 |
|
2716 |
If you made a mistake while partitioning and the partition no longer appears |
2717 |
in the partition table, so long as you have not written data in that space, |
2718 |
all your data is still there and can be restored. |
2719 |
|
2720 |
When changing the partition table on your hard drive, you must ensure that |
2721 |
no partition on the disk is mounted. This includes swap space. In order |
2722 |
to restore your partition, execute: |
2723 |
|
2724 |
swapoff -a |
2725 |
parted /dev/old_disk |
2726 |
|
2727 |
Then, use the rescue option: |
2728 |
|
2729 |
rescue START END |
2730 |
|
2731 |
where START is the area of the disk where you believe the partition began |
2732 |
and END is it's end. If parted finds a potential partition, it will ask |
2733 |
you if you want to add it to the partition table. |
2734 |
|
2735 |
Note: TestDisk can also be used to recover a "lost" partition. |
2736 |
|
2737 |
Disk / files recovery |
2738 |
------------------------------------------------------------------------------ |
2739 |
|
2740 |
Using dd |
2741 |
--------------------- |
2742 |
|
2743 |
In order to duplicate a disk to another disk, execute |
2744 |
|
2745 |
dd if=/dev/old_disk of=/dev/new_disk conv=noerror,sync |
2746 |
|
2747 |
or to create an image file |
2748 |
|
2749 |
dd if=/dev/old_disk of=image_file conv=noerror |
2750 |
|
2751 |
Be careful, if you are copying a disk, the destination must also be a disk, |
2752 |
not a partition. If you are copying a partition, the destination partition |
2753 |
must be large enough. Copying the whole disk is recommended. |
2754 |
|
2755 |
To speed up the copy process, you can append bs=8k, it will read/write |
2756 |
the disk by 16 sectors at a time. |
2757 |
|
2758 |
Using dd_rescue |
2759 |
--------------------- |
2760 |
|
2761 |
Like dd, dd_rescue does copy data from one file or block device to |
2762 |
another. You can specify file positions (called seek and skip in dd). There |
2763 |
are several differences: |
2764 |
|
2765 |
* dd_rescue does not provide character conversions. |
2766 |
* The command syntax is different. Call dd_rescue -h. |
2767 |
* dd_rescue does not abort on errors on the input file, unless you specify a |
2768 |
maximum error number. Then dd_rescue will abort when this number is reached. |
2769 |
* dd_rescue does not truncate the output file, unless asked to. |
2770 |
* You can tell dd_rescue to start from the end of a file and move backwards. |
2771 |
* It uses two block sizes, a large (soft) block size and a small (hard) |
2772 |
block size. In case of errors, the size falls back to the small one and |
2773 |
is promoted again after a while without errors. |
2774 |
* It does not (yet) support non-seekable in- or output. |
2775 |
|
2776 |
In order to duplicate a disk to another disk, execute |
2777 |
|
2778 |
dd_rescue -A -v /dev/old_disk /dev/new_disk |
2779 |
|
2780 |
or to create an image file |
2781 |
|
2782 |
dd_rescue -A -v /dev/old_disk image_file |
2783 |
|
2784 |
The copying should go very quickly until it hits a bad sector and then it |
2785 |
will slow down to take smaller chunks of data. People have reported very |
2786 |
good results with this technique. |
2787 |
|
2788 |
Using GNU ddrescue |
2789 |
--------------------- |
2790 |
|
2791 |
The GNU site describes GNU ddrescue as a data recovery tool, and lists |
2792 |
these features: |
2793 |
|
2794 |
* It copies data from one file or block device (hard disc, CD-ROM, etc) |
2795 |
to another, trying hard to rescue data in case of read errors. |
2796 |
* It does not truncate the output file if not asked to, so every time you |
2797 |
run it on the same output file, it tries to fill in the gaps. |
2798 |
* It is designed to be fully automatic. |
2799 |
* If you use the log file feature of GNU ddrescue, the data is rescued very |
2800 |
efficiently (only the needed blocks are read). Also you can interrupt the |
2801 |
rescue at any time and resume it later at the same point. |
2802 |
* The log file is periodically saved to disc. So in case of a crash you |
2803 |
can resume the rescue with little recopying. |
2804 |
* If you have two or more damaged copies of a file, CD-ROM, etc, and run |
2805 |
GNU ddrescue on all of them, one at a time, with the same output file, |
2806 |
you will probably obtain a complete and error-free file. The probability |
2807 |
of having damaged areas at the same places on different input files is |
2808 |
very low. Using the log file, only the needed blocks are read from the |
2809 |
second and successive copies. |
2810 |
* The same log file can be used for multiple commands that copy different |
2811 |
areas of the file, and for multiple recovery attempts over different subsets. |
2812 |
|
2813 |
The algorithm of GNU ddrescue is as follows: |
2814 |
|
2815 |
* Optionally read a log file describing the status of a multi-part or |
2816 |
previously interrupted rescue. |
2817 |
* Read the non-damaged parts of the input file, skipping the damaged areas, |
2818 |
until the requested size is reached, or until interrupted by the user. |
2819 |
* Try to read the damaged areas, splitting them into smaller pieces and |
2820 |
reading the non-damaged pieces, until the hardware block size is reached, |
2821 |
or until interrupted by the user. |
2822 |
* Try to read the damaged hardware blocks until the specified number of |
2823 |
retries is reached, or until interrupted by the user. |
2824 |
* Optionally write a log file for later use. |
2825 |
|
2826 |
Note: GNU ddrescue is considered to be the best recovery tool available. |
2827 |
|
2828 |
In order to duplicate a disk to another disk, execute |
2829 |
|
2830 |
ddrescue -vr3 /dev/old_disk /dev/new_disk logfile |
2831 |
|
2832 |
or to create an image file |
2833 |
|
2834 |
ddrescue -vr3 /dev/old_disk image_file logfile |
2835 |
|
2836 |
If the disk is failing fast and you want to get the most data out of it |
2837 |
on the first try, you should probably use "-n" on the first run. This |
2838 |
will avoid splitting error areas. Subsequent runs can use "-r1" or "-r3", |
2839 |
without "-n", to retry those error areas. |
2840 |
|
2841 |
To summarise, we execute: |
2842 |
|
2843 |
ddrescue -vn /dev/old_disk image_file logfile |
2844 |
ddrescue -v -r3 -C /dev/old_disk image_file logfile |
2845 |
|
2846 |
Note: When working with CD-ROMs you should probably specific "-b 2048" |
2847 |
|
2848 |
Using Foremost |
2849 |
--------------------- |
2850 |
|
2851 |
Foremost is a console program to recover files based on their headers, |
2852 |
footers, and internal data structures. This process is commonly referred to |
2853 |
as data carving. Foremost can work on image files, such as those generated |
2854 |
by dd, Safeback, Encase, etc, or directly on a drive. The headers and |
2855 |
footers can be specified by a configuration file or you can use command |
2856 |
line switches to specify built-in file types. These built-in types look |
2857 |
at the data structures of a given file format allowing for a more reliable |
2858 |
and faster recovery. |
2859 |
|
2860 |
It can be run on an image file created with any of the above tools, to |
2861 |
extract files: |
2862 |
|
2863 |
foremost -i image -o /recovery/foremost |
2864 |
|
2865 |
Foremost can be instructed to recover only specific file types, using the |
2866 |
-t command line parameter. In the following example Foremost will extract |
2867 |
only jpg files: |
2868 |
|
2869 |
foremost -t jpg -i image -o /recovery/foremost |
2870 |
|
2871 |
Available types are: jpg, gif, png, bmp, avi, exe (Windows binaries and |
2872 |
DLLs), wav, riff, wmv (will extract wma also), mov, pdf, ole (will extract |
2873 |
any file using the OLE file structure; this includes PowerPoint, Word, |
2874 |
Excel, Access, and StarWriter), doc, zip (will extract .jar files and Open |
2875 |
Office docs as well; this includes SXW, SXC, SXI, and SX? for undetermined |
2876 |
OpenOffice files), rar, html and cpp. |
2877 |
|
2878 |
Using TestDisk |
2879 |
--------------------- |
2880 |
|
2881 |
TestDisk was primarily designed to help recover "lost" partitions and/or make |
2882 |
non-booting disks bootable again when these symptoms are caused by faulty |
2883 |
software, certain types of viruses or human error (such as accidentally |
2884 |
deleting a Partition Table). Partition table recovery using TestDisk is |
2885 |
really easy. |
2886 |
|
2887 |
TestDisk can |
2888 |
|
2889 |
* Fix partition table, recover deleted partition |
2890 |
* Recover FAT32 boot sector from its backup |
2891 |
* Rebuild FAT12/FAT16/FAT32 boot sector |
2892 |
* Fix FAT tables |
2893 |
* Rebuild NTFS boot sector |
2894 |
* Recover NTFS boot sector from its backup |
2895 |
* Fix MFT using MFT mirror |
2896 |
* Locate ext2/ext3 Backup SuperBlock |
2897 |
|
2898 |
Some great tutorials are available at TestDisk's site: "TestDisk Step By |
2899 |
Step", "Running TestDisk", "Data Recovery Examples" etc. |
2900 |
|
2901 |
Using PhotoRec |
2902 |
--------------------- |
2903 |
|
2904 |
PhotoRec is file data recovery software designed to recover "lost" files |
2905 |
including video, documents and archives from Hard Disks and CDRom and |
2906 |
"lost" pictures (thus, its 'Photo Recovery' name) from digital camera |
2907 |
memory. PhotoRec ignores the filesystem and goes after the underlying data, |
2908 |
so it will still work even if your media's filesystem has been severely |
2909 |
damaged or re-formatted. |
2910 |
|
2911 |
For more safety, PhotoRec uses read-only access to handle the drive or |
2912 |
memory support you are about to recover "lost" data from. |
2913 |
|
2914 |
Important: As soon as a pic or file is accidentally deleted, or you discover |
2915 |
any missing, do NOT save any more pics or files to that memory device or |
2916 |
hard disk drive; otherwise you may overwrite your "lost" data. This means |
2917 |
that even using PhotoRec, you must not choose to write the recovered files |
2918 |
to the same partition they were stored on. |
2919 |
|
2920 |
A great tutorial titled "PhotoRec Step By Step" can be found at PhotoRec's |
2921 |
site. |
2922 |
|
2923 |
Links & resources |
2924 |
------------------------------------------------------------------------------ |
2925 |
|
2926 |
This page is a compilation of the following pages: |
2927 |
|
2928 |
DataRecovery |
2929 |
https://help.ubuntu.com/community/DataRecovery |
2930 |
|
2931 |
Hard Drive Recovery, Ubuntu-Style |
2932 |
http://blogs.sun.com/superpat/tags/ddrescue |
2933 |
|
2934 |
Recover Data and (deleted) Partition with Linux from Hard Drives, CD-ROMs |
2935 |
or DVDs |
2936 |
http://sysblogd.wordpress.com/2008/01/05/data-recovery-with-linux-from-hard-drives-cd-roms-or-dvds/ |
2937 |
|
2938 |
dd_rescue |
2939 |
http://www.garloff.de/kurt/linux/ddrescue/ |
2940 |
|
2941 |
gddrescue: a tool for recovering data from damaged media |
2942 |
http://debaday.debian.net/2007/12/12/gddrescue-a-tool-for-recovering-data-from-damaged-media/ |
2943 |
|
2944 |
Foremost |
2945 |
http://foremost.sourceforge.net/ |
2946 |
|
2947 |
TestDisk |
2948 |
http://www.cgsecurity.org/wiki/TestDisk |
2949 |
|
2950 |
PhotoRec |
2951 |
http://www.cgsecurity.org/wiki/PhotoRec |
2952 |
|
2953 |
|
2954 |
|
2955 |
|
2956 |
|
2957 |
Clonezilla-SysRescCD - Clonezilla-SysRescCD own scripts - 08/02/2009 - |
2958 |
v 3.1.0 |
2959 |
|
2960 |
In this page I will present the scripts I have written for |
2961 |
Clonezilla-SysRescCD |
2962 |
|
2963 |
startx-ttf-ati |
2964 |
------------------------------------------------------------------------------ |
2965 |
Included in: SystemRescueCD |
2966 |
|
2967 |
This script will help you start the X server (graphical environment), |
2968 |
if you have a ATI video card and a TTF monitor. The normal startx command |
2969 |
will not work in this case; you will end up with a blank screen. |
2970 |
|
2971 |
what-cd |
2972 |
------------------------------------------------------------------------------ |
2973 |
Included in: SystemRescueCD |
2974 |
|
2975 |
This script determines the device names for your CDs/DVDs, and whether |
2976 |
they can read/write CD/DVD-ROMs |
2977 |
|
2978 |
Its help screen is the following: |
2979 |
|
2980 |
# what-cd -h |
2981 |
what-cd - v 1.0.0 - S. Georgaras <sng@hellug.gr> |
2982 |
|
2983 |
what-cd will try to identify your CD/DVDs |
2984 |
You can use it to identify the device name of your CD-Reader (default), |
2985 |
CD-Writer, DVD-Reader, and DVD-Writer. |
2986 |
|
2987 |
Usage: what-cd [options] |
2988 |
Availabe options are: |
2989 |
d Print info about DVDs |
2990 |
w Print info about writers |
2991 |
b Batch mode. Only print one device name. |
2992 |
If more than one device is found, print |
2993 |
nothing. For use with scripts |
2994 |
e deviceID Eject device deviceID |
2995 |
Accecpable values: -1...num of devices |
2996 |
Use -1 when in batch mode |
2997 |
v Print version info and exit |
2998 |
h Print this screen and exit |
2999 |
|
3000 |
Its typical usage would be to identify the DVD writer: |
3001 |
|
3002 |
# what-cd -dw |
3003 |
Device /dev/hdd (id=0) can not write DVDs |
3004 |
Device /dev/hdc (id=1) can write DVDs |
3005 |
|
3006 |
When used in batch mode, it will only print a device name. This is |
3007 |
especially useful in scripts, but also in the command line, as shown in |
3008 |
section "Burning the DVD". |
3009 |
|
3010 |
# what-cd -dwb |
3011 |
/dev/hdc |
3012 |
|
3013 |
continue-multi-cd |
3014 |
------------------------------------------------------------------------------ |
3015 |
Included in: SystemRescueCD |
3016 |
|
3017 |
continue-multi-cd will help you continue a multi session CD; that is will |
3018 |
help you prepare ans burn any consecutive sessions to it. It may lack some |
3019 |
of the functionality you would have had if you used the command line tools |
3020 |
by themselves (mksiofs and cdrecord), but because of it, it keeps you away |
3021 |
from writing a lot of parameters. |
3022 |
|
3023 |
You could use it for example, to burn some extra documentation to |
3024 |
Clonezilla-SysRescCD CD, but you cannot use it to change the configuration |
3025 |
files of isolinux, as it just reads the first session when booting. |
3026 |
|
3027 |
Its help screen is the following: |
3028 |
|
3029 |
# continue-multi-cd -h |
3030 |
continue-multi-cd - v 2.0.0 - S. Georgaras <sng@hellug.gr> |
3031 |
|
3032 |
Usage: continue-multi-cd [options] <path to be added to CD> |
3033 |
|
3034 |
Available options are: |
3035 |
d Specify write device (in case auto detection does |
3036 |
not work) |
3037 |
c Close the CD. No more burning will be possible |
3038 |
Default is to leave it open |
3039 |
l Don't burn the CD after image creation |
3040 |
o <image name> Save the image file as <image name> |
3041 |
r Remove the image file after burning |
3042 |
f On the fly burning of the CD. No image file will |
3043 |
be created |
3044 |
v Print version info and exit |
3045 |
h Print this screen and exit |
3046 |
|
3047 |
You have to note one thing though: the folder <path to be added to CD> |
3048 |
will not be present on the CD; only its contents will. |
3049 |
|
3050 |
Let's suppose that you want to add to the CD the folder extra-doc, |
3051 |
which contains q-a.html and faq.html, and that its full path is |
3052 |
/home/user/extra-doc. If you issue the command |
3053 |
|
3054 |
continue-multi-cd -mwr /home/user/extra-doc |
3055 |
|
3056 |
you will not have a extra-doc folder on the root of your CD, but the files |
3057 |
q-a.html and faq.html will be present there. |
3058 |
|
3059 |
In order to have extra-doc on the CD, you have to copy it to a temporary |
3060 |
location and pass that path to continue-multi-cd. Let's see how it's done: |
3061 |
|
3062 |
mkdir -p /tmp/for-the-cd |
3063 |
cp -r /home/user/extra-doc /tmp/for-the-cd |
3064 |
continue-multi-cd -r /tmp/for-the-cd |
3065 |
rm -rf /tmp/for-the-cd |
3066 |
|
3067 |
|
3068 |
|
3069 |
|
3070 |
|
3071 |
Clonezilla-SysRescCD - Help - 08/02/2009 - v 3.1.0 |
3072 |
|
3073 |
|
3074 |
|
3075 |
On the CD |
3076 |
------------------------------------------------------------------------------ |
3077 |
Clonezilla-SysRescCD contains a copy of its web site and a text file |
3078 |
containing some of these pages. To acces them: |
3079 |
|
3080 |
* In Clonezilla Live |
3081 |
Type |
3082 |
less /live/image/README.txt |
3083 |
|
3084 |
* In SystemRescueCD |
3085 |
Type |
3086 |
less /mnt/livecd/README.txt |
3087 |
or |
3088 |
links /mnt/livecd/README.html |
3089 |
to view the html pages in links web browser. |
3090 |
|
3091 |
Searching for text |
3092 |
--------------------- |
3093 |
While in less you can use the command "/" to search for text. |
3094 |
|
3095 |
For example, if you want to search for the word "Getting", you just type: |
3096 |
/Getting |
3097 |
|
3098 |
If you want to search for a phrase containing spaces, use "\ " instead of |
3099 |
" ". For example, if you want to search for "Getting backups", you have |
3100 |
to type: |
3101 |
/Getting\ backups |
3102 |
|
3103 |
Pressing "n" you will get to the next matching, and pressing "N" will get |
3104 |
you to the previous one. |
3105 |
|
3106 |
You can move around with the keyboard arrows and PgUp-PgDn. |
3107 |
|
3108 |
Press q to exit. |
3109 |
|
3110 |
On the Net |
3111 |
------------------------------------------------------------------------------ |
3112 |
Clonezilla - http://www.clonezilla.org/ |
3113 |
Clonezilla Live - http://www.clonezilla.org/clonezilla-live/ |
3114 |
Related articles - http://www.clonezilla.org/related_article/ |
3115 |
DRBL - http://drbl.sourceforge.net/ |
3116 |
DRBL FAQ/Q&A - http://drbl.sourceforge.net/faq/ |
3117 |
DRBL Forum - http://sourceforge.net/forum/?group_id=73280 |
3118 |
Wiki for DRBL - http://drbl.sourceforge.net/wiki/ |
3119 |
Mailing lists - http://drbl.sourceforge.net/mailing-lists/ |
3120 |
LIVE-INITRAMFS - http://live.debian.net/other/manpages/live-initramfs.7.html |
3121 |
|
3122 |
SystemRescueCD - http://www.sysresccd.org/Main_Page |
3123 |
Detailed packages list- http://www.sysresccd.org/Detailed-packages-list |
3124 |
Manual - http://www.sysresccd.org/Online-Manual-EN |
3125 |
FAQ - http://www.sysresccd.org/FAQ |
3126 |
Howto - http://www.sysresccd.org/Howto |
3127 |
Forum - http://www.sysresccd.org/forums/ |
3128 |
|
3129 |
ntfs-3g - http://www.ntfs-3g.org/ |
3130 |
Linux-NTFS - http://www.linux-ntfs.org/ |
3131 |
Partimage - http://www.partimage.org/Main_Page |
3132 |
|
3133 |
Super Grub Disk Documentation - |
3134 |
http://www.supergrubdisk.org/wiki/SuperGrubDiskDocumentation |
3135 |
GNU GRUB (0.97) Simplified for Newbies - |
3136 |
http://jbakshi.50webs.com/Linux_tutorial/GRUB/GNU GRUB simplified.html |
3137 |
Smart BootManager - http://btmgr.sourceforge.net/ |
3138 |
|
3139 |
|
3140 |
|
3141 |
|
3142 |
|
3143 |
Clonezilla-SysRescCD - Identifying devices in Linux - 08/02/2009 - v 3.1.0 |
3144 |
|
3145 |
|
3146 |
|
3147 |
Intro |
3148 |
------------------------------------------------------------------------------ |
3149 |
This page is intended to help new Linux users and Windows users identify |
3150 |
their hard disks / CD ROMs in a Linux box. |
3151 |
|
3152 |
Linux disks and partition names may be different from other operating |
3153 |
systems. You need to know the names that Linux uses when you format, |
3154 |
mount or select partitions or disks. |
3155 |
|
3156 |
Linux uses the so called device name to access disks and partitions. You |
3157 |
can think of it as a link to the actual driver of the disk. All available |
3158 |
devices have a corresponding file in /dev (e.g. /dev/hda1). |
3159 |
|
3160 |
In general, each disk / CD-ROM has a three letter name, for example hda. Each |
3161 |
partition in such a disk has a number associated with it, starting from 1. So |
3162 |
the first partition of disk hda would be hda1, the second hda2 and so on. |
3163 |
|
3164 |
Depending on the device type, Linux gives the following names to devices: |
3165 |
|
3166 |
* IDE (ATA) floppies |
3167 |
The first floppy drive is named /dev/fd0. |
3168 |
The second floppy drive is named /dev/fd1. |
3169 |
|
3170 |
* IDE (ATA) disks /CD-ROMs |
3171 |
The master disk on IDE primary controller is named /dev/hda. |
3172 |
The slave disk on IDE primary controller is named /dev/hdb. |
3173 |
The master and slave disks of the secondary controller can be called |
3174 |
/dev/hdc and /dev/hdd, respectively. |
3175 |
|
3176 |
Linux represents the primary partitions as the drive name, plus the numbers |
3177 |
1 through 4. For example, the first primary partition on the first IDE |
3178 |
drive is /dev/hda1. The logical partitions are numbered starting at 5, |
3179 |
so the first logical partition on that same drive is /dev/hda5. Remember |
3180 |
that the extended partition, that is, the primary partition holding the |
3181 |
logical partitions, is not usable by itself. This applies to SCSI disks |
3182 |
as well as IDE disks. |
3183 |
|
3184 |
* SCSI disks |
3185 |
The first SCSI disk (SCSI ID address-wise) is named /dev/sda. |
3186 |
The second SCSI disk (address-wise) is named /dev/sdb, and so on. |
3187 |
|
3188 |
* SCSI CD-ROMs |
3189 |
The first SCSI CD-ROM is named /dev/scd0, also known as /dev/sr0. |
3190 |
The second SCSI CD-ROM is named /dev/scd1, also known as /dev/sr1, and so on. |
3191 |
|
3192 |
* USB disks |
3193 |
They are named just like SCSI disks. The only difference is that the |
3194 |
partition number has to do with the file system on the disk. If it's |
3195 |
/dev/sdx4, then it's a VFAT file system and if it's /dev/sdx1 it's probably |
3196 |
a linux (ext2, ext3) file system. |
3197 |
|
3198 |
Examples |
3199 |
------------------------------------------------------------------------------ |
3200 |
In order to identify the disks of a system you have to work with, a basic |
3201 |
knowledge of its configuration (how many disks it has, whether it's a |
3202 |
dual-boot system etc.) is welcomed but not required. A more experienced |
3203 |
user will not have to worry about it, though. |
3204 |
|
3205 |
Linux systems based on a 2.6.x kernel (like Clonezilla Live and |
3206 |
SystemRescueCD) provide all the necessary support to identify a system's |
3207 |
disk configuration, with just a couple of commands. |
3208 |
|
3209 |
Example 1 |
3210 |
--------------------- |
3211 |
The first system I have to work with is a dual-boot system (Windows - |
3212 |
Linux), with two disks and two DVD-ROMs. |
3213 |
|
3214 |
The first command will tell me what disks and partitions exist in the |
3215 |
system. So here it is: |
3216 |
|
3217 |
# cat /proc/partitions |
3218 |
major minor #blocks name |
3219 |
|
3220 |
3 0 312571224 hda |
3221 |
3 1 23446836 hda1 |
3222 |
3 2 40957717 hda2 |
3223 |
3 3 245240257 hda3 |
3224 |
3 4 2923830 hda4 |
3225 |
3 64 244198584 hdb |
3226 |
3 65 41945683 hdb1 |
3227 |
3 66 2104515 hdb2 |
3228 |
3 67 1 hdb3 |
3229 |
3 68 125909437 hdb4 |
3230 |
3 69 74236333 hdb5 |
3231 |
|
3232 |
The output of this command tells me that the system has two disks (hda |
3233 |
and hdb) which are the primary master and slave devices. |
3234 |
|
3235 |
The first disk contains four primary partitions (hda1-hda4) and the second |
3236 |
one four primary partitions (hdb1-hdb4) and a logical one (hdb5). Wait a |
3237 |
minute!!! this can't be right... In order to have a logical partition, I |
3238 |
must have a primary that contains it, which means that in this case I can't |
3239 |
have four primary partitions. So what is really happening here is that I have |
3240 |
two primary and two logical, plus an extended primary which contains them. |
3241 |
|
3242 |
What remains to be found is what type of partitions they are. I will find |
3243 |
that out by executing the following commands: |
3244 |
|
3245 |
# fdisk -l /dev/hda |
3246 |
|
3247 |
Disk /dev/hda: 320.0 GB, 320072933376 bytes |
3248 |
255 heads, 63 sectors/track, 38913 cylinders |
3249 |
Units = cylinders of 16065 * 512 = 8225280 bytes |
3250 |
|
3251 |
Device Boot Start End Blocks Id System |
3252 |
/dev/hda1 * 1 2919 23446836 7 HPFS/NTFS |
3253 |
/dev/hda2 2920 8018 40957717+ 7 HPFS/NTFS |
3254 |
/dev/hda3 8019 38549 245240257+ 7 HPFS/NTFS |
3255 |
/dev/hda4 38550 38913 2923830 82 Linux swap / Solaris |
3256 |
|
3257 |
# fdisk -l /dev/hdb |
3258 |
|
3259 |
Disk /dev/hdb: 250.0 GB, 250059350016 bytes |
3260 |
255 heads, 63 sectors/track, 30401 cylinders |
3261 |
Units = cylinders of 16065 * 512 = 8225280 bytes |
3262 |
|
3263 |
Device Boot Start End Blocks Id System |
3264 |
/dev/hdb1 * 1 5222 41945683+ 83 Linux |
3265 |
/dev/hdb2 5223 5484 2104515 82 Linux swap / Solaris |
3266 |
/dev/hdb3 5485 14726 74236365 f W95 Ext'd (LBA) |
3267 |
/dev/hdb4 14727 30401 125909437+ 83 Linux |
3268 |
/dev/hdb5 5485 14726 74236333+ 83 Linux |
3269 |
|
3270 |
Ok, this clears things up. The first disk contains three Windows XP |
3271 |
partitions (NTFS) and a Linux Swap partition. In fact, /dev/hda1 is the |
3272 |
system "disk" for Windows, since Windows will always be installed in the |
3273 |
first partition of the primary master disk. |
3274 |
|
3275 |
The second disk, on the other hand, contains a Linux partition (/dev/hdb1), |
3276 |
a Linux Swap partition /dev/hdb2, and an extended partition /dev/hdb3 |
3277 |
which contains two more Linux partitions (/dev/hdb4 and /dev/hdb5). |
3278 |
|
3279 |
The final thing we need to know about this system is what CD/DVD-ROMs it |
3280 |
has. So I execute the command: |
3281 |
|
3282 |
# cat /proc/sys/dev/cdrom/info |
3283 |
CD-ROM information, Id: cdrom.c 3.20 2003/12/17 |
3284 |
|
3285 |
drive name: hdd hdc |
3286 |
drive speed: 0 126 |
3287 |
drive # of slots: 1 1 |
3288 |
Can close tray: 1 1 |
3289 |
Can open tray: 1 1 |
3290 |
Can lock tray: 1 1 |
3291 |
Can change speed: 1 1 |
3292 |
Can select disk: 0 0 |
3293 |
Can read multisession: 1 1 |
3294 |
Can read MCN: 1 1 |
3295 |
Reports media changed: 1 1 |
3296 |
Can play audio: 1 1 |
3297 |
Can write CD-R: 0 1 |
3298 |
Can write CD-RW: 0 1 |
3299 |
Can read DVD: 1 1 |
3300 |
Can write DVD-R: 0 1 |
3301 |
Can write DVD-RAM: 0 1 |
3302 |
Can read MRW: 1 0 |
3303 |
Can write MRW: 1 0 |
3304 |
Can write RAM: 0 1 |
3305 |
|
3306 |
The system has two DVD-ROMs, hdc which is the secondary master and is a |
3307 |
DVD writer, and hdd which is the secondary slave and is a DVD reader. |
3308 |
|
3309 |
At this point I will connect my USB stick, wait for a while and execute |
3310 |
the command: |
3311 |
|
3312 |
# cat /proc/partitions |
3313 |
major minor #blocks name |
3314 |
|
3315 |
3 0 312571224 hda |
3316 |
3 1 23446836 hda1 |
3317 |
3 2 40957717 hda2 |
3318 |
3 3 245240257 hda3 |
3319 |
3 4 2923830 hda4 |
3320 |
3 64 244198584 hdb |
3321 |
3 65 41945683 hdb1 |
3322 |
3 66 2104515 hdb2 |
3323 |
3 67 1 hdb3 |
3324 |
3 68 125909437 hdb4 |
3325 |
3 69 74236333 hdb5 |
3326 |
8 0 1007615 sda |
3327 |
8 4 1006576 sda4 |
3328 |
|
3329 |
As you can see, we have two more lines here, that reflect the changes to |
3330 |
our system (the connection of the USB device). So my USB stick is recognized |
3331 |
by the system as sda, and the disk itself contains a VFAT file system. |
3332 |
|
3333 |
Example 2 |
3334 |
--------------------- |
3335 |
The second system is a Linux box with one SCSI disk and a CD-ROM. Again |
3336 |
I issue the command: |
3337 |
|
3338 |
# cat /proc/partitions |
3339 |
major minor #blocks name |
3340 |
|
3341 |
8 0 156290904 sda |
3342 |
8 1 64228 sda1 |
3343 |
8 2 15735667 sda2 |
3344 |
8 3 15735667 sda3 |
3345 |
8 4 124744725 sda4 |
3346 |
|
3347 |
From its output I see I only have one disk sda, which contains four |
3348 |
partitions. |
3349 |
|
3350 |
Then I execute fdisk, which shows me that the disk contains one DOS and |
3351 |
three Linux partitions. |
3352 |
|
3353 |
# fdisk -l /dev/hdb |
3354 |
Disk /dev/sda: 160.0 GB, 160041885696 bytes |
3355 |
255 heads, 63 sectors/track, 19457 cylinders |
3356 |
Units = cylinders of 16065 * 512 = 8225280 bytes |
3357 |
|
3358 |
Device Boot Start End Blocks Id System |
3359 |
/dev/sda1 1 8 64228+ 6 FAT16 |
3360 |
/dev/sda2 9 1967 15735667+ 83 Linux |
3361 |
/dev/sda3 1968 3926 15735667+ 83 Linux |
3362 |
/dev/sda4 3927 19456 124744725 83 Linux |
3363 |
|
3364 |
Finally I query its CD-ROMs, by executing the command: |
3365 |
|
3366 |
# cat /proc/sys/dev/cdrom/info |
3367 |
CD-ROM information, Id: cdrom.c 3.20 2003/12/17 |
3368 |
|
3369 |
drive name: hda |
3370 |
drive speed: 0 |
3371 |
drive # of slots: 1 |
3372 |
Can close tray: 1 |
3373 |
Can open tray: 1 |
3374 |
Can lock tray: 1 |
3375 |
Can change speed: 1 |
3376 |
Can select disk: 0 |
3377 |
Can read multisession: 1 |
3378 |
Can read MCN: 1 |
3379 |
Reports media changed: 1 |
3380 |
Can play audio: 1 |
3381 |
Can write CD-R: 1 |
3382 |
Can write CD-RW: 1 |
3383 |
Can read DVD: 1 |
3384 |
Can write DVD-R: 0 |
3385 |
Can write DVD-RAM: 0 |
3386 |
Can read MRW: 1 |
3387 |
Can write MRW: 1 |
3388 |
Can write RAM: 0 |
3389 |
|
3390 |
Which tells me that I only have an IDE CD-ROM, (hda), which is actually |
3391 |
a CD writer. |
3392 |
|
3393 |
Then I connect my USB stick, and I get: |
3394 |
|
3395 |
# cat /proc/partitions |
3396 |
major minor #blocks name |
3397 |
|
3398 |
8 0 156290904 sda |
3399 |
8 1 64228 sda1 |
3400 |
8 2 15735667 sda2 |
3401 |
8 3 15735667 sda3 |
3402 |
8 4 124744725 sda4 |
3403 |
8 16 1007615 sdb |
3404 |
8 20 1006576 sdb4 |
3405 |
|
3406 |
Although it's the same stick I used with the previous system, which was |
3407 |
recognized as sda there, now its name is sdb. So, its name depends on the |
3408 |
system it is connected to, and will not always be the same. |
3409 |
|
3410 |
SCSI disks when there are none!!! |
3411 |
------------------------------------------------------------------------------ |
3412 |
I am confused!!! I am on a disk with two ATA (PATA) disks, but when I |
3413 |
query the partition list, this is what I get: |
3414 |
|
3415 |
# cat /proc/partitions |
3416 |
major minor #blocks name |
3417 |
|
3418 |
3 0 312571224 sda |
3419 |
3 1 23446836 sda1 |
3420 |
3 2 40957717 sda2 |
3421 |
3 3 245240257 sda3 |
3422 |
3 4 2923830 sda4 |
3423 |
3 64 244198584 sdb |
3424 |
3 65 41945683 sdb1 |
3425 |
3 66 2104515 sdb2 |
3426 |
3 67 1 sdb3 |
3427 |
3 68 125909437 sdb4 |
3428 |
3 69 74236333 sdb5 |
3429 |
|
3430 |
According to what's discussed up to now, the system seems to have two SCSI |
3431 |
disks, but I know it actually has two ATA (PATA) disks. What's going on?. |
3432 |
|
3433 |
What is really happening here is that you have one of the newest Linux |
3434 |
kernels (using the libata disk driver), which shows ALL disks as SCSI. That |
3435 |
does not mean that the system thinks it has SCSI disks, it just names them |
3436 |
as such. |
3437 |
|
3438 |
To make is clear, execute the commands: |
3439 |
|
3440 |
# hdparm -i /dev/sda |
3441 |
|
3442 |
/dev/sda: |
3443 |
|
3444 |
Model=WDC WD3200AAJB-00TYA0 , FwRev=00.02C01, SerialNo= |
3445 |
WD-WCAPZ0648927 |
3446 |
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq } |
3447 |
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50 |
3448 |
BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=?16? |
3449 |
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455 |
3450 |
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} |
3451 |
PIO modes: pio0 pio3 pio4 |
3452 |
DMA modes: mdma0 mdma1 mdma2 |
3453 |
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 |
3454 |
AdvancedPM=no WriteCache=enabled |
3455 |
Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6,7 |
3456 |
|
3457 |
* signifies the current active mode |
3458 |
|
3459 |
# hdparm -i /dev/sdb |
3460 |
|
3461 |
/dev/sdb: |
3462 |
|
3463 |
Model=WDC WD2500JB-00GVC0 , FwRev=08.02D08, SerialNo= |
3464 |
WD-WCAL76141931 |
3465 |
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq } |
3466 |
RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74 |
3467 |
BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?16? |
3468 |
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455 |
3469 |
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} |
3470 |
PIO modes: pio0 pio1 pio2 pio3 pio4 |
3471 |
DMA modes: mdma0 mdma1 mdma2 |
3472 |
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 |
3473 |
AdvancedPM=no WriteCache=enabled |
3474 |
Drive conforms to: Unspecified: ATA/ATAPI-1,2,3,4,5,6 |
3475 |
|
3476 |
* signifies the current active mode |
3477 |
|
3478 |
This is also valid for the CDs/DVDs of the system: |
3479 |
|
3480 |
# cat /proc/sys/dev/cdrom/info |
3481 |
CD-ROM information, Id: cdrom.c 3.20 2003/12/17 |
3482 |
|
3483 |
drive name: sr1 sr0 |
3484 |
drive speed: 0 126 |
3485 |
drive # of slots: 1 1 |
3486 |
Can close tray: 1 1 |
3487 |
Can open tray: 1 1 |
3488 |
Can lock tray: 1 1 |
3489 |
Can change speed: 1 1 |
3490 |
Can select disk: 0 0 |
3491 |
Can read multisession: 1 1 |
3492 |
Can read MCN: 1 1 |
3493 |
Reports media changed: 1 1 |
3494 |
Can play audio: 1 1 |
3495 |
Can write CD-R: 0 1 |
3496 |
Can write CD-RW: 0 1 |
3497 |
Can read DVD: 1 1 |
3498 |
Can write DVD-R: 0 1 |
3499 |
Can write DVD-RAM: 0 1 |
3500 |
Can read MRW: 1 0 |
3501 |
Can write MRW: 1 0 |
3502 |
Can write RAM: 0 1 |
3503 |
|
3504 |
While the hdparm shows they are ATA devices: |
3505 |
|
3506 |
# hdparm -i /dev/sr0 |
3507 |
|
3508 |
/dev/sr0: |
3509 |
|
3510 |
Model=HL-DT-ST DVDRAM GSA-H42L , FwRev=SL01 , |
3511 |
SerialNo=K286CQF2231 |
3512 |
Config={ Fixed Removeable DTR10Mbs nonMagnetic } |
3513 |
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0 |
3514 |
BuffType=unknown, BuffSize=0kB, MaxMultSect=0 |
3515 |
(maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0 |
3516 |
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} |
3517 |
PIO modes: pio0 pio3 pio4 |
3518 |
DMA modes: mdma0 mdma1 mdma2 |
3519 |
UDMA modes: udma0 udma1 *udma2 udma3 udma4 |
3520 |
AdvancedPM=no |
3521 |
Drive conforms to: unknown: ATA/ATAPI-4,5,6,7 |
3522 |
|
3523 |
* signifies the current active mode |
3524 |
|
3525 |
|
3526 |
|
3527 |
|
3528 |
|
3529 |
Clonezilla-SysRescCD - Some theory on disks - 08/02/2009 - v 3.1.0 |
3530 |
|
3531 |
Intro |
3532 |
------------------------------------------------------------------------------ |
3533 |
|
3534 |
When working with with disks/partitions and system backup, restoration |
3535 |
and rescue, it is vital to have a very good understanding of the basic |
3536 |
concepts of booting, partitioning etc. |
3537 |
|
3538 |
This page is by no means a guide to these concepts. It just pin-points |
3539 |
some of them, so the user can look them up in more thorough sources. |
3540 |
|
3541 |
What is a file system? |
3542 |
------------------------------------------------------------------------------ |
3543 |
A file system is the way in which files are named and where they are placed |
3544 |
logically for storage and retrieval. The DOS, Windows, OS/2, Macintosh, |
3545 |
and UNIX-based operating systems all have file systems in which files are |
3546 |
placed somewhere in a hierarchical (tree) structure. A file is placed in |
3547 |
a directory (folder in Windows) or subdirectory at the desired place in |
3548 |
the tree structure. |
3549 |
|
3550 |
File systems specify conventions for naming files. These conventions include |
3551 |
the maximum number of characters in a name, which characters can be used, |
3552 |
and, in some systems, how long the file name suffix can be. A file system |
3553 |
also includes a format for specifying the path to a file through the |
3554 |
structure of directories. |
3555 |
|
3556 |
Each operating system provides special tools to initialize/format the file |
3557 |
system types it supports. Examples of such tools are format in DOS/Windows, |
3558 |
mkdosfs and mkfs in Linux, etc. |
3559 |
|
3560 |
What is a partition? |
3561 |
------------------------------------------------------------------------------ |
3562 |
|
3563 |
A partition is a logical division of a hard disk created so that you can |
3564 |
have different operating systems on the same hard disk or to create the |
3565 |
appearance of having separate hard drives for file management, multiple |
3566 |
users, or other purposes. |
3567 |
|
3568 |
In Windows, a one-partition hard disk is labelled the "C:" drive ("A:" |
3569 |
and "B:" are typically reserved for diskette drives). A two-partition |
3570 |
hard drive would typically contain "C:" and "D:" drives. (CD-ROM drives |
3571 |
typically are assigned the last letter in whatever sequence of letters |
3572 |
have been used as a result of hard disk formatting, or typically with a |
3573 |
two-partition, the "E:" drive.). |
3574 |
|
3575 |
In UNIX-based systems, a partition is used to host the / (root) file |
3576 |
system, and optionally the /opt, /usr and /home file systems. There may |
3577 |
also be a swap partition, which doesn't host any file system. |
3578 |
|
3579 |
Each operatin system provides some kind of tool to create and manage |
3580 |
partitions. Examples of such tools are fdisk in DOS/Windows, fdisk, sfdisk |
3581 |
and parted in Linux, etc. |
3582 |
|
3583 |
What is the MBR? |
3584 |
------------------------------------------------------------------------------ |
3585 |
|
3586 |
When you boot an operating system into your computer, a critical part |
3587 |
of the process is to give control to the first sector on your hard disk, |
3588 |
which is called the Master Boot Record (MBR). |
3589 |
|
3590 |
The Master Boot Record is also sometimes called the "partition sector" |
3591 |
or the "master partition table" because it includes a partition table |
3592 |
that defines how many partitions the hard disk has, the size of each, |
3593 |
and the address where each partition begins. |
3594 |
|
3595 |
What is the Boot Loader? |
3596 |
------------------------------------------------------------------------------ |
3597 |
|
3598 |
A boot loader, also called a boot manager, is a small program which usually |
3599 |
resides in the MBR of the first disk (i.e. primary master ATA disk) of |
3600 |
the system, that places the operating system (OS) of a computer into memory. |
3601 |
|
3602 |
Microsoft Windows or the Mac OS provide their own Boot Loaders, beeing able |
3603 |
to load only the operating system in question. Linux, on the other hand, |
3604 |
provides two alternatives: LILO and GRUB, which have Multiboot capabilities. |
3605 |
|
3606 |
Managing partitions |
3607 |
------------------------------------------------------------------------------ |
3608 |
|
3609 |
All the programs presented previously are able to create and delete |
3610 |
partitions on any disk, with qparted at the top of the list, as it is a |
3611 |
graphic tool. |
3612 |
|
3613 |
Changing the ID (type) of a partition is easy using qparted, but it is |
3614 |
as easy with sfdisk. In order to change a FAT32 partition to HPFS/NTFS |
3615 |
(NTFS), the following command is enough: |
3616 |
sfdisk --change-id /dev/hda1 c 7 |
3617 |
where |
3618 |
c: existing partition ID |
3619 |
7: new partition ID |
3620 |
|
3621 |
Of course the partition will be usable only after it is formated with NTFS |
3622 |
format, or after restoring a NTFS partition to it, using Clonezilla Live. |
3623 |
|
3624 |
Finally, enlarging a partition is a two step process: |
3625 |
|
3626 |
* Resizing the partition itself |
3627 |
* Resizing the file system contained within |
3628 |
|
3629 |
Fortunatelly, Clonezilla Live takes care of both these steps for us, |
3630 |
when instructed to do so (using the parameter -r). |
3631 |
|
3632 |
Partition list |
3633 |
--------------------- |
3634 |
|
3635 |
The following table presents known partition types along with their IDs: |
3636 |
|
3637 |
0 Empty 80 Old Minix |
3638 |
1 FAT12 81 Minix / old Linux |
3639 |
2 XENIX root 82 Linux swap / Solaris |
3640 |
3 XENIX usr 83 Linux |
3641 |
4 FAT16 <32M 84 OS/2 hidden C: drive |
3642 |
5 Extended 85 Linux extended |
3643 |
6 FAT16 86 NTFS volume set |
3644 |
7 HPFS/NTFS 87 NTFS volume set |
3645 |
8 AIX 88 Linux plaintext |
3646 |
9 AIX bootable 8e Linux LVM |
3647 |
a OS/2 Boot Manager 93 Amoeba |
3648 |
b W95 FAT32 94 Amoeba BBT |
3649 |
c W95 FAT32 (LBA) 9f BSD/OS |
3650 |
e W95 FAT16 (LBA) a0 IBM Thinkpad hibernation |
3651 |
f W95 Ext'd (LBA) a5 FreeBSD |
3652 |
10 OPUS a6 OpenBSD |
3653 |
11 Hidden FAT12 a7 NeXTSTEP |
3654 |
12 Compaq diagnostics a8 Darwin UFS |
3655 |
14 Hidden FAT16 <32M a9 NetBSD |
3656 |
16 Hidden FAT16 ab Darwin boot |
3657 |
17 Hidden HPFS/NTFS b7 BSDI fs |
3658 |
18 AST SmartSleep b8 BSDI swap |
3659 |
1b Hidden W95 FAT32 bb Boot Wizard hidden |
3660 |
1c Hidden W95 FAT32 (LBA) be Solaris boot |
3661 |
1e Hidden W95 FAT16 (LBA) bf Solaris |
3662 |
24 NEC DOS c1 DRDOS/sec (FAT-12) |
3663 |
39 Plan 9 c4 DRDOS/sec (FAT-16 |
3664 |
3c PartitionMagic recovery c6 DRDOS/sec (FAT-16) |
3665 |
40 Venix 80286 c7 Syrinx |
3666 |
41 PPC PReP Boot da Non-FS data |
3667 |
42 SFS db CP/M / CTOS / ... |
3668 |
4d QNX4.x de Dell Utility |
3669 |
4e QNX4.x 2nd part df BootIt |
3670 |
4f QNX4.x 3rd part e1 DOS access |
3671 |
50 OnTrack DM e3 DOS R/O |
3672 |
51 OnTrack DM6 Aux1 e4 SpeedStor |
3673 |
52 CP/M eb BeOS fs |
3674 |
53 OnTrack DM6 Aux3 ee EFI GPT |
3675 |
54 OnTrackDM6 ef EFI (FAT-12/16/32) |
3676 |
55 EZ-Drive f0 Linux/PA-RISC boot |
3677 |
56 Golden Bow f1 SpeedStor |
3678 |
5c Priam Edisk f4 SpeedStor |
3679 |
61 SpeedStor f2 DOS secondary |
3680 |
63 GNU HURD or SysV fd Linux raid autodetect |
3681 |
64 Novell Netware 286 fe LANstep |
3682 |
65 Novell Netware 386 ff BBT |
3683 |
70 DiskSecure Multi-Boot |
3684 |
75 PC/IX |
3685 |
|
3686 |
The partitions you are most likely to see in use, are: |
3687 |
|
3688 |
* FAT16 (ID = 6) |
3689 |
This is the old DOS partition type |
3690 |
You may still find it in pure DOS installations, like vendor diagnostics |
3691 |
tool partitions, and small USB sticks (128 - 250 MB) |
3692 |
|
3693 |
* HPFS/NTFS (ID = 7) |
3694 |
This is the Windows XP partition, also known as NTFS |
3695 |
|
3696 |
* W95 FAT32 (LBA) (ID = c) |
3697 |
This is the Windows 95 - 98 partition |
3698 |
It is used in any kind of disk and large USB devices (1 GB and more) |
3699 |
|
3700 |
* W95 Ext'd (LBA) (ID = f) |
3701 |
Extended partition. It acts as a container for other partitions |
3702 |
There is one more extended partition type (ID = 5), but it does not seem |
3703 |
to be in use as much |
3704 |
|
3705 |
* Linux swap / Solaris (ID = 82) |
3706 |
Swap partition, acting as Virtual Memory |
3707 |
Modern computers with 1 - 2 GB of memory may not use it at all |
3708 |
|
3709 |
* Linux (ID = 83) |
3710 |
Linux partitions, like ext2, ext3 and reiserfs |
3711 |
|
3712 |
|
3713 |
|
3714 |
|