1*36ac5f10Sderaadt.\" $OpenBSD: sysupgrade.8,v 1.22 2024/10/25 03:42:06 deraadt Exp $ 21b328dbbSflorian.\" 31b328dbbSflorian.\" Copyright (c) 2019 Florian Obser <florian@openbsd.org> 41b328dbbSflorian.\" 51b328dbbSflorian.\" Permission to use, copy, modify, and distribute this software for any 61b328dbbSflorian.\" purpose with or without fee is hereby granted, provided that the above 71b328dbbSflorian.\" copyright notice and this permission notice appear in all copies. 81b328dbbSflorian.\" 91b328dbbSflorian.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 101b328dbbSflorian.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 111b328dbbSflorian.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 121b328dbbSflorian.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 131b328dbbSflorian.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 141b328dbbSflorian.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 151b328dbbSflorian.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 161b328dbbSflorian.\" 17*36ac5f10Sderaadt.Dd $Mdocdate: October 25 2024 $ 18b608abd9Sjmc.Dt SYSUPGRADE 8 191b328dbbSflorian.Os 201b328dbbSflorian.Sh NAME 211b328dbbSflorian.Nm sysupgrade 221b328dbbSflorian.Nd upgrade system to the next release or a new snapshot 231b328dbbSflorian.Sh SYNOPSIS 241b328dbbSflorian.Nm 258aa961cfSflorian.Op Fl fkns 26fa02c594Smglocker.Op Fl b Ar base-directory 272d63a5f7Ssthen.Op Fl R Ar version 28*36ac5f10Sderaadt.Op Ar installurl | path 291b328dbbSflorian.Sh DESCRIPTION 301b328dbbSflorian.Nm 311b328dbbSflorianis a utility to upgrade 321b328dbbSflorian.Ox 332d63a5f7Ssthento a new release or snapshot if available. 341b328dbbSflorian.Pp 351b328dbbSflorian.Nm 361b328dbbSfloriandownloads the necessary files to 371b328dbbSflorian.Pa /home/_sysupgrade , 381b328dbbSflorianverifies them with 391b328dbbSflorian.Xr signify 1 , 401b328dbbSflorianand copies bsd.rd to 411b328dbbSflorian.Pa /bsd.upgrade . 421b328dbbSflorian.Pp 431b328dbbSflorian.Nm 44f18596e1Sianby default then reboots the system. 45f18596e1SianThe bootloader will automatically choose 461b328dbbSflorian.Pa /bsd.upgrade , 471b328dbbSfloriantriggering a one-shot upgrade using the files in 481b328dbbSflorian.Pa /home/_sysupgrade . 491b328dbbSflorian.Pp 501b328dbbSflorianThe options are as follows: 511b328dbbSflorian.Bl -tag -width Ds 52fa02c594Smglocker.It Fl b Ar base-directory 53fa02c594SmglockerDownload files to 54fa02c594Smglocker.Ar base-directory Ns / Ns Pa _sysupgrade 55fa02c594Smglockerinstead of 56fa02c594Smglocker.Pa /home/_sysupgrade . 57c52060daSflorian.It Fl f 58175054dbSflorianFor snapshots, force an already applied upgrade. 59c52060daSflorianThis option has no effect on releases. 60204236a8Snaddy.It Fl k 61204236a8SnaddyKeep the files in 62204236a8Snaddy.Pa /home/_sysupgrade . 63204236a8SnaddyBy default they will be deleted after the upgrade. 64f18596e1Sian.It Fl n 65f0c671a7SjmcFetch and verify the files and create 66f18596e1Sian.Pa /bsd.upgrade 67507a63eaSottobut do not reboot. 680e47a61aSjmc.It Fl R Ar version 692d63a5f7SsthenUpgrade to a specific release version. 702d63a5f7SsthenOnly upgrades from one version to the next are tested. 712d63a5f7SsthenSkipping versions may work. 722d63a5f7SsthenDowngrading is unlikely to work. 730ac72bf6Sflorian.It Fl s 74f0c671a7SjmcUpgrade to a snapshot. 758aa961cfSflorianThe default is to upgrade to the next release. 761b328dbbSflorian.El 779af48a26Skn.Pp 780c49c08fSderaadtWhen updating to a release or snapshot which lacks the required signify 79be53cb2dSderaadtkeys in 800c49c08fSderaadt.Pa /etc/signify , 81be53cb2dSderaadtthe missing keys will be downloaded in a secure way. 82be53cb2dSderaadtIn the usual case, the keys will already be present because 83ef76af9eSjmc.Ox 840c49c08fSderaadtreleases ship with the current key, the next key, and a collection of 850c49c08fSderaadtolder keys. 860c49c08fSderaadt.Pp 879af48a26SknSee 88a3154df3Skn.Xr upgrade.site 5 899af48a26Sknfor how to customize the upgrade process. 901b328dbbSflorian.Sh FILES 910581a5fbSflorian.Bl -tag -width "/auto_upgrade.conf" -compact 920581a5fbSflorian.It Pa /auto_upgrade.conf 930581a5fbSflorianResponse file for the ramdisk kernel. 940581a5fbSflorian.It Pa /bsd.upgrade 950581a5fbSflorianThe ramdisk kernel to trigger an unattended upgrade. 961b328dbbSflorian.It Pa /etc/installurl 971b328dbbSflorian.Ox 981b328dbbSflorianmirror top-level URL for fetching an upgrade. 991b328dbbSflorian.It Pa /home/_sysupgrade 1001b328dbbSflorianDirectory the upgrade is downloaded to. 1011b328dbbSflorian.El 1021b328dbbSflorian.Sh SEE ALSO 1031b328dbbSflorian.Xr signify 1 , 1041b328dbbSflorian.Xr installurl 5 , 105a3154df3Skn.Xr upgrade.site 5 , 1060581a5fbSflorian.Xr autoinstall 8 , 10779053326Sjmc.Xr release 8 , 10879053326Sjmc.Xr sysmerge 8 1091b328dbbSflorian.Sh HISTORY 1101b328dbbSflorian.Nm 1111b328dbbSflorianfirst appeared in 1121b328dbbSflorian.Ox 6.6 . 113