If you ever wanted to create bootable recovery USB Flash Drive then I have good news for you as it can be achieved in several simple steps using Clonezilla Live CD, external USB Hard Drive, and a target USB Flash Drive.
Please take a note that this is not an ordinary backup solution as this procedure is geared towards an easy and automatic restoration process.
Step by step procedure
Step 1
Prepare USB Flash Drive, which needs to be bigger then expected backup size.
I will use ext2 filesystem but you are free to use whatever filesystem you want, within reason, of course.
Do not forget that you are not limited to one partition, so you can use hidden partition for quick restore purpose, and second regular partition which additional drivers or applications.
Step 2
Download and burn Clonezilla Live CD.
Check out the differences between i486, i686, and amd64 versions.
Step 3
Boot prepared Live CD.
Step 4
Select preferred graphics mode.
Step 5
Select language.
Step 6
Select keymap.
Step 7
Start Clonezilla to perform backup.
Step 8
Select device to image mode.
Step 9
Select local device option as image will be stored on the external USB Hard Drive at first.
Step 10
Connect external USB Hard Drive to the target computer, wait couple of seconds and press Enter key.
Step 11
Select external USB Hard Drive. It will be used as intermediate backup storage before moving it to USB Flash Drive.
Step 12
Select the top directory on the external USB Hard Drive that will be used to store backup image.
Step 13
You can use beginner or expert mode.
Step 14
Select save local disk as an image.
Step 15
Provide a name for backup image.
Step 16
Select the source device – Hard Drive that will be backed up.
Step 17
Skip checking and repairing file systems on the source device.
Step 18
Decide if you want to check image integrity.
ocs-chkimg
command.Step 19
You can note the command displayed on the screen as it reflects choices made in the previous steps.
$ ocs-sr -q2 -c -j2 -z1p -i 2000 -sc -p true savedisk notebook-backup sda
I will not elaborate on the used parameters as you can quickly read description and examples using ocs-sr --help
command.
Step 20
Verify and confirm action before it is executed.
Step 21
Clonezilla will perform image creation.
Step 22
Exit to the command line after backup image is created.
Step 23
Connect the target USB Flash Drive.
Step 24
To create bootable USB Flash Drive execute the following command.
$ ocs-live-dev -d /dev/sdc1 -t -g en_US.UTF-8 -k NONE -e "-g auto -e1 auto -e2 -r -j2 -p reboot restoredisk notebook-backup sdb" notebook-backup
Additional notes
You can add --batch
parameter to perform fully automatic restore process.
$ ocs-live-dev -d /dev/sdc1 -t -g en_US.UTF-8 -k NONE -e "-batch -g auto -e1 auto -e2 -r -j2 -p reboot restoredisk notebook-backup sdb" notebook-backup
To modify startup menu you need to edit one of the following files (depending on the used boot loader): /boot/grub/menu.lst
(Grub1
), /EFI/boot/grub.cfg
(Grub2
), /syslinux/syslinux.cfg
(Syslinux
).
Clonezilla provides many more of interesting opportunities so I strongly encourage you to check it out.