Eu tenho uma caixa do Ubuntu em um SSD e um HDD secundário ( /dev/sdb
) com algumas partições NTFS.
Algum contexto: ontem a máquina não estava respondendo e tive que desligá-la com força (cortar a energia). Na reinicialização, o Ubuntu cairia no modo de emergência. Descobri que o UUID do HDD havia desaparecido (não apareceu em blkid
), portanto, tornando /etc/fstab
corrompido. Eu comentei a linha do disco em fstab
e consegui inicializar o Ubuntu.
Agora estou tentando montar o HDD novamente. Primeiro eu tentei o Gparted. Esta é a saída da libparted (usada pelo gparted):
======================
libparted : 3.2
======================
end of file while reading /dev/sdb
The primary GPT table is corrupt, but the backup appears OK, so that will be used.
Curiosamente, sudo blkid
mostra /dev/sdb
como tendo um PTUUID em vez de um UUID:
$ sudo blkid
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/sda1: UUID="e407bc1c-4c2d-4dae-80ce-e6bd96346698" TYPE="ext4" PARTUUID="659e6a1e-01"
/dev/sda5: UUID="f9500440-cddf-41f6-8512-5a30e66fbf3d" TYPE="swap" PARTUUID="659e6a1e-05"
/dev/sda6: UUID="18abc384-a610-4f65-8430-0109548a89ef" TYPE="ext4" PARTUUID="659e6a1e-06"
/dev/sdb: PTUUID="a6e9090d-b5ab-412a-8568-2eee08fa3fa8" PTTYPE="gpt"
Estou confiante de que as partições ainda estão lá, não consigo montá-las. parted
lista-os corretamente:
$ sudo parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) select /dev/sdb
Using /dev/sdb
(parted) p
Error: end of file while reading /dev/sdb
Retry/Ignore/Cancel? i
Error: The primary GPT table is corrupt, but the backup appears OK, so that will be used.
OK/Cancel? OK
Model: ATA ST1000LM024 HN-M (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 316MB 315MB EFI system partition boot, esp
2 316MB 945MB 629MB ntfs Basic data partition hidden, diag
3 945MB 1079MB 134MB Microsoft reserved partition msftres
4 1079MB 979GB 978GB ntfs Basic data partition msftdata
5 979GB 1000GB 21,5GB ntfs Basic data partition hidden, diag
(parted) q
Portanto, há dois erros ( Error: end of file while reading /dev/sdb
, Error: The primary GPT table is corrupt, but the backup appears OK, so that will be used.
) que provavelmente tornam a partição não montável. Alguma idéia de como resolvê-los?
EDIT Esta é a saída de ntfsfix
:
$ sudo ntfsfix /dev/sdb
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Unrecoverable error
Volume is corrupt. You should run chkdsk.
EDIT Saída do gdisk
GPT fdisk (gdisk) version 1.0.1
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!
Warning! One or more CRCs don't match. You should repair the disk!
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
EDIT Este é o comando que eu executei erroneamente e que causou o problema: sudo dd if=/dev/zero of=/dev/sdb bs=512 seek=1