[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

telling if we've actually booted from /boot/xen-4.14-amd64.gz



Is there a simple way to tell if the kernel/hypervisor that was used to
boot is the one currently installed in /boot.

I have a script that emails me when it detects a mismatch and it's
broken with the latest bullseye xen hypervisor.

I was grepping for major.minor.release (from /sys/hypervisor/version)
but that gives 4.14.4-pre while strings on the (uncompressed) hypervisor gives
4.14.3+32-g9de3671772-1~deb11u1

/sys/hypervisor/compilation/compile_date:Thu Dec  2 20:45:55 UTC 2021
seems to match the timestamp on the files in /boot. Is that something I
can rely on?

Is there a good way to do what I want (which is to avoid missing an automatic
upgrade and then not rebooting for months)?

Automatic rebooting on upgrade is not an option as I only want to reboot
when I have time to deal with any issues if it fails to come up for any
reason.

So far my script to check the kernel version is ok, only the hypervisor
check has failed with the recent update. For the kernel I grep for uname
-r and uname -v.

This update has fixed my power-off problem though :-)

Tim.


Reply to: