NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: system updates
On 7/24/24 11:12 AM, Louis Guillaume
wrote:
On
7/24/24 11:54 AM, Will Senn wrote:
On 7/24/24 10:45 AM, Louis Guillaume
wrote:
On 7/24/24 12:17 AM, Will Senn wrote:
Hi,
NetBSD newb here. I know FreeBSD well, a bit about OpenBSD,
and lots about Linux. My question is after installing, how
do I check for updates to the system itself and get them
installed (security updates, kernel updates, etc)... or is
this not a thing with NetBSD? I figure packages are
updatable via the pkg management tools (pkg_add/pkgsrc)
doing my research on this as we speak.
Help appreciated and if there's a common set of procedures
folks follow, that'd be good to know, too... in freebsd:
freebsd_update fetch install for system updates, pkg update
&& pkg upgrade for packages and mint: apt update
&& apt upgrade for the same sorts of updates... that
kind of thing.
Thanks,
Will
Hi Will,
Here is my procedure for upgrading NetBSD from the "stable"
branches' nightly builds.
1. Make a backup
2. Update the kernel
# cd /
# mv netbsd netbsd-10
# ftp -V -o "|pax -zrvpe"
http://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-10/latest/amd64/binary/sets/kern-GENERIC.tar.xz
You'll have to make sure the right version, architecture
and kernel
are part of the path. There is also a "kernel" directory
alongside
"sets" with zipped kernels if you need something other than
GENERIC.
3. Reboot (to single user mode may be best, but that's not
strictly
necessary. Maybe for production servers to keep the
services off).
Also when upgrading from say netbsd-9 to netbsd-10 - it
might be a
good idea to update from single user.
From single user mode you'll have to at least start the
network so
we can get to the NetBSD distribution.
# mount -uw /
# /etc/rc.d/network start
(this may or may not be enough, depending on the machine)
4. Assuming the system came back up and is on the network,
update the
sets. Look in /etc/mtree to see which sets were installed
on this
machine:
# ls /etc/mtree
NetBSD.dist set.base set.etc set.man set.misc
set.modules set.rescue set.text special
Excluding the "etc" set, retrieve and unpack all sets...
# cd /
# for i in base man misc modules rescue text ;do
> ftp -V -o "|pax -zrvpe"
http://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-10/latest/amd64/binary/sets/{i}.tar.xz
> done
5. Now retrieve (but don't unpack) the etc set and run
"etcupdate"
# cd /tmp
# ftp
http://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-10/latest/amd64/binary/sets/etc.tar.xz
# etcupdate -s etc.tar.xz
"etcupdate" will walk you through all updated/modified/new
configurations and will give you an opportunity to merge
your
changes in. It also runs "postinstall", which will remove
obsolete
files from the system.
6. Update device nodes:
# cd /dev
# sh MAKEDEV all
7. Reboot the system. If it comes up, you're all done!
For pkgsrc upgrades, look at "pkgin" (for binary updates,
fairly similar to apt-get) and "pkg_rolling-replace" for
updating packages from source.
--
Louis
Louis,
Very nice detail. Backup... hmmm. I'm used to using zfs... where
backing up is zfs send and restore is zfs receive - no bits
lost in a decade or more. Any recommendations for netbsd?
Will
I'm not familiar with zfs but apparently netbsd-10 supports a zfs
root filesystem?? I'm not sure.
I use good ol' dump/restore for backups, and Raidframe for
redundancy.
If you have your filesystems in raid-1 you can always break the
mirror for easy restore if your upgrade goes sideways. But that's
more like redundancy/failure protection, not backup!
--
Louis
ZFS on root is good. I
have been exploring too many bsd's lately - I was thinking netbsd
didn't do zfs, but it does, yay. that's awesome. Putting it on
root's tricky though... if this is up-to-date -
https://wiki.netbsd.org/root_on_zfs/.
Will
Home |
Main Index |
Thread Index |
Old Index