Firmware UEFI não recgonising da tabela de partições GPT

0

O firmware UEFI da minha ASRock FM2A75 Pro4 não reconhece as tabelas de partição GPT dos meus discos rígidos SATA, conforme mostrado pelo comando shell map EFI:

Device mapping table
  fs0     :Removable HardDisk - Alias hd15f0b blk0 
           PciRoot(0x0)/Pci(0x13,0x2)/USB(0x5,0x0)/HD(1,MBR,0x599b0b48,0x800,0x771800)
  blk0    :Removable HardDisk - Alias hd15f0b fs0 
           PciRoot(0x0)/Pci(0x13,0x2)/USB(0x5,0x0)/HD(1,MBR,0x599b0b48,0x800,0x771800)
  blk1    :HardDisk - Alias (null)
           PciRoot(0x0)/Pci(0x11,0x0)/Sata(0x1,0x0)/HD(1,MBR,0x00000000,0x1,0xffffffff)
  blk2    :HardDisk - Alias (null)
           PciRoot(0x0)/Pci(0x11,0x0)/Sata(0x2,0x0)/HD(1,MBR,0x00000000,0x1,0xffffffff)
  blk3    :BlockDevice - Alias (null)
           PciRoot(0x0)/Pci(0x11,0x0)/Sata(0x0,0x0)
  blk4    :BlockDevice - Alias (null)
           PciRoot(0x0)/Pci(0x11,0x0)/Sata(0x1,0x0)
  blk5    :BlockDevice - Alias (null)
           PciRoot(0x0)/Pci(0x11,0x0)/Sata(0x2,0x0)
  blk6    :Removable BlockDevice - Alias (null)
           PciRoot(0x0)/Pci(0x13,0x2)/USB(0x5,0x0)
  hd15f0b :Removable HardDisk - Alias fs0 blk0 
           PciRoot(0x0)/Pci(0x13,0x2)/USB(0x5,0x0)/HD(1,MBR,0x599b0b48,0x800,0x771800)

Um dump do começo do primeiro disco é:

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001c0  01 00 ee fe ff ff 01 00  00 00 ff ff ff ff 00 00  |................|
000001d0  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 55 aa  |..............U.|
00000200  45 46 49 20 50 41 52 54  00 00 01 00 00 02 00 00  |EFI PART........|
00000210  fc 8c f5 67 00 00 00 00  01 00 00 00 00 00 00 00  |...g............|
00000220  af d9 30 46 02 00 00 00  00 08 00 00 00 00 00 00  |..0F............|
00000230  8e d9 30 46 02 00 00 00  4d a7 05 30 c3 6b 10 4a  |..0F....M..0.k.J|
00000240  b3 de d9 8b 01 7f bd 45  02 00 00 00 00 00 00 00  |.......E........|
00000250  80 00 00 00 80 00 00 00  e2 cd 84 66 00 00 00 00  |...........f....|
00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  28 73 2a c1 1f f8 d2 11  ba 4b 00 a0 c9 3e c9 3b  |(s*......K...>.;|
00000410  f2 68 35 6f f8 53 5f 40  b4 91 e5 eb e1 76 6a f9  |[email protected].|
00000420  00 08 00 00 00 00 00 00  ff 27 03 00 00 00 00 00  |.........'......|
00000430  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000480  79 d3 d6 e6 07 f5 c2 44  a2 3c 23 8f 2a 3d f9 28  |y......D.<#.*=.(|
00000490  ea e7 0d a6 47 50 84 48  ab 8a 73 3e b3 99 e3 a8  |....GP.H..s>....|
000004a0  00 28 03 00 00 00 00 00  8e d9 30 46 02 00 00 00  |.(........0F....|
000004b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00100000  eb 3c 90 6d 6b 66 73 2e  66 61 74 00 02 04 01 00  |.<.mkfs.fat.....|

Os discos foram particionados com o cfdisk do util-linux e funcionam bem com o Linux.

A saída sgdisk -v /dev/sda é:

No problems found. 0 free sectors (0 bytes) available in 0
segments, the largest of which is 0 (0 bytes) in size.
    
por Timothy Baldwin 05.02.2016 / 03:26

2 respostas

0

Depois de comparar o comportamento com o parted que usei anteriormente, parece que o bugs UEFI rejeita tabelas de partição com um comprimento de cabeçalho de 512, o que o padrão permite:

Size in bytes of the GPT Header. The HeaderSize must be greater than or equal to 92 and must be less than or equal to the logical block size.

Depois de modificar o util-linux para usar um tamanho de cabeçalho de 92 e recriar minhas partições com o fdisk, o UEFI agora reconhece minhas partições.

    
por 07.02.2016 / 14:47
0

É "corrigido" no util-linux recente (a partir de 2.26-rc1):

Kay reported that Windows 8.1 installed does not recognize GPT created by libfdisk, but parted works as expected.

It seems (according to the header hexdump) that the problem is HeaderSize GPT field where libfdisk uses 512 (header + reserved area), but parted uses 92. The both is pretty valid according to the current EFI standard, but 92 is probably more backwardly compatible.

I also found places in code where libfdisk gpt driver is inconsistent and uses sometimes all sector and simetimes sizeof(gpt_header) only. The right solution is to read all sector (into zeroized memory) and later write again all sector to the device.

libfdisk: (gpt) uso do tamanho do cabeçalho de limpeza

    
por 07.02.2016 / 16:11