Solved Some necessary steps missing to install a new kernel

Some months ago, I had some problems when upgrading to FreeBSD 11.2

https://forums.FreeBSD.org/threads/cannot-make-buildworld-after-failed-upgrade-to-11-2.67177/
After using some of the nice advices, I ended up with a usable system, even though some inconsistencies were obvious.

I did wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/11.2-RELEASE/kernel.txz tar -xz -C / -f kernel.txz

I know I missed something. I cannot boot from the new kernel. Therefore, I get the following output:
freebsd-version -kru
Code:
11.2-RELEASE
11.0-RELEASE-p8
11.2-RELEASE-p2
uname -a
Code:
FreeBSD servername 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22 06:12:04 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

How do I activate the new kernel?

Thanks in advance,
Jon Theil Nielsen
 
Last edited by a moderator:
You could build the kernel from sources and install it. This should overwrite any inconsistent and old files.
I use this docu page: https://www.freebsd.org/doc/handbook/makeworld.html
Download your kernel's release source code via Subversion in /usr/src and then just build the stock configuration (GENERIC) as described.
It will install the kernel in /boot and then install world.

I think, you could also use freebsd-update for a binary update, but you may have to use a "force" switch or something similar if it complains that you already have the latest version.
 
You could build the kernel from sources and install it. This should overwrite any inconsistent and old files.
I use this docu page: https://www.freebsd.org/doc/handbook/makeworld.html
Download your kernel's release source code via Subversion in /usr/src and then just build the stock configuration (GENERIC) as described.
It will install the kernel in /boot and then install world.

I think, you could also use freebsd-update for a binary update, but you may have to use a "force" switch or something similar if it complains that you already have the latest version.

I think I succeeded in installing the kernel right now. I followed the description at
https://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html
and did:
wget http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.2-RELEASE/kernel.txz
tar -C/ -xvf kernel.txz boot/kernel/kernel
and rebooted into the 11.2 kernel.

Now I have
freebsd-version -kru
Code:
11.2-RELEASE
11.2-RELEASE
11.2-RELEASE-p2
I am not sure if I will have problems with the versions of the kernel and the userland not beeing exactly equal.

Regards,
Jon Theil Nielsen
 
I think I succeeded in installing the kernel right now. I followed the description at
https://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html
and did:
wget http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.2-RELEASE/kernel.txz
tar -C/ -xvf kernel.txz boot/kernel/kernel
and rebooted into the 11.2 kernel.

Now I have
freebsd-version -kru
Code:
11.2-RELEASE
11.2-RELEASE
11.2-RELEASE-p2
I am not sure if I will have problems with the versions of the kernel and the userland not beeing exactly equal.

Regards,
Jon Theil Nielsen

I think you still do. In my opinion what you are doing is wrong, because it extracts the kernel base version, so you don't have the patches.
The proper way to do it is as described above - either build the kernel and world from source, or use freebsd-update.
You should update the packages after that as well.

On my boxes your command returns consistent results:
Code:
# freebsd-version -kru
12.0-RELEASE-p3
12.0-RELEASE-p3
12.0-RELEASE-p3
 
I think you still do. In my opinion what you are doing is wrong, because it extracts the kernel base version, so you don't have the patches.
The proper way to do it is as described above - either build the kernel and world from source, or use freebsd-update.
You should update the packages after that as well.

On my boxes your command returns consistent results:
Code:
# freebsd-version -kru
12.0-RELEASE-p3
12.0-RELEASE-p3
12.0-RELEASE-p3

Thanks for your replies.
I guess you are right. I wil try the binary update first.
I tried
Code:
freebsd-update fetch
and
Code:
freebsd-update install
without any issues.

Later on, I will reboot and run freebsd-update(8) install again. If the output of freebsd-version(1) is consistent I will rebuild all ports.
 
Thanks for your replies.
I guess you are right. I wil try the binary update first.
I tried
Code:
freebsd-update fetch
and
Code:
freebsd-update install
without any issues.

Later on, I will reboot and run freebsd-update(8) install again. If the output of freebsd-version(1) is consistent I will rebuild all ports.

After reboot, freebsd-update(8) install ran without doing anything more.
And the kernel and userland versions was were the same:
Code:
freebsd-version -kru
11.2-RELEASE-p9
11.2-RELEASE-p9
11.2-RELEASE-p9
Now, I can rebuild all ports without serious issues.
Thank you for your help with this.

Regards,
Jon Theil Nielsen
 
Great! I am glad we could help.
Also, if you want your system to be completely clean, you can use the command freebsd-update IDS and see if you have any deviations from a clean installation of your current release.
Of course, your configuration files will most probably be different, but this is OK. Just make sure whatever changes the IDS shows, that you understand and want them.
 
Back
Top