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)
Mon, Apr 8, 9:07 PM
Unknown Object (File)
Fri, Apr 5, 4:01 PM
Unknown Object (File)
Jan 30 2024, 12:08 AM
Unknown Object (File)
Dec 14 2023, 9:12 AM
Unknown Object (File)
Dec 12 2023, 2:16 AM
Unknown Object (File)
Nov 9 2023, 4:00 PM
Unknown Object (File)
Nov 3 2023, 11:59 AM
Unknown Object (File)
Oct 6 2023, 2:55 PM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
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.