Upgrade Scripts for non-interactive major release upgrades (2->3, 3->4, 4->5)

  • Hi,

    first of all thanks for sharing these scripts.


    I casually tried updating OMV4->5 (made a backup beforehand obviously) but ran into problems.


    1. script 81 stopped with some dpkg error (salt.exceptions.CommandExecutionError: The shell bash is not available )

    2. today I rebooted, that worked at least, dpkg still had some problems, but after a few tries (idk what exactly helped it, autoclean?) it started working again

    3. but the web UI still doesn't work, so I tried sudo omv-salt deploy run nginx phpfpm (from RE: OMV 5.0 - finally out! :-))

    but I'm still getting weird php errors etc.

    (First webUI didn't show at all, now I can login, but I get an error after clicking login)


    Idk where to post my stuff, here or in github, what do you prefer ?

    Also does that main output log contain any personal info or can I just post it publicly ?

  • So Update went fine at all.

    Docker is working after installing the Portainer and all my Dockers ar up and running. Don't really like the "new" Portainer WebUI, the old one was more fluent for me, but time will solve this :)

    Also Plex is still there, but the Database seems to be lost, don't know why. Trying to check, maybe i can get it back out of my Backup File.


    Thanks for your great Script!


    //UPDATE//

    The Plex Server created a new Database in /var/lib/plexmediaserver/.....

    i have created a symlink pointing to my old Database directory and restartet Plex, now all is fine and running like before the Update :)

  • web UI still doesn't work,

    after updates a common root cause of issues is old content in browser cache.

    Did you clean browser cache or avoid this issue via a "incognito browser window"?

    omv 5.6.3-1 (usul) on RPi4/4GB with Kernel 5.10.x and WittyPi 3 V2 RTC HAT

    2x 6TB HDD formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • Thank you for sharing!


    However, I tried to upgrade my NanoPi M4 from 4 -> 5 and even though the upgrade seemed to be successful, when I rebooted my device (as told after the script finished), now it has no network (I don't even see it listed in my router's list of clients) and I have no output via HDMI. Guess it's dead and I will have to do a clean install 🤷🏼

    I need the upgrade log to check if anything went wrong. About the network:

    https://www.debian.org/release…l#migrate-interface-names


    About the HDMI output: Do you use special drivers? If yes did you rebuild your kernel module?

  • The log doesn't contain personal information. But it contains the whole package list including versions and some environment variables. If you don't want to publish that you can send it to me via PM.

  • after updates a common root cause of issues is old content in browser cache.

    Did you clean browser cache or avoid this issue via a "incognito browser window"?

    yes I tried that, reloaded with ctrl+r, and brave browser too, which I never used before with that,

    to make sure no browser cache is interfering


    The error after clicking login now is

    It seems to occur occasionally. I tried a few things

    including this RE: Error #0 when I try to get into the WebUI

    $ chown :openmediavault-webgui /var/cache/openmediavault


    But still didn't work either.


    The log doesn't contain personal information. But it contains the whole package list including versions and some environment variables. If you don't want to publish that you can send it to me via PM.

    Ok, I'll send DM

  • conker, see #12. You probably have an incompatible plugin installed.


    Edit (after checking your log): The scripts stopped at the last script in run.d. I don't know what the salt issue is about. But all the scripts in the post.d directory haven't been run at this point. If you have figured out how to fix the salt issue you still have to run these scripts:


    sudo run-parts --exit-on-error -v post.d


    This should update omvextras and all the plugins.

  • That's btw the salt error when openmediavault gets upgraded:


    The SHELL environment variable however says that it actually is a bash shell. Is this command maybe executed as a different user and this user has no bash shell? ryecoaaron , any idea about this?

  • Well I guess I have been lucky that the system booted at all xD

    I just purged all omv stuff after finding it with dpkg -l | grep openm

    and login indeed worked now


    now I'm running run-parts --exit-on-error -v post.d


    That kinda explains, why there are still so many old kernels left ...


    Also weird stuff going on here, but besides that it finished without errors,

    let's see how the reboot goes.

    Code
    Purging configuration files for openmediavault-omvextrasorg (4.1.16) ...
    Cleaning up configuration database ...
    /var/lib/dpkg/info/openmediavault-omvextrasorg.postrm: 35: /var/lib/dpkg/info/openmediavault-omvextrasorg.postrm: omv-mkconf: not found
    dpkg: error processing package openmediavault-omvextrasorg (--purge):
    installed openmediavault-omvextrasorg package post-removal script subprocess returned error exit status 127


    That's btw the salt error when openmediavault gets upgraded:


    The SHELL environment variable however says that it actually is a bash shell. Is this command maybe executed as a different user and this user has no bash shell? ryecoaaron , any idea about this?

    I have no clue 🤷‍♂️😅

    I just had my a screen session (but I think without the params)

    and I was logged in as root all the time.

  • Is this command maybe executed as a different user and this user has no bash shell? ryecoaaron , any idea about this?

    The salt commands are executed as root in the postinst script. I've never seen this error before. Maybe the default root shell needs to be root and someone changed it on their system? votdev

    omv 5.6.4 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Well I guess I have been lucky that the system booted at all xD


    now I'm running run-parts --exit-on-error -v post.d


    Code
    Purging configuration files for openmediavault-omvextrasorg (4.1.16) ...
    Cleaning up configuration database ...
    /var/lib/dpkg/info/openmediavault-omvextrasorg.postrm: 35: /var/lib/dpkg/info/openmediavault-omvextrasorg.postrm: omv-mkconf: not found
    dpkg: error processing package openmediavault-omvextrasorg (--purge):
    installed openmediavault-omvextrasorg package post-removal script subprocess returned error exit status 127

    No luck. The system had been upgraded successfully. Just a few package had not yet been. None of them critical.


    If openmediavault had already been upgraded the omv-mkconf script had been gone already. That's why the post.d/10-reinstall-omvextras script temporarily creates it to avoid this issue:


    echo -e '#!/bin/sh\nexit 0' > /usr/sbin/omv-mkconf


    Then the openmediavault-omvextrasorg.postrm will run successfully. Then the temporary script can be removed.

  • conker, I'm not able to reproduce it. I can see in your logs that you have rssh installed. I'm therefor interested which shells the current user and root have and if you restrict anything via .ssh/autohorized_keys or if you apply any other restrictions to either the user or the root account.

  • I need the upgrade log to check if anything went wrong. About the network:

    https://www.debian.org/release…l#migrate-interface-names


    About the HDMI output: Do you use special drivers? If yes did you rebuild your kernel module?

    Now that explains why the network is down! But, still, I can't work on it as I have no HDMI output. I don't use any special drivers.


    Tbh I prefer to do a clean installation or to restore from by backup than to try to debug this, but I leave the logs here hoping it helps if someone comes across a similar situation.


    Thank you for replying and, again, for sharing the scripts!

  • conker, I'm not able to reproduce it. I can see in your logs that you have rssh installed. I'm therefor interested which shells the current user and root have and if you restrict anything via .ssh/autohorized_keys or if you apply any other restrictions to either the user or the root account.

    I'm logged in as root all the time and same in the screen session

    Code
    root@********-omv:~# echo $SHELL
    bash

    For me the bash error sounds like maybe the shell package was updated around some of the time, and then the file wasn't available ?



    Also it seems now the hostname doesn't work,

    I'm considering to run it again after restoring the backup, then I'd check if I can reproduce it.

    Anything I'd need to pay attention to ?

  • Now that explains why the network is down! But, still, I can't work on it as I have no HDMI output. I don't use any special drivers.


    Tbh I prefer to do a clean installation or to restore from by backup than to try to debug this, but I leave the logs here hoping it helps if someone comes across a similar situation.


    Thank you for replying and, again, for sharing the scripts!

    Actually I think you are just missing a recent kernel image and hardware support:

    Quote

    [..]

    The following packages will be REMOVED:

    armbian-tools-stretch* linux-dtb-rk3399* linux-image-rk3399*

    linux-stretch-root-nanopim4* linux-u-boot-nanopim4-default*

    [..]

    You probably want to install the correct tools and linux image for ambian buster (just guessing: linux-image-current-rockchip64(?), armbian-firmware, armbian-config). I cannot find any updated package for linux-image-rk3399. So maybe someone can tell you the package names you are looking for. This would also explain the lack of support for the HDMI port.


    Also you might want to check what an Armbian upgrade from stretch to buster requires additonally (the scripts cannot cover this). A search engine might help.


    The upgrade process itself went without issues according to the log.

  • I'm logged in as root all the time and same in the screen session

    Code
    root@********-omv:~# echo $SHELL
    bash

    For me the bash error sounds like maybe the shell package was updated around some of the time, and then the file wasn't available ?


    Would you mind checking the shell entry for root in /etc/passwd?


    The shells are all updated much earlier. I have no idea why the salt-command throws this error. Next time, if the same error appears, you can try to run the failing command manually without redirecting the output to /dev/null. You can also try to explicitly set the shebang in /var/lib/dpkg/info/openmediavault.postinst to #!/bin/bash and then apt-get install -f.

  • I just released version 4.7. It fixes a few bugs and also disables the removal of packages without any source reference. This has caused for example the kernel images in #98 to be removed. Although this means that packages will be left which are no longer provided by any repository enabled, it will also prevent the removal of potentially important packages. Instead these packages are now announced at the end of the upgrade process and users will have to remove this kind of cruft on their own.

  • After my problem described here:

    Cannot login

    I did a upgrade with this great script to OMV 5. That worked almost flawless except for the "omv-salt deploy run --quiet collectd chrony postfix."

    but thats solved. and after a >apt-get upgrade<


    Code
    root@mediavault:~# dpkg -l | grep openm
    ii openmediavault 5.5.23-1 all openmediavault - The open network attached storage solution
    ii openmediavault-clamav 5.0.11-1 all openmediavault ClamAV plugin
    ii openmediavault-keyring 1.0 all GnuPG archive keys of the OpenMediaVault archive

    everything looks fine, BUT:

    I cannot get the WGUI at all. When I put the correct IP address in the Browser, i just get a white empty page

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!