Solved Upgraded from 14.3 to 15.0 - bhyve guest machine

Hi there,

What I did:

sh:
# FreeBSD 14.3
freebsd-update fetch install

# Upgrade to 15.0
freebsd-update upgrade -r 15.0-RELEASE install
shutdown -r now

# << reboot >>
# at this stage guest machine booted, but I was unable to connect via ssh
Apr 21 15:36:51 www kernel: ipfw: ipfw_ctl3 invalid option 99v0
Apr 21 15:36:51 www kernel: ipfw: ipfw_ctl3 invalid option 98v0
Apr 21 15:36:51 www syslogd: last message repeated 11 times
Apr 21 15:36:51 www kernel: ipfw: ipfw_ctl3 invalid option 111v0
Apr 21 15:36:51 www kernel: ipfw: ipfw_ctl3 invalid option 98v0
Apr 21 15:36:51 www kernel: ipfw: ipfw_ctl3 invalid option 95v0
Apr 21 15:36:51 www kernel: ipfw: ipfw_ctl3 invalid option 98v0
Apr 21 15:36:51 www kernel: ipfw: ipfw_ctl3 invalid option 95v0
Apr 21 15:36:51 www kernel: ipfw: ipfw_ctl3 invalid option 98v0

After reboot - IPFW rules not loaded! unable to connect remotely.
In my case I managed to load firewall rules only after running freebsd-update install

My question, is there a way to avoid that kind of issues ?
I have machine to update with no video card at all, only Ethernet interfaces .... and what I see from this point, I kinda have to find USB<->UART port somehow pass the first reboot and execute freebsd-update install before network interfaces will be reachable ....
 
My question, is there a way to avoid that kind of issues ?
Disable ipfw(8), or upgrade completely without rebooting system [1], or upgrade to 14.4 first before upgrading to 15.0 [2].

[1] https://www.freebsd.org/releases/15.0R/errata/#open-issues
Code:
Open Issues

    ipfw(8) denies networking when booting a 15.0 kernel with 14.3 userland
    Workaround: disable ipfw(8) or upgrade completely before rebooting ipfw(8) systems
    State: open - https://bugs.freebsd.org/291562

[2] Bug 291562 - freebsd-update: 14.3-15.0 ipfw incompatibility disaster for remote system with no console access: Comment 14

A commit in branch releng/14.4 references this bug:

ipfw: add ability to run ipfw(8) binary with 15.0+ kernel module
 
T-Daemon Thanks ! It worked, here is some notes which may become useful for others

Update process:
sh:
# FreeBSD 14.3 -> 14.4
freebsd-update fetch install && freebsd-update upgrade -r 14.4-RELEASE install

# First Reboot
shutdown -r now

# post reboot install, will take some time
freebsd-update install

# FreeBSD 14.4 -> 15.0
freebsd-update fetch install && freebsd-update upgrade -r 15.0-RELEASE install

# Second Reboot
shutdown -r now

# FreeBSD 15.0, will take A LOT of time, to monitor progress - see script under the spoiler
freebsd-update install

# update package tree
pkg update && pkg upgrade -fy

# delete the old system libs if any ...
freebsd-update install

# final reboot
shutdown -r now



# Poudriere users, who has intention to use own compiled repository,
# must pay attention to changes in /etc/pkg/FreeBSD.conf, and update /usr/local/etc/pkg/repos/FreeBSD.conf accordingly
#
# Before FreeBSD 15:
# echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#
# FreeBSD 15
# echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
# echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf


sh:
#!/bin/sh
# A very dirty way to monitor `freebsd-update install` progress
# by comparing index

# FreeBSD update index table
cfg_index="/var/db/freebsd-update/INDEX-NEW"

# process containing index
cfg_install_proc="install"



# calculate total number of files
v_total=$( wc -l "$cfg_index" | cut -w -f2 )

# Get PID of freebsd-install process
v_fbinstall_pid=$( pgrep -n -f '/bin/sh /usr/sbin/freebsd-update install' )

# echo "install-parrent pid: $v_fbinstall_pid"

while true; do
    sleep 2

    # check if parent process is still running
    ps -p "$v_fbinstall_pid" > /dev/null 2>/dev/null || break

    # extract the pid of "install" process
    v_pid=$( pgrep -n -P "$v_fbinstall_pid" "$cfg_install_proc" )
    [ $? -ne 0 ] && continue

    # Extract index line from process
    v_idx=$( ps -p "$v_pid" -ocommand | tail -n 1 | sed -E 's/^.+[[:blank:]]([[:xdigit:]]{10,})[[:blank:]].+/\1/' )
    [ -z "$v_idx" ] && continue

    # locate index in index table
    v_line=$( grep -ni "$v_idx" "$cfg_index" | head -n 1 | cut -f1 -d: )
    [ $? -ne 0 ] && continue


    # check if values is numeric
    [ -n "$v_line" -a "$v_line" -eq "$v_line" ] || continue

    # Calculate percentage
    v_percent=$( expr "$v_line" \* 100 \/ "$v_total" )
    [ $? -ne 0 ] && continue

    printf "\033[2K\rfreebsd-install progress: %s of %s, %s%%" "$v_line" "$v_total" "$v_percent"
done
 
Last edited:
Back
Top