xref: /openbsd-src/usr.sbin/sysupgrade/sysupgrade.8 (revision 36ac5f1008bb08354e7a0f92eb66bf572e4170bb)
1.\"	$OpenBSD: sysupgrade.8,v 1.22 2024/10/25 03:42:06 deraadt Exp $
2.\"
3.\" Copyright (c) 2019 Florian Obser <florian@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: October 25 2024 $
18.Dt SYSUPGRADE 8
19.Os
20.Sh NAME
21.Nm sysupgrade
22.Nd upgrade system to the next release or a new snapshot
23.Sh SYNOPSIS
24.Nm
25.Op Fl fkns
26.Op Fl b Ar base-directory
27.Op Fl R Ar version
28.Op Ar installurl | path
29.Sh DESCRIPTION
30.Nm
31is a utility to upgrade
32.Ox
33to a new release or snapshot if available.
34.Pp
35.Nm
36downloads the necessary files to
37.Pa /home/_sysupgrade ,
38verifies them with
39.Xr signify 1 ,
40and copies bsd.rd to
41.Pa /bsd.upgrade .
42.Pp
43.Nm
44by default then reboots the system.
45The bootloader will automatically choose
46.Pa /bsd.upgrade ,
47triggering a one-shot upgrade using the files in
48.Pa /home/_sysupgrade .
49.Pp
50The options are as follows:
51.Bl -tag -width Ds
52.It Fl b Ar base-directory
53Download files to
54.Ar base-directory Ns / Ns Pa _sysupgrade
55instead of
56.Pa /home/_sysupgrade .
57.It Fl f
58For snapshots, force an already applied upgrade.
59This option has no effect on releases.
60.It Fl k
61Keep the files in
62.Pa /home/_sysupgrade .
63By default they will be deleted after the upgrade.
64.It Fl n
65Fetch and verify the files and create
66.Pa /bsd.upgrade
67but do not reboot.
68.It Fl R Ar version
69Upgrade to a specific release version.
70Only upgrades from one version to the next are tested.
71Skipping versions may work.
72Downgrading is unlikely to work.
73.It Fl s
74Upgrade to a snapshot.
75The default is to upgrade to the next release.
76.El
77.Pp
78When updating to a release or snapshot which lacks the required signify
79keys in
80.Pa /etc/signify ,
81the missing keys will be downloaded in a secure way.
82In the usual case, the keys will already be present because
83.Ox
84releases ship with the current key, the next key, and a collection of
85older keys.
86.Pp
87See
88.Xr upgrade.site 5
89for how to customize the upgrade process.
90.Sh FILES
91.Bl -tag -width "/auto_upgrade.conf" -compact
92.It Pa /auto_upgrade.conf
93Response file for the ramdisk kernel.
94.It Pa /bsd.upgrade
95The ramdisk kernel to trigger an unattended upgrade.
96.It Pa /etc/installurl
97.Ox
98mirror top-level URL for fetching an upgrade.
99.It Pa /home/_sysupgrade
100Directory the upgrade is downloaded to.
101.El
102.Sh SEE ALSO
103.Xr signify 1 ,
104.Xr installurl 5 ,
105.Xr upgrade.site 5 ,
106.Xr autoinstall 8 ,
107.Xr release 8 ,
108.Xr sysmerge 8
109.Sh HISTORY
110.Nm
111first appeared in
112.Ox 6.6 .
113