OPNsense Forum

Archive => 17.7 Legacy Series => Topic started by: whitwye on August 08, 2017, 03:59:16 pm

Title: Apparent GPT error
Post by: whitwye on August 08, 2017, 03:59:16 pm
Searching before posting, I found this discussion: https://forum.opnsense.org/index.php?topic=5121.msg21235#msg21235

The context here is different. In a fresh OPNsense installation from the amd64 VGA USB version to a system in which OPNsense has been used to totally reformat the drive (in manual mode, but accepting each default), the resulting system boots, but with this complaint:

Quote
Aug  8 13:11:25 OPNsense kernel: Trying to mount root from ufs:/dev/ufs/OPNsense_Install [ro,noatime]...
Aug  8 13:11:25 OPNsense kernel: GEOM: da0: the secondary GPT header is not in the last LBA.
Aug  8 13:11:25 OPNsense kernel: GEOM: diskid/DISK-4C531001610425107534: the secondary GPT header is not in the last LBA.
Aug  8 13:11:25 OPNsense kernel: GEOM: diskid/DISK-4C531001610425107534: the secondary GPT header is not in the last LBA.
Aug  8 13:11:25 OPNsense kernel: GEOM: diskid/DISK-4C531001610425107534: the secondary GPT header is not in the last LBA.
Aug  8 13:11:25 OPNsense kernel: GEOM: diskid/DISK-4C531001610425107534: the secondary GPT header is not in the last LBA.

This looks like an inconsistency between the FreeBSD tools used to set up the drive, and where the FreeBSD kernel expects the secondary GPT header to be. Will this be a problem if trouble develops with the primary GPT header? Is there a utility which can adjust the secondary GPT header's location to make the kernel happy on next boot?

I did a second full installation on the system, just to be sure it wasn't a one-time problem. It showed up both times.
Title: Re: Apparent GPT error
Post by: franco on August 08, 2017, 05:13:37 pm
Hi whitwye,

FreeBSD does that. I don't know why. The only problem we have seen was when Windows wanted to repair USB sticks because of this problem, but with an uneven number of GPT partitions it wasn't comfortable and ended up trashing the boot for FreeBSD. Two small bugs which trashed USB image boot under these conditions.

The lesson was: Windows likes the image better when 4 partitions are written and FreeBSD is alright as long as it boots into a healthy environment. And we haven't had issues with the GPT/UEFI installer option so far.

I'm happy to fix this correctly, but I'm not a GPT expert...


Cheers,
Franco