Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have 8GB USB flash drive(PEN DRIVE). I used it and un-mount safely. But after next insertion it shows "No partition available". I tried it in windows too. I did not format it. I used disk utility(Ubuntu) and create a 8GB disk image. It saved in *img format. Now how can i read it? I tried mount command but it shows

sudo mount -o iocharset=iso8859-1  disk.img penR/
mount: you must specify the filesystem type

fdisk -l :

Disk /dev/sdb: 8053 MB, 8053063680 bytes
248 heads, 62 sectors/track, 1022 cylinders, total 15728640 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: 0xffffffff

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

MY PEN DRIVE WAS FAT32

Gparted shows unallocated disk. Disk utility asked for format. I have so much important data saved in disk. Please help. I am helpless. I believe linux is so powerful so that it can recover my data. thanks in advance.

share|improve this question
add comment

2 Answers

(Before doing anything with the disk.img, I would back it up.)

If the disk image is of the whole disk (eg, /dev/sdb), rather than just one partition (/dev/sdb1) you cannot mount the image directly (since the file will start with the disk partition table rather than the data partition). You can check if the image contains recogniseable partition headers with:

fdisk -lu disk.img

Which should indicate the presence of probably a single FAT32 partition, and tell you the offset in the img file (the number in the Start column). Then you can try and mount that partition using:

mount -o loop,offset=START disk.img MOUNTPOINT

Where START is the offset in bytes found with fdisk and MOUNTPOINT is somewhere to put it.

If the disk image does not contain any recogniseable partitions there may still be readable bits of data. Tools like photorec can be used to search the disk image for anything that looks like a recognisable file and try and extract it. See DataRecovery for more information on tools like this.

share|improve this answer
add comment

Testdisk is a nice recovery utility which you can use to recover your data.

    sudo tar xzf testdisk-6.14-WIP.linux26.tar.bz2
  • Move to the folder and run the testdisk-static file with root permissions.
    cd /path/to/file/testdisk-6.14-WIP
    sudo ./testdisk-static
  • For now, select [No Log].

enter image description here

  • You'll see the storage devices plugged in. Select your flash drive.

enter image description here

  • Then select the partition table type. You can select [None] in your case.

enter image description here

  • Click on [Analyse].

enter image description here

  • On the next screen Press Enter to search for lost partitions.

enter image description here

If you're unable to find any lost partitions, you might want to consider using PhotoRec, which is a data recovery utility. It is available in the same package as TestDisk.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.