View previous topic :: View next topic |
Author |
Message |
thomasvk Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 19 Mar 2005 Posts: 597
|
Posted: Sat Nov 11, 2006 10:31 am Post subject: [solved] FAT32 partition dead, please help |
|
|
Hello,
I had some trouble with some NTFS partition. So I booted into a Live CD, made a FAT32 partition and copied all data over. After a reboot the FAT32 partition isn't recognised anymore:
Code: | # mount /dev/hdc2 /mnt/hdc2/
mount: you must specify the filesystem type
# mount /dev/hdc2 /mnt/hdc2/ -t vfat
mount: wrong fs type, bad option, bad superblock on /dev/hdc2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
# dmesg | tail
FAT: invalid media value (0x24)
VFS: Can't find a valid FAT filesystem on dev hdc2. |
Also:
Code: | #cfdisk /dev/hdc
FATAL ERROR: Bad primary partition 1: logical partitions overlap
Press any key to exit cfdisk |
And:
Code: | # fdisk -l /dev/hdc
Disk /dev/hdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/hdc2 2550 9729 57668152+ b W95 FAT32 |
Finally:
Code: | # dosfsck /dev/hdc2
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Currently, only 1 or 2 FATs are supported, not 195. |
When I open the disk in a hex editor and go to the position where the FAT32 partition should start it all looks like a normal beginning of a FAT32 disk. Is there any way I can just fix this without having to run some file recovery application (those require a second disk, mostly recover loose files in one big pile, skip files, recover very old files; I only want that as a really final approach if nothing else works)? ![Confused :?](images/smiles/icon_confused.gif)
Last edited by thomasvk on Sat Nov 11, 2006 11:15 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
thomasvk Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 19 Mar 2005 Posts: 597
|
Posted: Sat Nov 11, 2006 11:15 am Post subject: |
|
|
I hereby declare myself to uber partition hexedit god, or something. Fdisk listed the partition beginning at cylinder 2550 which was converted into bytes at position 4E22CEC00. However in sector mode it was at some other point converted into bytes 4E200A000. I looked up both positions with a hex editor and saw that the first number was the right one. I made a backup of the partition table and went fucking around. First I removed the NTFS partition (nothing important on it anyways) and the FAT partition (it only changes in the partition table anyways, data stays the same). Then I re-made the FAT partition at a new location, the first number (4E22, etc). Then I mounted with mount without -t and hey, it mounted! 'ls /mnt/hdc2' and there's all my data.
It's a bit dangerous because I'm not really an engineer and was just fucking around but I'm such a lucky guy. I hope this fuckery of mine can help someone else some time with similar problems. ![Razz :P](images/smiles/icon_razz.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|