Upgraded to 13.1 pkg doesn't see it

HI,
I upgraded to FreeBSD 13.1 from 12.3, but the package manager says I'm on 12.2. And it seems that the /usr/include/sys headers are from 12.3, so ports won't make. Where does pkg get the OS version?
Code:
root@liberty [/usr/src] # pkg bootstrap -f
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+[URL]http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly[/URL], please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.18.4...
Newer FreeBSD version for package pkg:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1203000
- running kernel: 1202000
Ignore the mismatch and continue? [y/N]:
Thanks,
Don
 
Your running kernel still appears to be 12.1-RELEASE. Do you have an encrypted zoot-on-ZFS system perhaps? Make sure your bootpool is mounted before upgrading.
 
I'm using nfs not zfs.
And it looks like I booted with 13.1

Code:
---<<BOOT>>---
Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.1-RELEASE-p2 GENERIC amd64
FreeBSD clang version 13.0.0 ([email]git@github.com[/email]:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
VT(vga): resolution 640x480
CPU: AMD Ryzen 5 3600 6-Core Processor               (3800.24-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x870f10  Family=0x17  Model=0x71  Stepping=0
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x75c237ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX,ADMSKX>
  Structured Extended Features=0x219c91a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,PQM,PQE,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA>
  Structured Extended Features2=0x400004<UMIP,RDPID>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  AMD Extended Feature Extensions ID EBX=0x108b657<CLZERO,IRPerf,XSaveErPtr,RDPRU,WBNOINVD,IBPB,STIBP,SSBD>
  SVM: (disabled in BIOS) NP,NRIP,VClean,AFlush,DAssist,NAsids=32768
  TSC: P-state invariant, performance statistics
real memory  = 34359738368 (32768 MB)
avail memory = 33299341312 (31756 MB)
 
The order from freebsd-version(8) is a little wonky. Regardless of the order of the options the results are always in the same order.
Code:
kernel
running kernel
userland
From that order we can conclude that your kernel has been updated and you're running the new kernel. But your userland is still 12.1-RELEASE. Which probably means you only ran freebsd-update install once. Maybe you did run it twice but the second run failed for some reason.

I suggest running freebsd-update install several times in a row, ignore the suggestion to reboot. Keep running freebsd-update install until it says there's nothing more to do.
 
Code:
# gpart show
=>       40  976773088  nvd0  GPT  (466G)
         40       1024     1  freebsd-boot  (512K)
       1064  968883200     2  freebsd-ufs  (462G)
  968884264    7888864     3  freebsd-swap  (3.8G)

=>        40  1953525088  nvd1  GPT  (932G)
          40        2008        - free -  (1.0M)
        2048  1953521664     1  freebsd-ufs  (932G)
  1953523712        1416        - free -  (708K)

=>        40  1953525088  ada0  GPT  (932G)
          40  1953525088     1  freebsd  (932G)

=>        40  1000215136  ada1  GPT  (477G)
          40  1000215136     1  freebsd  (477G)

=>        40  1000215136  diskid/DISK-TPBF2006290040206478  GPT  (477G)
          40  1000215136                                 1  freebsd  (477G)
 
Code:
=>        40  1953525088  ada0  GPT  (932G)
          40  1953525088     1  freebsd  (932G)

=>        40  1000215136  ada1  GPT  (477G)
          40  1000215136     1  freebsd  (477G)
Those two are a little odd. Partition type should be freebsd-ufs or freebsd-zfs. freebsd is for bsdlabel(8) type partitions, but those are only used on MBR, not GPT. Doesn't really matter though, you can still format those partitions with whatever filesystem you pick. But it's confusing.
 
Code:
root@liberty [/hotlz/FreeBSD] # freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
root@liberty [/hotlz/FreeBSD] # /usr/sbin/freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.1-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 13.1-RELEASE-p2.
root@liberty [/hotlz/FreeBSD] # freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
root@liberty [/hotlz/FreeBSD] #
 
Great. Now everything is screwed up. You need to start over. Never run freebsd-update fetch when the upgrade hasn't completed yet.


freebsd-update -r 13.1-RELEASE --currently-running 12.1-RELEASE upgrade
freebsd-update install (run this three times in a row, ignore the suggestion to reboot)
pkg bootstrap -f
pkg upgrade
shutdown -r now
 
Code:
root@liberty [/hotlz/FreeBSD] # freebsd-update -r 13.1-RELEASE --currently-running 12.1-RELEASE upgrade
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 12.1-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Fetching 2 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic kernel/generic-dbg

The following components of FreeBSD do not seem to be installed:

Does this look reasonable (y/n)? y

Fetching metadata signature for 13.1-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 13.1-RELEASE-p2.
touch: f465c3739385890c221dff1a05e578c6cae0d0430e46996d319db7439f884336-install/kernelfirst: No such file or directory
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
You have new mail.
root@liberty [/hotlz/FreeBSD] # freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
root@liberty [/hotlz/FreeBSD] # freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
root@liberty [/hotlz/FreeBSD] # freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
root@liberty [/hotlz/FreeBSD] # pkg bootstrap -f
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+[URL]http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly[/URL], please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.18.4...
Newer FreeBSD version for package pkg:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1203000
- running kernel: 1202000
Ignore the mismatch and continue? [y/N]: y
package pkg is already installed, forced install
Extracting pkg-1.18.4: 100%
root@liberty [/hotlz/FreeBSD] # pkg bootstrap -f
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+[URL]http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly[/URL], please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.18.4...
Newer FreeBSD version for package pkg:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1203000
- running kernel: 1202000
Ignore the mismatch and continue? [y/N]: y
package pkg is already installed, forced install
Extracting pkg-1.18.4: 100%
root@liberty [/hotlz/FreeBSD] # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking for upgrades (2 candidates): 100%
Processing candidates (2 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
 
Code:
No updates needed to update system to 13.1-RELEASE-p2. 
touch: f465c3739385890c221dff1a05e578c6cae0d0430e46996d319db7439f884336-install/kernelfirst: No such file or directory
Stop here. This doesn't look right.
Code:
root@liberty [/hotlz/FreeBSD] # freebsd-update install
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.
This follows right after it. That's also not what should be happening. I think your /var/db/freebsd-update/ got seriously messed up now.

Can you post the output of df -h? Then do a rm -rf /var/db/freebsd-update/* and start the commands from post #16 again.
 
Code:
# df -h
Filesystem                           Size    Used   Avail Capacity  Mounted on
/dev/nvd0p2                          447G    105G    307G    26%    /
devfs                                1.0K    1.0K      0B   100%    /dev
/dev/nvd1p1                          902G    193G    637G    23%    /net
/dev/ada0s1                          902G     96G    734G    12%    /backup
procfs                               4.0K    4.0K      0B   100%    /proc
fdescfs                              1.0K    1.0K      0B   100%    /dev/fd
tmpfs                                3.2G    4.0K    3.2G     0%    /tmpfs
freedom.local.hotlz.com:/hotlz       924G    397G    453G    47%    /hotlz
freedom.local.hotlz.com:/usr         213G     79G    117G    40%    /freedom/usr
freedom.local.hotlz.com:/usr/home    213G     79G    117G    40%    /freedom/home
freedom.local.hotlz.com:/tcv         924G    148G    702G    17%    /tcv
freedom.local.hotlz.com:/var/log     213G     79G    117G    40%    /freedom/log
linprocfs                            4.0K    4.0K      0B   100%    /compat/linux/proc
linsysfs                             4.0K    4.0K      0B   100%    /compat/linux/sys
devfs                                1.0K    1.0K      0B   100%    /compat/linux/dev
fdescfs                              1.0K    1.0K      0B   100%    /compat/linux/dev/fd
tmpfs                                3.2G    4.0K    3.2G     0%    /compat/linux/dev/shm
 
Code:
freedom.local.hotlz.com:/hotlz       924G    397G    453G    47%    /hotlz
freedom.local.hotlz.com:/usr         213G     79G    117G    40%    /freedom/usr
freedom.local.hotlz.com:/usr/home    213G     79G    117G    40%    /freedom/home
freedom.local.hotlz.com:/tcv         924G    148G    702G    17%    /tcv
freedom.local.hotlz.com:/var/log     213G     79G    117G    40%    /freedom/log

Is there anything from the host's root file system linking to this? Or is this a separate jail you're running?
 
Code:
freedom.local.hotlz.com:/hotlz       924G    397G    453G    47%    /hotlz
freedom.local.hotlz.com:/usr         213G     79G    117G    40%    /freedom/usr
freedom.local.hotlz.com:/usr/home    213G     79G    117G    40%    /freedom/home
freedom.local.hotlz.com:/tcv         924G    148G    702G    17%    /tcv
freedom.local.hotlz.com:/var/log     213G     79G    117G    40%    /freedom/log

Is there anything from the host's root file system linking to this? Or is this a separate jail you're running?
These are just some nfs mount from my main server.

BTW I gave up and reinstalled FreeBSD 13.1 from scratch. In the old days, that was the only way you could. When you do it that way, you can get rid of stuff you no longer need.

Thanks for all the help.
 
Back
Top