[SOLVED] No web access and commande not found after OMV update 6 --> 7

  • Hi everyone,


    I tried to update my OMV server using omv-release-upgrade in SSH and it seems roll ok but in the process i had a file browser error and the upgrade stopped.

    Since i can't access web interface, 403 forbidden nginx.

    In SSH i can log with the root account but every command i type return with "command not found". Even with omv-firstaid.

    I checked the SSH status and it says active.

    Any idea?

  • Hello there.

    Check /usr and /bin folders. Maybe your PATH variable is not working. Try to start the command by it's absolute path and see if you can go from there. Most important is to re-start the last command you used before you got locked out. As last resort you could start in initramfs and chroot into your system and restart/finish the upgrade this way.

  • Ok, that is your problem. No files, no commands to execute. You probably have busybox or whatever was loaded in ram.


    Question ... did you do a backup, before you startet the upgrade? A backup is recommended before every upgrade.


    If so, just restore it and start upgrade again.


    If not, well ... you can't really chroot anymore. So clone the disk of your failed installation or just install everything fresh and setup your system from scratch. Usually there is a tool to backup your OMV-configuration, but I guess you haven't done that either, since you are trying to rescue your system this way.


    There is a messy way too. But since your system is in lingo between Debian 11 and 12, this would be very, very messy to achieve a clean system afterwards. But basically you copy /usr, /lib and /bin from a running system and try to jump-start your installation again. As long as your dpkg list are working (and they must be working) everything can be theoretically "reinstalled" again. I did it once years ago after some dude wanted to delete something on a server and wiped half of his system, before he could stop the delete command. All I had to do was to scp some files (basically install apt manually by hand) and then issue a reinstall command to reinstall all the packages in his system dpkg-list. But he only wiped his system, he wasn't in the middle of an upgrade, which makes that approach very messy.


    You can of course wait an see what ideas others have.


    EDIT:
    Oh yeah, go into /etc/openmediavault and copy config.xml. You could then clean-reinstall your system on a new drive (keep the old one for further data-extraction/reconstruction) and copy your config.xml back and see if that restores your system to it's old state. Use the old OMV-version, before the upgrade. So basically after booting your new-old installation, copy that config over the one you have and issue a redeploy command. In my head that seems fusible. What do the experts in here think? Could that be a practical solution to rebuild a lost system?

    Edited 3 times, last by bermuda ().

    • New
    • Official Post

    Oh yeah, go into /etc/openmediavault and copy config.xml. You could then clean-reinstall your system on a new drive (keep the old one for further data-extraction/reconstruction) and copy your config.xml back and see if that restores your system to it's old state. Use the old OMV-version, before the upgrade. So basically after booting your new-old installation, copy that config over the one you have and issue a redeploy command. In my head that seems fusible. What do the experts in here think? Could that be a practical solution to rebuild a lost system?

    That's the basic operation of omv-regen. But it's a bit more complicated than replacing the database.

  • When i type "ls" there's only:

    Where are you typing the command?


    The ls command will only show the list of files on the folder you are now.

    You need to run ls  / to show what is under the root folder.

    Not having /usr or /bin would mean your OS wouldn't run.


    Start by reading the How to post guide to post outputs in a way people can understand them:

    [How-To] Post content in a code box - Guides - openmediavault


    After, run and post the following commands (prepend sudo if not running as root)


    dpkg -l | grep openm

    cat /etc/os-release

    systemctl status nginx

    systemctl status php8.2-fpm.service

  • Yes, i have a backup.

    But how can i restore it?

    How did you create that backup? That is basically your answer to restore it.

    But you dodged the bullet here :) ... a backup can save you a lot of headache and time. You don't need to worry much.


    When you do the upgrade after your restored your OMV, use "screen" when your want to do it remotely. Inform yourself how to use it. It's pretty easy. In case you loose connection the process is not lost, it is still working and you can reconnect to your host.

  • Soma under the root folder but i missed the space between ls and /. Sorry.


    dpkg -l | grep openm

    Code
    rc  openmediavault                     6.9.16-1                             all          openmediavault - The open network attached storage solution
    rc  openmediavault-compose             6.11.3                               all          OpenMediaVault compose plugin
    rH  openmediavault-filebrowser         6.0.8-1                              all          openmediavault File Browser plugin
    ii  openmediavault-ftp                 6.0.7-1                              all          openmediavault FTP-Server plugin
    ii  openmediavault-keyring             1.0.2-2                              all          GnuPG archive keys of the openmediavault archive
    rc  openmediavault-omvextrasorg        6.3.6                                all          OMV-Extras.org Package Repositories for OpenMediaVault
    ii  openmediavault-sharerootfs         6.0.3-1                              all          openmediavault share root filesystem plugin
    rc  openmediavault-wireguard           6.3.7                                all          openmediavault WireGuard plugin

    cat /etc/os-release

    Code
    PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    NAME="Debian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"

    systemctl status nginx


    systemctl status php8.2-fpm.service

    Code
    Unit php8.2-fpm.service could not be found.
  • Start by reading the How to post guide to post outputs in a way people can understand them:

    [How-To] Post content in a code box - Guides - openmediavault

  • dpkg -l | grep openm

    Your system is in a mess.


    If you have a OS backup from before doing the upgrade, you better revert it and start again by making sure that you have it on OMV6 running proper.

    Follow what is instructed on the following post, before attempting the release-upgrade command:


    If you don't have a OS backup, you better of, starting fresh with a clean OMV7 install since trying to fix that mess will take more time than it deserves.

  • If i do fresh install can i restore the config file?

    No. You will have to reconfigure everything again.


    There's some commands that you can try to salvage it but you also need to consider that it might do worst than good.

    Without the output of what was ran and where it failed with the release-upgrade command, it's difficult to give a good sequence of commands.


    With only the info of what you already posted, the only certainty is that your OS (Debian) is already on version 12 while OMV is still on v6 (Debian 11) and was removed and not properly upgraded. The only good thing is that it still has it's configs there.


    If you are willing to take the risks, start by posting the outputs of (also put the command inside the CODE box)


    grep -r bullseye /etc/apt/*

    grep -r bookworm /etc/apt/*

    ls -al /etc/apt/sources.list.d/

  • Thanks a lot.

    I'll take the risk. At worst i'll do a fresh install.


    grep -r bullseye /etc/apt/*

    Code
    /etc/apt/preferences.d/openmediavault-kernel-backports.pref:Pin: release a=bullseye-backports
    /etc/apt/preferences.d/openmediavault-kernel-backports.pref:Pin: release a=bullseye-backports
    /etc/apt/preferences.d/openmediavault-kernel-backports.pref:Pin: release a=bullseye-backports
    /etc/apt/preferences.d/openmediavault-kernel-backports.pref:Pin: release a=bullseye-backports
    /etc/apt/sources.list.d/openmediavault-kernel-backports.list:deb [signed-by=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg] http://httpredir.debian.org/debian bullseye-backports main contrib non-free
    /etc/apt/sources.list.d/openmediavault-os-security.list:deb [signed-by=/usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg] http://security.debian.org/debian-security bullseye-security main contrib non-free
    /etc/apt/sources.list.d/openmediavault-os-security.list:deb-src [signed-by=/usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg] http://security.debian.org/debian-security bullseye-security main contrib non-free

    grep -r bookworm /etc/apt/*

    Code
    /etc/apt/sources.list:deb http://debian.iskon.hr/debian/ bookworm main
    /etc/apt/sources.list:deb-src http://debian.iskon.hr/debian/ bookworm main
    /etc/apt/sources.list:# bookworm-updates, to get updates before a point release is made;
    /etc/apt/sources.list:deb http://debian.iskon.hr/debian/ bookworm-updates main contrib non-free
    /etc/apt/sources.list:deb-src http://debian.iskon.hr/debian/ bookworm-updates main contrib non-free

    ls -al /etc/apt/sources.list.d/

    Code
    total 24
    drwxr-xr-x  2 root root 4096 16 mai   14:05 .
    drwxr-xr-x 13 root root 4096 16 mai   14:05 ..
    -rw-r--r--  1 root root  150 15 mai   17:34 openmediavault-kernel-backports.list
    -rw-r--r--  1 root root 1462 15 mai   17:34 openmediavault.list
    -rw-r--r--  1 root root   60  8 juin   2023 openmediavault-local.list
    -rw-r--r--  1 root root  336 15 mai   17:34 openmediavault-os-security.list
  • grep -r shaitan /etc/apt/*

    grep -r sandworm /etc/apt/*

  • grep -r shaitan /etc/apt/*

    Code
    /etc/apt/sources.list.d/openmediavault.list:deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://packages.openmediavault.org/public/ shaitan main
    /etc/apt/sources.list.d/openmediavault.list:deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://openmediavault.github.io/packages/ shaitan main
    /etc/apt/sources.list.d/openmediavault.list:# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://downloads.sourceforge.net/project/openmediavault/packages/ shaitan main
    /etc/apt/sources.list.d/openmediavault.list:deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://packages.openmediavault.org/public/ shaitan-proposed main
    /etc/apt/sources.list.d/openmediavault.list:deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://openmediavault.github.io/packages/ shaitan-proposed main
    /etc/apt/sources.list.d/openmediavault.list:# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://downloads.sourceforge.net/project/openmediavault/packages/ shaitan-proposed main
    /etc/apt/sources.list.d/openmediavault.list:deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://packages.openmediavault.org/public/ shaitan partner
    /etc/apt/sources.list.d/openmediavault.list:deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://openmediavault.github.io/packages/ shaitan partner
    /etc/apt/sources.list.d/openmediavault.list:# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://downloads.sourceforge.net/project/openmediavault/packages/ shaitan partner

    grep -r sandworm /etc/apt/*

    Nothing

  • What follows will be on your responsability.

    I can't guarantee NOR be held accountable if it renders your OS unbootable.


    If you accept the terms, then (one command at a time)

    When posting the output, also post the prompt with the command, like this:

    Code
    USER@HOST:~ $ cat /etc/apt/sources.list.d/openmediavault.list
    deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://packages.openmediavault.org/public/ sandworm main
    deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://openmediavault.github.io/packages/ sandworm main
    # deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://downloads.sourceforge.net/project/openmediavault/packages/ sandworm main


    These are the commands to run:

    Code
    sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list
    
    sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list.d/*
    
    sed -i "s/shaitan/sandworm/g" /etc/apt/sources.list.d/*
    
    sed -i "s/bullseye/bookworm/g" /etc/apt/apt.conf
    
    apt install --reinstall -f --dry-run
  • Soma


    sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list

    Code
    root@nasmat:~# sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list
    root@nasmat:~#

    sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list.d/*

    Code
    root@nasmat:~# sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list.d/*
    root@nasmat:~#

    sed -i "s/shaitan/sandworm/g" /etc/apt/sources.list.d/*

    Code
    root@nasmat:~# sed -i "s/shaitan/sandworm/g" /etc/apt/sources.list.d/*
    root@nasmat:~#

    sed -i "s/bullseye/bookworm/g" /etc/apt/apt.conf

    Code
    root@nasmat:~# sed -i "s/bullseye/bookworm/g" /etc/apt/apt.conf
    sed: impossible to read /etc/apt/apt.conf: No file or folder

    apt install --reinstall -f --dry-run

Participate now!

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