dankamongmen / growlight

notcurses block device manager / system installation tool
https://nick-black.com/dankwiki/index.php/Growlight
GNU General Public License v3.0
84 stars 12 forks source link

Creating partitions leads to corrupt backup GPT #129

Closed dankamongmen closed 3 years ago

dankamongmen commented 3 years ago

I created a new GPT on my USB device /dev/sdo. I then created a partition at sector 34. This appears to have left a corrupt backup GPT, according to gparted, and blkid does not list any filesystem tags on the resulting partition (despite making and even mounting an ext4 filesystem in /dev/sdo1). Presumably blkid is rejecting the corrupt GPT. The filesystem, as a result, is not detected by growlight, despite being visible in the Mounts output.

dankamongmen commented 3 years ago

We're blowing away the backup GPT:

PENDING FSECT: 34 LSECT: 483655679 comes from 230.62GiB 34→483655679 unpartitioned space

it ought only go up through 483655679.

dankamongmen commented 3 years ago

Those geometries are set in lex_part_spec().

dankamongmen commented 3 years ago

When we were using a percent-based size, we kept one extra sector on the partition. This fix is in 1.2.25.