Contains a free cluster 2 assuming eof fat32 root dir starts with a bad cluster

testdisk did the job!

>Create a new log file
[Choose Disk]
>Intel/PC partition
>Advanced
[Choose Partition]
>Boot
>Repair FAT
[Accept Defaults and Write]
>(Q)uit until exited

From here: http://ubuntuforums.org/showthread.php?t=2103994

Files & File Systems: Crash Course Computer Science #20

12 : 03

Files & File Systems: Crash Course Computer Science #20

FAT File System Explained

08 : 39

FAT File System Explained

Recover partition or repair broken superblocks on Ubuntu

07 : 22

FAT filesystem - bad superblock (2 Solutions!!)

02 : 48

Cant Read SuperBlock : New live Video for Cure error

09 : 42

Comments

  • Last night my android phone said it can’t read the SD card and it wanted to format it. I pulled it out, put it in a card reader and tried to mount it on my desktop pc:

    $ sudo mount /dev/sdb1 tmp
    [sudo] password for ivan: 
    mount: /dev/sdb1: can't read superblock
    

    Tried to fsck it:

    $ sudo fsck.msdos /dev/sdb1
    dosfsck 3.0.12, 29 Oct 2011, FAT32, LFN
      Contains a free cluster (2). Assuming EOF.
    FAT32 root dir starts with a bad cluster!
    

    And to see if there is actualy anything to mount:

    $ sudo fdisk -l /dev/sdb
    
    Disk /dev/sdb: 3951 MB, 3951034368 bytes
    122 heads, 57 sectors/track, 1109 cylinders, total 7716864 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
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            8192     7716863     3854336    b  W95 FAT32
    

    Now I’m doing a dd image before I’ve broken something else.

    Do you know any method for recovery?

    I’ve tried photorec and it did manage to retrieve data, but without any file names or directory structure. It doesn’t do any good except to restore my pictures, and they are my least concern.

    • If dd fails it is in 99.999% of the cases a hardware failure.

  • I’m glad it did a thing for someone. Yeah, probably you are right — accepted the answer.

  • This worked for me however I experienced partial data loss. Thanks.

  • Saved 80GBs of my data!

  • This did the job. But testdisk says it’s very dangerous though. I had tried writing partition first, but it didn’t work.

  • Thanks! Managed to save most of my data from a corrupted FAT32 formatted SD card with testdisk‘s copy feature

fsck.fat 3.0.28 (2015-05-16)
Read 512 bytes at 0:Input/output error

Значит ли это, что файлы постоянно не читаются?

Бег fsck возвращает следующее:

e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/mmcblk0p1
Could this be a zero-length partition?

ddrescue не могу ничего спасти. Выход из df:

Filesystem     1K-blocks     Used Available Use% Mounted on
udev             4002028        0   4002028   0% /dev
tmpfs             805008     9496    795512   2% /run
/dev/sda5      176456296 55779936 111689840  34% /
tmpfs            4025024   598760   3426264  15% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs            4025024        0   4025024   0% /sys/fs/cgroup
/dev/sda1          98304    51376     46928  53% /boot/efi
tmpfs             805008       92    804916   1% /run/user/1000
/dev/mmcblk0p1  15343104 13967392   1375712  92% /media/qwr/9016-4EF8

Обновление: ситуация становится более странной. На моей машине с Windows кажется, что вся SD-карта читаема. Однако копирование файлов происходит очень медленно, и время от времени возвращается к обычной скорости передачи. Мне удалось скопировать файлы, которые были в основном после (фотографии, сделанные после последнего резервного копирования), но после определенного момента проводник Windows не продолжил копирование, независимо от того, как долго я ждал.

Я вернулся в Ubuntu и, к моему удивлению, fsck.fat на самом деле побежал успешно. Запуск его несколько раз дает некоторую комбинацию следующего: Has a large number of bad entries. (128/133), Free cluster summary wrong (42991 vs. really 43267), Orphaned long file name part, Contains a free cluster (144584). Assuming EOF., Start does point to root directory. Deleting dir.ddrescue работает хорошо сейчас, поэтому я позволю ему продолжать работать на данный момент.

Любопытно, что это похоже на спящий и не спящий режим, или приостановку и возобновление, а ожидание может позволить Ubuntu ddrescue спасти изрядное количество.

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

2confused

Level 1
Level 1
Posts: 24
Joined: Tue Nov 07, 2017 6:47 pm

Error on micro SD card between Linux and Android phone

Not sure if this is the correct subforum or not for this type of question, I think it is, if not let me know where it gets moved to. No forum names sounded quite correct for this type question.

How can I get this to come up correctly on either, preferably both the computer/phone?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

2confused

Level 1
Level 1
Posts: 24
Joined: Tue Nov 07, 2017 6:47 pm

Re: Error on micro SD card between Linux and Android phone


by 2confused »

When I tried the sudo umount it came up saying the mountpoint could not be found.

I will add in I have typically been using this sd card on the computer but I went to plug it into the phone and I’m not sure that has created the problem by android trying to add in its own file structure or what. I know looking above at what I got back it does make me start thinking there might be two FAT32s on the drive and I don’t think that would come from linux only.

User avatar

ricardogroetaers

Level 6
Level 6
Posts: 1334
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Error on micro SD card between Linux and Android phone


by ricardogroetaers »

2confused wrote: Sun Jan 24, 2021 1:03 pm
When I tried the sudo umount it came up saying the mountpoint could not be found.

There will always be 2 FAT, one holder and one reserve.
It just can’t be different from the other.

Leaving fsck is enlightening.
1- file system has been corrupted by incorrect dismount.
2 and 3- Card was formatted on Android and the media is described as a «floppy disk» and not as an HD.
4- There is a lost allocation unit in the media, and fsck considered it as an end of file that no longer exists. You may have saved the content (which may not have a useful meaning) in «/ lost + found».
5- The root directory of fat 32 is in a defective allocation unit.

—   General
()


Hi all,,
posting this thread came after 4 days of trying different methods (except re-flashing).
I ran into a corrupted memory after unplugging the USB from the office PC. now the internal memory is not shown in filebox or manager. the files exist after checking them with TestDisk.
I’ve tried few codes of mounting and this is what I get:




the memory format is unknown,, I can’t browse it from PC or phone and I’m not willing to re-flash until I copy my stuff 1st,, if it’s the only way.

Any idea guys?

Thanx in advance,


Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 

Has your partition been unmounted correctly, or not? The sequence of he commands you pasted suggests not. If that’ s the case, I’ d try first:


Nokia-N900:~# umount-f /dev/mmcblk0p1


Then run fsck again.


Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 

What does sfdisk think about the memory card?


sudo gainroot
sfdisk -l


Do you have a backup of the data?
If yes, just reassign a fresh new file system


mkfs.vfat -n MyDocs /dev/mmcblk0p1


If no, try the -af option for fsck first, then try -r option, or try to get as much information from fsck as possible by using the -nv option


fsck -af /dev/mmcblk0p1
fsck -r /dev/mmcblk0p1
fsck -n -v /dev/mmcblk0p1


Please give the full error messages here for further debugging.


Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 


Originally Posted by anthonie
(Post 1209131)

Has your partition been unmounted correctly, or not? The sequence of he commands you pasted suggests not. If that’ s the case, I’ d try first:


Nokia-N900:~# umount-f /dev/mmcblk0p1


Then run fsck again.


it produces the same error


Nokia-N900:~# umount -f /dev/mmcblk0p1
umount: can't forcibly umount /dev/mmcblk0p1: Invalid argument
Nokia-N900:~#



Originally Posted by michaaa62
(Post 1209163)

What does sfdisk think about the memory card?


sudo gainroot
sfdisk -l


Do you have a backup of the data?
If yes, just reassign a fresh new file system


mkfs.vfat -n MyDocs /dev/mmcblk0p1


If no, try the -af option for fsck first, then try -r option, or try to get as much information from fsck as possible by using the -nv option


fsck -af /dev/mmcblk0p1
fsck -r /dev/mmcblk0p1
fsck -n -v /dev/mmcblk0p1


Please give the full error messages here for further debugging.







Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 

Did you ever try windows to check the file system or to mount it. There are chances that windows has a different thinking about the MyDocs partition than Linux or Maemo.

You better try to get a backup from the partition with testdisk before you try any other step, just to be on the safe side. You might as well use some exterior hard disk to make an image of the partition


Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 

damn it I came home last night with a disconnected internet,, gotta wait till Monday :\

hmmmm I haven’t tried that with windows. will give it a shot after backing up my stuff. Urmm yea, about the backup, I haven’t done it with TestDisk before. Does it do like what FTK imager does?


Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 


Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 

Owhh,, I’ve gone through that post of yours before but dump of me I just thought it is used to retrieve the missing files or the deleted ones. didn’t think of it as a backup method..
Thanx mate,, will do the backup and I think I’ll just reassign a new fresh file system if windows trick didn’t do the trick.


Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 


Re: Unknown memory format. FAT32 dir status starts with a bad cluster
 

Thanx guys,, thanx michaaa62.
I did backup everything using TestDisk,, and reassigned a fresh file system using the code


Originally Posted by michaaa62
(Post 1209163)

just reassign a fresh new file system


mkfs.vfat -n MyDocs /dev/mmcblk0p1



it went well after the restart. I’m copying back my data into my N900 as I write this. thanx guys,,, Really.

vBulletin® Version 3.8.8



Hi all,,
posting this thread came after 4 days of trying different methods (except re-flashing).
I ran into a corrupted memory after unplugging the USB from the office PC. now the internal memory is not shown in filebox or manager. the files exist after checking them with TestDisk.
I’ve tried few codes of mounting and this is what I get:

BusyBox v1.20.0 (Debian 1.20.0power1) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

~ $ root

BusyBox v1.20.0 (Debian 1.20.0power1) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

Nokia-N900:~# umount /dev/mmcblk0p1
umount: can’t umount /dev/mmcblk0p1: Invalid argument
Nokia-N900:~# fsck -a /dev/mmcblk0p1
fsck 1.41.3.maemo0 (12-Oct-2008)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
65:01/00
Copying backup to original
Cluster 5 out of range (251658240 > 442378). Setting to EOF.
/
Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!
Nokia-N900:~#

the memory format is unknown,, I can’t browse it from PC or phone and I’m not willing to re-flash until I copy my stuff 1st,, if it’s the only way.

Any idea guys?

Thanx in advance,


Has your partition been unmounted correctly, or not? The sequence of he commands you pasted suggests not. If that’ s the case, I’ d try first:

Nokia-N900:~# umount-f /dev/mmcblk0p1

Then run fsck again.


What does sfdisk think about the memory card?sudo gainroot
sfdisk -lDo you have a backup of the data?
If yes, just reassign a fresh new file systemmkfs.vfat -n MyDocs /dev/mmcblk0p1

If no, try the -af option for fsck first, then try -r option, or try to get as much information from fsck as possible by using the -nv optionfsck -af /dev/mmcblk0p1
fsck -r /dev/mmcblk0p1
fsck -n -v /dev/mmcblk0p1Please give the full error messages here for further debugging.


Has your partition been unmounted correctly, or not? The sequence of he commands you pasted suggests not. If that’ s the case, I’ d try first:

Nokia-N900:~# umount-f /dev/mmcblk0p1

Then run fsck again.

it produces the same error

Nokia-N900:~# umount -f /dev/mmcblk0p1
umount: can’t forcibly umount /dev/mmcblk0p1: Invalid argument
Nokia-N900:~#

What does sfdisk think about the memory card?sudo gainroot
sfdisk -lDo you have a backup of the data?
If yes, just reassign a fresh new file systemmkfs.vfat -n MyDocs /dev/mmcblk0p1

If no, try the -af option for fsck first, then try -r option, or try to get as much information from fsck as possible by using the -nv optionfsck -af /dev/mmcblk0p1
fsck -r /dev/mmcblk0p1
fsck -n -v /dev/mmcblk0p1Please give the full error messages here for further debugging.


Did you ever try windows to check the file system or to mount it. There are chances that windows has a different thinking about the MyDocs partition than Linux or Maemo.

You better try to get a backup from the partition with testdisk before you try any other step, just to be on the safe side. You might as well use some exterior hard disk to make an image of the partition


damn it I came home last night with a disconnected internet,, gotta wait till Monday :\

hmmmm I haven’t tried that with windows. will give it a shot after backing up my stuff. Urmm yea, about the backup, I haven’t done it with TestDisk before. Does it do like what FTK imager does?


No, testdisk is a data recovery tool.
Where no other tool might access the disk any more due to corruption to partition table or file system, it has a heuristic to assume patterns of file type as well as the data on the disk itself. Here is a short walkthrough of that, may be long, depends on the amount of data, procedure: http://talk.maemo.org/showpost.php?p=940368&postcount=16


Owhh,, I’ve gone through that post of yours before but dump of me I just thought it is used to retrieve the missing files or the deleted ones. didn’t think of it as a backup method..
Thanx mate,, will do the backup and I think I’ll just reassign a new fresh file system if windows trick didn’t do the trick.



Thanx guys,, thanx michaaa62.
I did backup everything using TestDisk,, and reassigned a fresh file system using the code
just reassign a fresh new file systemmkfs.vfat -n MyDocs /dev/mmcblk0p1

it went well after the restart. I’m copying back my data into my N900 as I write this. thanx guys,,, Really.


True,, Windows couldn’t detect the partition. reassigning was the only choice I had/know left. copied the data to the SD card,, although it took me whiiiiiiiile but yea it did the trick ,, thanx mate 🙂


Yes, testdisk is monster:eek:, in a very positive way!!! 😀


Yes, testdisk is monster:eek:, in a very positive way!!! 😀

Yeah, seems so 😉
Last time (long ago) I wanted to use it, I was not successful. Could not select my lost files and recover them. Seems it recognized only images, but I lost PDFs. Maybe I was just to dumb?


Hi all,,
posting this thread came after 4 days of trying different methods (except re-flashing).
I ran into a corrupted memory after unplugging the USB from the office PC. now the internal memory is not shown in filebox or manager. the files exist after checking them with TestDisk.
I’ve tried few codes of mounting and this is what I get:


the memory format is unknown,, I can’t browse it from PC or phone and I’m not willing to re-flash until I copy my stuff 1st,, if it’s the only way.

Any idea guys?

Thanx in advance,


Last edited by K9999; 2012-05-23 at .

Has your partition been unmounted correctly, or not? The sequence of he commands you pasted suggests not. If that’ s the case, I’ d try first:

Nokia-N900:~# umount-f /dev/mmcblk0p1

Then run fsck again.

What does sfdisk think about the memory card?

sudo gainroot
sfdisk -l

Do you have a backup of the data?
If yes, just reassign a fresh new file system

mkfs.vfat -n MyDocs /dev/mmcblk0p1

If no, try the -af option for fsck first, then try -r option, or try to get as much information from fsck as possible by using the -nv option

fsck -af /dev/mmcblk0p1
fsck -r /dev/mmcblk0p1
fsck -n -v /dev/mmcblk0p1

Please give the full error messages here for further debugging.


Originally Posted by anthonie
View Post

Has your partition been unmounted correctly, or not? The sequence of he commands you pasted suggests not. If that’ s the case, I’ d try first:

Nokia-N900:~# umount-f /dev/mmcblk0p1

Then run fsck again.

it produces the same error

Nokia-N900:~# umount -f /dev/mmcblk0p1
umount: can't forcibly umount /dev/mmcblk0p1: Invalid argument
Nokia-N900:~#


Originally Posted by michaaa62
View Post

What does sfdisk think about the memory card?

sudo gainroot
sfdisk -l

Do you have a backup of the data?
If yes, just reassign a fresh new file system

mkfs.vfat -n MyDocs /dev/mmcblk0p1

If no, try the -af option for fsck first, then try -r option, or try to get as much information from fsck as possible by using the -nv option

fsck -af /dev/mmcblk0p1
fsck -r /dev/mmcblk0p1
fsck -n -v /dev/mmcblk0p1

Please give the full error messages here for further debugging.

/home/user # sfdisk -l

Disk /dev/mmcblk1: 60352 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk1p1          0+  47999   48000-   1535999+   c  W95 FAT32 (LBA)
/dev/mmcblk1p2      48000   60351   12352     395264   83  Linux
/dev/mmcblk1p3          0       -       0          0    0  Empty
/dev/mmcblk1p4          0       -       0          0    0  Empty

Disk /dev/mmcblk0: 977024 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk0p1          1  884864  884864   28315648    c  W95 FAT32 (LBA)
/dev/mmcblk0p2     884865  950400   65536    2097152   83  Linux
/dev/mmcblk0p3     950401  974976   24576     786432   82  Linux swap / Solaris
/dev/mmcblk0p4          0       -       0          0    0  Empty
/home/user #

/home/user # fsck -af /dev/mmcblk0p1
fsck 1.41.3.maemo0 (12-Oct-2008)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
  65:01/00
Copying backup to original
Cluster 5 out of range (251658240 > 442378). Setting to EOF.
/
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!
/home/user # 
/home/user # 
/home/user # fsck -r /dev/mmcblk0p1
fsck 1.41.3.maemo0 (12-Oct-2008)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
  65:01/00
Copying backup to original
Cluster 5 out of range (251658240 > 442378). Setting to EOF.
/
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!
/home/user # 
/home/user # fsck -n -v /dev/mmcblk0p1
fsck 1.41.3.maemo0 (12-Oct-2008)
dosfsck 2.11 (12 Mar 2005)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Checking we can access the last sector of the filesystem
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
  65:01/00
Copying backup to original
Boot sector contents:
System ID "Maemo"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
     65536 bytes per cluster
       126 reserved sectors
First FAT starts at byte 64512 (sector 126)
         2 FATs, 32 bit entries
   1769984 bytes per FAT (= 3457 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 3604480 (sector 7040)
    442377 data clusters (28991619072 bytes)
32 sectors/track, 64 heads
         0 hidden sectors
  56631296 sectors total
Cluster 5 out of range (251658240 > 442378). Setting to EOF.
/
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!
/home/user #

Did you ever try windows to check the file system or to mount it. There are chances that windows has a different thinking about the MyDocs partition than Linux or Maemo.

You better try to get a backup from the partition with testdisk before you try any other step, just to be on the safe side. You might as well use some exterior hard disk to make an image of the partition

damn it I came home last night with a disconnected internet,, gotta wait till Monday :\

hmmmm I haven’t tried that with windows. will give it a shot after backing up my stuff. Urmm yea, about the backup, I haven’t done it with TestDisk before. Does it do like what FTK imager does?

Owhh,, I’ve gone through that post of yours before but dump of me I just thought it is used to retrieve the missing files or the deleted ones. didn’t think of it as a backup method..
Thanx mate,, will do the backup and I think I’ll just reassign a new fresh file system if windows trick didn’t do the trick.

Thanx guys,, thanx michaaa62.
I did backup everything using TestDisk,, and reassigned a fresh file system using the code


Originally Posted by michaaa62
View Post

just reassign a fresh new file system

mkfs.vfat -n MyDocs /dev/mmcblk0p1

it went well after the restart. I’m copying back my data into my N900 as I write this. thanx guys,,, Really.

У меня проблема с внешним USB-накопителем. Не монтируется. Может быть, на USB-накопителе нет данных, но также интересно понять, почему это произошло.

Disk /dev/sdb: 14,5 GiB, 15552479232 bytes, 30375936 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x500a0dff

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdb1       1948285285 3650263507 1701978223 811,6G 6e unknown
/dev/sdb2                0          0          0     0B 74 unknown
/dev/sdb4         28049408   28049848        441 220,5K  0 Empty

Потом попробовал отремонтировать.

fsck -y /dev/sdb
fsck from util-linux 2.34
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
 Automatically removing dirty bit.
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  0:eb/00, 1:58/00, 2:90/00, 3:4d/00, 4:53/00, 5:44/00, 6:4f/00, 7:53/00
  , 8:35/00, 9:2e/00, 10:30/00, 12:02/00, 13:10/00, 14:40/00, 15:0c/00
  , 16:02/00, 21:f8/00, 24:3f/00, 26:ff/00, 29:08/00, 33:78/00, 34:cf/00
  , 35:01/00, 36:e0/00, 37:39/00, 44:02/00, 48:01/00, 50:06/00, 64:80/00
  , 66:29/00, 67:6c/00, 68:e3/00, 69:1a/00, 70:b0/00, 71:4e/00, 72:4f/00
  , 73:20/00, 74:4e/00, 75:41/00, 76:4d/00, 77:45/00, 78:20/00, 79:20/00
  , 80:20/00, 81:20/00, 82:46/00, 83:41/00, 84:54/00, 85:33/00, 86:32/00
  , 87:20/00, 88:20/00, 89:20/00, 90:33/00, 91:c9/00, 92:8e/00, 93:d1/00
  , 94:bc/00, 95:f4/00, 96:7b/00, 97:8e/00, 98:c1/00, 99:8e/00, 100:d9/00
  , 101:bd/00, 103:7c/00, 104:88/00, 105:56/00, 106:40/00, 107:88/00
  , 108:4e/00, 109:02/00, 110:8a/00, 111:56/00, 112:40/00, 113:b4/00
  , 114:41/00, 115:bb/00, 116:aa/00, 117:55/00, 118:cd/00, 119:13/00
  , 120:72/00, 121:10/00, 122:81/00, 123:fb/00, 124:55/00, 125:aa/00
  , 126:75/00, 127:0a/00, 128:f6/00, 129:c1/00, 130:01/00, 131:74/00
  , 132:05/00, 133:fe/00, 134:46/00, 135:02/00, 136:eb/00, 137:2d/00
  , 138:8a/00, 139:56/00, 140:40/00, 141:b4/00, 142:08/00, 143:cd/00
  , 144:13/00, 145:73/00, 146:05/00, 147:b9/00, 148:ff/00, 149:ff/00
  , 150:8a/00, 151:f1/00, 152:66/00, 153:0f/00, 154:b6/00, 155:c6/00
  , 156:40/00, 157:66/00, 158:0f/00, 159:b6/00, 160:d1/00, 161:80/00
  , 162:e2/00, 163:3f/00, 164:f7/00, 165:e2/00, 166:86/00, 167:cd/00
  , 168:c0/00, 169:ed/00, 170:06/00, 171:41/00, 172:66/00, 173:0f/00
  , 174:b7/00, 175:c9/00, 176:66/00, 177:f7/00, 178:e1/00, 179:66/00
  , 180:89/00, 181:46/00, 182:f8/00, 183:83/00, 184:7e/00, 185:16/00
  , 187:75/00, 188:39/00, 189:83/00, 190:7e/00, 191:2a/00, 193:77/00
  , 194:33/00, 195:66/00, 196:8b/00, 197:46/00, 198:1c/00, 199:66/00
  , 200:83/00, 201:c0/00, 202:0c/00, 203:bb/00, 205:80/00, 206:b9/00
  , 207:01/00, 209:e8/00, 210:2c/00, 212:e9/00, 213:a8/00, 214:03/00
  , 215:a1/00, 216:f8/00, 217:7d/00, 218:80/00, 219:c4/00, 220:7c/00
  , 221:8b/00, 222:f0/00, 223:ac/00, 224:84/00, 225:c0/00, 226:74/00
  , 227:17/00, 228:3c/00, 229:ff/00, 230:74/00, 231:09/00, 232:b4/00
  , 233:0e/00, 234:bb/00, 235:07/00, 237:cd/00, 238:10/00, 239:eb/00
  , 240:ee/00, 241:a1/00, 242:fa/00, 243:7d/00, 244:eb/00, 245:e4/00
  , 246:a1/00, 247:7d/00, 248:80/00, 249:eb/00, 250:df/00, 251:98/00
  , 252:cd/00, 253:16/00, 254:cd/00, 255:19/00, 256:66/00, 257:60/00
  , 258:80/00, 259:7e/00, 260:02/00, 262:0f/00, 263:84/00, 264:20/00
  , 266:66/00, 267:6a/00, 269:66/00, 270:50/00, 271:06/00, 272:53/00
  , 273:66/00, 274:68/00, 275:10/00, 277:01/00, 279:b4/00, 280:42/00
  , 281:8a/00, 282:56/00, 283:40/00, 284:8b/00, 285:f4/00, 286:cd/00
  , 287:13/00, 288:66/00, 289:58/00, 290:66/00, 291:58/00, 292:66/00
  , 293:58/00, 294:66/00, 295:58/00, 296:eb/00, 297:33/00, 298:66/00
  , 299:3b/00, 300:46/00, 301:f8/00, 302:72/00, 303:03/00, 304:f9/00
  , 305:eb/00, 306:2a/00, 307:66/00, 308:33/00, 309:d2/00, 310:66/00
  , 311:0f/00, 312:b7/00, 313:4e/00, 314:18/00, 315:66/00, 316:f7/00
  , 317:f1/00, 318:fe/00, 319:c2/00, 320:8a/00, 321:ca/00, 322:66/00
  , 323:8b/00, 324:d0/00, 325:66/00, 326:c1/00, 327:ea/00, 328:10/00
  , 329:f7/00, 330:76/00, 331:1a/00, 332:86/00, 333:d6/00, 334:8a/00
  , 335:56/00, 336:40/00, 337:8a/00, 338:e8/00, 339:c0/00, 340:e4/00
  , 341:06/00, 342:0a/00, 343:cc/00, 344:b8/00, 345:01/00, 346:02/00
  , 347:cd/00, 348:13/00, 349:66/00, 350:61/00, 351:0f/00, 352:82/00
  , 353:74/00, 354:ff/00, 355:81/00, 356:c3/00, 358:02/00, 359:66/00
  , 360:40/00, 361:49/00, 362:75/00, 363:94/00, 364:c3/00, 365:42/00
  , 366:4f/00, 367:4f/00, 368:54/00, 369:4d/00, 370:47/00, 371:52/00
  , 372:20/00, 373:20/00, 374:20/00, 375:20/00, 428:0d/00, 429:0a/00
  , 430:44/00, 431:69/00, 432:73/00, 433:6b/00, 434:20/00, 435:65/00
  , 436:72/00, 437:72/00, 438:6f/00, 439:72/00, 440:ff/00, 441:0d/00
  , 442:0a/00, 443:50/00, 444:72/00, 445:65/00, 446:73/00, 447:73/00
  , 448:20/00, 449:61/00, 450:6e/00, 451:79/00, 452:20/00, 453:6b/00
  , 454:65/00, 455:79/00, 456:20/00, 457:74/00, 458:6f/00, 459:20/00
  , 460:72/00, 461:65/00, 462:73/00, 463:74/00, 464:61/00, 465:72/00
  , 466:74/00, 467:0d/00, 468:0a/00, 504:ac/00, 505:01/00, 506:b9/00
  , 507:01/00, 510:55/00, 511:aa/00
  Not automatically fixing this.
FSINFO sector has bad magic number(s):
  Offset 0: 0x00000000 != expected 0x41615252
  Offset 484: 0x00000000 != expected 0x61417272
  Offset 508: 0x00000000 != expected 0xaa550000
  Auto-correcting it.
/
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!

Я тоже пытался восстановить его с помощью программы testdisk, но у меня ничего не вышло. Любые идеи? Могу ли я проверить, действительно ли это файлы, и безопасно ли их форматировать? Почему это случилось?

Обновление: я пытался восстановить его в MS-Windows, и похоже, что это сработало:

C:\Users\datan>chkdsk /f E:
The type of the file system is FAT32.
Volume Serial Number is B01A-E36C
The specified disk appears to be a non-Windows XP disk.
Updating FAT media type.
The \ entry contains a nonvalid link.
Windows is verifying files and folders...
File and folder verification is complete.
Convert lost chains to files (Y/N)? Y
48 KB in 6 recovered files.

Windows has made corrections to the file system.
No further action is required.
   15 170 560 KB total disk space.
            8 KB in 1 folders.
           48 KB in 6 files.
   15 170 496 KB are available.

        8 192 bytes in each allocation unit.
    1 896 320 total allocation units on disk.
    1 896 312 allocation units available on disk.

C:\Users\datan>

Но мне все еще интересно, как это могло случиться? Я почти уверен, что не сделал ничего плохого СМИ.

Solution 1

Use ddrescue to make a copy of the SD card — you don’t want to work off of the original.

You can use TestDisk or Autopsy to try recovering the filesystem or a tool like scalpel to carve files from the disk.

Here are some basic commands:

Ddrescue

ddrescue is used in a similar fashion to dd. Namely:

ddrescue /dev/XXX /home/user/Desktop/copy_of_sd_card /home/user/Desktop/logfile

The logfile will store the information about any sectors it had trouble reading.

PhotoRec

As long as files on your SD card haven’t been physically overwritten there is always possible to recover them, even if SD card is reformatted. I recommend using the PhotoRec program, it is easy to use command line tool.

Comments

  • I used it on android and it just stopped working. I want to extract data before I format it. Here’s the output of sudo dosfsck -w -r -l -a -v -t /dev/mmcblk0p1:

    fsck.fat 3.0.26 (2014-03-07)
    fsck.fat 3.0.26 (2014-03-07)
    Checking we can access the last sector of the filesystem
    Boot sector contents:
    System ID "android "
    Media byte 0xf0 (5.25" or 3.5" HD floppy)
           512 bytes per logical sector
         32768 bytes per cluster
            32 reserved sectors
    First FAT starts at byte 16384 (sector 32)
             2 FATs, 32 bit entries
       2022912 bytes per FAT (= 3951 sectors)
    Root directory start at cluster 2 (arbitrary size)
    Data area starts at byte 4062208 (sector 7934)
        505668 data clusters (16569729024 bytes)
    16 sectors/track, 4 heads
             0 hidden sectors
      32370688 sectors total
    Checking file /
    /
      Contains a free cluster (2). Assuming EOF.
    FAT32 root dir starts with a bad cluster!
    

    Is it possible to save data? Thanks!

  • I’m not used to that programs. Can you give me specific commands? Thanks!

  • Sure, I just added some.

  • This saved my day since I already tried testdisk but did not find the option within.

Autopsy

Autospy is a graphical interface over the sleuth kit. When you run it, it creates a web interface.

This site has a simple walkthrough on how to use Autopsy.

Also, see this

TestDisk

You can then use TestDisk to try to retrieve files from the image:

testdisk /home/user/Desktop/copy_of_sd_card

It has a wizard-like interface. as well. A full guide is here.

Дополнительно:  Не удается зарядить ноутбук Mac с помощью адаптера питания USB-C - Служба поддержки Apple (RU)
Оцените статью
Master Hi-technology
Добавить комментарий