[Bug 256252] freebsd-update rollback made system unbootable

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 30 May 2021 03:10:00 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256252

            Bug ID: 256252
           Summary: freebsd-update rollback made system unbootable
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs_at_FreeBSD.org
          Reporter: xistence_at_0x58.com

I am running with ZFS on root using a default install that was made using
FreeBSD 12.0-RELEASE a year or two ago.

Today I attempted to upgrade to FreeBSD 13.0-RELEASE, after rebooting into the
new kernel network traffic stopped working, so I wanted to roll back the
changes FreeBSD update had made:

freebsd-update rollback
shutdown -r now

However after that I got back a mountroot>

After some fiddling, I used the following to get back into a bootable state:

set currdev="zfs:zroot/ROOT/default:"
unload
load /boot/kernel.old/kernel
load /boot/kernel.old/opensolaris.ko
load /boot/kernel.old/zfs.ko
boot -s

Once in single user mode:

zfs set readonly=off zroot
zfs mount -a
cd /boot
cp -pr kernel kernel.13
cp -pr kernel.old kernel.12
rm -rf kernel
cp -pr kernel.old kernel

shutdown -r now

After that my system came back online.

When I attempted to load:

/boot/kernel/kernel at the loader it would succeed, but would fail when I
attempted to load /boot/kernel/opensolaris.ko.

Somehow a freebsd-update rollback left me with a broken /boot/kernel.

The upgrade was from FreeBSD 12.2-RELEASE-p5 to FreeBSD 13.0-RELEASE-p1.

root_at_Breached:/usr/home/xistence # zpool status
  pool: zroot
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        zroot       ONLINE       0     0     0
          ada0p3    ONLINE       0     0     0

errors: No known data errors
root_at_Breached:/usr/home/xistence # zfs list -t all
NAME                 USED  AVAIL  REFER  MOUNTPOINT
zroot               7.66G   202G    88K  /zroot
zroot/ROOT          6.10G   202G    88K  none
zroot/ROOT/default  6.10G   202G  6.10G  /
zroot/tmp            112K   202G   112K  /tmp
zroot/usr           1.44G   202G    88K  /usr
zroot/usr/home      28.8M   202G  28.8M  /usr/home
zroot/usr/ports      713M   202G   713M  /usr/ports
zroot/usr/src        733M   202G   733M  /usr/src
zroot/var            123M   202G    88K  /var
zroot/var/audit       88K   202G    88K  /var/audit
zroot/var/crash       88K   202G    88K  /var/crash
zroot/var/log        123M   202G   123M  /var/log
zroot/var/mail       104K   202G   104K  /var/mail
zroot/var/tmp        124K   202G   124K  /var/tmp

Nothing special here. Let me know if there is anything else I can help with.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Sun May 30 2021 - 03:10:00 UTC

Original text of this message