NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Upgrading from 10.0 to 10.1
On Wed, 1 Oct 2025, Liam Proven wrote:
I think I messed this up.
Sorry you've had a hard time.
It has taken me several years of practice and exploring in VMs to be
able to get NetBSD installed on the bare metal in a multiboot setup.
This was the result of my first explorations:
https://www.theregister.com/2022/08/10/netbsd_93/
This mentions my hardware spec for installing 10:
https://www.theregister.com/2024/04/17/30yo_netbsd_releases_v10/
I Googled for info on how to upgrade. I didn't find much and the info
was conflicting or not completely applicable.
The only thing I found re 10.0 to 10.1 was this:
https://www.ncartron.org/upgrading-netbsd-to-101.html
I also read this chapter closely:
https://www.netbsd.org/docs/guide/en/chap-upgrading.html
I found this confusing and unhelpful.
1. There are two different methods described. It does not clearly
explain the differences, or give any recommendations about which to
prefer or why. Speaking as a (former) professional technical author
for enterprise Linux distributions among other things, when explaining
different tools that do the same thing, it is _necessary_ to explain
_why_ there are two and how to choose.
Agreed. While I've never used either method, the sequence of steps
for upgrading a major release with sysupgrade explains what needs
to be done:
1) download and extract kernel
2) download and extract modules
3) reboot
- you are now running the new release kernel with backwards compatibility
allowing you to continue with an older userland
4) download and extract at least all the sets you had installed (if in
doubt, look in /etc/mtree). You should download etc and xetc, but MUST
not extract them. You can add other sets (e.g. X) if you want
5) run etcupdate (which I've never bothered with)
6) run postinstall -s etc.tar.xz -s xetc.tar.xz fix
7) reboot
2. The `sysinst` method does not explain what it will upgrade. The
tool offers choices but does not explain what the choices mean.
For example:
«
Figure 4.6. Choosing the distribution filesets
»
Surely if one is upgrading then what it upgrades is what is presently
installed? You can't upgrade something which is not there to upgrade.
But the menu options here suggested to me that I should pick full
install regardless of what was already installed, and that might
install a lot of extra things I did not have and fill my root
partition.
As above, upgrading is not dissimilar to a new installation except you
don't extract etc and xetc. Those are handled by etxupdate and
postinstall.
When upgrading, sysinst should check what is installed by looking in
/etc/mtree and suggesting accordingly - I don't know whether it does
though.
I was not sure what to do.
I tried anyway. It ran for a long time -- hours -- and at the end I
was still on 10.0.
That sounds like a kernel was missed.
I moved on to the other method described.
3. The `sysupgrade` tool section contains scary warnings about the
necessity of doing some components before other components, but does
not then clearly explain how to do which first and how to check.
It also says there is an `auto` option and recommends it. It does not
specify if the `auto` option will do things in the correct order for
you.
Yes, the docs for sysupgrade are very unclear about what auto does.
The config files provided seemed to be incorrect, and although I was
running a clean install of 10.0 the config files contained mentions of
9.2 and other obsolete versions I never ran on this hardware. Why?
This seems like a bug to me.
Remember that sysupgrade is not a core part of NetBSD. It is a pkgsrc
package and upgrading pkgsrc package is outside the scope of an OS
upgrade. It is therefore possible that you have an old version of
sysupgrade installed (and/or a modified configuration file which would not
be replaced as part of an upgrade of it).
This is unlike OpenBSD where the upgrade tool is in base, so will get
upgraded with the OS. The nearest comparision is etcupdate and postinstall
which are in base and so are upgraded with the OS. That's why I use those.
The examples in the manual are also for obsolete releases and have not
been updated. That seems like an oversight to me.
Anyway, I edited the config file, attempting to specify 10.1, and ran
`sysupgrade auto`
It did a lot of work. I left it overnight.
In the morning it said it was done.
I rebooted.
I can no longer log in.
It starts to the graphical login screen. None of my credentials are accepted.
"Login incorrect or forbidden by policy."
At a text console, it says much the same:
"Login incorrect or refused on this terminal."
I guess I am stuck with reinstalling?
As you can boot single-user, we can have a go at working out what has
gone wrong with sysupgrade. As I say, I've never used etcupdate and it
will be this that has messed up the settings (or if it interactively
asked something, the wrong answer was given).
What is the _best_ way to upgrade a running system from a stable
release to the following one, when a new release arrives? Best as in
safest, easiest, least room for error, requiring the least expertise?
The steps I give at the top are fool-proof for a given class of fool :-)
In contrast at the same time I upgraded OpenBSD 7.6 to 7.7.
1. I used pkg_add to upgrade all packages.
2. I used `sysupgrade` to do the kernel and base OS.
As far as I can tell it does not matter which way round you do this,
but I knew #2 meant a reboot so I wanted to do the bit that didn't
need a reboot first.
With NetBSD you definitely want to upgrade the OS first and then the
packages. I can't see it would be a good idea any other way around as we
have backwards compatibility for older pkgsrc, but not forward
compatibility for pkgs for an unknown future release.
--
Stephen
Home |
Main Index |
Thread Index |
Old Index