Re: Salvaging data from USB flash disk
- From: Henrik Carlqvist <Henrik.Carlqvist@xxxxxxxxxxxx>
- Date: Sat, 24 Jun 2006 01:31:16 +0200
"OtisUsenet" <otis_usenet@xxxxxxxxx> wrote:
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?)
Obviously there is nothing looking like the magic numbers of a vfat
file system in the partition table. You did forget the most important
part:
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.
Try with an offset of 512 bytes and see if that helps, something like this:
# losetup -o 512 /dev/loop0 /tmp/lana-disk
# mount /dev/loop0 -r /mnt/lanadisk
If you don't want to use losetup you can also use dd to only copy some
data from the image file, something like:
dd if=/tmp/lana-disk of=/tmp/lana-partition bs=512 skip=1
Then you might be able to mount the image of a partition with:
mount -o loop /tmp/lana-partition /mnt/lanadisk
You can also use a tool like xxd to examine your disk image.
http://www.geocities.com/thestarman3/asm/mbr/MSWin41BRinHexEd.htm
describes what to search for. If you find keywords like FAT32 (clear text)
and 55AA (hexadecimal) you might be close. The boot record of the
partition is 3*512 bytes,
# 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
This looks bad. If you don't have any partition table the first 512 bytes
of the disk has probably been messed up in some way. If you are lucky only
the first 512 bytes are bad and all data in the file system is still
there. If you are unlucky also data after the first 512 bytes are messed
up. If so it will probably be very hard to recover any data.
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
.
- Follow-Ups:
- Re: Salvaging data from USB flash disk
- From: OtisUsenet
- Re: Salvaging data from USB flash disk
- References:
- Salvaging data from USB flash disk
- From: OtisUsenet
- Re: Salvaging data from USB flash disk
- From: Henrik Carlqvist
- Re: Salvaging data from USB flash disk
- From: OtisUsenet
- Salvaging data from USB flash disk
- Prev by Date: Re: SB 16 Vibra Isa pnp and Fedora 5
- Next by Date: Re: USB printer in Linux
- Previous by thread: Re: Salvaging data from USB flash disk
- Next by thread: Re: Salvaging data from USB flash disk
- Index(es):
Relevant Pages
|