Page MenuHomeFreeBSD

geom_label: Remove an old sysinstall(8) workaround
ClosedPublic

Authored by jrtc27 on Jun 19 2021, 8:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 9:00 PM
Unknown Object (File)
Thu, Nov 7, 3:26 PM
Unknown Object (File)
Tue, Nov 5, 8:06 AM
Unknown Object (File)
Sun, Oct 27, 3:12 PM
Unknown Object (File)
Sun, Oct 27, 3:12 PM
Unknown Object (File)
Sun, Oct 27, 3:12 PM
Unknown Object (File)
Sun, Oct 27, 2:52 PM
Unknown Object (File)
Thu, Oct 24, 6:45 AM
Subscribers
None

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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39995
Build 36884: arc lint + arc unit

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.