AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / computer / Perguntas / 1442713
Accepted
me0076
me0076
Asked: 2019-05-30 12:14:36 +0800 CST2019-05-30 12:14:36 +0800 CST 2019-05-30 12:14:36 +0800 CST

Como corrigir GPT danificado com MBR híbrido?

  • 772

Tenho um cartão SD com alguns problemas e não consegui corrigi-los.
É assim que o disco se parece nos discos do GNOME: Discos do Ubuntu

Quando executo gdisk /dev/sdb, dá a seguinte saída:

sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.3

Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.
Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: damaged

Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.

Não tenho certeza de qual tabela de partição devo usar, mas usei GPT (criar GPT em branco não foi útil) É assim que as partições se parecem:

Command (? for help): p
Disk /dev/sdb: 125067264 sectors, 59.6 GiB
Model: Multi-Card      
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 76A0F070-E171-475B-9409-53840D61AD12
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 4194270
Partitions will be aligned on 2048-sector boundaries
Total free space is 671677 sectors (328.0 MiB)


Number  Start (sector)    End (sector)  Size       Code  Name
1            2048           67583   32.0 MiB    0C01  hassos-boot
2           67584          116735   24.0 MiB    8300  hassos-kernel0
3          116736          641023   256.0 MiB   8300  hassos-system0
4          641024          690175   24.0 MiB    8300  hassos-kernel1
5          690176         1214463   256.0 MiB   8300  hassos-system1
6         1214464         1230847   8.0 MiB     8300  hassos-bootstate
7         1230848         1427455   96.0 MiB    8300  hassos-overlay
8         1427456         3524607   1024.0 MiB  8300  hassos-data

Receberei esta informação quando quiser verificar o disco:

Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.

Problem: The secondary header's self-pointer indicates that it does not reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Identified 2 problems!

Eu consegui consertar esses problemas e então recebi esta massagem:

No problems found. 121544637 free sectors (58.0 GiB) available in 2
segments, the largest of which is 121542623 (58.0 GiB) in size.

mas depois de escrever eu tenho isso:

 OK: writing new GUID partition table (GPT) to /dev/sdb.
 The operation has completed successfully.

Mas quando verifico as partições novamente, ainda é o mesmo. Tentei excluir todas as partições uma por uma e, em seguida, criar uma nova tabela de partições GUID vazia, mas depois de escrever, obtive o seguinte:

OK: writing new GUID partition table (GPT) to /dev/sdb.
The operation has completed successfully.

Mas quando verifico as partições novamente, ainda é o mesmo. Eu acho que é por causa do MBR híbrido e do GPT danificado. Existe alguma maneira de excluir essas duas tabelas ao mesmo tempo? Ou o que ainda posso fazer para corrigir esse problema?

desde já, obrigado

partitioning sd-card
  • 1 1 respostas
  • 10383 Views

1 respostas

  • Voted
  1. Best Answer
    Deltik
    2019-05-30T15:23:31+08:002019-05-30T15:23:31+08:00

    Na verdade, tive esse mesmo problema recentemente. Seu cartão SD pode estar em algum tipo de modo protegido contra gravação. Causas Possíveis:

    1. A memória flash está gasta e não pode mais ser gravada. (Isto é mau!)
    2. A chave física de proteção contra gravação pode estar habilitada. (Desligue-o para ativar a escrita novamente.)

    No meu caso, o controlador de disco flash estava descartando silenciosamente minhas gravações após a falha da memória flash; portanto, embora as gravações parecessem bem-sucedidas, a tabela de partição corrompida voltou na próxima leitura.

    Se o seu cartão SD está se comportando assim, provavelmente falhou e você precisará obter um novo.

    Suspeito que você esteja tendo o primeiro problema porque, se a chave de proteção contra gravação estivesse ativa, você veria algum tipo de aviso "somente leitura", pois o Linux pode detectar se um disco flash ou cartão SD está protegido contra gravação. (Veja /var/log/syslog)

    Exemplo de uma unidade flash protegida contra gravação /dev/sdc:

    29 de maio 18:26:44 kernel de demonstração: [32319.722491] scsi 2:0:0:0: Acesso direto NA NA 1.26 PQ: 0 ANSI: 5
    29 de maio 18:26:44 kernel de demonstração: [32319.723377] sd 2:0:0:0: Anexo scsi genérico sg1 tipo 0
    29 de maio 18:26:44 kernel de demonstração: [32319.724325] sd 2:0:0:0: [sdc] 31266816 blocos lógicos de 512 bytes: (16,0 GB/14,9 GiB)
    29 de maio 18:26:44 kernel de demonstração: [32319.725131] sd 2:0:0:0: [sdc] Write Protect está ativado
    29 de maio 18:26:44 kernel de demonstração: [32319.725137] sd 2:0:0:0: [sdc] Mode Sense: 43 00 80 00
    29 de maio 18:26:44 kernel de demonstração: [32319.725389] sd 2:0:0:0: [sdc] Cache de gravação: desativado, cache de leitura: ativado, não suporta DPO ou FUA
    29 de maio 18:26:44 kernel de demonstração: [32319.737297] sdc: sdc1
    29 de maio 18:26:44 kernel de demonstração: [32319.739266] sd 2:0:0:0: [sdc] Disco removível SCSI anexado
    

    Demonstração

    /dev/sdbfoi minha unidade flash quebrada que silenciosamente descartou as gravações.

    1. Tentei limpar a tabela de partições:

      root@demo [~]# gdisk /dev/sdb
      GPT fdisk (gdisk) version 1.0.3
      
      Caution: invalid backup GPT header, but valid main header; regenerating
      backup header from main header.
      
      Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
      on the recovery & transformation menu to examine the two tables.
      
      Warning! One or more CRCs don't match. You should repair the disk!
      
      Partition table scan:
        MBR: hybrid
        BSD: not present
        APM: not present
        GPT: damaged
      
      Found valid MBR and corrupt GPT. Which do you want to use? (Using the
      GPT MAY permit recovery of GPT data.)
       1 - MBR
       2 - GPT
       3 - Create blank GPT
      
      Your answer: 2
      
      Command (? for help): p
      Disk /dev/sdb: 7897087 sectors, 3.8 GiB
      Model: USB Flash Disk
      Sector size (logical/physical): 512/512 bytes
      Disk identifier (GUID): 5904C65E-B410-474D-B22F-9FEA7E3582C2
      Partition table holds up to 128 entries
      Main partition table begins at sector 2 and ends at sector 33
      First usable sector is 34, last usable sector is 7897053
      Partitions will be aligned on 2048-sector boundaries
      Total free space is 2014 sectors (1007.0 KiB)
      
      Number  Start (sector)    End (sector)  Size       Code  Name
         1            2048            4095   1024.0 KiB  EF02  BIOS boot partition
         2            4096          106495   50.0 MiB    EF00  EFI System
         3          106496         7897053   3.7 GiB     8300  Linux filesystem
      
      Command (? for help): x
      
      Expert command (? for help): z
      About to wipe out GPT on /dev/sdb. Proceed? (Y/N): y
      GPT data structures destroyed! You may now partition the disk using fdisk or
      other utilities.
      Blank out MBR? (Y/N): y
      
    2. A tabela de partição inválida retornou imediatamente:

      root@demo [~]# gdisk /dev/sdb
      GPT fdisk (gdisk) version 1.0.3
      
      Caution: invalid backup GPT header, but valid main header; regenerating
      backup header from main header.
      
      Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
      on the recovery & transformation menu to examine the two tables.
      
      Warning! One or more CRCs don't match. You should repair the disk!
      
      Partition table scan:
        MBR: hybrid
        BSD: not present
        APM: not present
        GPT: damaged
      
      Found valid MBR and corrupt GPT. Which do you want to use? (Using the
      GPT MAY permit recovery of GPT data.)
       1 - MBR
       2 - GPT
       3 - Create blank GPT
      
      Your answer:
      
    3. Apagar o início do disco com ddtambém não surtiu efeito:

      root@demo [~]# hexdump -C /dev/sdb | head
      00000000  eb 63 90 00 00 00 00 00  00 00 00 00 00 00 00 00  |.c..............|
      00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
      *
      00000050  00 00 00 00 00 00 00 00  00 00 00 80 00 08 00 00  |................|
      00000060  00 00 00 00 ff fa 90 90  f6 c2 80 74 05 f6 c2 70  |...........t...p|
      00000070  74 02 b2 80 ea 79 7c 00  00 31 c0 8e d8 8e d0 bc  |t....y|..1......|
      00000080  00 20 fb a0 64 7c 3c ff  74 02 88 c2 52 bb 17 04  |. ..d|<.t...R...|
      00000090  f6 07 03 74 06 be 88 7d  e8 17 01 be 05 7c b4 41  |...t...}.....|.A|
      000000a0  bb aa 55 cd 13 5a 52 72  3d 81 fb 55 aa 75 37 83  |..U..ZRr=..U.u7.|
      000000b0  e1 01 74 32 31 c0 89 44  04 40 88 44 ff 89 44 02  |[email protected].|
      root@demo [~]# dd if=/dev/zero of=/dev/sdb bs=1M count=1 status=progress
      1+0 records in
      1+0 records out
      1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0219383 s, 47.8 MB/s
      root@demo [~]# hexdump -C /dev/sdb | head
      00000000  eb 63 90 00 00 00 00 00  00 00 00 00 00 00 00 00  |.c..............|
      00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
      *
      00000050  00 00 00 00 00 00 00 00  00 00 00 80 00 08 00 00  |................|
      00000060  00 00 00 00 ff fa 90 90  f6 c2 80 74 05 f6 c2 70  |...........t...p|
      00000070  74 02 b2 80 ea 79 7c 00  00 31 c0 8e d8 8e d0 bc  |t....y|..1......|
      00000080  00 20 fb a0 64 7c 3c ff  74 02 88 c2 52 bb 17 04  |. ..d|<.t...R...|
      00000090  f6 07 03 74 06 be 88 7d  e8 17 01 be 05 7c b4 41  |...t...}.....|.A|
      000000a0  bb aa 55 cd 13 5a 52 72  3d 81 fb 55 aa 75 37 83  |..U..ZRr=..U.u7.|
      000000b0  e1 01 74 32 31 c0 89 44  04 40 88 44 ff 89 44 02  |[email protected].|
      
    • 0

relate perguntas

  • Instalando o Ubuntu em um disco rígido de backup em espaço não alocado

  • Como limpar completamente o disco do laptop para uma nova instalação do Ubuntu?

  • Tamanho da partição 128 GB, mas apenas 64 GB detectados [duplicado]

  • Cartão SD e um amplificador

  • Devo particionar um SSD secundário (sem sistema operacional) usado para armazenamento? [fechado]

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    O visualizador de fotos do Windows não pode ser executado porque não há memória suficiente?

    • 5 respostas
  • Marko Smith

    Como faço para ativar o WindowsXP agora que o suporte acabou?

    • 6 respostas
  • Marko Smith

    Área de trabalho remota congelando intermitentemente

    • 7 respostas
  • Marko Smith

    Serviço do Windows 10 chamado AarSvc_70f961. O que é e como posso desativá-lo?

    • 2 respostas
  • Marko Smith

    O que significa ter uma máscara de sub-rede /32?

    • 6 respostas
  • Marko Smith

    Ponteiro do mouse movendo-se nas teclas de seta pressionadas no Windows?

    • 1 respostas
  • Marko Smith

    O VirtualBox falha ao iniciar com VERR_NEM_VM_CREATE_FAILED

    • 8 respostas
  • Marko Smith

    Os aplicativos não aparecem nas configurações de privacidade da câmera e do microfone no MacBook

    • 5 respostas
  • Marko Smith

    ssl.SSLCertVerificationError: falha na verificação do certificado [SSL: CERTIFICATE_VERIFY_FAILED]: não foi possível obter o certificado do emissor local (_ssl.c:1056)

    • 4 respostas
  • Marko Smith

    Como posso saber em qual unidade o Windows está instalado?

    • 6 respostas
  • Martin Hope
    Albin Como faço para ativar o WindowsXP agora que o suporte acabou? 2019-11-18 03:50:17 +0800 CST
  • Martin Hope
    fixer1234 O "HTTPS Everywhere" ainda é relevante? 2019-10-27 18:06:25 +0800 CST
  • Martin Hope
    Kagaratsch O Windows 10 exclui muitos arquivos minúsculos muito lentamente. Algo pode ser feito para agilizar? 2019-09-23 06:05:43 +0800 CST
  • Martin Hope
    andre_ss6 Área de trabalho remota congelando intermitentemente 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney Por que colocar um ponto após o URL remove as informações de login? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension Ponteiro do mouse movendo-se nas teclas de seta pressionadas no Windows? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    Inter Sys Como Ctrl+C e Ctrl+V funcionam? 2019-05-15 02:51:21 +0800 CST
  • Martin Hope
    jonsca Todos os meus complementos do Firefox foram desativados repentinamente, como posso reativá-los? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK É possível criar um código QR usando texto? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 Altere o nome da ramificação padrão do git init 2019-04-01 06:16:56 +0800 CST

Hot tag

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve