# upgrading from 11.2-STABLE to 12-STABLE results in boot stall



## MarcoB (Dec 13, 2018)

Following FreeBSD stable for almost 20 years now but never had something like this. I upgraded from 11.2-STABLE to 12-STABLE, and after '`installkernel`' booting the kernel stalls after some messages:
...
init: Can't stat /dev: function not implemented
init: _secure_path: cannot stat /etc/login.conf: function not implemented
init: login_getclass: unknown class 'daemon'
...

Problem is that I can't even get into single user mode. It stalls right after initializing the usb mouse. A reboot is the only option and there aren't any logfiles yet.

So has anyone a clue what I'm missing here?


----------



## VladiBG (Dec 13, 2018)

https://www.freebsd.org/doc/handbook/kernelconfig-trouble.html#kernelconfig-noboot


----------



## MarcoB (Dec 13, 2018)

Yes, I know. I am able to reboot in my old 11.2 kernel. My question is if anyone has a clue what the error messages mean and what I'm missing.


----------



## SirDice (Dec 13, 2018)

But to be honest, I rarely boot the new kernel first. I typically use installkernel, installworld, mergemaster(8) and _then_ reboot.

The only time this actually caused a problem was when I upgraded to 5.0 and UFS was updated to UFS2. Not booting the new kernel _before_ running installworld corrupted everything. But that was the only time anything bad happened.


----------



## MarcoB (Dec 13, 2018)

The procedure I follow is:
`svn update /usr/src (but in this case svn checkout [URL]https://svn.FreeBSD.org/base/stable/12[/URL] /usr/src)
make buildworld
make buildkernel
make installkernel
shutdown -r now (to test the new kernel)
make installworld
reboot`

The plan was to run `mergemaster -Fp` after `installkernel` and before `installworld`, because there is a remark in /usr/src/UPDATING that mergemaster must be run before `installworld` because of a new ntpd uid/gid.

Single user mode doesn't work, rebooting is the only option.

So should I do a installworld first or is there a change in the kernel from 11>12 that I'm not aware of?


----------



## SirDice (Dec 13, 2018)

Oh, right. There's an account that needs to be added before you can run installworld. 
In that case:

```
make installkernel
mergemaster -p
make installworld
mergemaster -U
shutdown -r now
```


----------



## MarcoB (Dec 13, 2018)

Ok, would like to try that, but won't I run into an unbootable system when the new world is installed, and the new kernel still doesn't boot?

edit: probably should test the new kernel and reboot after the `mergemaster -p`


----------



## VladiBG (Dec 13, 2018)

For the test grab the usb boot of 12.0-release and check if it's boot on your hardware.


----------



## MarcoB (Dec 13, 2018)

Well, this didn't go as hoped. After some `mergemaster` runs I got the same errors. So I decided to do an `installworld` without a positive kernel test and then rebooted. It brought me at last in a working loginprompt. But every program I started resulted in a "bad system call" error. Found out that I made the mistake of commenting out the compatibility for freebsd 11 in the kernelconfig. So rebooted into my old 11.2 kernel and now trying to rebuild a new kernel. Definitely having some learning moments.


----------



## MarcoB (Dec 14, 2018)

Got 12-STABLE up and running again. Thanks to SirDice for pointing me in the right direction.


----------



## goshanecr (May 30, 2019)

I have exactly that issues today on 11.2 -> 12.0 upgrade, and all of it solved with this topic


----------

