Greetings. I was hoping you could help me figure out an issue I've encountered. I have a working system at the moment, but I'm worried the solution I ended up with is (at best) bad practice, or potentially ends up breaking my system down the road.
Please excuse my lengthy summary. Because I'm posting this after trying a couple of different fixes (most proved unsuccessful), and because I'm very much an amateur, I was unsure what information to leave out. So I decided to include most of it.
During my upgrade from FreeBSD 11.2 to 12.0-Release, I ran into a problem with gaining access to the /boot directory.
I was working my way through the upgrade process (according to section 2.2), but when I attempted to run
This left me stumped, but I decided to reboot and attempt to run the command again. Same result.
I tried running
as expected.
I then started searching the FreeBSD forums for posts regarding a similar issue, but most of the relevant posts I found were dated to around 2017 and earlier (I suspected it was an issue with my 12.0-Release upgrade). Nevertheless, I tried a few things after reading through all of them.
I tried running
and
I ran both
I read about potential problems with the canmount value in some zfs filesystem configurations, so I ran
I changed zroot/ROOT/default's value to on with
After most of the above steps (and with reboots in-between) I would check to see if
I then tried updating/upgrading the bootcode on my drive's MBR (
but it gave me an error along the lines of "error: file unavailable" (I'm sorry, I don't have the exact output, but needless to say the command was unable to run).
(
It took me this long, and all of the above steps, to finally realize that /boot was completely inaccessible.
I tried running
This confused me quite a bit, because I had what appeared to be a somewhat working system that could boot, so I started poking around for loader.conf with
I inspected /bootpool/boot/ more closely and found all my familiar kernel modules (virtualbox and nvidia) in the/bootpool/boot/modules/ directory.
So I decided to rename /boot/ to /boot-11.2-12.0R-upgrade/ and create a symbolic link from /boot/ to /bootpool/boot/ using
Checking with
And I was now finally able to run
I'm just left wondering if my "fix" is bad practice or if I can carry on from here, and consider the upgrade successful.
Apart from one other minor issue with
Am I good to go? Thank you if you made it this far!
Please excuse my lengthy summary. Because I'm posting this after trying a couple of different fixes (most proved unsuccessful), and because I'm very much an amateur, I was unsure what information to leave out. So I decided to include most of it.
During my upgrade from FreeBSD 11.2 to 12.0-Release, I ran into a problem with gaining access to the /boot directory.
I was working my way through the upgrade process (according to section 2.2), but when I attempted to run
freebsd-update install
for the final time, before the final reboot, I received the following output:
Code:
Cannot identify running kernel
I tried running
freebsd-version
and it returned
Code:
12.0-RELEASE
I then started searching the FreeBSD forums for posts regarding a similar issue, but most of the relevant posts I found were dated to around 2017 and earlier (I suspected it was an issue with my 12.0-Release upgrade). Nevertheless, I tried a few things after reading through all of them.
I tried running
zpool status
and got
Code:
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.
Code:
pool: bootpool
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.
zpool upgrade zroot
and zpool upgrade bootpool
, and tried running zpool status
again. I now had
Code:
pool: bootpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
bootpool ONLINE 0 0 0
ada0s1a ONLINE 0 0 0
errors: No known data errors
pool: zroot
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
ada0s1d.eli ONLINE 0 0 0
errors: No known data errors
zfs get canmount
and got
Code:
NAME PROPERTY VALUE SOURCE
bootpool canmount on default
zroot canmount on default
zroot/ROOT canmount on default
zroot/ROOT/default canmount noauto local
zroot/tmp canmount on default
zroot/usr canmount off local
zroot/usr/home canmount on default
zroot/usr/ports canmount on default
zroot/usr/src canmount on default
zroot/var canmount off local
zroot/var/audit canmount on default
zroot/var/crash canmount on default
zroot/var/log canmount on default
zroot/var/mail canmount on default
zroot/var/tmp canmount on default
zfs set canmount=on zroot/ROOT/default
and ran zfs get canmount
again:
Code:
NAME PROPERTY VALUE SOURCE
bootpool canmount on default
zroot canmount on default
zroot/ROOT canmount on default
zroot/ROOT/default canmount on local
zroot/tmp canmount on default
zroot/usr canmount off local
zroot/usr/home canmount on default
zroot/usr/ports canmount on default
zroot/usr/src canmount on default
zroot/var canmount off local
zroot/var/audit canmount on default
zroot/var/crash canmount on default
zroot/var/log canmount on default
zroot/var/mail canmount on default
zroot/var/tmp canmount on default
freebsd-update install
was able to run, but it still returned
Code:
Cannot identify running kernel
gpart show
output posted below for reference), with the following command: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
but it gave me an error along the lines of "error: file unavailable" (I'm sorry, I don't have the exact output, but needless to say the command was unable to run).
(
gpart show
output for refence)
Code:
=> 63 976773105 ada0 MBR (466G)
63 1 - free - (512B)
64 976773096 1 freebsd [active] (466G)
976773160 8 - free - (4.0K)
=> 0 976773096 ada0s1 BSD (466G)
0 4194304 1 freebsd-zfs (2.0G)
4194304 16777216 2 freebsd-swap (8.0G)
20971520 955801568 4 freebsd-zfs (456G)
976773088 8 - free - (4.0K)
=> 40 1953525088 ada1 GPT (932G)
40 2008 - free - (1.0M)
2048 1953521664 1 freebsd-ufs (932G)
1953523712 1416 - free - (708K)
I tried running
ls /boot/
and got the output
Code:
entropy modules
find / -name 'loader.conf' 2>/dev/null
and got the result:
Code:
/bootpool/boot/loader.conf
So I decided to rename /boot/ to /boot-11.2-12.0R-upgrade/ and create a symbolic link from /boot/ to /bootpool/boot/ using
ln -s /bootpool/boot/ /boot/
.Checking with
ls -l / | grep boot
gave me:
Code:
lrwxr-xr-x 1 root wheel 14 Dec 12 01:51 boot -> /bootpool/boot
drwxr-xr-x 3 root wheel 4 Dec 12 01:16 boot-11.2-12.0R-upgrade
drwxr-xr-x 3 root wheel 3 Nov 9 2016 bootpool
freebsd-update install
and let the upgrade complete without any further errors.I'm just left wondering if my "fix" is bad practice or if I can carry on from here, and consider the upgrade successful.
Apart from one other minor issue with
openssl
(which I'm guessing is unrelated), my system seems to be running perfectly fine.Am I good to go? Thank you if you made it this far!