Memory card partition table corrupted after unsafe removal


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Memory card partition table corrupted after unsafe removal
# 1  
Old 04-23-2014
Memory card partition table corrupted after unsafe removal

Memory card partition table got corrupted after unsafe removal.
Is there any possible recovery ?..

If i list using fdisk

fdisk -l
Code:
root@ubuntu:/usr/arm-fsl-linux-gnueabi/arm-fsl-linux-gnueabi/multi-libs# fdisk -l /dev/sdc

Disk /dev/sdc: 3965 MB, 3965190144 bytes
122 heads, 62 sectors/track, 1023 cylinders, total 7744512 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: 0x00000000

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

And in dmesg log i get this
Code:
414271.231594] sd 12:0:0:0: [sdb] Attached SCSI removable disk
[414271.232136] sd 12:0:0:1: [sdc] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
[414271.233734] sd 12:0:0:1: [sdc] Write Protect is off
[414271.233737] sd 12:0:0:1: [sdc] Mode Sense: 03 00 00 00
[414271.235463] sd 12:0:0:1: [sdc] No Caching mode page found
[414271.235466] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[414271.241314] sd 12:0:0:1: [sdc] No Caching mode page found
[414271.241317] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[414271.254315]  sdc: unknown partition table
[414271.259004] sd 12:0:0:1: [sdc] No Caching mode page found
[414271.259007] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[414271.259009] sd 12:0:0:1: [sdc] Attached SCSI removable disk
[414271.424884] EXT2-fs (sdc): error: ext2_check_descriptors: Block bitmap for group 0 not in group (block 3912056880)!
[414271.424888] EXT2-fs (sdc): group descriptors corrupted

Using fsck
Code:
414271.231594] sd 12:0:0:0: [sdb] Attached SCSI removable disk
[414271.232136] sd 12:0:0:1: [sdc] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
[414271.233734] sd 12:0:0:1: [sdc] Write Protect is off
[414271.233737] sd 12:0:0:1: [sdc] Mode Sense: 03 00 00 00
[414271.235463] sd 12:0:0:1: [sdc] No Caching mode page found
[414271.235466] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[414271.241314] sd 12:0:0:1: [sdc] No Caching mode page found
[414271.241317] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[414271.254315]  sdc: unknown partition table
[414271.259004] sd 12:0:0:1: [sdc] No Caching mode page found
[414271.259007] sd 12:0:0:1: [sdc] Assuming drive cache: write through
[414271.259009] sd 12:0:0:1: [sdc] Attached SCSI removable disk
[414271.424884] EXT2-fs (sdc): error: ext2_check_descriptors: Block bitmap for group 0 not in group (block 3912056880)!
[414271.424888] EXT2-fs (sdc): group descriptors corrupted

Any suggesstions for the recovery? And iam not able to mount.

Once i insert the memory card I get error

"Error mounting:mount : wrong fs type ,bad option ,bad superblock on /dev/sdc , missing codepage or helper program,or other error in some cases useful info is found in syslog -try
dmesg | tail or so "

Last edited by Franklin52; 04-23-2014 at 05:24 AM.. Reason: Please use code tags
# 2  
Old 04-23-2014
I find it hard to believe that an unsafe removal trashed the partition table. Unsafe removals are supposed to trash the file system metadata. I never believe anything that fdisk has to say. Switch to a better utility like parted. I just plugged a factory fresh thumb drive into my workstation....
Code:
#
# ls -ltr | tail -5
crw------- 1 root  root   442, 10242 Apr 23 13:28 usbdev6.3_ep02
crw------- 1 root  root    21,     2 Apr 23 13:28 sg2
brw-r----- 1 root  disk     8,    16 Apr 23 13:28 sdb
brw-r----- 1 root  disk     8,    17 Apr 23 13:28 sdb1
crw-rw-rw- 1 root  tty      5,     2 Apr 23 13:34 ptmx
# parted /dev/sdb print

Model: Lexar USB Flash Drive (scsi)
Disk /dev/sdb: 8017MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      12.3kB  8017MB  8017MB  primary  fat32        lba

Information: Don't forget to update /etc/fstab, if necessary.

# fsck -n /dev/sdb1
fsck 1.39 (29-May-2006)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Free cluster summary wrong (4294967295 vs. really 1953276)
  Auto-correcting.
Leaving file system unchanged.
/dev/sdb1: 1 files, 1/1953277 clusters
#

So /dev/sdb and /dev/sdb1 popped into existence when I plugged in my thumb drive. /dev/sdb is the physical device. It has a partition table that defines partition 1. So, predictably, I also get a device called /dev/sdb1 to correspond to my partition 1.

Note that I ran fsck on /dev/sdb1, not /dev/sdb. If I want to mount my thumb drive I do this....
Code:
# mount /dev/sdb1 /mnt
# df -k /mnt
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb1              7813108         4   7813104   1% /mnt
#


You ran fsck on /dev/sdc. That was probably a mistake and it may have trashed your partition table. It should have been /dev/sdc1.
# 3  
Old 04-23-2014
I don't think fsck would have corrupted the partition table. In some site they suggested for an auto recovery of the lost partition to try this.

Anyway I think my memory card totally gone.
I tried recovery with test disk and it was able to find the partition but was not able to recover the files inside.

Any other suggestions?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

How do I partition an Oracle 11g Table?

Hello, I have a database called "audit_database" and I want to create two tables. Table 1 = Table 1 Table 2 = Audit I want to partition the Audit table into partitions grouped by month. I'm not familiar with table partitioning but doing some reading online shows that it can be done but... (4 Replies)
Discussion started by: bbbngowc
4 Replies

2. Red Hat

This doesn't look like a partition table Probably you selected the wrong device.

Hi, I need to mount the device from this device # fdisk -l . . . Disk /dev/sdas: 2000.4 GB, 2000365289472 bytes 255 heads, 63 sectors/track, 243197 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size... (0 Replies)
Discussion started by: justbow
0 Replies

3. SCO

Backup MBR an Partition Table

hi How can I backup MBR an Partition Table of SCO 5.0.6? (7 Replies)
Discussion started by: ccc
7 Replies

4. Solaris

Manually editing partition table

I'm manually editing the partition table purely for experimenting. I did prtvtoc /dev/dsk/c1t0d0s2 > /tmp/prtvtoc I'm trying to split up partition 5 to make partition 6. I'm running into a cylinder boundary error on partition 6. Any clues? # vi /tmp/prtvtoc "/tmp/prtvtoc" 23 lines, 769... (1 Reply)
Discussion started by: adelsin
1 Replies

5. Slackware

Help me!!!! - Slackware 12 Issue - Invalid Partition table

Hi All, I am a linux newbie. After working with my loveable FEDORA 10 for months, i found it a bit slower. I wanted to try with slackware this time. I already had Windows XP and fedora in my 80 GB SATA disk. Now i allotted 15 GB ( SWAP + / + /home/usr ). During my installation i encountered no... (5 Replies)
Discussion started by: beinthemiddle
5 Replies

6. Solaris

usb memory card

I just got a removable memory card. I tried the following bu still my OS solaris x86 cannot detect it and also i got an error touch /reconfigure init 0 I inserted the removable memory card and the powered the system on I got the following on at boot up when i fully logged in I did ... (2 Replies)
Discussion started by: seyiisq
2 Replies

7. Solaris

Can I put my own tags in a partition table

I have X4500 running Solaris 10. I have formatted a disk and created partition table as given below. Specify disk (enter its number): 0 selecting c0t0d0 /dev/dsk/c0t0d0s0 is part of active ZFS pool zpool1. Please see zpool(1M). FORMAT MENU: disk - select a disk ... (3 Replies)
Discussion started by: bharu_sri
3 Replies

8. UNIX for Advanced & Expert Users

modify a predefined partition table on Solaris

I want to modify a predefined partition on Solaris. This predefined partion has 51 GB. I want to partition it as two partition. One is 5G, another one is about 46 GB. I want to use these commands: #format specify disk #partition # modify The system told me that ' Cannot modify disk... (1 Reply)
Discussion started by: duke0001
1 Replies

9. UNIX for Advanced & Expert Users

resizing the partition table

Host 1 ------- Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 1911 18.56GB (1912/0/0) 38913024 1 swap wu 1912 - 5434 34.19GB (3523/0/0) 71700096 2 backup wm 0 - 14086 136.71GB ... (5 Replies)
Discussion started by: sriny
5 Replies

10. Solaris

recovery partition table from fdisk?

I have two disks on a sun blade 100. I just installed a solaris8 on the first disk. The installation was successful. But the problem is now I lost all data / partition on my second hard disk. The possible reason could be: 1. I used default web start install. During the installation I didn't... (2 Replies)
Discussion started by: motor98
2 Replies
Login or Register to Ask a Question