+++ title = 'Going back from OpenBSD-snapshot' aliases = [ '/posts/2023-07-29-going-back-from-openbsd-snapshot', '/posts/2023-07-29-going-back-from-openbsd-current' ] summary = '''Made from the road of me trying out OpenBSDs current branch...''' date = '2023-07-29T11:48:51+02:00' lastmod = '2023-11-18T21:58:00+0000' categories = [ 'computerstuff' ] tags = [ 'openbsd' ] +++ The road begins on a currently updated OpenBSD 7.3 release. That means, the following commands have been initiated and completed without errors. ```console $ doas syspatch $ doas fw_update fw_update: added none; updated none; kept intel,inteldrm,iwn,uvideo,vmm $ doas pkg_add -uU quirks-6.121 signed on 2023-07-25T19:47:50Z ``` {{< alert "circle-info" >}} This article may be hard to follow, because some hints are probably missing. Use your common sense to fill these gaps yourself. {{< /alert >}} ## Backups never hurt We will save a list of the currently installed packages. Just for the case... ```console $ pkg_info -mz >package-list.txt ``` ## Upgrading to the latest snapshot ```console $ doas sysupgrade -s Fetching from https://ftp.hostserver.de/pub/OpenBSD/snapshots/amd64/ SHA256.sig 100% |********************************| 2144 00:00 Signature Verified INSTALL.amd64 100% |*******************************| 44817 00:00 base73.tgz 100% |********************************| 368 MB 02:56 bsd 100% |********************************| 24714 KB 00:06 bsd.mp 100% |********************************| 24790 KB 00:10 bsd.rd 100% |********************************| 4549 KB 00:01 comp73.tgz 100% |********************************| 75592 KB 00:31 game73.tgz 100% |********************************| 2748 KB 00:01 man73.tgz 100% |********************************| 7822 KB 00:02 xbase73.tgz 100% |********************************| 57148 KB 00:23 xfont73.tgz 100% |********************************| 22968 KB 00:14 xserv73.tgz 100% |********************************| 14950 KB 00:09 xshare73.tgz 100% |********************************| 4578 KB 00:02 Verifying sets. Fetching updated firmware. fw_update: added none; updated intel,inteldrm,vmm; kept iwn,uvideo Upgrading. ``` The computer reboots automatically at this point. After the reboot, we upgrade all the installed packages. ```console $ doas pkg_add -D snap -uvi Update candidates: quirks-6.121 -> quirks-6.135 quirks-6.135 signed on 2023-07-28T05:14:51Z quirks-6.121->6.135: ok Update candidates: adwaita-icon-theme-43 -> adwaita-icon-theme-44.0p0 Update candidates: librsvg-2.54.5p2 -> librsvg-2.56.3 Update candidates: libxml-2.10.4 -> libxml-2.11.4 Update candidates: libiconv-1.17 -> libiconv-1.17 adwaita-icon-theme-44.0p0:libiconv-1.17->1.17: ok Update candidates: xz-5.4.1 -> xz-5.4.3 adwaita-icon-theme-44.0p0:xz-5.4.1->5.4.3: ok adwaita-icon-theme-44.0p0:libxml-2.10.4->2.11.4: ok Update candidates: pango-1.50.14 -> pango-1.50.14 Update candidates: harfbuzz-7.1.0 -> harfbuzz-8.0.1 Update candidates: graphite2-1.3.14 -> graphite2-1.3.14 adwaita-icon-theme-44.0p0:graphite2-1.3.14->1.3.14: ok Update candidates: cairo-1.17.8 -> cairo-1.17.8p0 Update candidates: png-1.6.39 -> png-1.6.39 adwaita-icon-theme-44.0p0:png-1.6.39->1.6.39: ok Update candidates: glib2-2.74.6 -> glib2-2.76.4 Update candidates: libffi-3.4.4 -> libffi-3.4.4 adwaita-icon-theme-44.0p0:libffi-3.4.4->3.4.4: ok Update candidates: pcre2-10.37p1 -> pcre2-10.37p1 Update candidates: bzip2-1.0.8p0 -> bzip2-1.0.8p0 adwaita-icon-theme-44.0p0:bzip2-1.0.8p0->1.0.8p0: ok adwaita-icon-theme-44.0p0:pcre2-10.37p1->10.37p1: ok Update candidates: python-3.10.12 -> python-3.10.12 Update candidates: gettext-runtime-0.21.1 -> gettext-runtime-0.21.1 adwaita-icon-theme-44.0p0:gettext-runtime-0.21.1->0.21.1: ok Update candidates: sqlite3-3.41.0 -> sqlite3-3.42.0 adwaita-icon-theme-44.0p0:sqlite3-3.41.0->3.42.0: ok Can't install python-3.10.12 because of libraries |library crypto.51.0 not found | /usr/lib/libcrypto.so.50.0 (system): bad major | /usr/lib/libcrypto.so.50.2 (system): bad major | /usr/lib/libcrypto.so.52.0 (system): bad major |library ssl.54.0 not found | /usr/lib/libssl.so.53.0 (system): bad major | /usr/lib/libssl.so.53.2 (system): bad major | /usr/lib/libssl.so.55.0 (system): bad major Direct dependencies for python-3.10.12->3.10.12 resolve to bzip2-1.0.8p0 xz-5.4.3 libffi-3.4.4 sqlite3-3.42.0 gettext-runtime-0.21.1 Full dependency tree is libiconv-1.17 sqlite3-3.42.0 gettext-runtime-0.21.1 bzip2-1.0.8p0 xz-5.4.3 libffi-3.4.4 adwaita-icon-theme-44.0p0:glib2-2.74.6->2.76.4: ok Update candidates: lzo2-2.10p2 -> lzo2-2.10p2 adwaita-icon-theme-44.0p0:lzo2-2.10p2->2.10p2: ok adwaita-icon-theme-44.0p0:cairo-1.17.8->1.17.8p0: ok adwaita-icon-theme-44.0p0:.libs-harfbuzz-5.2.0+harfbuzz-7.1.0->harfbuzz-8.0.1: ok Update candidates: fribidi-1.0.12 -> fribidi-1.0.13 adwaita-icon-theme-44.0p0:fribidi-1.0.12->1.0.13: ok adwaita-icon-theme-44.0p0:pango-1.50.14->1.50.14: ok Update candidates: gdk-pixbuf-2.42.10 -> gdk-pixbuf-2.42.10 Update candidates: shared-mime-info-2.2 -> shared-mime-info-2.2 adwaita-icon-theme-44.0p0:shared-mime-info-2.2->2.2: ok Update candidates: tiff-4.5.0p0 -> tiff-4.5.1 Update candidates: jpeg-2.1.4v0 -> jpeg-2.1.5.1v0 adwaita-icon-theme-44.0p0:jpeg-2.1.4v0->2.1.5.1v0: ok Update candidates: zstd-1.5.5 -> zstd-1.5.5 Update candidates: lz4-1.9.4 -> lz4-1.9.4 adwaita-icon-theme-44.0p0:lz4-1.9.4->1.9.4: ok adwaita-icon-theme-44.0p0:zstd-1.5.5->1.5.5: ok adwaita-icon-theme-44.0p0:.libs-tiff-4.4.0p2+tiff-4.5.0p0->tiff-4.5.1: ok adwaita-icon-theme-44.0p0:gdk-pixbuf-2.42.10->2.42.10: ok adwaita-icon-theme-44.0p0:librsvg-2.54.5p2->2.56.3: ok Update candidates: hicolor-icon-theme-0.17 -> hicolor-icon-theme-0.17 gtk-update-icon-cache-3.24.37->gtk4-update-icon-cache-4.10.4 forward dependencies: | Dependency of neovim-0.8.3 on gtk-update-icon-cache-* doesn't match | Dependency of gtk+3-3.24.37 on gtk-update-icon-cache-* doesn't match | Dependency of adwaita-icon-theme-43 on gtk-update-icon-cache-* doesn't match | Dependency of gnome-icon-theme-3.12.0p6 on gtk-update-icon-cache-* doesn't match | Dependency of nitrogen-1.6.1p2 on gtk-update-icon-cache-* doesn't match | Dependency of gcr-3.41.1p1 on gtk-update-icon-cache-* doesn't match | Dependency of chromium-111.0.5563.110 on gtk-update-icon-cache-* doesn't match | Dependency of gnome-icon-theme-symbolic-3.12.0p4 on gtk-update-icon-cache-* doesn't match | Dependency of gtk+2-2.24.33p4 on gtk-update-icon-cache-* doesn't match Update candidates: neovim-0.8.3 -> neovim-0.9.1p0 Merging neovim-0.8.3->0.9.1p0 (ok) [...] ``` There are more messages that I found interesting, but I haven't found much information about these yet. ```console [...] Update candidates: drill-1.8.3 -> drill-1.8.3p0 Update candidates: libldns-1.8.3 -> libldns-1.8.3p0 Can't install libldns-1.8.3p0 because of libraries Can't install drill-1.8.3p0 because of libraries Direct dependencies for drill-1.8.3->1.8.3p0 resolve to libldns-1.8.3 Full dependency tree is libldns-1.8.3 [...] ``` ```console [...] Detected loop, merging sets ok | gtk+3-cups-3.24.37->3.24.38 | adwaita-icon-theme-43+chromium-111.0.5563.110+gcr-3.41.1p1+gnome-icon-theme-3.12.0p6+gnome-icon-theme-symbolic-3.12.0p4+gtk+2-2.24.33p4+gtk+3-3.24.37+gtk-update-icon-cache-3.24.37+neovim-0.8.3+nitrogen-1.6.1p2->adwaita-icon-theme-44.0p0+chromium-115.0.5790.102+gcr-3.41.1p2+gnome-icon-theme-3.12.0p7+gnome-icon-theme-symbolic-3.12.0p5+gtk+2-2.24.33p5+gtk+3-3.24.38+gtk4-update-icon-cache-4.10.4+neovim-0.9.1p0+nitrogen-1.6.1p3 Update candidates: cups-libs-2.4.2p0 -> cups-libs-2.4.6 Update candidates: avahi-libs-0.8p3 -> avahi-libs-0.8p3 Update candidates: libevent-2.1.12p0 -> libevent-2.1.12p0 Can't install libevent-2.1.12p0 because of libraries Update candidates: dbus-1.14.6p0v0 -> dbus-1.14.8v0 [...] ``` At this point I spent a few hours looking for a solution -- I haven't found one yet. I will probably don't look at current to soon. ## Revert back to -release Nonetheless, I could not fix this and I wanted to revert my system back to -release. There is no command to downgrade from -snapshot back to -release so we have to re-install the base files of the last -release. Boot the `bsd.rd` kernel which will boot up to this prompt: ```console Welcome to the OpenBSD/amd64 7.3 installation program. (I)nstall, (U)pgrade, (A)utoinstall or (S)hell? █ ``` Enter u and hit Enter. ```console At any prompt except password prompts you can escape to a shell by typing '!'. Default answers are shown in []'s and are selected by pressing RETURN. You can exit this program at any time by pressing Control-C, but this can leave yout system in an inconsistent state. Choose your keyboard layout ('?' or 'L' for list) [default] de.nodead Available disks are: sd0. Which disk is the root disk? ('?' for details) [sd0] sd0 Checking root filesystem (fsck -fp /dev/sd0a)... OK. Mounting root filesystem (mount -o ro /dev/sd0a /mnt)... OK. ifconfig: route: bad value Force checking of clean non-root filesystems? [no] no fsck -p 888c179eaf1d9c7e.l... OK. fsck -p 888c179eaf1d9c7e.d... OK. fsck -p 888c179eaf1d9c7e.f... OK. fsck -p 888c179eaf1d9c7e.g... OK. fsck -p 888c179eaf1d9c7e.h... OK. fsck -p 888c179eaf1d9c7e.k... OK. fsck -p 888c179eaf1d9c7e.j... OK. fsck -p 888c179eaf1d9c7e.e... OK. /dev/sd0a (888c179eaf1d9c7e.a) on /mnt type ffs (rw, local) /dev/sd0l (888c179eaf1d9c7e.l) on /mnt/home type ffs (rw, local, nodev, nosuid) /dev/sd0d (888c179eaf1d9c7e.d) on /mnt/tmp type ffs (rw, local, nodev, nosuid) /dev/sd0f (888c179eaf1d9c7e.f) on /mnt/usr type ffs (rw, local, nodev) /dev/sd0g (888c179eaf1d9c7e.g) on /mnt/usr/X11R6 type ffs (rw, local, nodev) /dev/sd0h (888c179eaf1d9c7e.h) on /mnt/usr/local type ffs (rw, local, nodev, wxallowed) /dev/sd0k (888c179eaf1d9c7e.k) on /mnt/usr/obj type ffs (rw, local, nodev, nosuid) /dev/sd0j (888c179eaf1d9c7e.j) on /mnt/usr/src type ffs (rw, local, nodev, nosuid) /dev/sd0e (888c179eaf1d9c7e.e) on /mnt/var type ffs (rw, local, nodev, nosuid) Let's upgrade the sets! Location of sets? (disk http nfs or 'done') [http] HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] HTTP Server? (hostname, List#, 'done' or '?') [ftp.hostserver.de] Server directory? [pub/OpenBSD/snapshots/amd64] pub/OpenBSD/7.3/amd64 Select sets by entering a set name, a file name pattern or 'all'. De-select sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled '[X]'. [X] bsd [X] base73.tgz [X] game73.tgz [X] xfont73.tgz [X] bsd.mp [X] comp73.tgz [X] xbase73.tgz [X] xserv73.tgz [X] bsd.rd [X] man73.tgz [X] xshare73.tgz Set name(s)? (or 'abort' or 'done') [done] done Directory does not contain SHA256.sig. Continue without verification? [no] yes Installing bsd 100% |**************************| 24714 KB 00:00 Installing bsd.mp 100% |**************************| 24790 KB 00:00 Installing bsd.rd 100% |**************************| 4549 KB 00:00 Installing base73.tgz 100% |**************************| 368 MB 00:14 Installing comp73.tgz 100% |**************************| 75592 KB 00:06 Installing man73.tgz 100% |**************************| 7822 KB 00:01 Installing game73.tgz 100% |**************************| 2748 KB 00:00 Installing xbase73.tgz 100% |**************************| 57148 KB 00:03 Installing xshare73.tgz 100% |**************************| 4578 KB 00:02 Installing xfont73.tgz 100% |**************************| 22968 KB 00:01 Installing xserv73.tgz 100% |**************************| 14950 KB 00:00 Location of sets? (disk http nfs or 'done') [done] done Making all device nodes... done. Multiprocessor machine; using bsd.mp instead of bsd. fw_update: added none; updated none; kept intel,inteldrm,iwn,uvideo,vmm Relinking to create unique kernel... done. CONGRATULATIONS! Your OpenBSD upgrade has been successfully completed! Exit to (S)hell, (H)alt or (R)eboot? [reboot] █ ``` When asked for the **Server directory** change from snapshots to 7.3. ``` pub/OpenBSD/7.3/amd64 ``` {{< alert title="" >}} The script/log above has been taken from the email that get sent to root after the upgrade. There might be some typing errors, but the screen output looks generally like that... {{< /alert >}} ## Back on release But we still run the -snapshot kernel. ```console $ uname -a OpenBSD lenovo.lan 7.3 GENERIC.MP#1125 amd64 ``` Installing the latest binary patches will also create an actual kernel. ```console $ doas syspatch Get/Verify syspatch73-001_bgpd.tgz 100% |**********| 316 KB 00:00 Installing patch 001_bgpd Get/Verify syspatch73-002_bgpd.tgz 100% |**********| 288 KB 00:00 Installing patch 002_bgpd Get/Verify syspatch73-003_rpki.tgz 100% |**********| 104 KB 00:00 Installing patch 003_rpki Get/Verify syspatch73-004_ssl.tgz 100% |***********| 2570 KB 00:04 Installing patch 004_ssl Get/Verify syspatch73-005_libx11.tgz 100% |********| 1769 KB 00:01 Installing patch 005_libx11 Get/Verify syspatch73-006_bgpd.tgz 100% |**********| 210 KB 00:00 Installing patch 006_bgpd Get/Verify syspatch73-007_httpd.tgz 100% |*********| 80314 00:00 Installing patch 007_httpd Get/Verify syspatch73-008_elf.tgz 100% |***********| 88233 00:00 Installing patch 008_elf Get/Verify syspatch73-009_bgpd.tgz 100% |**********| 210 KB 00:00 Installing patch 009_bgpd Get/Verify syspatch73-010_ssh_age... 100% |********| 1898 KB 00:00 Installing patch 010_ssh_agent Get/Verify syspatch73-011_amdcpu.tgz 100% |********| 70176 00:00 Installing patch 011_amdcpu Get/Verify syspatch73-012_amdfirm... 100% |********| 364 KB 00:00 Installing patch 012_amdfirmware Get/Verify syspatch73-013_amdcpuf... 100% |********| 34012 00:00 Installing patch 013_amdcpufirmware Get/Verify syspatch73-014_wscons.tgz 100% |********| 39732 00:00 Installing patch 014_wscons Get/Verify syspatch73-015_hvamdcp... 100% |********| 69888 00:00 Installing patch 015_hvamdcpu Relinking to create unique kernel... done; reboot to load the new kernel Errata can be reviewed under /var/syspatch ``` To apply the latest AMD microcode updates, we still have to execute two other commands. ```console $ doas fw_update fw_update: added none; updated none; kept intel,inteldrm,iwn,uvideo,vmm $ doas installboot -v sd0 Using / as root installing bootstrap on /dev/rsd0c using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot copying /usr/mdec/BOOTIA32.EFI to /tmp/installboot.gVEta0dehr/efi/BOOT/BOOTIA32.EFI copying /usr/mdec/BOOTX64.EFI to /tmp/installboot.gVEta0dehr/efi/BOOT/BOOTX64.EFI $ shutdown -r now Shutdown NOW! shutdown: [pid 4264] *** FINAL System shutdown message from dominic@lenovo.lan *** System going down IMMEDIATELY ``` ```console $ uname -a OpenBSD lenovo.lan 7.3 GENERIC.MP#3 amd64 ``` If for any reasons the packages cannot be updated because we still have newer packages installed (from snapshots) than available on release: Remove them all and re-install them based on the backup (package-list.txt) we did earlier. ```console $ doas pkg_delete -X rsync-3.2.7: ok libiconv-1.17:hydra-9.2: ok libiconv-1.17:freerdp-2.10.0: ok libiconv-1.17:chromium-111.0.5563.110: ok libiconv-1.17:gtk+3-cups-3.24.37: ok libiconv-1.17:cups-libs-2.4.2p0: ok libiconv-1.17:pcmanfm-1.3.2p0: ok [...] ``` Re-install them based on our backup file. ```console $ doas pkg_add -z -l package-list.txt quirks-6.121 signed on 2023-07-25T19:47:50Z quirks-6.121: ok aircrack-ng-1.5.2p8:sqlite3-3.41.0: ok aircrack-ng-1.5.2p8:pcre-8.44: ok [...] Can't find uvideo-firmware-1.2p3 Can't find vmm-firmware-1.14.0p4 zsh-5.9: ok Running tags: ok Updating font cache: ok The following new rcscripts were installed: /etc/rc.d/apache2 /etc/rc.d/gitdaemon /etc/rc.d/iperf3 /etc/rc.d/messagebus /etc/rc.d/rsyncd /etc/rc.d/saslauthd See rcctl(8) for details. New and changed readme(s): [...] --- +fish-3.6.0p0 ------------------- You may wish to add /usr/local/share/fish/man to /etc/man.conf --- +i3status-2.14 ------------------- Before running i3status, a configuration file needs to be created. Copy the provided /usr/local/share/examples/i3status/i3status.conf to ~/.i3status.conf and modify as necessary. ``` Output truncated to save some space/words. Again, a `shutdown -r now` reboots the computer. Now all should be on an updated OpenBSD 7.3 (release) again.