LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-14-2011, 05:51 PM   #1
peterlowrie
Member
 
Registered: May 2009
Location: New Zealand
Distribution: mdv-x86/aurora-sparc64/solaris10-x86/solaris10-sparc
Posts: 42

Rep: Reputation: 15
Question Data written to unformatted disk


Whota clot I am. I went and fdisk'd a USB disk and put the Fat32 filesystem onto it. Then I thought I ran dosfsck over it which I thort formatted the disk - apparently not. Then I copied a bunch of files and directories to it. Now I am unable to recover the files and data. In the rare instances when I perform a sloppy mount I see directories named 001, 002, 003 and 004. These directories variously contain files named 001, 002, 004 (no 003) etc.

Fdisk gives me:

prompt>fdisk /dev/sdl
Disk /dev/sdl: 3909 MB, 3909091328 bytes
121 heads, 62 sectors/track, 1017 cylinders
Units = cylinders of 7502 * 512 = 3841024 bytes
Disk identifier: 0xc3072e18

Device Boot Start End Blocks Id System
/dev/sdl1 1 1017 3814736 b W95 FAT32

prompt>fdisk /dev/sdl1
Disk /dev/sdl1: 3906 MB, 3906289664 bytes
121 heads, 62 sectors/track, 1016 cylinders
Units = cylinders of 7502 * 512 = 3841024 bytes
Disk identifier: 0x1219b459

Device Boot Start End Blocks Id System

prompt>parted -l
Model: USB DISK 2.0 (scsi)
Disk /dev/sdl: 3909MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 31.7kB 3906MB 3906MB primary

prompt>mount -s -t vfat /dev/sdl1 /mnt/here
mount: wrong fs type, bad option, bad superblock on /dev/sdl1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


I don't know enough to use dd, kpartx, parted, partmon, partprobe, partx et al

prompt>dmesg
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdl1.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdl1.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdl1.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdl1.
FAT: invalid media value (0xb9)
VFS: Can't find a valid FAT filesystem on dev sdl.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdl1.
usb 2-4: new full speed USB device using ohci_hcd and address 12
usb 2-4: not running at top speed; connect to a high speed hub
usb 2-4: New USB device found, idVendor=13fe, idProduct=3600
usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-4: Product: USB DISK 2.0
usb 2-4: Manufacturer:
usb 2-4: SerialNumber: 07AA0D027E440097
usb 2-4: configuration #1 chosen from 1 choice
scsi10 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 12
usb-storage: waiting for device to settle before scanning
scsi 10:0:0:0: Direct-Access USB DISK 2.0 PMAP PQ: 0 ANSI: 0 CCS
sd 10:0:0:0: Attached scsi generic sg13 type 0
sd 10:0:0:0: [sdl] 7634944 512-byte logical blocks: (3.90 GB/3.64 GiB)
sd 10:0:0:0: [sdl] Write Protect is off
sd 10:0:0:0: [sdl] Mode Sense: 03 41 00 00
sd 10:0:0:0: [sdl] Assuming drive cache: write through
usb-storage: device scan complete
sd 10:0:0:0: [sdl] Assuming drive cache: write through
sdl:

Hopefully the above provides sufficient for someone more proficient to address the issue and suggest how to try and recover the data on the unformatted disk. Be aware it's practically impossible now to mount the disk.

Oh brother, I'm sooo stupid. I hope you can help me.

:-( Peter
 
Old 01-14-2011, 06:32 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Depending on the file types, you might just try running photorec (part of the testdisk suite) on the drive and see what comes back. You usually lose the file names, but it's better than nothing.

Also, take a dd image of the drive if you have space, and do all your operations on that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how will unformatted disk be shown in cat /proc/partitions ? rolverm Linux - Hardware 1 04-17-2009 08:43 AM
How to view sectors of unformatted hard disk writedom Linux - General 5 05-26-2008 09:15 AM
usb hard disk - unformatted greengrocer Linux - Newbie 5 05-15-2007 07:21 AM
w2k recognises my fedora C4 partition as local disk d: unformatted!!? rchaves Fedora 2 01-06-2006 10:45 AM
Possible to make filesystem on disk with data written to it? redhatman Linux - Newbie 3 08-28-2004 10:49 AM


All times are GMT -5. The time now is 12:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration