Recommended/preferred way to upgrade when using custom kernel?

Hello!

What is the preferred way to upgrade the OS when using custom kernel (Xen)? I use ZFS on the hypervisor.

I ask it because I ran into a problem when I tried to upgrade my Xen production server from 13.1 to 13.2. The upgrade was successful with the generic kernel but when I switched to Xen kernel it stucked during boot.
Fortunately the "freebsd-update rollback" saved the situation and I could switch back to a working 13.1 environment.
The manual says that there is a grace period (3 months) when the 13.2 stuffs are built on 13.1 server and there is not guarantee that kernel modules will work with custom kernel.

So I see two options:
1. during the grace period I compile xen-kernel and xen-tools from source. If I find problem I can roll back to the previous state with "freebsd-update rollback" + replace my compiled Xen to the previous working version (own compiled or package manager provided).

2. I tries to upgrade after the grace period. If it fails it is more tricky to roll back because not only the kernel and boot environment are changed but all user-land components. I think it is the best in this case if I reinstall it from ISO image + restore data from backup.
In this case the rollback mechanism seems a little bit complicated.

There is an another solution is in my mind: because the server has mirrored disks if I remove one from the mirror I can play with the another disk (try to upgrade or reinstall the OS) and if it fails I can restore the working state from the offline disk.
 
back when I was running a custom kernel (for FC target mode), my workflow was as follows:

- create new BE ("FreeBSD-<new-release-version>")
- mount BE, mount /usr/src into it and start a jail in that BE (can now be done directly via bectl jail)
- fetch & install upgrades (remember to run freebsd-update install a second time with '--currently-running <newrelease>' to complete the update)
- build & install custom kernel
- stop jail, unmount BE & /usr/src
- activate BE
- reboot
- upgrade packages

Except for the /usr/src and kernel build part, this is pretty much the same workflow I still use for release upgrades on remote machines where I want to have some extra safety net and want to minimize downtime.
 
Back
Top