I recently published some information on how to attempt an upgrade from OMV2 to OMV3 including the upgrade to Debian Jessie. I have now written scripts to automate this process for all three major upgrade paths: 2 to 3, 3 to 4, and 4 to 5.
I put all the knowledge and experience I collected in these scripts as well as tests and fixes for issues to expect as announced by the Debian release notes for each release. The scripts are based on the original omv-release-upgrade script supplied by openmediavault, but are much more sophisticated. I've successfully tested them in different constellations in VMs and managed the successful upgrade from 2 to 3 to 4 to 5. Note, that I cannot test all possible system variations though. So if you are interested in upgrading your system with these scripts and you have an unusual configuration you can let me know beforehand and I'll do my best to recreate the configuration in a VM and test it.
Note that an upgrade attempt of an OMV2 system will only be possible as long as Debian provides repositories for Debian Jessie (8). After the repositories are gone the upgrade path will be closed and you will have to reinstall from scratch.
Before you attempt any upgrade I recommend the following steps:
- Make a full backup of your operating system and make sure you know how to play it back in case something awful happens.
- Uninstall all unused plugins. Those make the upgrade harder. But if you don't use/need them then don't install them.
- Disable all services running on the OMV machine except for SSH. This will prevent any users from trying to access these services during the upgrade process and it will also allow to remount the data partitions/devices with the shared folders, samba shares, etc. as read-only before attempting the upgrade (mandatory at the moment)
- If the upgrade attempt is done remotely via SSH I highly recommend to install screen and run the script in a screen session (see below). Otherwise if the SSH connection breaks the console session will close too and the running script will be terminated even if it has not finished and leaves the system broken.
- If you are running encryption (especially on the boot device), if you have unusual boot configurations (scripts), if you are running graphical desktop environments, if you have a lot of third party packages installed, or if you want to stay with sysvinit instead of systemd please make sure you read the Debian release notes. In these cases you are probably better off with a manual upgrade or you have to prepare your system before you can run the scripts.
The scripts are kept in branches for each openmediavault major series and are also released with the version accordingly to the major openmediavault version.
OMV2 to OMV3
Latest sources: https://github.com/dleidert/op…-upgrade/archive/2.tar.gz
Current release: https://github.com/dleidert/op…grade/archive/v2.4.tar.gz
Script name: `omv-release-upgrade-3`
Debian release notes: https://www.debian.org/releases/jessie/releasenotes
OMV3 to OMV4
Latest sources: https://github.com/dleidert/op…-upgrade/archive/3.tar.gz
Current release: https://github.com/dleidert/op…grade/archive/v3.3.tar.gz
Script name: `omv-release-upgrade-4`
Debian release notes: https://www.debian.org/releases/stretch/releasenotes
OMV4 to OMV5
Latest sources: https://github.com/dleidert/op…-upgrade/archive/4.tar.gz
Current release: https://github.com/dleidert/op…grade/archive/v4.7.tar.gz
Script name: `omv-release-upgrade-5`
Debian release notes: https://www.debian.org/releases/buster/releasenotes
Debian Wheezy users (OMV2) have to get the binary package for their architecture from snapshot.debian.org and then install it. Here for amd64:
sudo dpkg -i screen_4.1.0~20120320gitdb59704-7+deb7u1_amd64.deb
Users of later Debian versions can get it via
sudo apt-get install screen
The README.md file supplied with the tarball contains some basic information on how to use screen. But there is plenty of easy to understand documentation out there.
Checking the correct boot device
There is an issue with grub which can break your system after an unattended upgrade procedure. If devices have been changed on the target system the target device to install the grub boot-loader into stored in the debconf database might be wrong. Please test that the device given by
debconf-show grub-pc | grep -w grub-pc/install_devices
is actually the device the grub boot loader is intended to be installed to. If that's not the case run
sudo dpkg-reconfigure -plow grub-pc
and update the device. Otherwise you might end up not being able to boot your system just being shown the following error message:
grub-pc: error: symbol `grub_calloc' not found
If that is the case get a Debian installation CD/USB image, boot it, choose rescue mode, and follow the instructions to re-install the grub boot loader into the correct destination.
Running the script
One needs to get the tarball, unpack it, and run the script. The following shows it for the attempt to upgrade an OMV2 system:
wget -qO- https://github.com/dleidert/openmediavault-upgrade/archive/v2.4.tar.gz | tar -xz
If anything goes wrong there is a logfile created by the script which you can supply. The logfile is created in the directory from which you run the script and is called omv_release_upgrade_to_<debian_codename>.<date+time>.log. If everything goes to plan there will be a message telling you to restart the system.
For the OMV 2 to 3 upgrade path it is vital that you check your /etc/fstab for devices with an auto mount option but no nofail option before you reboot. Such devices must be present during boot or the system won't boot successfully. There is a script to add the nofail attribute to these mountpoints during the upgrade. However, make double sure before rebooting.
Feel free to send me feedback or report issues.