Copyright: © 2007-2009, Spiros Georgaras <sng@hellug.gr> | Single page |
Last update: 23/12/2009 | Printable version |
![]() | |
Previous | Contents | Next |
Assuming you have used Clonezilla Live to make a backup of your Windows XP system (partition /dev/hda1), which you have saved as win_img, you will probably be wondering what to do with it now. Well, one option would be to keep it to the disk you used to save it in, store the disk, and use it whenever you need it.
Another option would be to create a DVD you can use to restore this image. This procedure will be explained here.
You will use Clonezilla-SysRescCD to create a restore Clonezilla Live System, and burn it to DVD along with your win_img image. Depending on the size of the image and the free disk space, you have three alternatives:
Assuming you have saved your image file win_img in partition hdb4, you have to boot Clonezilla Live to RAM, using Clonezilla-SysRescCD, and when the system is fully up select Enter_shell and type 2 to get to the shell.
Then you mount the partition in /home/partimag
sudo su -
rm /home/partimag
mkdir /home/partimag
mount /dev/hdb4 /home/partimag
cd /home/partimag
Note: It /dev/hdb4 is a NTFS (Windows XP) partition, you will have to use ntfs-3g to mount it, since you need write access to it. In this case you type the commands:
sudo su -
ntfs-3g /dev/hdb4 /home/partimag
cd /home/partimag
If you have problems mounting the partition, refer to section "Saving image files in NTFS partitions".
Create the ISO file by executing the command:
/opt/drbl/sbin/ocs-iso -a restore -V "Win XP Restore" \
-P "Spiros Georgaras <sng@hellug.gr>" -s
All tha's left to do is burn the DVD. Remove the CD from the DVD writer, insert a writable DVD disk and burn the ISO file:
growisofs -Z /dev/hdc=restore.iso
eject /dev/hdc
If the computer has only one DVD writer, you can use the following command, which will auto detect it
growisofs -Z $(what-cd -dwb)=restore.iso
eject $(what-cd -dwb)
Finally, add the image file to the DVD, by typing:
growisofs -M /dev/hdc -R -J \
-V "Win XP Restore" --publisher "Spiros Georgaras <sng@hellug.gr>" \
-graft-points /win_img/=/home/partimag/win_img
If the computer has only one DVD writer, you can use the following command, which will auto detect it
growisofs -M $(what-cd -dwb) -R -J \
-V "Win XP Restore" --publisher "Spiros Georgaras <sng@hellug.gr>" \
-graft-points /win_img/=/home/partimag/win_img
Note: In the last commands I have assumed your writer is /dev/hdc. You will have to replace this with the device name of your writer.
Working parameters can be passed to the Clonezilla Live restore script at DVD mastering time. This is very useful if we want to create an "automated" restore DVD. The restore script (osc-sr) can accept the following parameters:
We will use these commands when mastering our restore DVD. According to Clonezilla's documentation, since we will use mkisofs (actually genisoimage) coming with Clonezilla Live, the ISO file must not be over 4.4GB.
Note: The restore DVD will use a 800x600 screen by dafault; if you have to use 640x480, you have to edit the isolinux/isolinux.cfg file manually.
You can get more info about the available restore script options by executing
/opt/drbl/sbin/ocs-sr -h 2>&1 | less
Caution: It is not possible to concatenate the options, as it usually happens in linux. That is, if you write -bc... instead of -b -c --nogui..., the result will be that the automatic restore will not work. This is because of the way the original restore script was written.
Assuming you have saved your image file win_img in partition hdb4, you have to boot Clonezilla Live to RAM, using Clonezilla-SysRescCD, and when the system is fully up select Enter_shell and type 2 to get to the shell.
Then you mount the partition in /home/partimag
sudo su -
rm /home/partimag
mkdir /home/partimag
mount /dev/hdb4 /home/partimag
cd /home/partimag
Note: It /dev/hdb4 is a NTFS (Windows XP) partition, you will have to use ntfs-3g to mount it, since you need write access to it. In this case you type the commands:
sudo su -
ntfs-3g /dev/hdb4 /home/partimag
cd /home/partimag
If you have problems mounting the partition, refer to section "Saving image files in NTFS partitions".
Assuming the image file is the backup of partition hda1, create the ISO file by executing the command:
/opt/drbl/sbin/ocs-iso -a clonezilla-44-restore-dvd \
-I "Restore Windows XP (Home PC) - hda1" \
-V "Win XP Restore" -P "Spiros Georgaras <sng@hellug.gr>" \
-W "-j0 -b -c --nogui restoreparts win_img hda1" win_img
All tha's left to do is burn the DVD. Remove the CD from the DVD writer, insert a writable DVD disk and burn the ISO file:
growisofs -Z /dev/hdc=clonezilla-44-restore-dvd
eject /dev/hdc
Note: In the last commands I have assumed your writer is /dev/hdc. You will have to replace this with the device name of your writer.
If the computer has only one DVD writer, you can use the following command, which will auto detect it
growisofs -Z $(what-cd -dwb)=clonezilla-44-restore-dvd.iso
eject $(what-cd -dwb)
Assuming you have saved your image file win_img in partition hdb4, you have to boot Clonezilla Live normally (no copy to RAM), using Clonezilla-SysRescCD, and when the system is fully up select Enter_shell and type 2 to get to the shell.
Then you mount the partition in /home/partimag
sudo su -
mount /dev/hdb4 /home/partimag
cd /home/partimag
Note: It /dev/hdb4 is a NTFS (Windows XP) partition, you will have to use ntfs-3g to mount it, since you need write access to it. In this case you type the commands:
sudo su -
ntfs-3g /dev/hdb4 /home/partimag
cd /home/partimag
If you have problems mounting the partition, refer to section "Saving image files in NTFS partitions".
Assuming the image file is the backup of partition hda1, create the ISO file by executing the command:
/opt/drbl/sbin/ocs-iso -a clonezilla-8-rescue-dvd \
-I "Restore Windows XP (Home PC) - hda1" \
-V "Win XP Restore" -P "Spiros Georgaras <sng@hellug.gr>" \
-A "-j0 -b -c --nogui restoreparts win_img hda1"
At this point you have to reboot the system, and boot Clonezilla Live to RAM, in order to burn the DVD.
When the system is fully up, select Enter_shell and type 2 to get to the shell and execute the commands:
sudo su -
mount /dev/hdb4 /home/partimag
cd /home/partimag
Note: At this point you don't need write access to /dev/hdb4, so it makes no difference whether it is a NTFS (Windows XP) partition or not.
Remove the CD from the DVD writer, insert a writable DVD disk and burn the ISO file:
growisofs -Z /dev/hdc=clonezilla-8-rescue-dvd.iso
eject /dev/hdc
If the computer has only one DVD writer, you can use the following command, which will auto detect it
growisofs -Z $(what-cd -dwb)=clonezilla-8-rescue-dvd.iso
eject $(what-cd -dwb)
Finally, add the image file to the DVD, by typing:
growisofs -M /dev/hdc -R -J \
-V "Win XP Restore" --publisher "Spiros Georgaras <sng@hellug.gr>" \
-graft-points /win_img/=/home/partimag/win_img
If the computer has only one DVD writer, you can use the following command, which will auto detect it
growisofs -M $(what-cd -dwb) -R -J \
-V "Win XP Restore" --publisher "Spiros Georgaras <sng@hellug.gr>" \
-graft-points /win_img/=/home/partimag/win_img
Note: In this section I have assumed your writer is /dev/hdc. You will have to replace this with the device name of your writer.
Systems equipped witη a USB keyboard, have a problem starting Clonezilla Live, SystemRescueCD or any of the tools in the CD, since the keyboard does not work while in boot menu, and the default boot menu action is to boot from the first hard disc.
One solution would be to connect to the system a PS2 keyboard before booting Clonezilla-SysRescCD. The problem that still remains has to do with systems not equipped with a PS2 connector at all.
In order to use Clonezilla-SysRescCD in such a system, the CD should be remastered changing the default boot menu entries as desired.
In order to use Clonezilla Live on such a system, one could use the network to get a backup, or perform a restore. Creating a restore DVD for such a system, would obviously have to be an auto restore DVD.
The problem of booting an auto restore DVD and performing the restore is still there, since the default boot menu action is again to boot from the first hard disc.
To address this problem, some new parameters have been added to the ISO mastering script (ocs-iso):
In order to use these parameters to master the auto restore DVD, the user has to modify the ISO mastering commands.
The command for a 4.4GB DVD would be:
/opt/drbl/sbin/ocs-iso -a clonezilla-44-restore-dvd \
-I "Restore Windows XP (Home PC) - hda1" \
-V "Win XP Restore" -P "Spiros Georgaras <sng@hellug.gr>" \
--noKeyboard --bootDelay 10 \
-W "-j0 -b -c --nogui restoreparts win_img hda1" win_img
The command for a 8GB DVD would be:
/opt/drbl/sbin/ocs-iso -a clonezilla-8-rescue-dvd \
-I "Restore Windows XP (Home PC) - hda1" \
-V "Win XP Restore" -P "Spiros Georgaras <sng@hellug.gr>" \
--noKeyboard --bootDelay 10 \
-A "-j0 -b -c --nogui restoreparts win_img hda1"
Using an auto restore DVD mastered using these parameters, is very simple; at system start-up the boot menu is displayed and after [number of seconds], the restore operation will start automatically.
When using any of the -W and -A parameters, you can use two more paremeters to modify the text displayed at the CD/DVD title and the menu items. These parameters are:
Previous | Contents | Next |