I'm trying to copy a USB stick that I purchased that's supposed to contain a bootable desktop with a bunch of applications like firefox, openoffice, etc. The USB stick somehow actually contains two devices. One has a vfat filesystem and the other appears to be NTFS. When mounted, it has some sort of fedora variant in a tarball on it that's actually the bootable desktop.
I've been able to use dd to create an image then write it back using dd to another USB stick successfully. The problem I'm having is with mounting the resulting dd image.
The filesystem appears to begin at block 4, so I've used an offset to try and mount it:
# mount -o loop,offset=4 -t vfat myusb_sdb.dd /media/desktop/
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
# dd if=/dev/sdb of=myusb_sdb.dd
dd: reading `/dev/sdb': Input/output error
5242864+0 records in
5242864+0 records out
2684346368 bytes (2.7 GB) copied, 182.722 s, 14.7 MB/s
# fdisk -l /dev/sdb
Disk /dev/sdb: 3870 MB, 3870335488 bytes
45 heads, 4 sectors/track, 41995 cylinders, total 7559249 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: 0x261e6d11
Device Boot Start End Blocks Id System
/dev/sdb1 * 4 5242859 2621428 b W95 FAT32
# file myusb_sdb.dd
myusb_sdb.dd: x86 boot sector; partition 1: ID=0xb, active, starthead
1, startsector 4, 5242856 sectors, code offset 0x31
Running fdisk on myusb_sdb.dd returns the same as the original device:
# fdisk -l myusb_sdb.dd
Disk myusb_sdb.dd: 2684 MB, 2684346368 bytes
45 heads, 4 sectors/track, 29127 cylinders, total 5242864 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: 0x261e6d11
Device Boot Start End Blocks Id System
myusb_sdb.dd1 * 4 5242859 2621428 b W95 FAT32
Thanks for any ideas,
Alex