I wanted to achieve a system disk backup with an Ubuntu live CD. I used the following command:
dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c > /media/external/image.gz
This seemed to work. To validate that I erased the content of sda, then loaded back from the image:
dd if=/dev/zero of=/dev/sda bs=1M
gunzip -c /media/external/image.gz | dd of=/dev/sda conv=sync,noerror bs=64K
However, the result was no longer bootable.
The results of fdisk -l are equal before taking the backup and after trying to restore it:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util
fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 14594 117220823+ ee GPT
/dev/sda2 * 1 1 0 0 Empty
Partition 2 does not end on cylinder boundary.
I can't seem to be able to mount the disk either. The filetypes I tried did not work (the original disk is a bootable Mac OS X). I tried hfs, hfsplus, hpfs.
The disk does not show (not even as unmounted) in the Ubuntu file explorer anymore. It was showing before zeroing and the restore attempt.
My main question is: what is wrong in my backup/clear/restore sequence? Shouldn't it copy and restore the whole content of the disk, including boot and whatnot? And do that independently of the format? Can the zeroing be the heart of the problem? What did I miss?
EDIT: I have seen this but it did not help me.
The external disk is NTFS.
