Using dd command and running out of space while cloning drive to img

Alan Kuras asked:

I have a problem with drive cloning.
Im using dd on damaged disk with bad sectors trying to make an image from it. Im booting computer with Live Linux CD .

Damaged disk: sda 146GB (NTFS)
External drive: sdb 300GB (NTFS)

After running the command below im running out of space on disk sdb.

dd if=/dev/sda of=/media/sdb1/hdd.img bs=4096 conv=noerror,sync

The question is why im running out of space on disk sdb ?

UPDATE: There is 300 GB of free space on partition sdb1

My answer:

/dev/sdb is a device special that represents the disk drive; it isn’t a filesystem, but you’ve tried to use it as one.

Instead, try this:

dd if=/dev/sda of=/dev/sdb bs=4096 conv=noerror,sync

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.