Using the fdisk -l
command I got the following answer:
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 28266495 14132224 27 Hidden NTFS WinRE
/dev/sda2 28268544 28473343 102400 7 HPFS/NTFS/exFAT
/dev/sda3 28473344 132552703 52039680 7 HPFS/NTFS/exFAT
/dev/sda4 * 132556798 625141759 246292481 5 Extended
/dev/sda5 193996800 198092799 2048000 82 Linux swap / Solaris
/dev/sda6 234960896 625141759 195090432 7 HPFS/NTFS/exFAT
/dev/sda7 198094848 234950316 18427734+ 83 Linux
/dev/sda8 132556800 183756018 25599609+ 83 Linux
I'd like to copy the three first partitions of my disk in an image using the dd
command. So I mounted an external hard drive, entered in its folder and typed:
# dd count=$((132552703-2048)) if=/dev/sda of=./newImage.image
But this command copied all the sda disk to my external hard drive instead of just copying until the end of the sda3 partition.
How can I use the dd
to create an image that starts at the beginning of sda1 and finishes at the end of sda3?