DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1 Week Ago
TheTKS TheTKS is offline
Port Guard
 
Join Date: Sep 2018
Location: Canada
Posts: 33
Default Sysupgrade vs fresh installation

An observation about OpenBSD installations after running:
- On my desktop (x86_64): sysupgrade twice with a fresh installation in between (sysupgrade 6.5 => 6.6, new 6.7, then sysupgrade 6.7 => 6.8)
- On my Raspberry Pi 4 4GB: new 6.8

A really nice thing with OpenBSD is, once you've got the important steps down and the information handy, both sysupgrade and new installation go quickly compared to most (all?) other desktop OSs.

If you have as simple single-user desktop OS installations as I do, with very few non-default options chosen during installation and just a handful of packages added, and so few manual modifications to .conf files, and relatively few user files, there is little to no time savings to running sysupgrade vs a new installation, assuming you back up and copy back all relevant user and conf files.

I learned a couple of things running sysupgrade and the followup actions, but not much, as there really wasn't that much needed.

I expect the more changes from and additions to a base installation you do, the bigger the time savings.

That is probably beyond obvious for power users, but as a very light-duty user so far, this has only become apparent to me after running sysupgrade a couple of times.

TKS
Reply With Quote
  #2   (View Single Post)  
Old 1 Week Ago
johnR johnR is offline
Fdisk Soldier
 
Join Date: Nov 2017
Posts: 55
Default

I've found that sysupgrade goes more smoothly on my desktop computer if I remove all packages using 'pkg_delete -X' first, then install them again manually afterwards. This saves time over a fresh install as it leaves the package conf dotfiles in place.

If I don't remove the packages first there's often a problem with the 'pkg_add -u' step, probably due to the large number of packages I use.

Last edited by johnR; 1 Week Ago at 09:01 AM. Reason: clarification
Reply With Quote
  #3   (View Single Post)  
Old 1 Week Ago
bradley bradley is offline
Port Guard
 
Join Date: Jul 2020
Posts: 32
Default

Yes, I noticed before as well that there can be issues with pkg_add -u. At my first sysupgrade I did run the command but somehow some packages were not updated. However the recent sysupgrade was smooth and quick on a desktop machine. I really like this feature.

There is one thing I'd like to add: While using sysupgrade, don't forget fw_update after the reboot as there might be new firmware for the machine. In the documentation it's not pointed out at the "Unattended Upgrade" steps, only for "Manual Upgrade".

Last edited by bradley; 1 Week Ago at 02:24 AM. Reason: addendum
Reply With Quote
  #4   (View Single Post)  
Old 1 Week Ago
cynwulf's Avatar
cynwulf cynwulf is offline
tying up some loose ends
 
Join Date: Mar 2014
Posts: 260
Default

Quote:
Originally Posted by johnR View Post
If I don't remove the packages first there's often a problem with the 'pkg_add -u' step, probably due to the large number of packages I use.
Quote:
Originally Posted by bradley View Post
Yes, I noticed before as well that there can be issues with pkg_add -u. At my first sysupgrade I did run the command but somehow some packages were not updated.
Refer to pkg_add(1). Specifically:

Quote:
-U Update dependencies if required before installing the new package(s).

-u Update the given installed pkgname(s), and anything it depends upon. If no pkgname is given, pkg_add will update all installed packages. This relies on PKG_PATH to figure out the new package names.
I usually run:
Code:
# pkg_add -Uu
# pkg_delete -a
Reply With Quote
  #5   (View Single Post)  
Old 1 Week Ago
bradley bradley is offline
Port Guard
 
Join Date: Jul 2020
Posts: 32
Default

Quote:
Originally Posted by cynwulf View Post
Refer to pkg_add(1). Specifically:



I usually run:
Code:
# pkg_add -Uu
# pkg_delete -a
That -U makes sense to me. If I'm not mistaken, it wasn't available in earlier versions. Wondering if there are reasons for using only -u? What I'd use next time after a sysupgrade and reboot:

Code:
fw_update
pkg_add -vvvvviUu
pkg_delete -a
pkg_check -vvvvv
sysmerge
First a firmware update, -vvvvv is for output, which I like to read, -i is interactive mode (asks questions if there is something difficult), -a is for deleting unused dependencies and pkg_check I like to use for checking the consistency of all the installed packages (and indeed I had some dependency issues pointed out by pkg_check, a gtk package wanted to have the whole mate desktop, but it's ok now).

Last edited by bradley; 1 Week Ago at 07:39 PM.
Reply With Quote
  #6   (View Single Post)  
Old 1 Week Ago
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 233
Default

Quote:
Originally Posted by bradley View Post
There is one thing I'd like to add: While using sysupgrade, don't forget fw_update after the reboot as there might be new firmware for the machine. In the documentation it's not pointed out at the "Unattended Upgrade" steps, only for "Manual Upgrade".
fw_upgrade is run by rc.firstime after upgrading (among other steps). You should see this in the emails the installer sends to root.
Reply With Quote
  #7   (View Single Post)  
Old 1 Week Ago
TheTKS TheTKS is offline
Port Guard
 
Join Date: Sep 2018
Location: Canada
Posts: 33
Default

Quote:
Originally Posted by bradley View Post
That -U makes sense to me. If I'm not mistaken, it wasn't available in earlier versions. Wondering if there are reasons for using only -u? What I'd use next time after a sysupgrade and reboot:

Code:
fw_update
pkg_add -vvvvviUu
pkg_delete -a
pkg_check -vvvvv
sysmerge
First a firmware update, -vvvvv is for output, which I like to read, -i is interactive mode (asks questions if there is something difficult), -a is for deleting unused dependencies and pkg_check I like to use for checking the consistency of all the installed packages (and indeed I had some dependency issues pointed out by pkg_check, a gtk package wanted to have the whole mate desktop, but it's ok now).
I also saw fw_update run during sysupgrade, so you shouldn’t need to run it.

I’ll have to take a closer look at these pkg_add/delete/check steps the next time I get ready for a sysupgrade.

I did see a bunch of output running pkg_add -u, at first thinking that there might have been some errors. It turns out not, but one thing I learned is that pkg_add might leave a bunch of messages to delete a bunch of files which don’t exist. You should look at each one, to make sure.

TKS
Reply With Quote
  #8   (View Single Post)  
Old 1 Week Ago
bradley bradley is offline
Port Guard
 
Join Date: Jul 2020
Posts: 32
Default

Indeed, I can remember those messages too, mostly about using the rm command couple of times (if I'm not mistaken being at the very end of the output).

Btw I checked /var/mail and did not find anything related to sysupgrade. After using this command and a reboot (as a sidenote it might be an idea to show a short notice before reboot) I tried fw_update and it did download some files, which means that somehow it did not run for me during sysupgrade. Otherwise I usually also update the ports tree:
Code:
cd /usr/ports
cvs -q up -Pd -rOPENBSD_6_8
Reply With Quote
  #9   (View Single Post)  
Old 6 Days Ago
openletter openletter is online now
New OpenBSD User
 
Join Date: Feb 2020
Posts: 13
Default

I am still very new to OpenBSD, but I have installed older versions, starting around 6.5, and upgraded all the way to 6.7.

My experience is that I consistently have issues getting pkg_add -u to complete as it usually hangs around 68% and I have to interrupt with Ctrl+C. When I then run pkg_add -u again, it completes stating everything is up to date. Running pkg_check after that says everything is ok.

For the upgrade to 6.8, after completing the upgrade I changed the /etc/installurl to a different one and the pkg_add -u completed without issue.

At my next upgrade I'll instead try using the -Uu options to see if anything changes.

Despite all of this, I haven't had any issues with the OS, itself (just my fat fingers and misconfigurations).

Note that the only packages installed are nano and dokuwiki plus their dependencies.
Reply With Quote
Reply

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
sysupgrade fails on evbarm7hf (rasperry pi 2) milestone NetBSD Installation and Upgrading 10 26th April 2020 04:50 PM
Is there an update of sysupgrade available? darktrym NetBSD Package System (pkgsrc) 2 20th September 2019 04:59 PM
Fresh installation 6.1.2 amd64 freezes in the line "root device" divel NetBSD Installation and Upgrading 2 22nd November 2013 07:11 PM
Problems after fresh OpenBSD installation Destorni OpenBSD General 7 22nd March 2013 07:18 PM
Fresh PuTTY J65nko News 2 15th July 2011 02:03 AM


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


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