I have extended partition that contains three another partition. All I want to do is make copied image of that 'extended' partition. I followed steps shown in here, and ran this
sudo dd if=/dev/sdc3 conv=sync,noerror bs=64K | gzip -c > TOSHIBA_ExtPart.img.gz
then I got the error : No such device or address.
*I want to make perfect copy of partition, because there are deleted files I want to recover in the future in partition so imaged file should contain them.
Is there any mistake I made?
Or is there any better method to do it?
(OS : Ubuntu 16.04 LTS)
Best Answer
I agree with @ravery, that you should check that you are really trying to read from the correct device.
But there is another problem too. I tested your command in a test environment, and
dd
read only one kibibyte (1024 bytes) when I wanted it to make an image of an extended partition.An obvious work-around is to make an image of the whole drive
/dev/sdX
, where X is the drive letter (for examplea
orb
orc)
. But it means more work.Another alternative is to look for the start and the size of the extended partition with the help of
parted
.u MiB
means that the unit is mibibytes. Use that block size also indd
and then useseek
andcount
indd
to select the correct data to copy into the image.seek=
andcount=
are used likebs=
. It is described inman dd
. You can usebs=1M
and then use the output from the parted command line for the values for seek and count.