Traté de arreglar un problema que encontré ayer mi MacBook Pro (13 pulgadas, mediados de 2012) siguiendo las instrucciones en la respuesta superior de este hilo . Me temo que puedo haber destruido inadvertidamente mis datos al reescribir la tabla de particiones con los valores indicados en esta respuesta en lugar de los valores adecuados.
El disco y volumen afectado en mi problema es el disco2, volumen 2. El volumen 3 era anteriormente una partición de Bootcamp que borré e instalé en MacOS antes de recordar que tenía una unidad de reserva para poner en mi ordenador (disco1). Aquí están los resultados de la diskutil list
comando que ejecuté al principio de este esfuerzo:
Trevors-MBP:~ trevorraney$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 499.9 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +499.9 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 487.3 GB disk1s1
2: APFS Volume Preboot 23.6 MB disk1s2
3: APFS Volume Recovery 511.0 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 439.9 GB disk2s2
3: Apple_APFS Container disk3 59.9 GB disk2s3
/dev/disk3 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +59.9 GB disk3
Physical Store disk2s3
1: APFS Volume Untitled 12.9 GB disk3s1
2: APFS Volume Preboot 24.1 MB disk3s2
3: APFS Volume Recovery 509.5 MB disk3s3
4: APFS Volume VM 2.1 GB disk3s4
Abajo está lo que introduje en mi intento de arreglar esta unidad. Específicamente el comando sudo gpt add -i 2 -b 409640 -s 372637568 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk2
. Observe que el disco2s2 tiene ahora 190 gigabytes, y la creación de un disco3 erróneo.
Trevors-MBP:~ trevorraney$ gpt -r show /dev/disk2
gpt show: unable to open device '/dev/disk2': Permission denied
Trevors-MBP:~ trevorraney$ sudo gpt -r show /dev/disk2
Password:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 859181016 2 GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
859590656 116920320 3 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
976510976 262111
976773087 32 Sec GPT table
976773119 1 Sec GPT header
Trevors-MBP:~ trevorraney$ diskutil umountDisk disk2
Unmount of all volumes on disk2 was successful
Trevors-MBP:~ trevorraney$ gpt remove -i 2 disk2
gpt remove: unable to open device 'disk2': Permission denied
Trevors-MBP:~ trevorraney$ sudo gpt remove -i 2 disk2
disk2s2 removed
Trevors-MBP:~ trevorraney$ diskutil umountDisk disk2
Unmount of all volumes on disk2 was successful
Trevors-MBP:~ trevorraney$ gpt add -i 2 -b 409640 -s 372637568 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk2
gpt add: unable to open device 'disk2': Permission denied
Trevors-MBP:~ trevorraney$ sudo gpt add -i 2 -b 409640 -s 372637568 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk2
disk2s2 added
Trevors-MBP:~ trevorraney$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 499.9 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +499.9 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 487.3 GB disk1s1
2: APFS Volume Preboot 23.6 MB disk1s2
3: APFS Volume Recovery 511.0 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_APFS Container disk3 190.8 GB disk2s2
3: Apple_APFS Container disk4 59.9 GB disk2s3
/dev/disk3 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +ERROR disk3
Physical Store disk2s2
/dev/disk4 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +59.9 GB disk4
Physical Store disk2s3
1: APFS Volume Untitled 12.9 GB disk4s1
2: APFS Volume Preboot 24.1 MB disk4s2
3: APFS Volume Recovery 509.5 MB disk4s3
4: APFS Volume VM 2.1 GB disk4s4
Por último, aquí está la lista de errores que obtuve después de ejecutar diskutil verifyVolume
en el disco2s2.
Trevors-MBP:~ trevorraney$ diskutil verifyDisk disk2
Started partition map verification on disk2
Checking prerequisites
Checking the partition list
Checking the partition map size
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Checking the EFI system partition's folder content
Checking all HFS data partition loader spaces
Checking booter partitions
Checking Core Storage Physical Volume partitions
The partition map appears to be OK
Finished partition map verification on disk2
Trevors-MBP:~ trevorraney$ diskutil verifyVolume disk2s2
Started file system verification on disk2s2
Verifying storage system
Performing fsck_apfs -n -x /dev/disk2s2
warning: nx_block_count is 107397627, while device block count is 46579696
Checking the container superblock
warning: dev_read(60086901, 1): Device not configured
warning: dev_read(60086902, 1): Device not configured
warning: dev_read(60086903, 1): Device not configured
warning: dev_read(60086904, 1): Device not configured
warning: dev_read(60086905, 1): Device not configured
warning: dev_read(60086906, 1): Device not configured
warning: dev_read(60086907, 1): Device not configured
warning: dev_read(60086908, 1): Device not configured
warning: dev_read(60086909, 1): Device not configured
warning: dev_read(60086910, 1): Device not configured
warning: dev_read(60086911, 1): Device not configured
warning: dev_read(60086912, 1): Device not configured
warning: dev_read(60086913, 1): Device not configured
warning: dev_read(60086914, 1): Device not configured
warning: dev_read(60086915, 1): Device not configured
warning: dev_read(60086916, 1): Device not configured
warning: dev_read(60086917, 1): Device not configured
warning: dev_read(60086918, 1): Device not configured
warning: dev_read(60086919, 1): Device not configured
warning: dev_read(60086920, 1): Device not configured
warning: dev_read(60086921, 1): Device not configured
warning: dev_read(60086922, 1): Device not configured
warning: dev_read(60086923, 1): Device not configured
warning: dev_read(60086924, 1): Device not configured
warning: dev_read(60086925, 1): Device not configured
warning: dev_read(60086926, 1): Device not configured
warning: dev_read(60086927, 1): Device not configured
warning: dev_read(60086928, 1): Device not configured
warning: dev_read(60086929, 1): Device not configured
warning: dev_read(60086930, 1): Device not configured
warning: dev_read(60086931, 1): Device not configured
warning: dev_read(60086932, 1): Device not configured
warning: dev_read(60086933, 1): Device not configured
warning: dev_read(60086934, 1): Device not configured
warning: dev_read(60086935, 1): Device not configured
warning: dev_read(60086936, 1): Device not configured
warning: dev_read(60086937, 1): Device not configured
warning: dev_read(60086938, 1): Device not configured
warning: dev_read(60086939, 1): Device not configured
warning: dev_read(60086940, 1): Device not configured
warning: dev_read(60086941, 1): Device not configured
warning: dev_read(60086942, 1): Device not configured
warning: dev_read(60086943, 1): Device not configured
warning: dev_read(60086944, 1): Device not configured
warning: dev_read(60086945, 1): Device not configured
warning: dev_read(60086946, 1): Device not configured
warning: dev_read(60086947, 1): Device not configured
warning: dev_read(60086948, 1): Device not configured
warning: dev_read(60086949, 1): Device not configured
too many warnings generated; suppressing subsequent ones
error: no valid checkpoint found
Most recent checkpoint is invalid
The volume /dev/disk2s2 could not be verified completely
Storage system check exit code is 8
Error: -69716: Storage system verify or repair failed
Underlying error: 8
Trevors-MBP:~ trevorraney$
Supongo que la partición estaba en formato APFS, pero posiblemente podría haber sido HFS+. Tengo la esperanza de que, como no he intentado reparar el disco en Terminal, el daño que he hecho sea reversible y pueda recuperar algunos o todos mis datos. Cualquier ayuda será muy apreciada.
Actualización: Contabilización de la salida de sudo gpt -r show /dev/disk2
y sudo dd if=/dev/disk2s2 count=1 bs=512 | hexdump -Cv
como sugiere David Anderson.
Last login: Sun Sep 30 11:56:40 on ttys000
Trevors-MBP:~ trevorraney$ sudo gpt -r show /dev/disk2
Password:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 372637568 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
373047208 486543448
859590656 116920320 3 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
976510976 262111
976773087 32 Sec GPT table
976773119 1 Sec GPT header
Trevors-MBP:~ trevorraney$ sudo dd if=/dev/disk2s2 count=1 bs=512 | hexdump -Cv
1+0 records in
1+0 records out
512 bytes transferred in 0.001883 secs (271937 bytes/sec)
00000000 1f 32 02 66 46 24 11 49 01 00 00 00 00 00 00 00 |.2.fF$.I........|
00000010 a2 c1 0d 00 00 00 00 00 01 00 00 80 00 00 00 00 |................|
00000020 4e 58 53 42 00 10 00 00 fb c1 66 06 00 00 00 00 |NXSB......f.....|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 02 00 00 00 00 00 00 00 15 fa 6d 9a a2 2c 45 0f |..........m..,E.|
00000050 88 b8 c1 b8 2b c6 6b 13 7b 86 17 00 00 00 00 00 |....+.k.{.......|
00000060 a3 c1 0d 00 00 00 00 00 18 01 00 00 30 6c 00 00 |............0l..|
00000070 75 da 94 03 00 00 00 00 e3 01 94 03 00 00 00 00 |u...............|
00000080 5d 00 00 00 e9 10 00 00 5b 00 00 00 02 00 00 00 |].......[.......|
00000090 b4 10 00 00 35 00 00 00 ea b9 02 00 00 00 00 00 |....5...........|
000000a0 04 a9 0e 00 00 00 00 00 01 04 00 00 00 00 00 00 |................|
000000b0 00 00 00 00 64 00 00 00 03 04 00 00 00 00 00 00 |....d...........|
000000c0 e1 b9 02 00 00 00 00 00 e3 b9 02 00 00 00 00 00 |................|
000000d0 e5 5e 03 00 00 00 00 00 00 00 00 00 00 00 00 00 |.^..............|
000000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000200
Trevors-MBP:~ trevorraney$