ZFS gptzfsboot

Hello,

When I boot my FreeBSD computer, I have following message:

gptzfsboot: error 1 lba 250067560
GELI Passphrase for disk0p3:

But my system seems to work correctly.

Previously, this disk was partitioned buy Linux using standard MBR.
I then installed FreeBSD 11 on it using automatic GELI/ZFS on whole disk.
So the system is working fine, but before asking for GELI passphrase, I always get this error.

Is there any way to fix that ?

More info

Code:
$ gpart show ada0
=>       40  250067488  ada0  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064        984        - free -  (492K)
       2048    4194304     2  freebsd-swap  (2.0G)
    4196352  245870592     3  freebsd-zfs  (117G)
  250066944        584        - free -  (292K)


$ gpart list ada0
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 250067527
first: 40
entries: 152
scheme: GPT
Providers:
1. Name: ada0p1
   Mediasize: 524288 (512K)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawuuid: a6d2d656-9cf4-11e6-b891-001d7d068fc7
   rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
   label: gptboot0
   length: 524288
   offset: 20480
   type: freebsd-boot
   index: 1
   end: 1063
   start: 40
2. Name: ada0p2
   Mediasize: 2147483648 (2.0G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: a6e97d50-9cf4-11e6-b891-001d7d068fc7
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
   label: swap0
   length: 2147483648
   offset: 1048576
   type: freebsd-swap
   index: 2
   end: 4196351
   start: 2048
3. Name: ada0p3
   Mediasize: 125885743104 (117G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawuuid: a6f1e611-9cf4-11e6-b891-001d7d068fc7
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: zfs0
   length: 125885743104
   offset: 2148532224
   type: freebsd-zfs
   index: 3
   end: 250066943
   start: 4196352
Consumers:
1. Name: ada0
   Mediasize: 128034594304 (119G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e4

$ dmesg |grep ada0
ada0 at ata1 bus 0 scbus4 target 0 lun 0
ada0: <SAMSUNG SSD 830 Series CXM03B1Q> ACS-2 ATA SATA 3.x device
ada0: Serial Number S0Z3NEAC916732
ada0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada0: 122103MB (250067567 512 byte sectors)
ada0: quirks=0x3<4K,NCQ_TRIM_BROKEN>
GEOM_ELI: Device ada0p3.eli created.
GEOM_ELI: Device ada0p2.eli created.

Maybe its the same problem I got previously here ?:
https://forums.freebsd.org/threads/58253/

The partition table is wrong and the backup table is not where it should be ?

Thanks for any help
 
ada0: 122103MB (250067567 512 byte sectors)
ada0: quirks=0x3<4K,NCQ_TRIM_BROKEN>
One thing that look wrong to me is the number of sectors: that disk is using 4K quirk (implying 4K physical sector size), while logically exposing 512 byte sector size, the final number should be a multiple of 8. (512 x 8 = 4096).
I would have expected 250067568 x 512 byte sectors, or no 4K quirk at all.

However, assume I'm wrong and the system is correct.

The size of the GPT table is 39 sectors, (+ one for protective MBR), that's also confirmed from:
first: 40
entries: 152
scheme: GPT
that is 152 partitions = 38 sectors, + gpt header + protective mbr = 40 sectors.
The alternate GPT is similar except it doesn't include the protective MBR, size is 39.
Therefore the alternate GPT table at the end of the disk, should use the range 250067528-250067566,
yet I'm not sure about what gptzfsboot is looking for at sector 250067560, that sector should contain info related to partitions ada0p129, ada0p130, ada0131, ada0p132 ....

It seems to me you just found a bug ... unclear where the bug is ... could be in gptzfsboot, could be an error in GPT table.
 
I do not think you will have problem because of this, gptzsboot is used at boot only, so once the system is up it is out of the game. Problem eventually would have been a non bootable system ... anyway, a backup is always a right thing to have.

I'm looking forward for further comments on this ... in example geli related, which I never used ...
 
just came across this, from gptzfsboot(8)
IMPLEMENTATION NOTES
The GPT standard allows a variable number of partitions, but gptzfsboot
only boots from tables with 128 partitions or less.

It look like your GPT table, is larger than what gptzfsboot can manage, (152 partitions).
 
Back
Top