Upgrading to newer versions of GhostBSD base on 13-STABLE

News and Announcements related to GhostBSD
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Upgrading to newer versions of GhostBSD base on 13-STABLE

Post by ericbsd »

Warning: It is safer to backup and reinstalls GhostBSD with an iso. If you follow these steps properly, everything should be fine, but I would backup all the important data in another drive or a NAS.

Edit:
Our new live system introduced in 2020 has a bug with the installer that copied the livecd zpool.cache. This causes a zfs issue after the upgrade. So removing the livecd cache is the fixed solution for the problem.

Code: Select all

sudo rm /boot/zfs/zpool.cache
Edit:
Before creating a new zfs Boot Environment remove vfs.root.mountfrom from /boot/loader.conf should be similar to the line below. If that line is still in the loader.conf BE will not work after upgrading to OpenZFS 2.0.

Code: Select all

vfs.root.mountfrom="zfs:tank/ROOT/initial"
I always recommend creating a backup BE if everything goes wrong.

Code: Select all

bectl create 12-stable

In /etc/pkg/GhostBSD.conf comment this line:

Code: Select all

"http://pkg.us.ghostbsd.org/stable/${ABI}/latest",
and add this:

Code: Select all

url: "http://pkg.us.ghostbsd.org/stable/FreeBSD:13:amd64/latest",
It should look like this:

Code: Select all

# $GhostBSD$
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/GhostBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "GhostBSD: { enabled: no }" > /usr/local/etc/pkg/repos/GhostBSD.conf
#

GhostBSD: {
  # url: "http://pkg.ghostbsd.org/stable/${ABI}/latest",
  url: "http://pkg.us.ghostbsd.org/stable/FreeBSD:13:amd64/latest",
  enabled: yes
}
Everything below I recommend to run in a TTY. Just press Ctrl+Alt+F2 login as root or use sudo su.

You need to bootstrap pkg before the upgrade.

Code: Select all

# env IGNORE_OSVERSION=yes pkg bootstrap -f
Now you can upgrade with this:

Code: Select all

# env ABI=freebsd:13:amd64 pkg-static upgrade -f
After that long upgrade is done, reboot.

If everything looks good, you can upgrade your pools by doing this:

Code: Select all

sudo zpool upgrade -a
Note: There is no going back to 12 after sudo zpool upgrade -a.

Edit:
if you want zpool.cache and not have zdb to complain create back your cache with the following command:

Code: Select all

sudo zpool set cachefile=/etc/zfs/zpool.cache tank
Note on 13, the cache was moved to /etc/zfs/, and your pool name might not be call tank if you named it something else.
nevets
Posts: 149
Joined: Tue Jun 23, 2020 3:54 am

Re: Upgrading to the new GhostBSD base on 13-STABLE

Post by nevets »

Hi Eric,
I used the iso to upgrade, however, the /etc/pkg/GhostBSD.conf doesn't reflect the content for FreeBSD13 - it was still the version 12 script.
I thought that if I used the iso I didn't need to do the other manual entry actions in this post, such as modifying the /etc/pkg/GhostBSD.conf file.
Behaviourally,
# sudo pkg update -f
reports no updates, however, Update Station utility shows that there are and loads them properly.
Was there an oversight in the iso release and should the /etc/pkg/GhostBSD.conf be updated in the next iso?
Cheers,
Steve.
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Upgrading to the new GhostBSD base on 13-STABLE

Post by ericbsd »

Where did you download the ISO?
wb7odyfred
Posts: 203
Joined: Sat Nov 12, 2016 5:44 pm

Re: Upgrading to the new GhostBSD base on 13-STABLE

Post by wb7odyfred »

RESPONSE to command

Code: Select all

 env IGNORE_OSVERSION=yes pkg bootstrap -f
env IGNORE_OSVERSION=yes 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 http://pkg.us.ghostbsd.org/stable/FreeB ... d64/latest, please wait...
pkg-static: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended
Installing pkg-1.16.3...
pkg-static: wrong architecture: FreeBSD:13:amd64 instead of FreeBSD:12:amd64
package pkg is already installed, forced install
Extracting pkg-1.16.3: 100%
* WARNING: you are stopping a boot service
RESPONSE to command

Code: Select all

env ABI=freebsd:13:amd64 pkg-static upgrade -f
env ABI=freebsd:13:amd64 pkg-static upgrade -f
Updating GhostBSD repository catalogue...
pkg-static: Repository GhostBSD has a wrong packagesite, need to re-create database
Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 801.2kB/s 00:08
Processing entries: 0%
Newer FreeBSD version for package p5-File-ShareDir-PAR:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1300500
- running kernel: 1202504
Ignore the mismatch and continue? [y/N]: y
xorg-fonts-truetype-7.7_1 [GhostBSD] (ABI changed: 'freebsd:12:*' -> 'freebsd:13:*')
xorg-minimal-7.5.2_3 [GhostBSD]
xorg-server-1.20.9_3,1 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
xorgproto-2020.1 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
xprop-1.2.5 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
xrdb-1.2.0 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
xset-1.2.4_3 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
xvid-1.3.7,1 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
xxhash-0.8.0 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
yelp-3.38.3 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
yelp-xsl-3.38.3 [GhostBSD] (ABI changed: 'freebsd:12:*' -> 'freebsd:13:*')
zenity-3.32.0 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
zip-3.0_1 [GhostBSD]
zsh-5.8 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')
zstd-1.4.8 [GhostBSD] (ABI changed: 'freebsd:12:x86:64' -> 'freebsd:13:x86:64')

Number of packages to be removed: 2
Number of packages to be installed: 5
Number of packages to be upgraded: 78
Number of packages to be reinstalled: 559

The process will require 51 MiB more space.
1 GiB to be downloaded.

Proceed with this action? [y/N]: y
grahamperrin
Posts: 105
Joined: Sun Sep 04, 2016 6:06 am

Re: Upgrading to newer versions of GhostBSD base on 13-STABLE

Post by grahamperrin »

ericbsd wrote: Fri Apr 02, 2021 7:53 am

Code: Select all

bectl create 12-stable
Also, it's ideal to create, activate then boot an environment named (for example)

Code: Select all

13-STABLE
A descriptive name for the environment.

If I'm not mistaken, without this, the upgraded environment will be named:

Code: Select all

initial
– potential for future confusion.
grahamperrin
Posts: 105
Joined: Sun Sep 04, 2016 6:06 am

Architecture and kernel ABI mismatches

Post by grahamperrin »

wb7odyfred wrote: Mon Apr 26, 2021 6:40 am

pkg-static: wrong architecture: FreeBSD:13:amd64 instead of FreeBSD:12:amd64

- package: 1300500
- running kernel: 1202504
Ignore the mismatch and continue? [y/N]: y
With the given approach to upgrading the base system and packages: mismatches such as these are expected.
grahamperrin
Posts: 105
Joined: Sun Sep 04, 2016 6:06 am

Caution against using the desktop environment during the upgrade

Post by grahamperrin »

ericbsd wrote: Fri Apr 02, 2021 7:53 am … Everything below I recommend to run in a TTY. Just press Ctrl+Alt+F2 login as root or use sudo su. …
I should strongly discourage attempting this type of upgrade whilst the desktop environment is in use.

I made an attempt as root in the desktop environment, half-expecting failure and sure enough, the pkg-static command failed. I didn't take a screenshot, if I recall correctly the failure was SQL-related.

Success in safe mode:
2021-04-30 18.31.png
Last edited by grahamperrin on Fri Apr 30, 2021 2:36 pm, edited 1 time in total.
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Upgrading to newer versions of GhostBSD base on 13-STABLE

Post by ericbsd »

grahamperrin wrote: Fri Apr 30, 2021 1:50 pm
ericbsd wrote: Fri Apr 02, 2021 7:53 am … Everything below I recommend to run in a TTY. Just press Ctrl+Alt+F2 login as root or use sudo su. …
I should strongly discourage attempting this type of upgrade whilst the desktop environment is in use.

I made an attempt as root in the desktop environment, half-expecting failure and sure enough, the pkg-static command failed. I didn't take a screenshot, if I recall correctly the failure was SQL-related.

I'm now making an attempt in safe mode.
That is why I said I recommend doing it in a TTY.
aschiebe
Posts: 30
Joined: Sat Mar 14, 2020 4:04 pm

Re: Upgrading to newer versions of GhostBSD base on 13-STABLE

Post by aschiebe »

Congrates to Eric,
upgrade from stable 12.2 to 13 done with success in a small test vmclient and on my nvidia driven main laptop - TANXS a lot for this upgrade path. Looks all pretty well after two restarts.
TanXs Eric, great work!
Post Reply