2017-06-03 19:27:30 +00:00
|
|
|
.Dd February 14, 2016
|
2016-02-18 21:16:02 +00:00
|
|
|
.Dt SYSMERGE 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm sysmerge
|
|
|
|
.Nd upgrade current operating system from a sysroot
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm sysmerge
|
2023-07-07 22:28:33 +00:00
|
|
|
.Op Fl cfpsw
|
2023-07-15 22:12:35 +00:00
|
|
|
.Op Fl t Ar target
|
2016-02-18 21:16:02 +00:00
|
|
|
.Op Fl \-booting
|
2016-08-22 22:28:49 +00:00
|
|
|
.Op Fl \-hook-finalize
|
|
|
|
.Op Fl \-hook-prepare
|
2016-02-18 21:16:02 +00:00
|
|
|
.Ar source
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
upgrades the current operating system by copying the system files from the
|
|
|
|
specified
|
|
|
|
.Ar source
|
2017-02-15 21:56:28 +00:00
|
|
|
directory (usually a sysroot) onto the current root filesystem.
|
|
|
|
This is meant to be used when building the operating system from source as
|
|
|
|
described in
|
2016-02-18 21:16:02 +00:00
|
|
|
.Xr development 7 .
|
|
|
|
.Pp
|
|
|
|
.Nm
|
|
|
|
installs the
|
|
|
|
.Sy system
|
|
|
|
manifest from the tix repository in the
|
|
|
|
.Ar source
|
2017-02-15 21:56:28 +00:00
|
|
|
directory, as well as all the ports found.
|
2021-01-18 23:04:56 +00:00
|
|
|
If a full upgrade is done, then all ports not found will be uninstalled.
|
2020-12-27 21:32:04 +00:00
|
|
|
Upgrade hooks will be run if further actions are needed to migrate the system to
|
|
|
|
the new version as described in
|
|
|
|
.Xr following-development 7 .
|
2017-02-15 21:56:28 +00:00
|
|
|
The
|
2016-02-18 21:16:02 +00:00
|
|
|
.Xr initrd 7
|
|
|
|
is regenerated using
|
|
|
|
.Xr update-initrd 8 .
|
|
|
|
If grub is enabled in
|
|
|
|
.Xr upgrade.conf 5 ,
|
|
|
|
then the bootloader is reinstalled and reconfigured as needed.
|
|
|
|
.Pp
|
|
|
|
.Nm
|
2017-02-15 21:56:28 +00:00
|
|
|
is an automatic and non-interactive upgrade.
|
|
|
|
It is meant to be used as part of the development process to upgrade to locally
|
|
|
|
built versions.
|
|
|
|
The
|
2016-02-18 21:16:02 +00:00
|
|
|
.Xr sysupgrade 8
|
2020-12-27 21:32:04 +00:00
|
|
|
program is by contrast an interactive program.
|
2016-02-18 21:16:02 +00:00
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width "12345678"
|
|
|
|
.It Fl \-booting
|
2017-02-15 21:56:28 +00:00
|
|
|
It's boot time, complete the system upgrade that was delayed.
|
|
|
|
This is meant to be used by
|
2016-02-18 21:16:02 +00:00
|
|
|
.Xr init 8
|
|
|
|
through the
|
2016-08-21 21:03:33 +00:00
|
|
|
.Sy merge
|
2017-02-15 21:56:28 +00:00
|
|
|
boot target.
|
|
|
|
This installs the
|
2016-02-18 21:16:02 +00:00
|
|
|
.Pa /sysmerge
|
|
|
|
directory onto the root filesystem and removes the
|
|
|
|
.Pa /sysmerge
|
|
|
|
directory.
|
2016-08-22 22:28:49 +00:00
|
|
|
.It Fl c , Fl \-cancel
|
2017-02-15 21:56:28 +00:00
|
|
|
Cancel a pending upgrade that would trigger on the next boot.
|
|
|
|
Remove the
|
2016-02-18 21:16:02 +00:00
|
|
|
.Pa /sysmerge
|
|
|
|
directory and restore the old
|
|
|
|
.Xr kernel 7
|
|
|
|
and
|
|
|
|
.Xr initrd 7 .
|
2021-01-18 23:04:56 +00:00
|
|
|
.It Fl f , Fl \-full
|
|
|
|
Full system upgrade that uninstalls ports not present in the
|
|
|
|
.Ar source
|
|
|
|
directory.
|
2016-08-22 22:28:49 +00:00
|
|
|
.It Fl \-hook-finalize
|
2020-12-27 21:32:04 +00:00
|
|
|
Run the post-upgrade hooks.
|
2017-02-15 21:56:28 +00:00
|
|
|
This is meant to be used by the old
|
2016-08-22 22:28:49 +00:00
|
|
|
.Nm
|
|
|
|
when it invokes the new
|
|
|
|
.Nm
|
|
|
|
during a non-waiting upgrade.
|
|
|
|
.It Fl \-hook-prepare
|
2020-12-27 21:32:04 +00:00
|
|
|
Run the pre-upgrade hooks.
|
2017-02-15 21:56:28 +00:00
|
|
|
This is meant to be used by the old
|
2016-08-22 22:28:49 +00:00
|
|
|
.Nm
|
|
|
|
when it invokes the new
|
|
|
|
.Nm
|
|
|
|
during a non-waiting upgrade.
|
2023-07-07 22:28:33 +00:00
|
|
|
.It Fl s , Fl \-system
|
|
|
|
Upgrade the system.
|
|
|
|
This option is implied unless
|
|
|
|
.Fl \-ports
|
|
|
|
is passed.
|
2023-07-15 22:12:35 +00:00
|
|
|
.It Fl t , Fl \-target Ns = Ns Ar target
|
|
|
|
Upgrade the installation in the
|
|
|
|
.Ar target
|
|
|
|
directory rather than the root filesystem.
|
|
|
|
This option is supported if the
|
|
|
|
.Pa target
|
|
|
|
is the
|
|
|
|
.Pa /
|
|
|
|
directory or only has ports installed and no system.
|
|
|
|
This option is unsupported if
|
|
|
|
.Ar target
|
|
|
|
has the system installed and is not the
|
|
|
|
.Pa / directory .
|
|
|
|
Instead one should
|
|
|
|
.Xr chroot 8
|
|
|
|
into the
|
|
|
|
.Pa target
|
|
|
|
and run the old
|
|
|
|
.Nm
|
|
|
|
inside rather than the new
|
|
|
|
.Nm .
|
|
|
|
However, this option may be useful for repairing installations and should work
|
|
|
|
in practice, however it is untested and might not properly handle incompatible
|
|
|
|
changes across releases.
|
2023-07-07 22:28:33 +00:00
|
|
|
.It Fl p , Fl \-ports
|
|
|
|
Upgrade the ports.
|
|
|
|
This option is implied unless
|
|
|
|
.Fl \-system
|
|
|
|
is passed.
|
2016-02-18 21:16:02 +00:00
|
|
|
.It Fl w , Fl \-wait
|
|
|
|
Wait until the next boot to complete the upgrade, rather than finishing it now.
|
2023-08-07 19:31:59 +00:00
|
|
|
The upgrade is installed into the
|
2016-02-18 21:16:02 +00:00
|
|
|
.Pa /sysmerge
|
2023-08-07 19:31:59 +00:00
|
|
|
directory instead, with the new kernel and initrd files in
|
|
|
|
.Pa /boot/sysmerge .
|
|
|
|
The new
|
2016-02-18 21:16:02 +00:00
|
|
|
.Xr kernel 7
|
2023-08-07 19:31:59 +00:00
|
|
|
has a new
|
2016-02-18 21:16:02 +00:00
|
|
|
.Xr initrd 7
|
2023-08-07 19:31:59 +00:00
|
|
|
that runs
|
2016-02-18 21:16:02 +00:00
|
|
|
.Sy /sysmerge/sbin/sysmerge --booting
|
|
|
|
on boot through the
|
|
|
|
.Sy chain-merge
|
|
|
|
.Xr init 8
|
2023-08-07 19:31:59 +00:00
|
|
|
boot target, which performs the operating system upgrade.
|
|
|
|
The bootloader configuration is regenerated with a menu option to perform
|
|
|
|
the upgrade if grub is enabled in
|
|
|
|
.Xr upgrade.conf 5 ,
|
|
|
|
otherwise the
|
|
|
|
.Pa /etc/default/grub.d/10_sortix.cache
|
|
|
|
bootloader fragment can be used to manually bootload the upgrade.
|
2016-02-18 21:16:02 +00:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
2023-08-07 19:31:59 +00:00
|
|
|
.Bl -tag -width "/etc/default/grub.d/10_sortix.cache" -compact
|
2016-02-18 21:16:02 +00:00
|
|
|
.It Pa /boot/sortix.bin
|
2023-08-07 19:31:59 +00:00
|
|
|
Old system
|
|
|
|
.Xr kernel 7 .
|
2016-02-18 21:16:02 +00:00
|
|
|
.It Pa /boot/sortix.initrd
|
2023-08-07 19:31:59 +00:00
|
|
|
Old system
|
|
|
|
.Xr initrd 7 .
|
|
|
|
.It Pa /boot/sysmerge/
|
|
|
|
New system kernel and initrd files.
|
|
|
|
.It Pa /etc/default/grub.d/10_sortix.cache
|
|
|
|
GRUB configuration fragment that boots the new system.
|
2016-02-18 21:16:02 +00:00
|
|
|
.It Pa /etc/machine
|
2023-08-07 19:31:59 +00:00
|
|
|
Processor platform of this installation.
|
2016-02-18 21:16:02 +00:00
|
|
|
.It Pa /etc/sortix-release
|
2023-08-07 19:31:59 +00:00
|
|
|
The current system release.
|
2016-02-18 21:16:02 +00:00
|
|
|
.It Pa /etc/upgrade.conf
|
2023-08-07 19:31:59 +00:00
|
|
|
Controls the bootloader upgrade behavior (see
|
|
|
|
.Xr upgrade.conf 5 ) .
|
|
|
|
.It Pa /share/sysinstall/hooks/
|
2020-12-27 21:32:04 +00:00
|
|
|
A file per upgrade hook indicating that it doesn't need to be run.
|
2023-08-07 19:31:59 +00:00
|
|
|
.It Pa /sysmerge/
|
|
|
|
The pending systen upgrade is stored here.
|
2016-02-18 21:16:02 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr development 7 ,
|
|
|
|
.Xr initrd 7 ,
|
|
|
|
.Xr installation 7 ,
|
|
|
|
.Xr kernel 7 ,
|
|
|
|
.Xr upgrade 7 ,
|
|
|
|
.Xr sysinstall 8 ,
|
|
|
|
.Xr sysupgrade 8
|