# my 12.1-RC1 doesn't boot after freebsd-update -r upgrade from 12.0-RELEASE



## RodrigoC (Oct 15, 2019)

First of all, hi!


this is my first post, even that I've being using FreeBSD for three years now, sorry I'm digitaly shy.

Let's go, from a working state of 12.0-RELEASE-p10, then I upgrade by handbook's procedure:

`# beadm create 12-R-2019.10.14
# beadm activate 12-R-2019.10.14
# reboot
# freebsd-update upgrade -r 12.1-RC1
# freebsd-update install
#### after reboot ####
# freebsd-update install
# reboot`

when finished, no errors seen, I reboot as suggested and a just after screen message "Loading kernel modules:" then black screen and reboot.





After this, from the boot menu, I change to the previous boot environment and start 12.0 again.

Crash logs shows:
 /var/crash/core.txt.0 

```
Unable to find matching kernel for /var/crash/vmcore.0
```

/var/crash/info.0

```
Dump header from device: /dev/ada0p3
  Architecture: amd64
  Architecture Version: 2
  Dump Length: 752545792
  Blocksize: 512
  Compression: none
  Dumptime: Mon Oct 14 15:37:23 2019
  Hostname:
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 12.1-RC1 r353428 GENERIC
  Panic String: page fault
  Dump Parity: 425258255
  Bounds: 0
  Dump Status: good
```

/var/vmcore.0
It's quite large and I'm not sure if it's needed


Also segment of /var/log/messages, attached is the full boot to boot segment.


```
Oct 14 13:38:55 tron kernel:
Oct 14 13:38:55 tron syslogd: last message repeated 1 times
Oct 14 13:38:55 tron kernel: Fatal trap 12: page fault while in kernel mode
Oct 14 13:38:55 tron kernel: cpuid = 0; apic id = 00
Oct 14 13:38:55 tron kernel: fault virtual address    = 0x1
Oct 14 13:38:55 tron kernel: fault code        = supervisor read data, page not present
Oct 14 13:38:55 tron kernel: instruction pointer    = 0x20:0xffffffff834ae90f
Oct 14 13:38:55 tron kernel: stack pointer            = 0x28:0xfffffe007476a810
Oct 14 13:38:55 tron kernel: frame pointer            = 0x28:0xfffffe007476a880
Oct 14 13:38:55 tron kernel: code segment        = base 0x0, limit 0xfffff, type 0x1b
Oct 14 13:38:55 tron kernel:             = DPL 0, pres 1, long 1, def32 0, gran 1
Oct 14 13:38:55 tron kernel: processor eflags    = interrupt enabled, resume, IOPL = 0
Oct 14 13:38:55 tron kernel: current process        = 0 (softirq_0)
Oct 14 13:38:55 tron kernel: trap number        = 12
Oct 14 13:38:55 tron kernel: panic: page fault
Oct 14 13:38:55 tron kernel: cpuid = 0
Oct 14 13:38:55 tron kernel: time = 1571060096
Oct 14 13:38:55 tron kernel: KDB: stack backtrace:
Oct 14 13:38:55 tron kernel: #0 0xffffffff80c1d287 at kdb_backtrace+0x67
Oct 14 13:38:55 tron kernel: #1 0xffffffff80bd05bd at vpanic+0x19d
Oct 14 13:38:55 tron kernel: #2 0xffffffff80bd0413 at panic+0x43
Oct 14 13:38:55 tron kernel: #3 0xffffffff810a7d2c at trap_fatal+0x39c
Oct 14 13:38:55 tron kernel: #4 0xffffffff810a7d79 at trap_pfault+0x49
Oct 14 13:38:55 tron kernel: #5 0xffffffff810a736f at trap+0x29f
Oct 14 13:38:55 tron kernel: #6 0xffffffff8108174c at calltrap+0x8
Oct 14 13:38:55 tron kernel: #7 0xffffffff835aa480 at tasklet_handler+0x100
Oct 14 13:38:55 tron kernel: #8 0xffffffff80c1bb44 at gtaskqueue_run_locked+0x144
Oct 14 13:38:55 tron kernel: #9 0xffffffff80c1b7a8 at gtaskqueue_thread_loop+0x98
Oct 14 13:38:55 tron kernel: #10 0xffffffff80b90c13 at fork_exit+0x83
Oct 14 13:38:55 tron kernel: #11 0xffffffff8108278e at fork_trampoline+0xe
Oct 14 13:38:55 tron kernel: Uptime: 4s
Oct 14 13:38:55 tron kernel: Dumping 724 out of 16224 MB:..3%..12%..23%..31%..42%..51%..62%..71%..82%..91%---<<BOOT>>---
```


One more thing, a single user boot on the 12.1 environment leaves me on the shell with no errors.

Greetings,
Rodrigo


----------



## RodrigoC (Oct 15, 2019)

Something else, as suggested in other post:
 /etc/freebsd-update.conf
has:

```
# Components of the base system which should be kept updated.
Components src world kernel
```


----------



## RodrigoC (Oct 21, 2019)

Hi again, 

same with 12.1-RC2.
This laptop was installed with 12.0 and update should work seamlessly, may it be that something is broken on my system?


----------



## xtaz (Oct 21, 2019)

If you are loading one of the KMS graphics drivers in either /boot/loader.conf or /etc/rc.conf I would temporarily comment out that line and try booting it again. Those drivers need to be compiled against the same kernel version that you're running and it may be these that's crashing the system. Especially considering the last line that you see on the screen.

If that allows it to boot then you can recompile that driver from the ports.


----------



## RodrigoC (Oct 21, 2019)

That's it! removal of KMS driver load from rc.conf allows to boot.

Seems that I'll have to recompile those modules.

Thank you.


----------



## xtaz (Oct 21, 2019)

I think this is going to catch out a lot of people. I'm waiting until 12.1 is actually released before I bother upgrading my laptop, but when I did the 11.x to 12.0 upgrade I knew this would be a potential problem and commented that out before I did the upgrade.

A lot of people are not going to think about that.


----------



## userxbw (Oct 23, 2019)

this is why I burned RC's to stick and boot that to see whats what, RC2 still locks up on my laptop so I bug reported it, and my system still works. 




__





						241340 – FreeBSD 12.1 - RC2 boot process fails.
					






					bugs.freebsd.org
				



 - [META] FreeBSD 12.1-RELEASE blockers


----------



## gnath (Oct 23, 2019)

RodrigoC I had same problem. You need to boot in single user mode and find which module caused the problem in loading . If found, stop that from loading and reboot. If not found, check for the modules loaded at that point for your     earlier 12.0- RELEASE-p10 & try to find the same.


----------



## xtaz (Oct 24, 2019)

For what it's worth I upgraded my laptop today from 12.0-RELEASE-p11 to 12.1-RC2 and completely forgot about my own advice and rebooted it with all the kernel drivers still being loaded. It actually booted fine straight into X without any issues at all. I've recompiled the drm driver anyway though.


----------



## toorski (Oct 24, 2019)

xtaz said:


> For what it's worth I upgraded my laptop today from 12.0-RELEASE-p11 to 12.1-RC2


I assume that 12.1  will stil use OpenSSL. Am I correct?
If so, I'll have to move my OpenSMTPD from 11.3 jail to OpenBSD guest OS in FreeBSD's bhyve to use LibreSSL, b'cause *SMTPD doesn't play witn OpenSSL-1.1*


----------



## xtaz (Oct 25, 2019)

12.1-RC2 has OpenSSL 1.1.1d I think. 12.0-RELEASE also has 1.1.1. Sounds like upstream on that really needs to fix it as 1.1.1 is basically the only supported version now. They deprecated the other versions.


----------



## SirDice (Oct 25, 2019)

toorski said:


> If so, I'll have to move my OpenSMTPD from 11.3 jail to OpenBSD guest OS in FreeBSD's bhyve to use LibreSSL, b'cause *SMTPD doesn't play witn OpenSSL-1.1*


Add to /etc/make.conf:

```
DEFAULT_VERSIONS+= ssl=libressl
```
And build everything from ports or build your own package repository.


----------

