-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
after zpool upgrade, the need to update bootcode is not mentioned #12099
Comments
What's required depends heavily on factors such as whether the pool is even required for booting (I know, your zroot example is one such), whether the partitions are in MBR or GPT format, and whether you use BIOS or UEFI to boot. I feel like the bootloader is out of scope and it's a detail of system administration external to ZFS, especially when OpenZFS also covers Linux and its even more varied mechanisms for booting. I'm assuming this particular instance follows an upgrade from FreeBSD 12.x to 13.0. FreeBSD probably should document their upgrade procedures to include updating the boot loader. |
Specifically, FreeBSD used to print a message here, and that went away as we migrated to OpenZFS. I think the idea would be to restore it, as before conditional on the pool property bootfs being set. Instead of providing specific instructions, I envision it just have a URL to the FreeBSD handbook chapter on bootcode or similar. |
@allanjude I thought about this too, but AFAIK bootfs doesn't necessarily need to be set in order to boot from a zpool. Anyway, I opened a pull request in #12104 that mentions this in a generic enough way, so it applies to all operating systems, as I've been told by someone else who faced the same problem on Debian. I'm happy to change this pull request based on feedback of course. If the consensus is that Linux users don't want or don't need this, then it might be better to create a patch downstream. |
FreeBSD bug 255318 – handbook: Document how to update the bootloader |
@allanjude After some discussion, I updated the patch #12104 to only cover FreeBSD for now. The question is, if showing the reminder should be made conditional based on bootfs being set (like you suggested and I evaluated in the beginning, when I thought this will be cross platform). It's clearly not necessary to be set to boot from a pool (I built systems without it set in the past), but all out of the box FreeBSD setups we use these days have it set - so maybe a good trade off (and not being annoyed by the warning in case a non-bootable pool is updated). What do you think? Code: if (modified_pool) {
#ifdef __FreeBSD__
char bootfs[ZPOOL_MAXPROPLEN];
if (zpool_get_prop(zhp, ZPOOL_PROP_BOOTFS, bootfs,
sizeof (bootfs), NULL, B_FALSE) == 0 &&
strcmp(bootfs, "-") != 0) {
(void) printf(gettext("\nPool '%s' has the bootfs "
"property set, you might need to update\nthe boot "
"code. See gptzfsboot(8) and loader.efi(8) for "
"details.\n"), zpool_get_name(zhp));
}
#else
(void) printf("\n");
#endif
} Result (with bootfs set):
Result (without bootfs set):
|
As suggested in openzfs#12099 (and after sleeping over it), change zpool upgrade so that a reminder to update the boot code is only shown if the zpool in question has the bootfs property set. This should be sufficient for the vast majority of installations. People rolling something else/custom are most likely aware what to do in their setup anyway. Signed-off-by: Michael Gmelin <grembo@FreeBSD.org>
There used to be a warning after upgrading a zpool in FreeBSD, so users won't forget to updating the boot loader in case that pool is booted from. This change brings this warning back, but only if the bootfs property is set on the pool, which should be sufficient for the vast majority of FreeBSD installations. People running something custom are most likely aware of what to do after an upgrade in their specific environment. Functionality is implemented in an OS specific helper function. Closes openzfs#12099 Signed-off-by: Michael Gmelin <grembo@FreeBSD.org>
There used to be a warning after upgrading a zpool in FreeBSD, so users won't forget to update the boot loader that pool is booted from. This change brings this warning back, but only if the bootfs property is set on the pool, which should be sufficient for the vast majority of FreeBSD installations. People running something custom are most likely aware of what to do after an upgrade in their specific environment. Functionality is implemented in an OS specific helper function. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Co-authored-by: Michael Gmelin <grembo@FreeBSD.org> Signed-off-by: Michael Gmelin <grembo@FreeBSD.org> Closes #12099 Closes #12104
There used to be a warning after upgrading a zpool in FreeBSD, so users won't forget to update the boot loader that pool is booted from. This change brings this warning back, but only if the bootfs property is set on the pool, which should be sufficient for the vast majority of FreeBSD installations. People running something custom are most likely aware of what to do after an upgrade in their specific environment. Functionality is implemented in an OS specific helper function. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Co-authored-by: Michael Gmelin <grembo@FreeBSD.org> Signed-off-by: Michael Gmelin <grembo@FreeBSD.org> Closes openzfs#12099 Closes openzfs#12104
There used to be a warning after upgrading a zpool in FreeBSD, so users won't forget to update the boot loader that pool is booted from. This change brings this warning back, but only if the bootfs property is set on the pool, which should be sufficient for the vast majority of FreeBSD installations. People running something custom are most likely aware of what to do after an upgrade in their specific environment. Functionality is implemented in an OS specific helper function. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Co-authored-by: Michael Gmelin <grembo@FreeBSD.org> Signed-off-by: Michael Gmelin <grembo@FreeBSD.org> Closes openzfs#12099 Closes openzfs#12104
There used to be a warning after upgrading a zpool in FreeBSD, so users won't forget to update the boot loader that pool is booted from. This change brings this warning back, but only if the bootfs property is set on the pool, which should be sufficient for the vast majority of FreeBSD installations. People running something custom are most likely aware of what to do after an upgrade in their specific environment. Functionality is implemented in an OS specific helper function. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Co-authored-by: Michael Gmelin <grembo@FreeBSD.org> Signed-off-by: Michael Gmelin <grembo@FreeBSD.org> Closes openzfs#12099 Closes openzfs#12104
System information
After
zpool upgrade
, there is no notice to update the bootcode:The text was updated successfully, but these errors were encountered: