# freebsd-update to 11.2-RELEASE fails to boot/reboots



## drhowarddrfine (Jun 27, 2018)

I read a couple of people updated just fine so I updated one of our servers without issue but, when I updated my workstation, it gets as far as bringing up the eight CPUs on my system, then blurts out some hex code too quickly for me to read, and reboots. I am unable to get into single user mode but I can get into the console.

I was able to boot into kernel.old and everything works fine there. Reading some other threads, it seems `freebsd-update rollback` should have brought me back to version 11.1, I thought, but now the system complains that /etc/fstab does not match the version or doesn't exit (I think). I didn't find any other error messages anywhere. So I'm back on kernel.old and not sure what to do.

One thought is to remove everything from /var/db/freebsd-update and try to upgrade again, (there is a rollback file in there now), but I don't know if that's the proper way to do that. I have my files backed up but I'd rather find the way around this issue than reinstalling.

I'd like to know which mailing list would be the one to ask about this there, too, if anyone knows. It's not obvious to me.

Oh, yeah. I forgot about /boot/kernel and /boot/kernel.old but I've never had to do this before. First time freebsd-update failed for me.


----------



## drhowarddrfine (Jun 27, 2018)

Correct me if I'm wrong. I should be able to copy /boot/kernel.old to /boot/kernel, reboot and I'll be back with 11.1-RELEASE as the default and everything should be just fine, right?

If so, then I will delete everything in /var/db/freebsd-update and try `freebsd-update upgrade` again. Sound like a plan?


----------



## sidetone (Jun 27, 2018)

drhowarddrfine said:


> I should be able to copy /boot/kernel.old to /boot/kernel, reboot and I'll be back with 11.1-RELEASE as the default and everything should be just fine, right?


That should work, but it's better to choose your kernel by editing /boot/loader.conf:

```
kernel= "kernel.old"
kernels="kernel kernel.old" # will let you choose at the boot menu
```
This will only set the kernel to be the one of 11.1-RELEASE. `freebsd-update rollback`, as you mentioned, is supposed to be the command to use.
It's a good idea to copy your kernel.old to another directory, so it won't be replaced each time you try to upgrade.


----------



## drhowarddrfine (Jun 27, 2018)

Moving boot/kernel.old to boot/kernel and deleting /var/db/freebsd-update. Tried freebsd-update again and again I get the same issue above where it keeps rebooting at the same spot.

I recently started to install win10 in bhyve. If anyone thinks it matters, changes made to /boot/loader.conf are

```
vmm_load="YES"
if_tap_load="YES"
```


----------



## drhowarddrfine (Jun 27, 2018)

I recorded the output of boot with my phone. It happens so fast it was even hard to capture the frame that shows the problem. There was a panic and it involves emulators/virtualbox. There is a comment in the release notes about VirtualBox which I don't recall as I type this. I question whether it conflicts with my install of bhyve, too, as I mentioned earlier. I'm going to comment out both in /boot/loader.conf to see if that makes the upgrade work.


----------



## jrm@ (Jun 27, 2018)

I also experienced the issue with VB in the release candidates.


----------



## drhowarddrfine (Jun 27, 2018)

jrm@ Well that explains that. I removed all the stuff in loader.conf and rc.conf, was able to get to the login prompt now, but when I run startx, the system reboots. Yes, I have nvidia.

Since I want to replace virtualbox with bhyve, does that issue still affect this with bhyve?


----------



## jrm@ (Jun 28, 2018)

No, I don't believe bhyve will be a problem.  Also, if byhve doesn't work out, you can build emulators/virtualbox-ose-kmod directly on the target 11.2 box and the system will load that kernel module.

The same goes for the Nvidia driver.  If you can get it built directly on 11.2, I _think_ it will load.


----------



## scottro (Jun 28, 2018)

I'm going to try installing VBox on one of the laptops I upgraded today, and will, if I have time to actually do it, report back later.

EDIT:  On a laptop (old L420 Thinkpad) that had been upgraded ( by source) from 11.1 to 11.2, I installed VirtualBox and guest additions and everything was fine. So for me at least, it could be installed once the system was upgraded without problem.


----------



## drhowarddrfine (Jun 28, 2018)

After reading some info that all of this is intertwined with nvidia drivers, I though that maybe reinstalling nvidia might make 11.2 work. That was a mistake. I'm not on version 11.1 but nvidia can't find the screens (it complains). 

I've uninstalled virtualbox and kmod but, this morning, I don't recall if I reinstalled nvidia-driver again so I'll try that. Wife is going out of town tomorrow for the weekend and I really, really didn't want to spend that time trying to fix my workstation.


----------



## scottro (Jun 28, 2018)

I do sympathize. I don't have a sacrificial NVidia machine to test with at this point.  But I think most of us can remember an upgrade that went completely horribly.


----------



## DutchDaemon (Jun 28, 2018)

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228536


----------



## scottro (Jun 28, 2018)

So, as of right now, it seems that one has to build the NVidia driver from the port once they've upgraded, and possibly even on a fresh install.  (Mentioned in comment 3 in the bug)


----------



## drhowarddrfine (Jun 28, 2018)

To correct an error I said earlier, I installed the wrong driver for nvidia during all this and I am now able to use my workstation with 11.2-RELEASE. I have an older graphics card and forgot to install the older driver. 

I have not re-installed virtualbox due to the problems with it but my intention is to switch to bhyve anyway.


----------



## scottro (Jun 28, 2018)

Glad to hear you won't lose your weekend.
Did you have to install it from ports or did you use the pkg version and find it working?


----------



## drhowarddrfine (Jun 28, 2018)

scottro I installed from ports.


----------



## hamtaro (Jun 28, 2018)

first from pkg but i dont liked after from ports (for my radeon card) n.n


----------



## Minbari (Jun 28, 2018)

jrm@ said:


> I also experienced the issue with VB in the release candidates.


Rebuilding Vbox on 11.2 solve the boot problem; don't know if this work for pkgs I'm using ports only.


----------



## Freakbeat (Jun 28, 2018)

I have an issue when new kernel couldn't start modules, I used the old kernel but I don't know how to fix the freebsd-update rollback:


```
root@star:/home/user # freebsd-update rollback
Uninstalling updates...Update files missing -- this should never happen.
Re-run '/usr/sbin/freebsd-update fetch'.

root@star:/home/user # freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 11.1-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata files... failed.
```


----------



## mdelaney (Jun 28, 2018)

I had the same problem with VirtualBox. I uninstalled VirtualBox (virtualbox-ose, and virtualbox-ose-kmod; version 5.2.8_1) after removing the aforementioned packages, I was able to proceed with the upgrade from 11.1-RELEASE to 11.2-RELEASE.


----------



## Jonathan M Davis (Jun 28, 2018)

drhowarddrfine said:


> There is a comment in the release notes about VirtualBox which I don't recall as I type this. I question whether it conflicts with my install of bhyve, too, as I mentioned earlier.



bhyve requires the vmm kernel module, and virtualbox does not work if vmm is loaded. So, aside from all of the issues discussed here about virtualbox and nvidia on FreeBSD 11.2, virtualbox and bhyve can live on the same box, but they can't be run at the same time, and which one works at any given time depends on whether the vmm module is currently loaded. Personally, I normally have my rc.conf set up to load everything for both bhyve and virtualbox, which means that bhyve works without doing anything but that if I want to start virtualbox, I have to kldunload vmm (and then if I want to run bhyve after using virtualbox, I have to kldload vmm).


----------



## outpaddling (Jul 8, 2018)

Just ran into the same issue after upgrading my Thinkpad.  Commenting out the vbox entries in /boot/loader.conf and /etc/rc.conf fixed it.

1. Boot from a USB stick or DVD
2. Select Live CD
3. Log in as root
4. mount /dev/ada0p2 /mnt
5. vi /mnt/boot/loader.conf
    Comment out vboxdrv_load="YES"
6. vi /mnt/etc/rc.conf
    Comment out vboxnet_enable="YES"
7. reboot

Thanks for sharing your experience here.  Turned a scary situation into a very easy fix...


----------



## rjohn (Jul 11, 2018)

i had same problem ,restored kernel files ,delete upgrade folder ,commect out as mension above the conf files and tryed again to run : `freebsd-update upgrade -r 11.2-RELEASE`

and at some point i get notifications for lot of files like this one :

```
he following file will be removed, as it no longer exists in                                                                                                   

FreeBSD 11.2-RELEASE: /boot/device.hints                                                                                                                       

Does this look reasonable (y/n)? y                                                                                                                             

                                                                                                                                                                

The following file will be removed, as it no longer exists in                                                                                                   

FreeBSD 11.2-RELEASE: /etc/apmd.conf                                                                                                                           

Does this look reasonable (y/n)? y                                                                                                                             

                                                                                                                                                                

The following file will be removed, as it no longer exists in                                                                                                   

FreeBSD 11.2-RELEASE: /etc/autofs/include_ldap                                                                                                                 

Does this look reasonable (y/n)? y
```

is this normal ?


----------



## Deleted member 48958 (Jul 11, 2018)

drhowarddrfine said:


> I read a couple of people updated just fine so I updated one of our servers without issue but, when I updated my workstation, it gets as far as bringing up the eight CPUs on my system, then blurts out some hex code too quickly for me to read, and reboots. I am unable to get into single user mode but I can get into the console.
> 
> I was able to boot into kernel.old and everything works fine there.



I have completely the same situation, it's rebooting with 11.2 kernel,
and I'm not able to boot, I tried to upgrade to 11.2-RELEASE using freebsd-update
also I tried to build 11.2 world and kernel from source — the situation is the same,
it reboots on boot, but 11.1 kernel boots fine without any issues.



DutchDaemon said:


> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228536





jrm@ said:


> I also experienced the issue with VB in the release candidates.


But, after removing nvidia-drviver and virtualbox ports, now I'm able to boot into 11.2.
Also, after rebuilding nvidia-driver port and rebooting, I'm able to use Xorg. And after rebuilding
virtualbox-ose-kmod port and rebooting, I'm able to use virtualbox as well. So remove
all virtualbox and nvidia stuff,  boot into 11.2 kernel, rebuild these ports and reboot,
all should work fine. It's good that this forum exists


----------



## ShelLuser (Jul 11, 2018)

Maybe a tip, I don't know:


```
PORTS_MODULES=x11/nvidia-driver
```
See, I had 0 problems upgrading, not even with the nvidia driver, and I can only conclude that this line probably saved me a lot of hassle.

You need to add it to /etc/make.conf and it will make sure that your system will also rebuild the port(s) you mention here whenever you build a new kernel. So after I had finished building my new kernel my system made sure that the nvidia driver had also been updated.

So I never had any problems booting.


----------



## tehpeh (Aug 2, 2018)

I can't launch X on fresh 11.2 install with a GeForce 320M (Mac Mini 2010) even after installing nvidia-driver-340 via ports.

On `startx` the system reboots and Xorg.log says "Failed to initialize the NVIDIA kernel module" (and "no screens found"), nothing else in other logs that I can see. I have tried with both a minimal xorg.d conf file and with `nvidia-xconfig`.

I'm starting to think, based on other posts, this is an unsupported card. Does anyone have related experiences?


----------



## dave (Aug 11, 2018)

I had the issue with virtualbox.  Now, I have rolled back the upgrade, but cannot start virtualbox services, due to some modules still not loading.  Here is what I get:

```
KLD ums.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
KLD uhid.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
KLD uhid.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
em0: link state changed to UP
KLD netgraph.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
KLD vboxnetflt.ko: depends on netgraph - not available or version mismatch
linker_load_file: Unsupported file type
KLD netgraph.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
KLD vboxnetflt.ko: depends on netgraph - not available or version mismatch
linker_load_file: Unsupported file type
```

Does anyone know how to troubleshoot this?


----------



## ShelLuser (Aug 11, 2018)

dave said:


> Does anyone know how to troubleshoot this?


How did you install these?  Using ports or binary packages?


----------



## dave (Aug 11, 2018)

Packages


----------



## ShelLuser (Aug 11, 2018)

dave said:


> Packages


Re-reading the error messages again makes me believe that the rollback might not have gone as smoothly as it seems. The errors indicate a mismatch between the kernel and the kernel modules. At first I thought that this was only limited to the added (Virtualbox) modules, but modules such as uhid.ko and ums.ko are actually part of the kernel itself.

Did you build your own kernel or do you use the GENERIC (default) kernel?

I think this should be solvable by re-installing the kernel.


----------



## dave (Aug 11, 2018)

I used the GENERIC kernel.

When I rolled back, I just used the `freebsd-update rollback` command and rebooted.

I notice that my /boot/kernel directory has files all dated from the day I did the original upgrade to 11.2-RELEASE.  I.e. a few days ago.  My /boot/kernel.old directory has files all dated previous, mostly August 19, 2017.

It's worth noting that Google dates the 11.1-RELEASE announcement web page as July 26, 2017.  So that August 19, 2017 date is probably when I did the binary upgrade to 11.1.

Can I simply `mv /boot/kernel /boot/kernel.11.2` and `mv /boot/kernel.old /boot/kernel` and then reboot?


----------



## ShelLuser (Aug 11, 2018)

I'd first start by simply selecting the 'kernel.old' image from the boot menu and see if that fixes the problem.
So when you just start the server you get into a menu with a FreeBSD ASCII logo and all, that menu allows you to switch between the normal kernel and the backup. I don't know from mind but I think it's option 5 or 4. If that works then you can always swap out the directories.


----------



## dave (Aug 11, 2018)

Thanks, that resolved my issue.  Here is a summary of what I did to get back up and running with virtualbox...

Boot the machine with an installer CD or USB stick and drop to the shell.
Mount the usual boot volume with something like `mount /dev/ada0p2 /mnt`.
Edit the /mnt/boot/loader.conf file to comment out the 
	
	



```
vboxdrv_load="YES"
```
 line.
Edit the /mnt/etc/rc.conf file to comment out any virtualbox-related lines.
Reboot the machine to its usual boot drive.
Run `# freebsd-update rollback`.
As part of my troubleshooting, I re-installed all of my packages.  Not sure if this is required or not.
Restore the previous kernel: `mv /boot/kernel /boot/kernel.11.2` and `mv /boot/kernel.old /boot/kernel`.
Test loading the required module: `# kldload vboxdrv`.
Re-enable virtualbox-related stuff in /boot/loader.conf and /etc/rc.conf.
Many thanks to ShelLuser and the FreeBSD Forums!


----------

