Upgrading Makronix
An upgrade replaces the base system and keeps your accounts, your
files and the packages you installed. There are two ways to do it: from a
new installation medium, or from a running system with
sysupgrade8.
Both end with the same steps: the sets are unpacked, the configuration is
merged, and the machine is rebooted.
From the medium
Start the new medium and choose Upgrade NetBSD on a hard
disk
in sysinst. The installer asks for the
disk and the root partition, unpacks the new sets over the old system
and leaves /etc and /home
alone. The makronix
set is part of the upgrade; choose it
when the installer offers the sets.
After the reboot, run the two NetBSD tools that bring the
configuration up to date:
# postinstall -s /usr/src/etc fix
# etcupdate -s /usr/src/etc
postinstall8
repairs the files that NetBSD knows how to merge (the mail
configuration, the device files, the fonts); etcupdate8
merges the rest and leaves its conflicts for you to resolve. Read
/etc/rc.conf afterwards: a new release can add a
service or rename a variable, and the old file is kept as
/etc/rc.conf.old when it is replaced.
With sysupgrade
sysupgrade does the same work from the running
system. It fetches the sets from a directory, a file://
address or an https:// address, unpacks them and
updates the kernel. The address is the first line of
/etc/makronix/update:
# cat /etc/makronix/update
https://example.invalid/makronix/0.99.10/amd64
# sysupgrade auto https://example.invalid/makronix/0.99.10/amd64
After sysupgrade, run postinstall
and etcupdate as above and reboot. The MCDE
System Settings has the same operation as a
dialog: it reads the source from /etc/makronix/update,
runs sysupgrade for the base system and then
pkg_add -uu for the packages.
Trust: an https://
source is protected by TLS; a file:// source is as
trusted as the medium it is on. This release does not verify a
signature on the sets. Use a source you control, and keep a copy of the
previous release until the new one has started.
The packages
Packages from pkgsrc are updated with the package tools, not with
the base system:
# pkg_add -uu
# pkg_admin rebuild
The packages of the makronix
set are not in the
package database: the installer unpacks them as part of the set. They
change with a Makronix release, which is one reason to upgrade the whole
system rather than a single file.
An encrypted system
On an encrypted system the kernel the machine boots is the copy on
the small unencrypted partition, not /netbsd in the
encrypted root. After an upgrade, copy the new kernel and the matching
cgdroot.kmod to that partition:
# mount /cgdboot
# cp /netbsd /cgdboot/netbsd
# cp /path/from/the/release/cgdroot.kmod /cgdboot/
# umount /cgdboot
The release notes name the exact path of
cgdroot.kmod; it is part of the kernel set of the
new release. Keep the old kernel as
/cgdboot/netbsd.old so that the loader can start it
if the new one fails.
If the upgrade fails
A failed upgrade is not a lost machine. Start the old medium,
mount the root partition and read /var/log/messages;
the installer has left the old configuration in
/etc/rc.conf.old and the old kernel in
/netbsd.old. The loader's menu can start
netbsd.old when the new kernel does not boot. With
the source set installed, the system can be rebuilt in place
().