Copying USB stick fails with device errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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.

When I try to use dd to copy it, it eventually times out, produces an
error like "sdb: unable to read partition table" and makes the device
entirely inaccessible. I'm also unable to mount the resulting dd image
as a loopback vfat filesystem once my copy has completed.

There seems to be a disparity between what fdisk shows is the length
of the filesystem and how much space is actually allocated? How did
they create two devices within the one device?

dmesg contains this info when I insert the USB stick:

[1857968.944942] sd 75:0:0:0: [sdb] 7559249 512-byte logical blocks:
(3.87 GB/3.60 GiB)
[1857968.945310] sd 75:0:0:1: [sdc] 25307055 512-byte logical blocks:
(12.9 GB/12.0 GiB)

Here's the output from fdisk:

# fdisk -l /dev/sdb /dev/sdc

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

Disk /dev/sdc: 13.0 GB, 12957212160 bytes
229 heads, 55 sectors/track, 2009 cylinders, total 25307055 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: 0x7d2c8154

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            9048    24272568    12131760+   7  HPFS/NTFS/exFAT

# file usbstick.dd
usbstick.dd: x86 boot sector; partition 1: ID=0xb, active, starthead
1, startsector 4, 5242856 sectors, code offset 0x31

What's the proper way to copy the entire USB stick as an image?

I suspect the issue is that the bootsector is within the first four
blocks, and the filesystem begins after that. How can I tell "mount"
to look for the filesystem after the first four blocks?

Somehow when I insert the USB stick on my fedora16 desktop, it's
already mounted (by udev?) and I can see the contents, so there is a
valid filesystem on the original USB stick.

Thanks,
Alex
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux