DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 2nd August 2020
czachstd's Avatar
czachstd czachstd is offline
New User
 
Join Date: Jun 2020
Posts: 7
Question Several questions on updating NetBSD

.
i have several questions about updating NetBSD, so i'm writing them one by one.
i'm currently running NetBSD 9.0, the "Formal Release", the "major RELEASE".

what (i think) i want is this: from "Chapter 33. Updating an existing system from sources".
https://www.netbsd.org/docs/guide/en/chap-updating.html


Quote:
"A common mechanism for upgrading a NetBSD system to a newer version is by rebuilding the system from sources and installing the results."
.
Quote:
"In particular, if you are running a stable NetBSD release in a production environment, you are encouraged to perform this procedure regularly in order to incorporate any security fixes that have been applied to the branch since its release."
this is what i actually want.
i'm not talking about upgrading across major releases. i'm not talking about upgrading from NetBSD 8.0 to NetBSD 9.0. or: upgrading from NetBSD 9.0 to NetBSD 10.0. No.

--
(MY FIRST QUESTION IS,) what is/are the easiest, most simple list of terminal commands to update the operating system: (quote) "in order to incorporate any security fixes that have been applied". example: for Debian Linux it's: "apt update", "apt upgrade".

So, following the guide: https://www.netbsd.org/docs/guide/en/chap-updating.html

i ran: "sysbuild build".
the process took 6 hours. here's the output:

Code:
make release started at:  Mon Jul 20 19:44:24 UTC 2020
make release finished at: Tue Jul 21 01:13:52 UTC 2020
===> Successful make release
===> build.sh ended:      Tue Jul 21 01:13:52 UTC 2020
===> Summary of results:
         build.sh command:    ./build.sh -D/root/sysbuild/amd64/destdir -M/root/sysbuild/amd64/obj -N2 -R/root/sysbuild/release -T/root/sysbuild/amd64/tools -U -X/usr/xsrc -j2 -mamd64 -x release
         build.sh started:    Mon Jul 20 19:44:15 UTC 2020
         NetBSD version:      9.0_STABLE
         MACHINE:             amd64
         MACHINE_ARCH:        x86_64
         Build platform:      NetBSD 9.0 amd64
         HOST_SH:             /bin/sh
         No $TOOLDIR/bin/nbmake, needs building.
         Bootstrapping nbmake
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /root/sysbuild/amd64/tools
         DESTDIR path:        /root/sysbuild/amd64/destdir
         RELEASEDIR path:     /root/sysbuild/release
         Created /root/sysbuild/amd64/tools/bin/nbmake
         Updated makewrapper: /root/sysbuild/amd64/tools/bin/nbmake-amd64
         Successful make release
         build.sh ended:      Tue Jul 21 01:13:52 UTC 2020
===> .
sysbuild: I: Command finished successfully
.
then, following the guide, i ran:
Code:
sysupgrade auto ~/sysbuild/release/$(uname -m)
Code:
sysupgrade auto
,
both of them failed. output:
.

Code:
sysupgrade: I: Starting auto-update with stages: fetch modules kernel sets etcupdate postinstall clean
sysupgrade: I: Linking local /root/sysbuild/release/amd64/binary/sets/base.tgz into /var/cache/sysupgrade
sysupgrade: E: Cannot open /root/sysbuild/release/amd64/binary/sets/base.tgz
--
(MY SECOND QUESTION IS,) what is causing these errors? and is just running "sysbuild build" is enough, and do i not need to run "sysupgrade" (in this case)? but the guide says so!

--
(MY THIRD QUESTION IS,) can someone please explain the difference between "sysbuild" and "sysupgrade" in 1-2 sentence (easy way)?

--
(MY FOURTH QUESTION IS,) is there not any kind of result report sheet, like:
Quote:
"you were running version/build "01" before, and now it has been updated to build/version "02". and these <a>, <b> and <c> security vulnerabilities has been fixed" ?

where do i get something like that?

--
(MY FIFTH QUESTION IS,) in Debian Linux, a simple "apt update", "apt upgrade" took couple of minutes only. is not there any faster method to achieve this in NetBSD? i have to run this 6 hours "sysbuild build" process again and again?

--
(MY SIXTH QUESTION IS,) it is written: (quote) "you are encouraged to perform this procedure regularly". well how much regularly? once in a month? twice in a month?

--
(MY SEVENTH QUESTION IS,) how do i know, by running a simple terminal command, that the NetBSD team has released a security update, and i better update soon? . or do i have to check out the following webpages for this purpose, say once weekly, and will that be enough?


https://mail-index.netbsd.org/security-announce/
https://mail-index.netbsd.org/netbsd-announce/
https://www.netbsd.org/support/security/advisory.html
https://www.netbsd.org/changes/

so just following these links on weekly basis is enough?
what i found out till now is, since the release of NetBSD 9.0, there's been only one single security announcement, titled: "Security Advisory 2020-002: Specific ICMPv6 error message packet can crash the system".


https://mail-index.netbsd.org/securi...msg000139.html
https://ftp.netbsd.org/pub/NetBSD/se...20-002.txt.asc

and it is clearly mentioned: "NetBSD 9.0: not affected".

also in the "NetBSD 9.0 Security Advisories" page:
https://www.netbsd.org/support/secur...tches-9.0.html

"the list of advisories applicable to the NetBSD 9.0 release: None yet."

--
(MY EIGHTH QUESTION IS,) so although it is instructed in the guide: (quote) "you are encouraged to perform this procedure regularly"; but if i'm running NetBSD 9.0 (the "Formal Release") (the "major RELEASE"), and although it's been 6 months since NetBSD 9.0 released, as there's been no vulnerability announcement, so i do not need to perform any sysbuild-sysupgrade, right?

i want to know the easiest, most simple method.
THANK YOU, FOR TAKING THE TIME TO READ THIS LONG QUESTIONNAIRE.
,
Reply With Quote
  #2   (View Single Post)  
Old 2nd August 2020
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

It has been a couple of years at least since I ran NetBSD, so I'm not up on the latest. However generally regarding upgrading I think it should not be necessary to spend 6 hours building the whole system from source. Instead you can get the results of that process in the form of the .tgz sets that have been built by the project. Take a look at http://nyftp.netbsd.org and/or http://ftp.netbsd.org .

What I used to do was grab the sets for the system version I wanted to upgrade to and go through a manual process, which involved a couple of reboots, to upgrade. I don't know if this was 100% kosher because I was never an expert, but it worked for me.

It seems certain that the system upgrade tools you mention are a better way to upgrade and ensure that all fine points are handled correctly. I'm not familiar with those tools, *but* what I would suggest is to read their documentation and see if you can use them in conjunction with .tgz sets that you've downloaded, instead of compiled yourself.

Hopefully you will get other responses from someone with recent relevant experience, but I hope the above may at least be a helpful pointer to think about.
Reply With Quote
  #3   (View Single Post)  
Old 2nd August 2020
gpatrick gpatrick is offline
Spam Deminer
 
Join Date: Nov 2009
Posts: 245
Default

I also haven't ran NetBSD for a couple of years, but I've upgraded in the past without problems. I don't know why you want to build from source. Just do a binary upgrade.

Code:
One of the benefits of sysupgrade is that it is an integrated and almost-unattended 
solution: the tool fetches the new kernel and distribution sets from remote sites 
if you desire and performs the upgrade without user intervention until new changes 
to the configuration files need to be merged.

Let's assume you are running NetBSD/amd64 7.1 and you wish to upgrade to NetBSD 7.2. 
The procedure to do so would be to run the following command:

# sysupgrade auto http://cdn.NetBSD.org/pub/NetBSD/NetBSD-7.2/amd64
  

And that's all that it takes. This will proceed to download the kernel and sets 
appropriate for your machine, unpack them and assist you in merging new 
configuration changes. Do not forget to reboot afterwards.
If you're using pkgin, then to upgrade all packages do
Code:
pkgin update
pkgin full-upgrade

Last edited by gpatrick; 2nd August 2020 at 10:48 PM.
Reply With Quote
  #4   (View Single Post)  
Old 4th August 2020
czachstd's Avatar
czachstd czachstd is offline
New User
 
Join Date: Jun 2020
Posts: 7
Red face

|
Thank you @ IdOp.

Thank you @ gpatrick.


my initial wish was to follow the "formal release", but later decided to go with the "stable branch".

so (i guess) this command worked for me:


Code:
sysupgrade auto https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/amd64
the output of "uname -a" previously/now:

Code:
NetBSD XXX 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

Code:
NetBSD XXX 9.0_STABLE NetBSD 9.0_STABLE (GENERIC) #0: Sun Aug  2 11:20:24 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Reply With Quote
  #5   (View Single Post)  
Old 4th August 2020
gpatrick gpatrick is offline
Spam Deminer
 
Join Date: Nov 2009
Posts: 245
Default

NetBSD is my favorite of the BSD family, but in the past couple of years I have found a decreasing interest in trying out new things. At one time I had 7 machines and was running SmartOS, OpenIndiana, NetBSD, OpenBSD, FreeBSD, Minix3, Plan9, and trying this, that and everything else, then reinstalling with another OS. But after 25 years, I'm just burned out and tired of it. So I have a mail server and had a web server (but it died), and my Windows machine I used only to VPN into work.

I'm glad you was able to get it working.
Reply With Quote
  #6   (View Single Post)  
Old 4th August 2020
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

@czachstd, also glad you got it working. I believe STABLE is what I used to upgrade to also, that seems like a good choice. If/when the time comes for me to use NetBSD again, it's good to know about sysupgrade being possible instead of a possibly quirky manual procedure.
Reply With Quote
  #7   (View Single Post)  
Old 5th August 2020
czachstd's Avatar
czachstd czachstd is offline
New User
 
Join Date: Jun 2020
Posts: 7
Default

Quote:
Originally Posted by IdOp View Post
It has been a couple of years at least since I ran NetBSD, so I'm not up on the latest.
Quote:
Originally Posted by IdOp View Post
It seems certain that the system upgrade tools you mention are a better way to upgrade and ensure that all fine points are handled correctly. I'm not familiar with those tools, *but* what I would suggest is to read their documentation

there's a few introductory writings on sysbuild and sysupgrade, but i could not find any online man page(yet). the only way was to run: "man sysbuild", "man sysupgrade". others:


https://blog.netbsd.org/tnf/entry/in...and_sysupgrade

https://wiki.netbsd.org/guide/updating/

https://www.netbsd.org/docs/guide/en/chap-updating.html
https://jmmv.dev/2012/07/introducing...or-netbsd.html
https://jmmv.dev/2012/08/introducing-sysupgrade.html



Quote:
Originally Posted by gpatrick View Post
If you're using pkgin, then to upgrade all packages do
Code:
pkgin update
pkgin full-upgrade

they have deprecated the "full-upgrade" command. it's only: "pkgin update" and "pkgin upgrade" now.


Quote:
Originally Posted by gpatrick View Post
At one time I had 7 machines and was running SmartOS, OpenIndiana, NetBSD, OpenBSD, FreeBSD, Minix3, Plan9,

is it possible to get an usable graphical interface in Minix or Plan9?
Reply With Quote
  #8   (View Single Post)  
Old 5th August 2020
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by czachstd View Post
there's a few introductory writings on sysbuild and sysupgrade, but i could not find any online man page(yet). the only way was to run: "man sysbuild", "man sysupgrade". others:
Thanks for posting the summary of links, those could be very useful!

Yes, it's odd that those two man pages aren't on https://man.NetBSD.org/
Reply With Quote
Reply

Tags
build, netbsd, security, update, vulnerability

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating package stanl OpenBSD Packages and Ports 3 25th May 2020 01:33 AM
NetBSD questions rons NetBSD General 5 11th June 2017 08:16 AM
patching or updating ? dennky OpenBSD Installation and Upgrading 12 14th January 2010 07:17 PM
/usr became full while updating via cvs IronForge OpenBSD Installation and Upgrading 3 6th January 2010 01:08 PM
Updating FreeBSD carpman FreeBSD Installation and Upgrading 6 26th October 2008 11:49 AM


All times are GMT. The time now is 08:23 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick