Re: Salvaging data from USB flash disk



Hi Henrik,

Thank you for the information. No success yet. This is what I tried
so far:

# mount /tmp/lana-disk -r -o loop /mnt/lanadisk
mount: you must specify the filesystem type

# mount /tmp/lana-disk -r -t vfat -o loop /mnt/lanadisk
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)

Then I tried this losetup...like this:

# losetup /dev/loop0 /tmp/lana-disk
# mount /dev/loop0 -r -t vfat -o loop /mnt/lanadisk
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)

# mount -r /dev/loop0 /mnt/lanadisk
mount: you must specify the filesystem type

# mount -r -t vfat /dev/loop0 /mnt/lanadisk
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
or too many mounted file systems


I might be using losetup/mount wrong, I don't know. Am I?

There is also this:

# fdisk -l /dev/sda

Disk /dev/sda: 1043 MB, 1043333120 bytes
33 heads, 61 sectors/track, 1012 cylinders
Units = cylinders of 2013 * 512 = 1030656 bytes

Disk /dev/sda doesn't contain a valid partition table


I'm still hopeful about this disk! :) If you have more suggestions I'm
all ears, eyes, and fingers!
Thank you.


Henrik Carlqvist wrote:
"OtisUsenet" <otis_usenet@xxxxxxxxx> wrote:
So far I did this:

$ dd if=/dev/sda of=/usr/disk-data

Good. You now have a backup of the flash drive to play with. Before trying
to do anyghint with that file you should first make a copy of it. Any
rescue operation performed on the file might destroy some contents. With
an extra copy it will be easy to start over even if your are unable to
read the flash drive again.

$ mkdir /mnt/mydisk
$ mount lana-disk -r -t usbfs -o loop /mnt/mydisk

That did put something in the /mnt/mydisk directory, but it looked....

It looked exactly as /proc/bus/usb/ does on my system. That is what usbfs
is for. Usbfs is not a format of a file system, it is an interface for the
kernel usb system.

Your flash disk most likely has a vfat file system. So instead of using
"-t usbfs" you could use "-t vfat". However, it is better not to specify
any file system at all when mounting. Most likely Linux will find out what
file system it is by itself.

Could I maybe make an ISO from a /dev/sda (the flash disk) device, then
mount the ISO, and then get to the data? Anything else?

ISO is yet another file system. That file system is usually used for CDs
and DVDs. There is no point in trying to convert the flash disk contents
to an iso file system.

Before trying to mount the image there is one more important thing that
you have to think about. The image file comes from your entire disk, not
only the partition containing the file system with data. The first 512
bytes of your disk and also the first 512 bytes of your image contains the
partition table. You will not be able to mount the image, as you would not
try to mount /dev/sda. Instead you would try to mount /dev/sda1.

Instead you will have to use losetup to define an offset where the
partition begins. My guess is that this offset is 512 bytes, but the
partition table could say something else. For more info on how to use
losetup and mount /dev/loop*, see the man page of losetup.

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc8(at)uthyres.com Examples of addresses which go to spammers:
root@xxxxxxxxxxxxx root@localhost

.



Relevant Pages

  • Re: Help Failing Disk Problem
    ... and the FreeBSD OS on a hard disk that is failing. ... Either use sysinstall to slice and partition ... fdisk, bsdlabel and newfs. ... 512 MB I mount as /tmp ...
    (freebsd-questions)
  • Re: Salvaging data from USB flash disk
    ... The image file comes from your entire disk, ... not only the partition containing the file system with data. ... You will not be able to mount the image, ...
    (comp.os.linux.hardware)
  • Re: Relabel partition didnt work
    ... > You're confusing disk lables with mount points. ... > When installing etch, at some point partman asked for a mount point for ... > that partition and I entered /xyz. ... There's nothing to do to the second hard disk. ...
    (Debian-User)
  • Re: fsck failure at boot
    ... the relevance of SANsurfer would depend on what the problem is. ... I'm a bit confused by the "*** An error occurred during the file system check" error message you mentioned in your first mail. ... The complaint about the superblock problem can be ignored, in as far as the superblock must be correct - as is evident from the fact that you can mount the partition just fine when the system is fully booted. ...
    (RedHat)
  • Re: Relabel partition didnt work
    ... > mount: mount point /store does not exist ... You're confusing disk lables with mount points. ... /xyz is the 4th primary partition on my 2nd hd. ... Debian will, by default, make labels for disks based on the mount point given during installation. ...
    (Debian-User)