OpenBSD Following -current and using snapshots [FAQ Index]


Active OpenBSD development is known as the -current branch. These sources are frequently compiled into releases known as snapshots.

Aggressive changes are sometimes pushed in this branch, and complications can arise when building the latest code or upgrading from a previous point in time. Some of the steps for getting over these hurdles are explained on this page. Make sure you've read and understand how to build the system from source before using -current and the instructions below.

In general, it's far easier to use snapshots, as developers will have gone through much of the trouble for you already.

You should always use a snapshot as the starting point for running -current. This process typically consists of running sysupgrade(8) with the -s flag. Alternatively, download (and verify) the appropriate bsd.rd file from the /snapshots/ directory of your preferred mirror, boot from it, and choose (U)pgrade at the prompt. Any installed packages should then be upgraded after booting into the new system.

Upgrading to -current by compiling your own source code is discouraged for everyone except for experts, as difficult build-time crossing-points can occur often, and no assistance will be provided. In case of failure, use a snapshot to recover.

Most of these changes will have to be performed as root.

2025/11/17 - OpenBSD/luna88k switches to PIE userland

The OpenBSD/luna88k port has switched userland to PIE (Position-Independent-Executables). Update using a snapshot is highly recommended. To update from source, the following steps are needed:
  1. Install new Makefile machinery.
    # cd /usr/src/share/mk && make install
    
  2. Build, but do not install, binutils.
    # cd /usr/src/gnu/usr.bin/binutils-2.17 && su build -c 'exec make -f Makefile.bsd-wrapper'
    
  3. Build and install the new compiler.
    # cd /usr/src/gnu/usr.bin/cc && su build -c 'exec make' && make install
    
  4. Install binutils.
    # cd /usr/src/gnu/usr.bin/binutils-2.17 && make -f Makefile.bsd-wrapper install
    
  5. Build and install the C runtime objects.
    # cd /usr/src/lib/csu && su build -c 'exec make' && make install
    
  6. Rebuild the system as usual.
    # cd /usr/src && make build
    

2025/11/16 - 52-partition ABI change

struct disklabel is changing in preparation for supporting 52 partitions rather than the 16 partition limit. Building through this is not trivial and requires the following conservative steps:
    cp /usr/src/etc/rc /etc/rc               # to be safe
    cp /usr/src/etc/etc.ARCH/MAKEDEV /dev
    
    # place some sort of newish bsd.rd for recovery purposes
    
    cd /usr/src && make includes
    cd /usr/src/lib/libc && make && make install
    cd /usr/src/lib/libutil && make && make install
    
    cd /usr/src/sbin && make && make install
    
    # With new disklabel command installed, verify that "disklabel sd0" fails
    # with an error.  It should give an error, because it is issuing an ioctl
    # for the large partition table
    
    cp /bsd /bsd.save
    cd /sys/arch/ARCH/compile/GENERIC && make && make install
    
    cd /dev && sh MAKEDEV all
    reboot
    
This hopefully works.

2025/10/23 - OpenBSD/luna88k compiler switch

The OpenBSD/luna88k port has switched compiler from gcc 3.3.6 to gcc 4.2.1. Update using a snapshot is highly recommended. To update from source, the following steps are needed:
  1. Install new Makefile machinery.
    # cd /usr/src/share/mk && make install
    
  2. Build and install the new compiler.
    # cd /usr/src/gnu/usr.bin/cc && su build -c 'exec make' && make install
    
  3. Build and install the preprocessor.
    # cd /usr/src/usr.bin/cpp && su build -c 'exec make' && make install
    
  4. Rebuild the system as usual.
    # cd /usr/src && make build
    

$OpenBSD: current.html,v 1.1144 2025/11/17 16:06:27 miod Exp $