Some necessary steps missing to install a new kernel

jontheil

Member


Messages: 67

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:

roccobaroccoSC

Active Member

Reaction score: 43
Messages: 159

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.
 

roccobaroccoSC

Active Member

Reaction score: 43
Messages: 159

Also, upgrading to 12.0-RELEASE might get you out of trouble. If you want to switch to 12.0 of course.
 
OP
OP
jontheil

jontheil

Member


Messages: 67

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
 

roccobaroccoSC

Active Member

Reaction score: 43
Messages: 159

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
 
OP
OP
jontheil

jontheil

Member


Messages: 67

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.
 
Top