Skip to content

Workaround bad JSON output from sfdisk.

Adriaan de Groot requested to merge work/adridg/bad-sfdisk-json into master

The output of sfdisk --json /dev/sdb is not necessarily valid JSON. Then, no partition information is stored, no first-valid-lba in particular. This leads to new partitions being made from sector 0, which is invalid on a GPT table.

The workaround is to manually fix the known-broken JSON from sfdisk. This is amply documented in a standalone static function.

FIXES #425097

Merge request reports