Page MenuHomeFreeBSD

geom_label: Remove an old sysinstall(8) workaround
ClosedPublic

Authored by jrtc27 on Jun 19 2021, 8:59 PM.

Details

Summary

We removed sysinstall(8) back in 2011, so this workaround should be long
since unnecessary. This workaround can end up breaking cases that are
hit in the real world, such as dd'ing a small pre-built disk image to a
large partition that you intend to grow on first boot and uses a UFS
disk label for / in its /etc/fstab (as the only reliable thing a raw UFS
image can reference).

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jrtc27 created this revision.

I think this is OK, but you might want to add kirk to the reviewers. He knows about weird setups like this...

This revision is now accepted and ready to land.Jun 19 2021, 10:04 PM

Basing a decision on just the superblock magic number seems a bit weak, but that is what has been used traditionally and it worked, so with that in mind, this change seems reasonable.
Were this still in use, I would recommend more robust checks. For example verifying the check-hash for UFS2 filesystems that have them.