Bug 223470 - freebsd-update: Cannot identify running kernel (/boot removed from jails)
Summary: freebsd-update: Cannot identify running kernel (/boot removed from jails)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Keywords: needs-patch, needs-qa
Depends on:
Reported: 2017-11-06 11:48 UTC by Mathieu Arnold
Modified: 2021-10-03 21:14 UTC (History)
6 users (show)

See Also:
koobs: mfc-stable12?
koobs: mfc-stable11?


Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Arnold freebsd_committer 2017-11-06 11:48:28 UTC
To conserve disk space, I removed /boot from most of my jails, and when I do that, freebsd-update refuses to run saying that "Cannot identify running kernel".
Comment 1 Ed Maste freebsd_committer 2017-11-20 19:38:51 UTC
freebsd-update fetches the kern.bootfile sysctl, then checks that the corresponding directory exists.

The security.jail.jailed sysctl can be used to determine if we are running in a jail; FreeBSD-update could check that sysctl and ignore failure to find a kernel if so. We should still update the kernel if found, but silently ignore if not.
Comment 2 Colin Percival freebsd_committer 2019-03-12 23:00:13 UTC
Drop freebsd-update PRs which were assigned to me.  I'm not working on this code any more.
Comment 3 Ozgur Karatas 2019-03-31 01:49:41 UTC

this is not a bug. freebsd-update fetch command doesn't know your freebsd version because no zfs release to /boot.

firstly run:

$ zpool list
$ zfs list

if you are seen boot run:

$ zpool import bootpool

you can try it:

$ freebsd-update fetch


Comment 4 Mathieu Arnold freebsd_committer 2019-04-09 13:38:39 UTC
A jail does not have any bootable filesystem, it is a jail.
Comment 5 Dries Michiels 2019-04-09 16:59:01 UTC
It would be indeed much cleaner if freebsd-update natively supported jails without a /boot. Although as a workaround you can use the following:

freebsd-update --currently-running "RELEASE VERSION YOU RUN IN THE JAIL"
Comment 6 Mathieu Arnold freebsd_committer 2019-04-18 16:52:51 UTC
# freebsd-update --currently-running 12.0 fetch install
src component not installed, skipped
Cannot identify running kernel
Comment 7 Dries Michiels 2019-04-27 14:40:58 UTC
Have you tried this too:
freebsd-update --currently-running 12.0-RELEASE fetch install
Comment 8 Piotr Pawel Stefaniak freebsd_committer 2021-10-03 21:14:27 UTC
It looks like c76da1f01064 fixes this (but doesn't close yet).