dd Backup of an encrypted partition or harddisk using Puppy Linux Minihowto for linux. (I am using ubuntu 8.04 and kde) :-) Back to Main Page
How to use the dd command to make a backup of a partition or a harddisk of an encrypted ubuntu 8.04, using Puppy 4.00
This is a "fairly" short version, and if you want to know more, go to the Internet etc.
This howto is without any guarantee, and you may use it on your own responsibility only.
There may be errors, but I do not want to use too much time to write this howto.
To check specific words you may try: http://en.wikipedia.org/wiki/Main_Page (search).
This minihowto is made mainly using screenshots, but some screenshots are missing, as I did not know how to make them.
Download a puppy 4.00 iso image and burn it into a puppy live-cd: download iso image (Further reading from puppy sites)
Insert the puppy live-cd and boot the computer (start up the computer):








Then follows a few more dialogs, where you can select place and size etc. of the pup_save.2fs file - not shown


You may run the "gparted" command from the command line, in order to see the names (and size) of the partitions
Please note /dev/hda2 which is an encrypted partition

You
can run the "fdisk -lsu" command in order to see the designations
(names) of the partitions on the computer which makes it more easy to
run the commands
on the command line.

Overview of the dd command
In
order to make a backup of the whole harddisk (/dev/hda) by the
name of "image.gz" onto an external harddisk (/dev/sda1) run following
command:
dd if=/dev/hda | gzip > /mnt/sda1/image.gz
Please note, that you might choose another name than "image.gz".
The image is compressed to use less space on the external harddisk.
/dev/sda1 has to be mounted.
In order to restore the image.gz on the external harddisk and back onto the internal harddisk run the following command:
gunzip -c /mnt/sda1/image.gz | dd of=/dev/hda
/dev/sda1 (the external harddisk) has to be mounted.
In order to make a backup of the hda1 partition run the following command:
dd if=/dev/hda1 | gzip > /mnt/sda1/image1.gz
Please note, that you might choose another name than "image1.gz".
/dev/hda1 must NOT be mounted
/dev/sda1 (the external harddisk) has to be mounted
The image is compressed to use less space on the external harddisk.
In order to restore the image1.gz image back onto the hda1 partition run the following command:
gunzip -c /mnt/sda1/image1.gz | dd of=/dev/hda1
/dev/sda1 (the external harddisk) has to be mounted
/dev/hda1 must NOT be mounted
In order to make a backup of the hda2 partition run the following command:
dd if=/dev/hda2 | gzip > /mnt/sda1/image2.gz
Please note, that you might choose another name than "image2.gz".
/dev/hda1 must NOT be mounted
/dev/sda1 (the external harddisk) has to be mounted
The image is compressed to use less space on the external harddisk.
In order to restore the image2.gz image back onto the hda2 partition run the following command:
gunzip -c /mnt/sda2/image1.gz | dd of=/dev/hda2
/dev/sda1 (the external harddisk) has to be mounted
/dev/hda2 must NOT be mounted
Please note, that the names of the harddisk block devices can be different according to which type of harddisk you use:
Older types of harddisks (pci) are called hda - hda1 - hda2 etc.
Newer types of harddisks (sata) are called sda -sda1 - sda2 etc.
External harddisks are using the sd* (sda - sda1 etc. designations (names)
The operating system (linux) will automatically designate the names.
In order to see the names, you may run the following command:
fdisk -lsu
In order to open the "gparted" program, to see the names -and sizes in a more human way run the following command:
gparted
Please
also note, that the above "dd" command does not care what kind of data
(linux or windows etc.) is contained in the partitions (on the
harddisk).
it copies the data as low level data blocks.
7/2008