![ddrescue 및 testdisk를 사용하여 손상된 하드 디스크 파일 시스템 복구](https://linux55.com/image/218779/ddrescue%20%EB%B0%8F%20testdisk%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20%EC%86%90%EC%83%81%EB%90%9C%20%ED%95%98%EB%93%9C%20%EB%94%94%EC%8A%A4%ED%81%AC%20%ED%8C%8C%EC%9D%BC%20%EC%8B%9C%EC%8A%A4%ED%85%9C%20%EB%B3%B5%EA%B5%AC.png)
ddrescue
부분적으로 복구된 파티션을 처리한 후 을(를) 사용하여 고장난 외장 하드 드라이브를 저장한 다음 testdisk
이를 적용하여 복구 작업을 완료하라는 지시를 받았습니다 . 드라이브가 두 번째 드라이브에 거의 완전히 저장되었음에도 불구하고(급하게 삭제한 후 특히 귀찮은 클릭 소리와 함께 Windows 파티션을 삽입했기 때문에) testdisk는 여전히 새 드라이브를 "결함"으로 간주하는 것 같습니다. 더 구체적으로 말하면, Quick Search
로그에 구체적으로 언급된 소수의 폴더와 파일만 반환됩니다 Bad Relative Sector
. 현재 가능성이 다음과 같다고 들었으므로 어떤 추가 조치를 취해야 할지 궁금합니다.
- ddrescue 시도를 다시 실행하고 완전히 완료되도록 한 다음 testdisk가 파일 시스템을 다시 생성하기를 바랍니다.
- 복구된 드라이브에서 Photorec을 사용하여 가능한 한 많은 프로젝트를 수행할 수 있기를 바랍니다.
- 다른 도구를 사용하여 데이터를 복구하세요. 추가적으로 좀 더 자세한 해결 방법을 찾아보라고 하더군요https://forum.cgsecurity.org/phpBB3/viewtopic.php?t=12307게다가.
다음은 ddrescue 작업에서 발췌한 로그입니다(전체 로그가 너무 커서 여기에서 찾을 수 있음).https://pastebin.com/mCi0DgEi):
Rescue Logfile. Created by GNU ddrescue version 1.19
# Command line: ddrescue -f /dev/sdc /dev/sdb /home/marco/Desktop/log1.log
# Start time: 2023-03-28 23:06:35
# Current time: 2023-04-03 17:29:58
# Scraping failed blocks... (forwards)
# current_pos current_status
0xC6DC9200 /
# pos size status
0x00000000 0x586DF000 +
0x586DF000 0x0000D000 -
0x586EC000 0x67F48000 +
0xC0634000 0x00720000 -
0xC0D54000 0x00034000 +
0xC0D88000 0x00001000 -
0xC0D89000 0x00009000 +
0xC0D92000 0x00001000 -
0xC0D93000 0x0002B000 +
0xC0DBE000 0x00008000 -
0xC0DC6000 0x00001000 +
0xC0DC7000 0x00001000 -
0xC0DC8000 0x00ABC000 +
0xC1884000 0x00001000 -
0xC1885000 0x0000A000 +
0xC188F000 0x00001000 -
0xC1890000 0x002CA000 +
0xC1B5A000 0x00001000 -
0xC1B5B000 0x005FF000 +
0xC215A000 0x00001000 -
......................
0xAAC1E54200 0x00002C00 /
0xAAC1E56E00 0x00000200 -
0xAAC1E57000 0x003B1000 +
0xAAC2208000 0x00000200 -
0xAAC2208200 0x00000C00 /
0xAAC2208E00 0x00000200 -
0xAAC2209000 0x00317000 +
0xAAC2520000 0x00000200 -
0xAAC2520200 0x00000C00 /
0xAAC2520E00 0x00000200 -
0xAAC2521000 0x0001C000 +
0xAAC253D000 0x00000200 -
0xAAC253D200 0x00000C00 /
0xAAC253DE00 0x00000200 -
0xAAC253E000 0x00077000 +
0xAAC25B5000 0x00000200 -
0xAAC25B5200 0x00003C00 /
0xAAC25B8E00 0x00000200 -
0xAAC25B9000 0x0008F000 +
0xAAC2648000 0x00000200 -
0xAAC2648200 0x00000C00 /
0xAAC2648E00 0x00000200 -
0xAAC2649000 0x11CDF4CE000 +
0x1C7A1B17000 0x00000200 -
0x1C7A1B17200 0x00000C00 /
0x1C7A1B17E00 0x00000200 -
0x1C7A1B18000 0x00099000 +
0x1C7A1BB1000 0x00000200 -
0x1C7A1BB1200 0x00000C00 /
0x1C7A1BB1E00 0x00000200 -
0x1C7A1BB2000 0x2CD9ED000 +
0x1CA6F59F000 0x00000200 -
0x1CA6F59F200 0x00000C00 /
0x1CA6F59FE00 0x00000200 -
0x1CA6F5A0000 0x751B76000 +`
또한 testdisk 출력의 일부는 다음과 같습니다.
` 2023년 4월 3일 월요일 22:54:40 명령줄: TestDisk /log /debug
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org
OS: Linux, kernel 4.15.0-142-generic (#146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021) x86_64
Compiler: GCC 5.3
ext2fs lib: 1.42.13, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.0
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 625142448 sectors
/dev/sda: user_max 625142448 sectors
/dev/sda: native_max 625142448 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63, sector size=512 - WDC WD3200BPVT-80JJ5T0, S/N:WD-WXU1EA1LJZPV, FW:01.01A01
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63, sector size=512 - TOSHIBA EXTERNAL_USB
Partition table type (auto): Intel
Disk /dev/sdb - 2000 GB / 1863 GiB - TOSHIBA EXTERNAL_USB
Partition table type: Intel
Analyse Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63
Geometry from i386 MBR: head=255 sector=63
BAD_RS LBA=2048 63
NTFS at 0/32/33
Current partition structure:
1 * HPFS - NTFS 0 32 33 243201 48 31 3907025072
Bad relative sector.
Record 5617 has wrong SeqNo (1 <> 2)
search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63
NTFS at 0/32/33
filesystem size 3907025072
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
HPFS - NTFS 0 32 33 243201 48 31 3907025072
NTFS, blocksize=4096, 2000 GB / 1863 GiB
Results
* HPFS - NTFS 0 32 33 243201 78 13 3907026944
NTFS, blocksize=4096, 2000 GB / 1863 GiB
Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 3907026944 linear /dev/sdb 2048" | dmsetup create test0
ntfs_device_testdisk_io_ioctl() unimplemented
NTFS Volume is dirty.
dir_partition inode=5
* HPFS - NTFS 0 32 33 243201 78 13 3907026944
NTFS, blocksize=4096, 2000 GB / 1863 GiB
ntfs_readdir failed for cluster 5: Input/output error
Directory /
5 dr-xr-xr-x 0 0 0 3-Apr-2023 17:45 .
5 dr-xr-xr-x 0 0 0 3-Apr-2023 17:45 ..
4335 dr-xr-xr-x 0 0 0 7-Mar-2016 07:57 $RECYCLE.BIN
530569 dr-xr-xr-x 0 0 0 29-Mar-2016 16:25 Folder1
531255 dr-xr-xr-x 0 0 0 26-Feb-2016 16:00 Folder2
524569 dr-xr-xr-x 0 0 0 26-Feb-2016 15:54 Folder3
1064063 -r--r--r-- 0 0 3538 4-Mar-2016 23:54 list.txt
interface_write()
1 * HPFS - NTFS 0 32 33 243201 78 13 3907026944
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
::: several similar lines :::
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_attr_find: Corrupt inode (-1): Input/output error
ntfs_mst_post_read_fixup_warn: magic: 0x93d9b08c size: 1024 usa_ofs: 59825 usa_count: 16722: Invalid argument
Using locale 'LC_CTYPE=en_US.UTF-8;LC_NUMERIC=it_IT.UTF-8;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=it_IT.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=it_IT.UTF-8;LC_NAME=it_IT.UTF-8;LC_ADDRESS=it_IT.UTF-8;LC_TELEPHONE=it_IT.UTF-8;LC_MEASUREMENT=it_IT.UTF-8;LC_IDENTIFICATION=it_IT.UTF-8'.`
지금까지 내가 따라온 단계를 요약하면 다음과 같습니다.https://archive.is/j66F9 정말 감사합니다 사용자님딱딱한 옥수수 가루 빵초기 질문에 대해 너무 인내심을 가져 주셔서 감사합니다.
답변1
ddrescue 시도를 다시 실행하고 완전히 완료되도록 한 후 testdisk가 파일 시스템을 다시 생성하기를 바랍니다.
결과 중간 로그 파일이 아직 남아 있는 경우 ddrescue
복구 프로세스를 다시 시작하면 중단된 부분부터 계속 진행됩니다. 그러나 어떤 방식으로든 대상 이미지를 변경한 경우 계속할 가능성이 크게 줄어들므로 새 이미지로 재부팅(새 로그 파일 사용)을 고려해야 합니다.
ddrescue
대상이 장치일 필요는 없습니다. 충분히 큰 파티션의 파일은 완벽하게 허용됩니다 .