|
OpenBSD Installation and Upgrading Installing and upgrading OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
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 |
|
|||
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; 16th November 2020 at 09:01 AM. Reason: clarification |
|
|||
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; 16th November 2020 at 02:24 AM. Reason: addendum |
|
|||
Quote:
Code:
fw_update pkg_add -vvvvviUu pkg_delete -a pkg_check -vvvvv sysmerge Last edited by bradley; 16th November 2020 at 07:39 PM. |
|
|||
fw_upgrade is run by rc.firstime after upgrading (among other steps). You should see this in the emails the installer sends to root.
|
|
|||
Quote:
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 |
|
|||
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 |
|
|||
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. |
|
|||
Quote:
In my case, I have two: an older one /root/mbox, a newer one /home/[user]/mbox. The older one in /root is the original, from when I wiped my drive and did a clean installation of 6.7 The newer one is in /home/[user], I presume because I ran sysupgrade to 6.8 from within my user instance, that is (abbreviated steps, and I believe this is the right order): [user]$ su - [user]# sysupgrade [user]# sysmerge [user]# syspatch then a bunch of [user]# [pkg_add -options, pkg_delete -options, pkg_check -options] With reboots, and doing what I needed to do from man afterboot and from https://www.openbsd.org/faq/upgrade68.html (read "After the Upgrade", and then read all the way to the end of the page!) fw_update ran during sysupgrade. Which is why I concluded that, with my fairly simple setup, it probably takes me about the same amount of time to sysupgrade (both in man-minutes and start-to-finish time) as it does to back up files, do a fresh intstallation including Xfce and other 3rd party packages, and copy back user files. I expect that with a more complicated setup, more users or more computers to upgrade, sysupgrade could be substantially faster, especially if you can automate some of the manual steps. TKS |
|
|||
A week ago, after the 6.9 beta snapshot got available I upgraded via
Code:
sysupgrade -s 1. I noticed that sysupgrade runs fw_update before reboot, but fw_update after reboot had two new recent firmwares installed. So it's definitely useful running it after reboot. 2. pkg_add -u did not update all packages for me. It took some hours to complete, but e.g. the Firefox package wasn't updated (the old version was still working fine). It was the same with otter-browser. I suspect there might be sometimes glitches with dependencies (e.g. it did not update qtconnectivity first). After pkg_check there were some dependency issues fixed. Updated those packages one by one. Thinking about the process I'd try next time after sysupgrade finished and there was a reboot (btw it might be an idea to check the free space on /home first, but it's no problem to resume the downloads): Code:
$ su - # fw_update # pkg_add -vvvvviUum # pkg_delete -a # pkg_check -vvvvv # sysmerge I've got the impression - might be wrong though - that it might be a good idea to get a list of the manually installed packages (before running the final sysmerge) with Code:
pkg_info -m There is a useful tool called sysclean (in sysutils/sysclean), which lists obsolete files between OpenBSD upgrades. Last edited by bradley; 24th February 2021 at 03:58 PM. |
|
|
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 |