Solved FreeBSD-update -r 13.2-RELEASE upgrade 13.1 => 13.2 => install => reboot => cannot load kernel

Hi,
The Virtualbox FreeBSD that I attempted to upgrade to 13.2 had something seriously wrong. At the end, /boot/kernel could not be loaded although it existed and was populated by looking at the bootloader screen.

I managed to find an older 12.1 FreeBSD Virtualbox file gw.vdi and removed the current and hosed gw.vdi from Virtualbox and replaced it with the old 12.1 backup. After a short couple of hours the server is now:
FreeBSD gw.internal 13.2-RELEASE-p2 FreeBSD 13.2-RELEASE-p2 GENERIC amd64

The upgrades to get from 12.1 to 13.2 were simple, straightforward and successful. I followed the following page:

I thank those people below that did try to help me out but that original FreeBSD VM was totally hosed.
===========================================================================

Ran freebsd-update -r 13.2-RELEASE upgrade
1st time it gets to the scrolling numbers and stops.. like it is frozen. Killed the VM and restarted the VM running exact same command. After it gets to sendmail or submit.cf to edit it, simply #'d the >>>>> and ====== and then ran freebsd-update install. After short time it tells me to reboot and rerun the -update install.

Rebooted and then it says cannot load kernel.

This iteration of FreeBSD is simple no custom kernel. Any idea's on how to get this working again?

Thanks in advance for any help.
 
Last edited:
Update, after seeing post by SirDice<tm> booted using boot /boot/kernel.old and now its up. So, what would be suggested to go forward?

Just ran # freebsd-update rollback
done
# reboot
FreeBSD 13.1-RELEASE-p3 GENERIC
It's back up but there are some errors that were there before causing this iteration to constantly reboot....
warning: total configured swap (524288 pages) exceeds maximum recommended amount (475600 pages).
warning: increase kern.maxswzone or reduce amount of swap.

# swapinfo
Device 1K-blocks Used Avail Capacity
/dev/ada0p3 2097152 76888 2020264 4%

KLD intpm.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/kernel/intpm.ko - unsupported file type

KLD intpm.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/kernel/intpm.ko - unsupported file type
KLD mac_ntpd.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/kernel/mac_ntpd.ko - unsupported file type

Have run pkg upgrade and pkg install screen
rsync'd files for smb and unbound to another server in case it turns out this current iteration is hosed.

Thanks.
Now going to wait to see what anyone suggests from this point
 
Is it the first time you upgrade a FreeBSD system?

1st time it gets to the scrolling numbers and stops.. like it is frozen.

Have you waited long enough to be sure it's stuck?

Is this installation use zfs on root? Because, if it is, you can select the Boot Environment item of the beastie menu at startup and see if you have a BE created before you begin to upgrade. Normally you will find them as there are automatically generated by the upgrade process itself. Try to boot on one of them.
 
Seems from above, you don't realize its past all that. I am logged via ssh and it is currently:
13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64

And yeah I have upgraded and installed since 1999. However this is the first time while its doing the patches it stops in what appeared to be the middle. So just get past that.

I guess I will just have to run freebsd-update -r 13.2-RELEASE upgrade and post if there is any problems. And so you're aware, prior to starting this upgrade, I had noticed the server was off. Why? No clue. When first starting it after is was off, it just kept rebooting. Virtualbox window doesn't have scroll bar so cannot see at what point it panics. Ended up getting into single user mode and ran fsck -y MANY times because after reboot .. file system clean, just repeats constant rebooting until after running fsck -y and reboot it finally booted normal or at least what appears to be normal.

This time, upgrade via ssh and in screen!

To install the downloaded upgrades, run "/usr/sbin/freebsd-update install"
Installing updates...gunzip: (stdin): unexpected end of file
gunzip: (stdin): unexpected end of file
ef_read_entry failed

Kernel updates have been installed. Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.
Hmm. Don't think it likes running in screen. Try again without screen...

No, it something else. No longer in screen and it seems to fail...
# /usr/sbin/freebsd-update install
Installing updates...gunzip: (stdin): unexpected end of file
gunzip: (stdin): unexpected end of file
gunzip: (stdin): unexpected end of file
gunzip: (stdin): unexpected end of file

... says done. reboot and back to unbootable.


reboot_after_install.png
 
Back in via ssh. Used boot /boot/kernel.old/kernel

Try again running freebsd-update install .....
# freebsd-update install
No updates are available to install.
FreeBSD 13.1-RELEASE-p3 GENERIC

Ok, so back to start, freebsd-update -r 13.2-RELEASE upgrade
 
/usr/sbin/freebsd-update install
Installing updates...cp: ///boot/kernel.old/./.freebsd-update and ./.freebsd-update are identical (not copied).
gunzip: (stdin): unexpected end of file
gunzip: (stdin): unexpected end of file
ef_read_entry failed

Kernel updates have been installed. Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.
 
Yeah, don't reboot. Looks like one or more of the downloaded patch files is corrupted. I would do a rm -rf /var/cache/freebsd-update/* and start freebsd-update -r 13.2-RELEASE upgrade again.
 
Oh, and anything out of the ordinary of the original install? I mean, used any encrypted partitions? Different partitioning than the default? Dualbooting with grub? Perhaps obvious but we've had a few people run into it, is there enough free space?
 
Back
Top