1

I have a windows 8.1 Pro laptop with a 500GB HD and a 500GB portable USB HD.

I boot up my laptop with a linux live CD so that I can use dd or cat.

Testing cat:

cat /dev/sda > /dev/sdc
cat: write error: No space left on device

Testing dd:

dd if=/dev/sda of=/dev/sdc bs=4096
dd: error writing L/dev/sdcL: No space left on device
1+0 records in
0+0 records out
0 bytes (0 B) copied. 0.0kB/s

When running fdisk -l I can see that my laptop HD has been assigned to /dev/sda and my external HD to /dev/sdc

However fdisk shows some unexpected info for the /dev/sdc section:

fdisk -l
Disk /dev/sdc: 10MiB, 10485768 bytes, 20400 sectors
Units: sectors of 1 * 512 = 512 bytes
...
Device    Boot  Start   End       Blocks    Id  System
/dev/sdc1 * 2048    718847    358400    7   HPFS/NTFS/exFAT
/dev/sdc2   718848  81922047  40601600  7   HPFS/NTFS/exFAT

The /dev/sdc external hd shows its only 10MiB in size.

What can I do to correct this issue?

I have tried using fdisk /dev/sdc to delete all partitions on the device, but after doing this cat and dd still return the same error message.

Another thing thats confusing is arn't cat and dd supposed to clone the source(laptop) hd and copy it to the target(external)? so the fact that my external HD having a different partition setup/config shouldnt matter right? Because the source disk is overwriting whatever is there with itself... Why should its setup make any difference? On a bare metal level the HD is 500GB, I thought that was the purpose of dd to clone the Entire Disk byte for byte. If it takes into consideration the setup of the external HD clearly its not cloning byte for byte as its giving authority to the external disk.

Update

lsblk returns

NAME   MAJ:MIN RM   SIZE   RO TYPE
sda     0:0     0  465.9G  0  disk 
>^sda1  0:1     0  350M    0  part
>^sda2  0:2     0  38.7G   0  part
sdc     8:32    0  465.8G  0  disk
loop0   7:0     0  275.1M  0  loop /livemnt/squashfs

gdisk -l /dev/sdc returns

....
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present

**********************************
Found invalid GTP and valid MBR; converting MBR to GPT format in memory.
**********************************
...

Connecting and dissconnecting the external HD makes the /dev/sdc drive appear and dissappear.

fdisk -l is reporting that the disk /dev/sdc is only 10MiB. How can it report this when we have no partitions?

  • I agree that leaving aside sectors marked as bad and things like that, dd should trash the partition table on your external drive. It shouldn't fail after 0 records either, nor mention sdc1 in its error message. – Ulrich Schwarz Jul 15 '16 at 16:55
  • Please post the output of lsblk and gdisk -l /dev/sdc because it is a bit unclear what is going on. – Ned64 Jul 15 '16 at 17:14
  • Is /dev/sdc really your external HD? (If you disconnect your external HD does /dev/sdc disappear? If you reconnect it, does /dev/sdc reappear?) Remember that because you're booting from a Live CD, the disk devices may not necessarily appear in the order you might expect ordinarily. – roaima Jul 15 '16 at 17:29
  • @UlrichSchwarz Sorry for the typo, dd doesnt mention sdc1 in its error, it reports sdcL – Jimbo'sGun's Jul 15 '16 at 19:29
  • @Ned64 I have updated my original post with the results of running your cmds. – Jimbo'sGun's Jul 15 '16 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.