Page MenuHomeFreeBSD

Colons in boot environment name
ClosedPublic

Authored by mav on Jun 29 2018, 7:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 5:03 PM
Unknown Object (File)
Sat, Dec 14, 10:01 AM
Unknown Object (File)
Sun, Dec 8, 11:39 PM
Unknown Object (File)
Fri, Dec 6, 10:09 AM
Unknown Object (File)
Nov 23 2024, 7:24 AM
Unknown Object (File)
Nov 5 2024, 4:47 AM
Unknown Object (File)
Nov 1 2024, 8:06 PM
Unknown Object (File)
Oct 19 2024, 7:52 AM
Subscribers

Details

Summary

While migrating FreeNAS back from GRUB to BSD loader we noticed that the last can not boot from boot environments with colons in their name. The problem is in currdev variable, using colon as a field separator, and the code splitting dataset and path fields on second colon, that leads to trucating dataset name, if one includes colon. I don't know whether anybody have colon in kernel part, but FreeNAS sometimes uses them in boot environment names (time of creation).

Proposes one-line patch makes currdev dev and path fields for ZFS to be cut not on second colon, but on the last one, assuming that colon in dataset name is more important then in kernel path. Also kernel path is an optional parameter in the currdev variable, so in my understanding this change should not completely prevent booting kernels with colons, as bad it does now for boot environments.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable