Upgrade Scripts for non-interactive major release upgrades (2->3, 3->4, 4->5)
-
- Major Upgrade
- dleidert
-
-
mhmm, ok. I'v installed all missing packages. But still geting this issue when trying to upgrade openmediavault+
Code
Display Moreroot@omvcopy:~/openmediavault-upgrade-4.3# sudo apt-get dist-upgrade -y --no-install-recommends --no-install-suggests -u -o Dpkg::Options::=--force-confdef -o DPkg::Options::=--force-confold openmediavault+ Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Error! Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: openmediavault : Depends: salt-minion (>= 3000.2) but 2018.3.4+dfsg1-6+deb10u1 is to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. root@omvcopy:~/openmediavault-upgrade-4.3#Ok. salt-minion seems to be the culprit now. The version to be installed is the one from Debian, not the one from omv. So what do these commands say:
sudo apt-cache policy salt-minion
sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion
sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion=3002.2+ds-1
-
sudo apt-cache policy salt-minion
sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion
sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion=3002.2+ds-1
that's the output from all 3 commands:
Code
Display Moresudo apt-cache policy salt-minion salt-minion: Installed: 2018.3.4+dfsg1-6+deb10u1 Candidate: 2018.3.4+dfsg1-6+deb10u1 Version table: 3002.2+ds-1 500 500 http://packages.openmediavault.org/public usul/main amd64 Packages *** 2018.3.4+dfsg1-6+deb10u1 990 990 https://deb.debian.org/debian buster/main amd64 Packages 990 https://deb.debian.org/debian-security buster/updates/main amd64 Packages 100 /var/lib/dpkg/status 2016.11.2+ds-1+deb9u6 500 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages 2016.11.2+ds-1+deb9u4 500 500 http://debian.ethz.ch/debian stretch/main amd64 Packages root@omvcopy:~# root@omvcopy:~# sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion Reading package lists... Done Building dependency tree Reading state information... Done salt-minion is already the newest version (2018.3.4+dfsg1-6+deb10u1). Starting pkgProblemResolver with broken count: 0 Starting 2 pkgProblemResolver with broken count: 0 Done The following packages were automatically installed and are no longer required: acl acpid apt-transport-https avahi-daemon beep borgbackup btrfs-progs cifs-utils cpufrequtils cron-apt curlftpfs dh-python dmeventd e2fslibs fsarchiver gdisk glusterfs-client glusterfs-common hdparm ifenslave jfsutils jq libacl1-dev libaio1 libaom0 libattr1-dev libavahi-core7 libavcodec57 libavcodec58 libavformat57 libavformat58 libavutil55 libavutil56 libb2-1 libbind9-140 libbluray1 libbluray2 libc-dev-bin libc6-dev libchromaprint1 libcodec2-0.8.1 libcomerr2 libcpufreq0 libcroco3 libcrystalhd3 libdaemon0 libdbus-glib-1-2 libdevmapper-event1.02.1 libdns162 libdrm-common libdrm2 libevent-2.0-5 libexif12 libfile-copy-recursive-perl libfile-slurp-perl libflac8 libgfchangelog0 libgfdb0 libglusterfs-dev libgme0 libgomp1 libgsm1 libibverbs1 libicu57 libid3tag0 libisc160 libisccc140 libisccfg140 libjavascript-minifier-xs-perl libjq1 libjs-extjs6 libjs-jquery libjs-sphinxdoc libjs-underscore libjson-perl liblocale-po-perl libltdl7 liblvm2app2.2 liblvm2cmd2.02 liblvm2cmd2.03 liblwres141 liblzo2-2 libmp3lame0 libmpg123-0 libnss-mdns libntfs-3g871 libnuma1 libogg0 libonig4 libonig5 libopenjp2-7 libopenmpt0 libopts25 libopus0 libossp-uuid16 libperl5.24 libpython3.5-minimal libpython3.5-stdlib libpython3.7 librdmacm1 libreadline5 librsvg2-2 libshine3 libsnappy1v5 libsoxr0 libspeex1 libssh-gcrypt-4 libswresample2 libswresample3 libtheora0 libtwolame0 liburcu4 liburcu6 libva-drm1 libva-drm2 libva-x11-1 libva-x11-2 libva1 libva2 libvdpau1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx4 libvpx5 libwavpack1 libwebpmux2 libwebpmux3 libx264-148 libx264-155 libx265-165 libx265-95 libxfixes3 libxvidcore4 libzvbi-common libzvbi0 linux-libc-dev lvm2 minidlna monit php-bcmath php-cgi php-fpm php-mbstring php-pam php-xml php7.0-bcmath php7.0-cgi php7.0-cli php7.0-common php7.0-fpm php7.0-json php7.0-mbstring php7.0-opcache php7.0-readline php7.0-xml php7.3-bcmath php7.3-mbstring php7.3-xml pm-utils proftpd-mod-vroot python3-dbus python3-dialog python3-distutils python3-jwt python3-lib2to3 python3-llfuse python3-lxml python3-natsort python3-prettytable python3-pyudev python3.5 python3.5-minimal quota quotatool rsync sdparm smartmontools socat sshpass update-inetd uuid wsdd xfsprogs xmlstarlet Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@omvcopy:~# root@omvcopy:~# sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion=3002.2+ds-1 Reading package lists... Done Building dependency tree Reading state information... Done Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 Investigating (0) salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 -> 3002.2+ds-1 @ii pumU Ib > Broken salt-minion:amd64 Depends on salt-common:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (= 3002.2+ds-1) Considering salt-common:amd64 0 as a solution to salt-minion:amd64 9999 Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: salt-minion : Depends: salt-common (= 3002.2+ds-1) but 2018.3.4+dfsg1-6+deb10u1 is to be installed E: Unable to correct problems, you have held broken packages. root@omvcopy:~# -
-
hopefully this is the full resolver log - seems like salt-minion is again the issue?
Code
Display Moresudo apt-get dist-upgrade -u -o Debug::pkgProblemResolver=true --assume-no openmediavault+ Reading package lists... Done Building dependency tree Reading state information... Done Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 Investigating (0) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 -1 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (1) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 -1 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (2) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 -1 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (3) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 0 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (4) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 0 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (5) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 0 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (6) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 0 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (7) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 0 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (8) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 0 Removing openmediavault:amd64 rather than change salt-minion:amd64 Investigating (9) openmediavault:amd64 < none -> 5.5.21-1 @rc puN Ib > Broken openmediavault:amd64 Depends on salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (>= 3000.2) Considering salt-minion:amd64 0 as a solution to openmediavault:amd64 0 Removing openmediavault:amd64 rather than change salt-minion:amd64 Done Calculating upgrade... Error! Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: openmediavault : Depends: salt-minion (>= 3000.2) but 2018.3.4+dfsg1-6+deb10u1 is to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. -
that's the output from all 3 commands:
Code
Display Moreroot@omvcopy:~# sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion=3002.2+ds-1 Reading package lists... Done Building dependency tree Reading state information... Done Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 Investigating (0) salt-minion:amd64 < 2018.3.4+dfsg1-6+deb10u1 -> 3002.2+ds-1 @ii pumU Ib > Broken salt-minion:amd64 Depends on salt-common:amd64 < 2018.3.4+dfsg1-6+deb10u1 @ii mK > (= 3002.2+ds-1) Considering salt-common:amd64 0 as a solution to salt-minion:amd64 9999 Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: salt-minion : Depends: salt-common (= 3002.2+ds-1) but 2018.3.4+dfsg1-6+deb10u1 is to be installed E: Unable to correct problems, you have held broken packages. root@omvcopy:~#Yes, that should be
sudo apt-get install -u -d -o Debug::pkgProblemResolver=true salt-minion=3002.2+ds-1 salt-common=3002.2+ds-1
then to succeed. However the interesting part is that on my system the packages from packages.openmediavault.org have a higher priority (995) then the ones from Debian (990). While on your system for salt* it shows the the standard priority of 500. Compare it to my test system:
Code
Display More$ sudo apt-cache policy salt-minion salt-minion: Installed: 2018.3.4+dfsg1-6+deb10u1 Candidate: 3002.2+ds-1 Version table: 3002.2+ds-1 995 995 http://packages.openmediavault.org/public usul/main amd64 Packages *** 2018.3.4+dfsg1-6+deb10u1 990 990 https://deb.debian.org/debian buster/main amd64 Packages 990 https://deb.debian.org/debian-security buster/updates/main amd64 Packages 100 /var/lib/dpkg/status 2016.11.2+ds-1+deb9u6 500 500 http://deb.debian.org/debian-security stretch/updates/main amd64 Packages 2016.11.2+ds-1+deb9u4 500 500 http://deb.debian.org/debian stretch/main amd64 Packages 2014.1.13+ds-3+deb8u1 500 500 http://security.debian.org/debian-security jessie/updates/main amd64 Packages $ cat /etc/apt/preferences.d/openmediavault.pref Package: * Pin: origin packages.openmediavault.org Pin-Priority: 995It seems that /etc/apt/preferences.d/openmediavault.pref on my test system is a remnant of an earlier openmediavault version and sets the priority high enough so it works. You didn't list this file though when I asked for the contents of /etc/apt/preferences.d/. But in one of your earlier replies the output of sudo apt-cache policy was:
Quote995 https://openmediavault.github.io/packages arrakis/main amd64 Packages
release o=openmediavault.org archive,a=arrakis,n=arrakis,l=openmediavault.org archive,c=main,b=amd64
origin openmediavault.github.io
995 http://packages.openmediavault.org/public arrakis/main amd64 Packages
release o=openmediavault.org archive,a=arrakis,n=arrakis,l=openmediavault.org archive,c=main,b=amd64
origin packages.openmediavault.orgSo there must be some pinning somewhere. Would you be so kind to post the contents of the files found in /etc/apt/preferences.d/?
I think that's all I need to reproduce the issue now.
-
Ok thank you Dleidert - after i removed the backports I followed through and it seemed to go swimmingly. Rebooted and all rebooted ok...
Now on 4.1.36.1..... Now to upgrade to V5x!!!
Thank you for the ease and relative painfree upgrade - really appreciated!!

Just wanted to follow up... I managed to upgrade from 3-4 with your help, and then followed your guide from 4-5 and all installed.. i think!!
Seems like whilst i can still get in using SSH, I cannot get in using the Web Control panel. I have gone in with firstaid and changed it... however it still refuses. Not sure if anything changed at all between 4 and 5 that i missed?
-
-
-
Alen the issue has been fixed in release 4.4 of the script. You should now be able to upgrade.
-
toibs because there might be an issue that omv4 is not upgraded please check what the following says:
sudo apt-cache policy openmediavault
And as always I'd appreciate the log file.
root@openmediavault:/# sudo apt-cache policy openmediavault
openmediavault:
Installed: 4.1.36-1
Candidate: 5.5.21-1
Version table:
5.5.21-1 500
500 http://packages.openmediavault.org/public usul/main amd64 Packages
*** 4.1.36-1 100
100 /var/lib/dpkg/status
if i try to run the upgrade script again i get....
sudo ./omv-release-upgrade-5
2021-01-07T08:02:34,131750108+00:00
run-parts: executing /openmediavault-upgrade-4.3/check.d/01-debian-version
You are trying to run this script from Debian '10.7', not Debian 'stretch'.
run-parts: /openmediavault-upgrade-4.3/check.d/01-debian-version exited with return code 1
-
-
You ran into the same issue as Alen did.
Display Moreroot@openmediavault:/# sudo apt-cache policy openmediavault
openmediavault:
Installed: 4.1.36-1
Candidate: 5.5.21-1
Version table:
5.5.21-1 500
500 http://packages.openmediavault.org/public usul/main amd64 Packages
*** 4.1.36-1 100
100 /var/lib/dpkg/status
Parts of your system have already been upgraded. OMV has not yet been upgraded. We are going to fix it by hand. Get the latest source
Codewget -qO- https://github.com/dleidert/openmediavault-upgrade/archive/v4.4.tar.gz | tar -xz cd openmediavault-upgrade-4.4and instead of running the whole script, run the remaining scripts manually.:
Code. inc/envvars sudo pre.d/01-create-omvvars sudo pre.d/72-apt-update-omv-source-list sudo pre.d/73-apt-source-remove-docker sudo pre.d/75-apt-source-armbian-fix sudo run.d/10-apt-update sudo run.d/80-apt-dist-upgrade sudo run.d/81-apt-dist-upgrade-omvNow after having done this sudo apt-cache policy openmediavault should show the 5.x version installed. Then run the remaining tasks:
Now everything should be fine.
-
Thank you dleidert...
However doesnt seem to work

sudo run.d/80-apt-dist-upgrade - this comes up clear (all up to date)
However sudo run.d/81-apt-dist-upgrade-omv brings up the following :
Coderoot@openmediavault:/openmediavault-upgrade-4.4# sudo run.d/81-apt-dist-upgrade-omv run.d/81-apt-dist-upgrade-omv: 6: .: Can't open /openmediavault-upgrade-4.4/run.d/../inc/omvvarsSorry

-
Hi,
thanks for the great Script

Now i will also try to Update my OMV4 to OMV5.
Just to be sure, because was often running into problems on Upgrades:
- I need to delete the Extra Repo
- Also i need to uninstall all Plugins?
- Still using Plex as "Plugin" because had bad experince with Plex as a Docker and i don't really want to move my Plex into a Docker. Is it possible to keep Plex installed during the Update process?
Backup:
Did a Backup via the Backup Plugin (fsarchiver), so all should be save, if i run into problems and i can restore the complete OMV installation as it was at the time of the Backup?
Sorry for this Questions, but i was reading the half day during the Forum and wasn't 100% sure about this topics. Don't want to crash my great running OMV installation *scarry*
-
-
sudo run.d/80-apt-dist-upgrade - this comes up clear (all up to date)
However sudo run.d/81-apt-dist-upgrade-omv brings up the following :
Coderoot@openmediavault:/openmediavault-upgrade-4.4# sudo run.d/81-apt-dist-upgrade-omv run.d/81-apt-dist-upgrade-omv: 6: .: Can't open /openmediavault-upgrade-4.4/run.d/../inc/omvvarsSorry

Yes. Run
sudo pre.d/01-create-omvvars
first. It will create the missing file inc/omvvars.
-
Display More
Now i will also try to Update my OMV4 to OMV5.
Just to be sure, because was often running into problems on Upgrades:
- I need to delete the Extra Repo
- Also i need to uninstall all Plugins?
- Still using Plex as "Plugin" because had bad experince with Plex as a Docker and i don't really want to move my Plex into a Docker. Is it possible to keep Plex installed during the Update process?
Backup:
Did a Backup via the Backup Plugin (fsarchiver), so all should be save, if i run into problems and i can restore the complete OMV installation as it was at the time of the Backup?
Sorry for this Questions, but i was reading the half day during the Forum and wasn't 100% sure about this topics. Don't want to crash my great running OMV installation *scarry*
The scripts currently deal with omvextras installed. And they will remove all plugins not available for OMV5.
Is plex from one of the repositories omvextras adds to its menu? Then you should be fine. Do you have any third-party software installed, either not being installed in Debian package format or pulled in from any non-omv resource (not counting the resources omvextras enables)? And the scripts are untested for Raspbian users.
It is good you have a backup. Then you should be able to replay it to the system. To restore the system's filesystem one has to use a live-cd or extra system though. There was a thread recently how to play such a backup back. However I haven't seen a non-salvageable system in my time.
I understand the feelings. I can test it in a VM if you want. You need to provide me the package list
dpkg-query -W -f='${binary:Package}=${Version}\n' | sort > package.list
and which repositories from omvextras you have enabled and if you have the backports repository enabled.
-
sudo apt-cache policy openmediavaul
Alen the issue has been fixed in release 4.4 of the script. You should now be able to upgrade.
dleidert you are star!!! I've restored the snapshot on my VM to pre-upgrade and ran the release 4.4 script and all went fine. My test system has been upgrade to v 5.5.21-1. Will do some testing now.
Do you still need to content of /etc/apt/preferences.d/ for further analysis?
vcdwelt I also had Plex/Duplicati/Rsync installed pre-upgrade - there are all gone now. Also Dockers is gone with all my dockers installed. This is more of a problem. Is this expected behaviour?
-
-
I also had Plex/Duplicati/Rsync installed pre-upgrade - there are all gone now. Also Dockers is gone with all my dockers installed. This is more of a problem. Is this expected behaviour?
dleidert could you please comment on this finding?
-
-
Do you still need to content of /etc/apt/preferences.d/ for further analysis?
No, thanks.
I also had Plex/Duplicati/Rsync installed pre-upgrade - there are all gone now. Also Dockers is gone with all my dockers installed. This is more of a problem. Is this expected behaviour?
There is a list of plugins not available for omv5. These plugins get removed before attempting the upgrade. The plugin list includes openmediavault-docker-gui, openmediavault-duplicati, and openmediavault-shellinabox in your case. At the moment the script pre.d/50-remove-plugins removes these plugins as well es the packages they pulled in completely. It might not be ideal, but it is the cleanest solution at the moment. I can make a more "defensive" approach and just remove the plugin package, leaving the other packages untouched. That may lead to systems having a lot of cruft installed afterwards.
I'm open for suggestions how it should work.
-
-
I'm open for suggestions how it should work.
You could probably apt-mark manual plexmediaserver duplicati docker-ce
As for the dockers, they aren't gone. just reinstall docker and they will come back. If they are gone, it is just the images. You data should still be stored in the volumes specified for each container. A slight pain but nothing is gone.
-
I had thought about the same solution. I've added a script to mark a defined list of packages as manually installed. The list currently consists of the three packages you mention. If there are more it can be extended. Will be part of release 4.5.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!