Eu acidentalmente excluí a maioria da minha tabela de partições do Windows no meu laptop de inicialização dupla e estou tentando consertar / recuperar a tabela de partições defeituosa.
Eu tenho um laptop de inicialização dupla: Ubuntu e Windows. Grub ainda funciona (eu posso inicializar no Ubuntu).
/dev/sdb
/dev/sda
. Eu acidentalmente apaguei a maior parte da minha tabela de partição do windows em dev/sda
(erros estúpidos acontecem). Aqui está o que resta de acordo com fdisk
:
$ sudo fdisk -lu /dev/sda
Disk /dev/sda: 465,8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: gpt
Disk identifier: 6CAE9467-2FF5-4DB9-8E72-4321E9061C2A
Device Start End Sectors Size Type
/dev/sda2 923648 1128447 204800 100M EFI System
Eu ainda posso selecionar o Windows a partir do grub, mas é claro que agora eu só recebo (em alemão para: Recover, o sistema deve ser reparado):
Domeu/boot/grub/grub.cfg
on/dev/sdb
:
menuentry'WindowsBootManager(on/dev/sda2)'--classwindows--classos$menuentry_id_option'osprober-efi-46A6-7D64'{insmodpart_gptinsmodfatsetroot='hd0,gpt2'if[x$feature_platform_search_hint=xy];thensearch--no-floppy--fs-uuid--set=root--hint-bios=hd0,gpt2--hint-efi=hd0,gpt2--hint-baremetal=ahci0,gpt246A6-7D64elsesearch--no-floppy--fs-uuid--set=root46A6-7D64fichainloader/EFI/Microsoft/Boot/bootmgfw.efi
testdisk
resultadosparadev/sda
:
TestDisk7.0,DataRecoveryUtility,April2015ChristopheGRENIER<[email protected]>http://www.cgsecurity.orgDisk/dev/sda-500GB/465GiB-CHS6080125563PartitionStartEndSizeinsectors>PMSData2048923647921600PMSData9236481128447204800[NONAME]DMSData1161216975772594974611379DMSData974774273975773696999424DMSData975773696976773119999424Structure:Ok.UseUp/DownArrowkeystoselectpartition.UseLeft/RightArrowkeystoCHANGEpartitioncharacteristics:P=PrimaryD=DeletedKeysA:addpartition,L:loadbackup,T:changetype,P:listfiles,Enter:tocontinueNTFS,blocksize=4096,471MB/450MiB
DepoisdeolhardentrodecadapartiçãousandoP:listfiles
(detalhesabaixo),pareceque:
Minhasperguntas:
L:loadbackup
)?D
(excluído)?Pareceestarcorrompidodequalquermaneira.D
(excluído)?Elecontémrecuperação,masjáexisteumarecuperaçãoválidalocalizadanapartição1.grub
para/dev/sda2
aponteparaolocalcorreto?Resultadosdetestdisk
apósinserircadapartiçãocomP
:
Partição1
PMSData2048923647921600Directory/>dr-xr-xr-x0004-Jun-201623:48.dr-xr-xr-x0004-Jun-201623:48..dr-xr-xr-x0004-Jun-201623:44Recoverydr-xr-xr-x0001-Jun-201614:12SystemVolumeInformation
Partição2
PMSData9236481128447204800[NONAME]Directory/>drwxr-xr-x0002-Jun-201607:34EFI
Partição3
MSData1161216975772594974611379Directory/>dr-xr-xr-x00010-Feb-201701:05.dr-xr-xr-x00010-Feb-201701:05..dr-xr-xr-x00022-Aug-201622:54$GetCurrentdr-xr-xr-x0002-Jun-201610:40$Recycle.Bindr-xr-xr-x0008-Nov-201618:54Inteldr-xr-xr-x00027-Apr-201607:52Logsdr-xr-xr-x00016-Jul-201613:47PerfLogsdr-xr-xr-x0002-Feb-201723:13ProgramFilesdr-xr-xr-x0002-Feb-201723:11ProgramFiles(x86)dr-xr-xr-x00022-Aug-201622:59ProgramDatadr-xr-xr-x00027-Dec-201615:55Python36dr-xr-xr-x00022-Aug-201622:38Recoverydr-xr-xr-x00020-Jun-201622:03SQLServer2000SampleDatabasesdr-xr-xr-x00021-Jun-201620:06SQLServer2016Mediadr-xr-xr-x00010-Feb-201700:28SystemVolumeInformationdr-xr-xr-x00022-Aug-201622:44Usersdr-xr-xr-x00010-Feb-201701:06Windowsdr-xr-xr-x00022-Aug-201622:54Windows10Upgradedr-xr-xr-x0005-Oct-201619:25_tmpdr-xr-xr-x0004-Jun-201622:23clouddr-xr-xr-x0002-Feb-201718:45projectsdr-xr-xr-x00024-Jul-201614:35tools-r--r--r--00130-Oct-201508:18BOOTNXT-r--r--r--00027-Dec-201615:55Python36:Win32App_1-r--r--r--00020-Jun-201622:03SQLServer2000SampleDatabases:Win32App_1-r--r--r--0039526810-Jul-201513:00bootmgr-r--r--r--00255013683210-Feb-201701:07pagefile.sys-r--r--r--001677721610-Feb-201701:07swapfile.sys
Partição4
MSData974774273975773696999424Can'topenfilesystem.Filesystemseemsdamaged.
Partição5
MSData975773696976773119999424Directory/>dr-xr-xr-x00018-Nov-201621:26.dr-xr-xr-x00018-Nov-201621:26..dr-xr-xr-x00022-Aug-201623:36Recoverydr-xr-xr-x0004-Jun-201622:49SystemVolumeInformation
testdisk.log
:
ThuFeb1620:46:552017Commandline:TestDiskTestDisk7.0,DataRecoveryUtility,April2015ChristopheGRENIER<[email protected]>http://www.cgsecurity.orgOS:Linux,kernel4.8.0-37-generic(#39-UbuntuSMPThuJan2602:27:07UTC2017)x86_64Compiler:GCC5.3ext2fslib:1.43.3,ntfslib:libntfs-3g,reiserfslib:none,ewflib:none,curseslib:ncurses6.0/dev/sda:LBA,HPA,LBA48,DCOsupport/dev/sda:size976773168sectors/dev/sda:user_max976773168sectors/dev/sda:native_max976773168sectors/dev/sda:dco976773168sectors/dev/sdb:LBA,HPA,LBA48,DCOsupport/dev/sdb:size976773168sectors/dev/sdb:user_max976773168sectors/dev/sdb:native_max976773168sectors/dev/sdb:dco976773168sectorsWarning:can'tgetsizeforDisk/dev/mapper/control-0B-0sectors,sectorsize=512HarddisklistDisk/dev/sda-500GB/465GiB-CHS6080125563,sectorsize=512-SamsungSSD850EVO500GB,S/N:S1YCNXAGB00962X,FW:EMT02B6QDisk/dev/sdb-500GB/465GiB-CHS6080125563,sectorsize=512-SamsungSSD850EVOM.2500GB,S/N:S24CNXAH208296N,FW:EMT21B6QPartitiontabletype(auto):EFIGPTDisk/dev/sda-500GB/465GiB-SamsungSSD850EVO500GBPartitiontabletype:EFIGPTAnalyseDisk/dev/sda-500GB/465GiB-CHS6080125563hdr_size=92hdr_lba_self=1hdr_lba_alt=976773167(expected976773167)hdr_lba_start=34hdr_lba_end=976773134hdr_lba_table=2hdr_entries=128hdr_entsz=128Currentpartitionstructure:2PEFISystem9236481128447204800[EFIsystempartition]search_part()Disk/dev/sda-500GB/465GiB-CHS6080125563NTFSat0/32/33filesystemsize921600sectors_per_cluster8mft_lcn38400mftmirr_lcn2clusters_per_mft_record-10clusters_per_index_record1NTFSpart_offset=1048576,part_size=471859200,sector_size=512NTFSpartitioncannotbeadded(part_offset<part_size).NTFSat0/32/33filesystemsize921600sectors_per_cluster8mft_lcn38400mftmirr_lcn2clusters_per_mft_record-10clusters_per_index_record1MSData2048923647921600NTFS,blocksize=4096,471MB/450MiBFAT32at57/126/6FAT1:6654-7422FAT2:7423-8191start_rootdir:8192rootcluster:2Data:8192-204799sectors:204800cluster_size:2no_of_cluster:98304(2-98305)fat_length769calculated769set_FAT_info:namefromBSusedFAT32at57/126/6MSData9236481128447204800[NONAME]FAT32,blocksize=1024,104MB/100MiBNTFSat72/72/1filesystemsize974611379sectors_per_cluster8mft_lcn786432mftmirr_lcn2clusters_per_mft_record-10clusters_per_index_record1NTFSpart_offset=594542592,part_size=499001026048,sector_size=512NTFSpartitioncannotbeadded(part_offset<part_size).NTFSat72/72/1filesystemsize974611379sectors_per_cluster8mft_lcn786432mftmirr_lcn2clusters_per_mft_record-10clusters_per_index_record1MSData1161216975772594974611379NTFS,blocksize=4096,499GB/464GiBNTFSat60739/26/24filesystemsize999424sectors_per_cluster8mft_lcn41642mftmirr_lcn2clusters_per_mft_record-10clusters_per_index_record1MSData974774273975773696999424NTFSfoundusingbackupsector,blocksize=4096,511MB/488MiBNTFSat60739/26/24filesystemsize999424sectors_per_cluster8mft_lcn41642mftmirr_lcn2clusters_per_mft_record-10clusters_per_index_record1MSData975773696976773119999424NTFS,blocksize=4096,511MB/488MiBResultsPMSData2048923647921600NTFS,blocksize=4096,471MB/450MiBPMSData9236481128447204800[NONAME]FAT32,blocksize=1024,104MB/100MiBMSData1161216975772594974611379NTFS,blocksize=4096,499GB/464GiBMSData974774273975773696999424NTFSfoundusingbackupsector,blocksize=4096,511MB/488MiBMSData975773696976773119999424NTFS,blocksize=4096,511MB/488MiBHintforadvancedusers.dmsetupmaybeusedifyouprefertoavoidtorewritethepartitiontableforthemoment:echo"0 921600 linear /dev/sda 2048" | dmsetup create test0
echo "0 204800 linear /dev/sda 923648" | dmsetup create test1
echo "0 974611379 linear /dev/sda 1161216" | dmsetup create test2
echo "0 999424 linear /dev/sda 974774273" | dmsetup create test3
echo "0 999424 linear /dev/sda 975773696" | dmsetup create test4
ntfs_device_testdisk_io_ioctl() unimplemented
dir_partition inode=5
P MS Data 2048 923647 921600
NTFS, blocksize=4096, 471 MB / 450 MiB
Directory /
5 dr-xr-xr-x 0 0 0 4-Jun-2016 23:48 .
5 dr-xr-xr-x 0 0 0 4-Jun-2016 23:48 ..
37 dr-xr-xr-x 0 0 0 4-Jun-2016 23:44 Recovery
35 dr-xr-xr-x 0 0 0 1-Jun-2016 14:12 System Volume Information
dir_partition inode=0
P MS Data 923648 1128447 204800 [NO NAME]
FAT32, blocksize=1024, 104 MB / 100 MiB
FAT: cluster=2(0x2), pos=931840
Directory /
3 drwxr-xr-x 0 0 0 2-Jun-2016 07:34 EFI
ntfs_device_testdisk_io_ioctl() unimplemented
dir_partition inodentfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
Record 0 has no FILE magic (0x0)
Failed to load $MFT: Input/output error
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument
Record 0 has no FILE magic (0x0)
Failed to load $MFT: Input/output error
=5
MS Data 1161216 975772594 974611379
NTFS, blocksize=4096, 499 GB / 464 GiB
Directory /
5 dr-xr-xr-x 0 0 0 10-Feb-2017 01:05 .
5 dr-xr-xr-x 0 0 0 10-Feb-2017 01:05 ..
132 dr-xr-xr-x 0 0 0 22-Aug-2016 22:54 $GetCurrent
63 dr-xr-xr-x 0 0 0 2-Jun-2016 10:40 $Recycle.Bin
86499 dr-xr-xr-x 0 0 0 8-Nov-2016 18:54 Intel
135457 dr-xr-xr-x 0 0 0 27-Apr-2016 07:52 Logs
184781 dr-xr-xr-x 0 0 0 16-Jul-2016 13:47 PerfLogs
184785 dr-xr-xr-x 0 0 0 2-Feb-2017 23:13 Program Files
192329 dr-xr-xr-x 0 0 0 2-Feb-2017 23:11 Program Files (x86)
192466 dr-xr-xr-x 0 0 0 22-Aug-2016 22:59 ProgramData
279327 dr-xr-xr-x 0 0 0 27-Dec-2016 15:55 Python36
174888 dr-xr-xr-x 0 0 0 22-Aug-2016 22:38 Recovery
546406 dr-xr-xr-x 0 0 0 20-Jun-2016 22:03 SQL Server 2000 Sample Databases
210433 dr-xr-xr-x 0 0 0 21-Jun-2016 20:06 SQLServer2016Media
82311 dr-xr-xr-x 0 0 0 10-Feb-2017 00:28 System Volume Information
192686 dr-xr-xr-x 0 0 0 22-Aug-2016 22:44 Users
193184 dr-xr-xr-x 0 0 0 10-Feb-2017 01:06 Windows
17780 dr-xr-xr-x 0 0 0 22-Aug-2016 22:54 Windows10Upgrade
136591 dr-xr-xr-x 0 0 0 5-Oct-2016 19:25 _tmp
463 dr-xr-xr-x 0 0 0 4-Jun-2016 22:23 cloud
170100 dr-xr-xr-x 0 0 0 2-Feb-2017 18:45 projects
300 dr-xr-xr-x 0 0 0 24-Jul-2016 14:35 tools
389125 -r--r--r-- 0 0 1 30-Oct-2015 08:18 BOOTNXT
279327 -r--r--r-- 0 0 0 27-Dec-2016 15:55 Python36:Win32App_1
546406 -r--r--r-- 0 0 0 20-Jun-2016 22:03 SQL Server 2000 Sample Databases:Win32App_1
19844 -r--r--r-- 0 0 395268 10-Jul-2015 13:00 bootmgr
34 -r--r--r-- 0 0 2550136832 10-Feb-2017 01:07 pagefile.sys
82325 -r--r--r-- 0 0 16777216 10-Feb-2017 01:07 swapfile.sys
ntfs_device_testdisk_io_ioctl() unimplemented
ntfs_device_testdisk_io_ioctl() unimplemented
MS Data 974774273 975773696 999424
NTFS found using backup sector, blocksize=4096, 511 MB / 488 MiB
Can't open filesystem. Filesystem seems damaged.
ntfs_device_testdisk_io_ioctl() unimplemented
dir_partition inode=5
MS Data 975773696 976773119 999424
NTFS, blocksize=4096, 511 MB / 488 MiB
Directory /
5 dr-xr-xr-x 0 0 0 18-Nov-2016 21:26 .
5 dr-xr-xr-x 0 0 0 18-Nov-2016 21:26 ..
35 dr-xr-xr-x 0 0 0 22-Aug-2016 23:36 Recovery
40 dr-xr-xr-x 0 0 0 4-Jun-2016 22:49 System Volume Information
interface_write()
1 P MS Data 2048 923647 921600
2 P MS Data 923648 1128447 204800 [NO NAME]
simulate write!
TestDisk exited normally.
Tags windows partitioning testdisk linux