tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

new tool: nbupgrade(8)



hey, I wrote this script to replace sysupgrade (but maintainable and
not using a weird shell library), would be nice to import it.

So far I've tested it upgrading across multiple major releases
and branches.

NBUPGRADE(8)		    System Manager's Manual		  NBUPGRADE(8)

NAME
     nbupgrade - tool for unattended upgrades of NetBSD

SYNOPSIS
     nbupgrade [-cfknp] [-r version] [-s set]

DESCRIPTION
     nbupgrade is a script for performing unattended upgrades of NetBSD.  It
     is primarily intended for use cases where sysinst(8) may not be suitable,
     for example, inside system management scripts, and on machines that lack
     a user interface or removable media from which to boot.  It also works
     inside a chroot(8).

     NetBSD maintains ABI/API compatibility for past releases.	This means
     that new kernels are able to run old userspace programs, but old kernels
     are not able to run new userspace programs.  For this reason, nbupgrade
     will prioritize upgrading the kernel when its version number is
     significantly older than the target, or when targeting the unstable
     branch.

     The following options are available:

     -r version
	     Specify the target version for the upgrade.

	     This may be a version number (e.g. "11.3"), a stable branch name
	     (e.g.  "netbsd-11"), or "head" to target the unstable version.

	     By default, the version number of the currently running kernel is
	     used.

     -f      Do not perform an upgrade, only fetch the files required to do
	     so.  Checksums will also be compared to verify that the files
	     match.

     -k      Only upgrade the kernel.  An old userspace will be ignored.  This
	     option is useful for users who wish to test a newer kernel while
	     maintaining full compatibility with an older release.

     -n      Do not perform an upgrade.  Useful with the -c and -p options.

     -p      Run post-install operations, including running etcupdate(8) and
	     postinstall(8) checks.  These require user input, so are not
	     performed automatically.

     -c      Clean up files after an upgrade.  nbupgrade saves some temporary
	     files on the system, and old kernel modules and system files may
	     linger after a successful upgrade.

	     This should be the last upgrade-related command you run, after
	     checking the full output of uname(1), including the release
	     version with -r.

     -s set  Install extra sets.  Usually, nbupgrade will look at the existing
	     system to determine which sets are installed, and target those
	     for upgrading.  Rarely, new sets are available in new NetBSD
	     releases, but they will not be installed unless added with this
	     flag.

	     This option can also be used to add new sets without upgrading
	     the system.

	     When combined with -f, this option will cause extra sets to be
	     fetched but not installed.

EXAMPLES
     Upgrade to NetBSD 11.0, installing the extra sets base32 and base64:
	   # nbupgrade -r 11.0
	   # shutdown -r now
	   # nbupgrade -pc -s "base32 base64"

     Fetch the sets from the stable branch netbsd-11:
	   # nbupgrade -r netbsd-11 -f

     Install a CURRENT kernel:
	   # nbupgrade -r head -k

SEE ALSO
     nbupgrade.conf(5), etcupdate(8), postinstall(8), sysinst(8)

AUTHORS
     nbupgrade was written by Nia Alarie <nia%NetBSD.org@localhost>.

NetBSD 10.0			April 23, 2024			   NetBSD 10.0

Attachment: nbupgrade.tar.gz
Description: Binary data



Home | Main Index | Thread Index | Old Index