I wanted to create a swap partition in my rooted phone 32 GB sd-hc.
In the beginning it was 30GB FAT32 (LIQUID labelled) first plus 2GB ext3 after (not sure they were both primary or there was one logical). I worked with gparted, the card being in the phone and exclusively shared with my laptop via USB. My idea was to create the swap at the very end of the card. I set a resize operation for the first partition (FAT32) to 28GB by the end, then I wanted to move the ext3 close to the fat32 but I got a warning this may break something so I canceled and left it as is, and set an operation to make a swap (primary or logical, I can't remember also) between the two others. Then I applied. It was very long, so maybe I clicked cancel (not sure). Whatever gparted said operation(s?) succeeded.
When I released (eject) the card from the laptop then canceled the share from the phone, it said there was a problem with the card. Once rebooted the phone looped in boot on its splash screen.
OK, I removed the card and plugged it in a desktop pc with a card reader: ext3 is mounted automatically without issue but I get an error with the fat32 (Error mounting /dev/sde1 at /media/me/C371-EFEA; Command-line `mount -t "vfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexcec,flush" "/dev/sde1" "media/me//C371-EFEA"` exited with non-zero exit status 32: mount: /dev/sde1: can't read superblock)
I ran testdisk and photorec, but puzzled by all the options I locked the card to read-only and created and image with a simple dd if=/dev/sde of=back.img to try on it, and also I ran the option Create image.dd of both partitions from within testdisk (I renamed each img file after each run to prevent concatenation or replacement I first met), then backup copies of each image.
Well, not really sure how I did, but it seems I reached to recover all the files from the fat part in the global image file (it was after a Rebuild BS then quit, but I don't remember it was after quick or deeper scan, relaunched testdisk, analyze (quick/deeper ?) and then my fat32 displayed its original label and files names and dates were nice now, instead of weird before rebuild BS.
Now I thought I could try on the unlocked card but I get errors I didn't see in image file about mismatch BS, BS backup and others and I'm afraid I'll break things more.
Should I go to geometry settings to set them the same I see in image file? Is this just a setting to make analyses accurate or does this writes to the card? I'd like to recover the card, maybe the phone will work again without needing to reflash/reinstall all which I hardly remember how I did.
Code: Select all
Disk /dev/sde - 31 GB / 29 GiB - CHS 29939 64 32 Partition Start End Size in sectors 1 P FAT32 LBA 0 0 2 26962 63 32 55220223 [NO NAME] Boot sector Warning: number of heads/cylinder mismatches 255 (FAT) != 64 (HD) Warning: number of sectors per track mismatches 63 (FAT) != 32 (HD) OK Backup boot sector Warning: number of heads/cylinder mismatches 255 (FAT) != 64 (HD) Warning: number of sectors per track mismatches 63 (FAT) != 32 (HD) OK Second sectors (cluster information) are not identical. Third sectors (Second part of boot code) are not identical. A valid FAT Boot sector must be present in order to access any data; even if the partition is not bootable.
Code: Select all
1 P FAT32 LBA 0 0 2 26962 63 32 55220223 [NO NAME] Directory / >dr-xr-xr-x 0 0 4132459095 21-Dec-1907 16:10 _y^T< z Eaf drwxr-xr-x 0 0 999572918 15-Jan-1946 09:23 _q kG~Y~UQ. -r-xr-xr-x 0 0 0 6-Apr-1959 02:54 @ Ue^\^K.Ѵ -r-xr-xr-x 0 0 0 15-May-1960 06:11 ~GĔQ ^\ -rwxr-xr-x 0 0 0 1-Jan-2002 06:16 ~D^D^Qׅ .\~T! dr-xr-xr-x 0 0 919442492 16-Apr-2009 01:22 _^D -n H.&Y dr-xr-xr-x 0 0 2002623538 5-Dec-2033 07:26 _ n ~^ ~Y^U drwxr-xr-x 0 0 4200703382 14-Nov-1919 09:05 _F ^V . drwxr-xr-x 0 0 1826221463 31-Jan-2029 07:14 _9 i~A-^Q. drwxr-xr-x 0 0 2407390426 17-Oct-2032 15:12 _kY~ 8 i dr-xr-xr-x 0 0 29854 ...