I took out a 250 GB SATA disk from my netbook, filled it with zeroes with dd and connected it to my laptop via the usb adapter. It's correctly detected by fdisk:
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x475fa272
Device Boot Start End Blocks Id System
I created a primary partition and used the following command to create a ext4 filesystem:
mkfs.ext4 /dev/sdb1
Now fidsk shows:
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
81 heads, 63 sectors/track, 95707 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x475fa272
Device Boot Start End Blocks Id System
/dev/sdb1 2048 488397167 244197560 83 Linux
Ok, no surprise so far. Next, I wanted to extract Ubuntu ISO image with the following command:
dd if=~/ubuntu-12.10-desktop-i386.iso of=/dev/sdb
To my surprise, filesystem changed to 'Hidden HPFS/NTFS':
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
19 heads, 24 sectors/track, 1071046 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x475fa272
Device Boot Start End Blocks Id System
/dev/sdb1 * 64 1542743 771340 17 Hidden HPFS/NTFS
What's the CORRECT way to extract ISO image to the external drive using dd with preserving the current filesystem?