Page MenuHomeFreeBSD

Colons in boot environment name

Authored by mav on Jun 29 2018, 7:08 PM.



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

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.