Root partition (on ZFS) not mounting after upgrading from 10.1 to 10.2

While bjeurissen summary on Mar 7 was helpful, the rest of this thread is not. There does not appear to be a resolution, or a recognition that something in the ' FreeBSD-update upgrade ' process breaks 10.1 systems that are installed on a zfs root. I just did a 10.1-RELEASE to 10.3-RELEASE upgrade and hit the same issue. The sequence:
Code:
unload
load boot/kernel.old/kernel
load boot/kernel.old/opensolaris.ko
load boot/kernel.old/zfs.ko
boot
does boot into 10.1, so loader.conf is not corrupt and contains:
Code:
zfs_load="YES"
kern.geom.label.gptid.enable="0"
accf_http_load="YES"
kern.hz="100"
# Loader for Hyper-V KVP driver --do not modify
hv_kvp_load="YES"
The comment by kpa that zfs.ko is out of sync suggests where to look, but does not offer a way to fix that. Even so, that does not appear to be true as:

ls -l /boot/kernel|grep zfs.ko
-r-xr-xr-x 1 root wheel 2431936 Jun 27 12:52 zfs.ko
ls -l /boot/kernel.old|grep zfs.ko
-r -xr-xr-x 1 root wheel 2320168 May 6 06:16 zfs.ko

suggests they are different, and diff says they differ without further comment. FWIW: the original install did not load a symbols file, but the upgrade process did pull in zfs.ko.symbols. That suggests the release process took the debug feed, or the upgrade sequence pulled from the wrong place.

In any case, it is not clear where to go from here.
 
I just spotted the thread and I can rule out any boot code issues which got suggested above. I upgraded a 10.1 ZFS powered system to 10.3 yesterday and the only caveat I had to face was forgetting about opensolaris.ko being a dependency for zfs.ko. In other words: a modules_override in /etc/make.conf won't work if you only mention zfs.

As a side-comment: why keep the swap space outside of ZFS? It might be easier on you to include it.

This sounds to me as a kernel messing up. Is it possible that you set files schg and your system on kern.seclevel one?
 
While bjeurissen summary on Mar 7 was helpful, the rest of this thread is not. There does not appear to be a resolution, or a recognition that something in the ' FreeBSD-update upgrade ' process breaks 10.1 systems that are installed on a zfs root. I just did a 10.1-RELEASE to 10.3-RELEASE upgrade and hit the same issue.

In any case, it is not clear where to go from here.

"Good" to hear I am not the only one that got stranded in this situation... I actually hit the problem when upgrading to 10.2...

I could not figure out what went wrong and how to ever fix it, so I ended up performing a fresh install of 10.3 a couple of weeks ago...

I had all my data duplicated on another 10.1 machine first as I was a bit worried that I would not be able to mount my zfs data partitions after a reinstall, but that turned out well...

Not sure what I have to do now when I want to upgrade the other 10.1 machine to 10.3...
 
I don't understand the comment about make.conf since this is not a custom kernel. Is it possible the RELEASE build forgot to include opensolaris.ko as a dependency after 10.1?

As I recall, swap outside zfs is the installer default. I don't believe I specified anything more than swap size and mine looks like:

#gpart show
=> 34 536870845 ada0 GPT (256G)
34 1024 1 FreeBSD-boot (512K)
1058 50331648 2 FreeBSD-swap (24G)
50332706 486538173 3 FreeBSD-zfs (232G)


Glad to hear that a fresh 10.3 works, but that would not be my first choice. I got started on this path because something in FreeBSD-update trashed compatibility between the system and samba security, so that may be my only way out.
 
I don't understand the comment about make.conf since this is not a custom kernel. Is it possible the RELEASE build forgot to include opensolaris.ko as a dependency after 10.1?
No, don't read between the lines. I merely mentioned that I recently upgraded without having any requirements to update my bootcode.

As I recall, swap outside zfs is the installer default. I don't believe I specified anything more than swap size and mine looks like:
So I looked into the 10.3 binary upgrade and it mentions 2 specific complications, one of which being to be careful to double check that a new kernel is placed in boot/kernel.

Although I doubt this to be related I have to wonder if this could apply to your situation? If the wrong kernel is being used then this could lead to the zfs.ko module being unable to load thus automatically resulting in a kernel without ZFS support.
 
OK, I just found this thread after having made a new thread describing the exact same issue Thread 56862 (oops).

So, is the only answer to overwrite and do a new install of 10.3 over 10.1? There is clearly some problem that is yet to be diagnosed with freebsd-update() and 10.1 on zfs() boot.
 
I had the same issue and it's been covered pretty much step by step. I tried to find what the error codes were for the mountroot prompt but couldn't find anything useful. After a day or two of trying I got it to work. This is more or less what happened.


Upgrading from FreeBSD 10.2-RELEASE to FreeBSD 11.0-RELEASE

# freebsd-update fetch
# freebsd-update install
# freebsd-update upgrade -r 11.0-RELEASE
# freebsd-update install
# reboot


!!!!!!!!! Disaster Strikes! !!!!!!!!!

Unable to boot into system.

Booting takes me to the MountRoot prompt - any attempt to load zfs:zroot fails.

Reboot system to boot menu. (Reboot by leaving the prompt blank and hit return)

Option 3 to Escape to loader prompt.

# lsdev
disk devices:
disk0: BIOS drive C:
disk0p1: FreeBSD boot
disk0p2: FreeBSD swap
disk0p3: FreeBSD ZFS

disk1: BIOS drive D:
pxe devices:
zfs devices:
zfs:zroot
zfs:theghetto
OK


So I can see it's there, but I just can't load it. So after reading many threads about this issue this is what I came up with to fix it.

While still in Option 3 to Escape to loader prompt
# unload
# load boot/kernel.old1/kernel
# load boot/kernel.old1/opensolaris.ko
# load boot/kernel.old1/zfs.ko


!!!!! The location of YOUR old kernel might be in a different location! Use ls /boot to see where
your kernel might be !!!!!

# menu

This takes you back to the main boot menu

Let the system boot (multi or single user mode)

You'll be at a command prompt. Log into your system so you can have access to your aliases etc.

You might be asked for a user name, enter root. PW is not set (set to blank).

# login root

(then enter your actual systems root pw)

You should now be in your system.

# mount -u / (changes root filesystem from read-only to read/write)
# mount -a (attempts to mount any other filesystems in /etc/fstab)
# cd /boot/defaults
# vi loader.conf


change zfs_load="NO" to YES

:w!
# ctrl d


This logs you out of your system.

# reboot

And you should be able to boot into your system normally.

From here...

# freebsd-update install
# freebsd-update install
# shutdown -r now


And you're now upgraded. But don't take my word for it!

uname -a
FreeBSD 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64



I hope this help some of you out, good luck!

Subscribe!
 
I had similar issue with FreeBSD 13.0-RELEASE when building custom kernel
Last successful rebuild was made with 12.1-RELEASE

I had following line in /etc/make.conf
Code:
MODULES_OVERRIDE        = accf_http zfs opensolaris krpc

by setting this line as:
Code:
MODULES_OVERRIDE        = accf_http zfs xdr cryptodev crypto krpc
solved my problem, no need to mess with bootcode
 
Back
Top