Skip to main content

OpenBSD: How to follow -current? [Resolved]

This question is similar to this one, but more specific.


  1. I have a -stable OpenBSD machine and I want to start following -current. I know about the upgrade procedure from one release to another. How can I go from a release to the latest snapshot? I can simply boot from the latest snapshot's bsd.rd and follow the upgrade procedure, but what about the "pre-upgrade steps" and the "configuration steps"? Are there any to apply when going from -stable to the latest snapshot?

  2. When I get a -current system and I want to update it again, what is the procedure? Should I build from sources or use the latest snapshot's bsd.rd again? In any case, are there any "configuration steps" involved, as in the link above?


Question Credit: Gradient
Question Reference
Asked October 10, 2018
Tags: openbsd
Posted Under: Unix Linux
36 views
3 Answers

Don't build from source. I've been following current for several years. You can do binary upgrades to new snapshots. And you can do a direct binary upgrade from release/stable to current.

Reboot.

At the prompt type:

boot bsd.rd

Go through the motions of upgrading. When it asks for a hostname, I use this one, it's quite fast

mirrors.sonic.net

When it asks for a path, change it to

/pub/OpenBSD/snapshots/amd64/

Substitute amd64 for your architecture.

Continue with the upgrade prompts

Reboot after it's done.

Change PKG_PATH

export PKG_PATH=http://mirrors.sonic.net/pub/OpenBSD/snapshots/packages/amd64/

Add this to ~/.profile and /root/.profile

PKG_PATH=http://mirrors.sonic.net/pub/OpenBSD/snapshots/packages/amd64/

export PKG_PATH

Then run

doas pkg_add -u

In the future, you won't have to change PKG_PATH or the bsd.rd file path. It will remember. Like pepperidge farm.

To update to a new snapshot in the future, just

boot bsd.rd

follow the prompts

reboot

doas pkg_add -u

One thing to note. When the upgrade to a new snapshot will take you to a new version number, like from 6.2 to 6.3 which will happen rather soon, booting bsd.rd and following the prompts will only allow you to download the new bsd.rd ramdisk. You must reboot after it's finished and re-enter bsd.rd to continue with the upgrade. But you'll only have to do this once every six months, and it's automatic. Just don't freak out when it only says it's downloading bsd.rd

If you want to know if you should upgrade, just bookmark:

http://mirrors.sonic.net/pub/OpenBSD/snapshots/amd64/

In your browser and visit it to check the dates on the archives.

Don't forget to visit one directory up once in a while:

http://mirrors.sonic.net/pub/OpenBSD/snapshots/

To snag ports.tar.gz and update your ports tree


credit: datUser
Answered October 10, 2018

My only issue is when I go to upgrade from stable to -current snapshot I understand I download the new bsd.rd file and boot from it and choose upgrade. I get that part but when I choose upgrade it thinks i'm going from 6.3 to 6.4 and gets all confused. It starts looking for a 6.4 directory. Can someone help?


credit: da5id
Answered October 10, 2018

In answer to question 2 - when you want to go from which ever -current you've installed to the next one you download the latest bsd.rd from the snapshot mirrors boot bsd.rd and choose upgrade.

My main laptop runs -current from my /var/log/messages you can see that I upgraded my kernel on the 7 Dec and 15 Jan:

messages:Jan 18 08:51:39 port /bsd: OpenBSD 6.2-current (GENERIC.MP) #360: Mon Jan 15 12:10:59 MST 2018
messages.1:Jan 13 10:22:11 port /bsd: OpenBSD 6.2-current (GENERIC.MP) #259: Thu Dec  7 13:09:59 MST 2017

If you look in the current snapshop directory of your local mirror you can see that there is a newer bsd.rd that I could upgrade to now. The faster architectures like amd64 usually push out new kernels everyday, unless the project is approaching a release when new kernels are not pushed out as quickly.

So my process is basically:

  1. Download latest bsd.rd from snapshots
  2. Boot bsd.rd and do install, and reboot
  3. Run pkg_add -vui

The only caveat I would add is read following current as sometimes there are changes that means the process is not a smooth transition from one -current to the next.

Edit: I only build kernels from source if there is a change that I want to test before it has made it into -current, or when trying to track down issues.


credit: guntbert
Answered October 10, 2018
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA