Skip to content
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

release will not update if kernel name is anything other than kernel #14

Open
woodsb02 opened this issue Feb 9, 2017 · 1 comment
Open

Comments

@woodsb02
Copy link

woodsb02 commented Feb 9, 2017

On iocell 2.1.0, if sysctl -n kern.bootfile is not /boot/kernel/kernel then running "iocell fetch" will fail to perform a freebsd-update.

# iocell fetch release=11.0-RELEASE
Extracting: base.txz
Extracting: doc.txz
Extracting: lib32.txz
Extracting: src.txz
* Updating base jail template.
Cannot identify running kernel
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.

The reason is explained in this forum post: https://forums.freebsd.org/threads/43329/#post-241491

The solution is to ensure the release contains the directory sysctl -n kern.bootfile:

# cd /iocell/releases/11.0-RELEASE/root/boot/
# ln -sf kernel `sysctl -n kern.bootfile`
@rwp0
Copy link

rwp0 commented May 22, 2022

freebsd-update(8) source contains:

	# Figure out what directory contains the running kernel
	BOOTFILE=`sysctl -n kern.bootfile`
	KERNELDIR=${BOOTFILE%/kernel}
	if ! [ -d ${KERNELDIR} ]; then
		echo "Cannot identify running kernel"
		exit 1
	fi

Which produces Cannot identify running kernel message for all kernel files named other than plain kernel.


This code snippet is repeated three times in the shell script making it a good candidate to wrap in a function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants