Page 1 of 1

How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Sun Sep 30, 2018 12:49 pm
by code_exec
Ubuntu MATE is a remake of the Ubuntu Linux distribution which uses the MATE desktop. Unfortunately, for Pi users, it seems like we are stuck at 16.04. Or are we? There is a way to upgrade from Ubuntu MATE 16.04 to 18.04, and that involves modifying the list of repositories for apt to fetch packages from, and then upgrading the system.

First of all, I suggest upgrading packages on your system to their latest Xenial versions. To do so, enter the following into the terminal:

Code: Select all

sudo apt update
sudo apt upgrade -y
Next, you need to modify the list of repositories that apt fetches packages from. To do so, enter the following into the terminal:

Code: Select all

sudo pluma /etc/apt/sources.list
Then change all mentions of xenial to bionic, and then save the file.

After that, you need to update the repositories that apt fetches packages from. To do that, enter the following into the terminal:

Code: Select all

sudo apt update
After that, you need to remove a package from your system that prevents the upgrade from happening. To do this, enter in

Code: Select all

sudo apt remove python3-aptdaemon.pkcompat
Next, you need to upgrade all packages on your system to their Bionic versions. To do so, enter in:

Code: Select all

sudo apt upgrade -y && sudo apt dist-upgrade -y
Once the upgrade has complete, reboot your Pi. It should now load into Ubuntu MATE 18.04.

However, there will be a few bugs. Several dependency errors will appear when trying to install programs like GIMP. This is because some leftover repositories are still present, so to get rid of those, Run the following in the terminal:

Code: Select all

sudo caja
Then navigate to /etc/apt/sources.list.d. Delete all files in that folder. Run the following commands:

Code: Select all

sudo apt update 
sudo apt upgrade -y
You should now be able to install packages that were previously uninstallable due to dependency errors.

Re: How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Tue Oct 02, 2018 12:07 pm
by FrankGould
Thank you very much for these instructions. I successfully upgraded from Mate 16 to 18.04. Perfect timing. Mate 16 had old drivers that 18 has but I couldn't get 18 to install until I found these instructions! One note: xrdp needs to be fixed following the Mate 18 install. Below is a link that worked for me:

https://ubuntu-mate.community/t/xrdp-se ... pen/1131/5

Re: How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Tue Oct 02, 2018 6:47 pm
by code_exec
FrankGould wrote:
Tue Oct 02, 2018 12:07 pm
Thank you very much for these instructions. I successfully upgraded from Mate 16 to 18.04. Perfect timing. Mate 16 had old drivers that 18 has but I couldn't get 18 to install until I found these instructions! One note: xrdp needs to be fixed following the Mate 18 install. Below is a link that worked for me:

https://ubuntu-mate.community/t/xrdp-se ... pen/1131/5
No problem! According to Ubuntu MATE's project leader, the official Ubuntu MATE 18.04 image for the Pi is currently being developed.

https://ubuntu-mate.community/t/when-wi ... y-pi/17542

And yes, you may experience a few bugs with these instructions.

Re: How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Wed Oct 03, 2018 1:50 pm
by FrankGould
Correction. My previous post worked for a few times then stopped working. Then an associate offered the link below and it has continued to work consistently, although the UI is slightly different than the Mate desktop. At least we have a solution.

https://www.tweaking4all.com/software/l ... ntu-14-04/

@code_exec: Will there be a fix for xrdp that works with the Mate desktop? This workaround is fine but I'd like to offer to test, if that is possible or helpful.

Re: How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Sat Oct 13, 2018 1:28 pm
by code_exec
FrankGould wrote:
Wed Oct 03, 2018 1:50 pm
Correction. My previous post worked for a few times then stopped working. Then an associate offered the link below and it has continued to work consistently, although the UI is slightly different than the Mate desktop. At least we have a solution.

https://www.tweaking4all.com/software/l ... ntu-14-04/

@code_exec: Will there be a fix for xrdp that works with the Mate desktop? This workaround is fine but I'd like to offer to test, if that is possible or helpful.
Would "sudo apt install xrdp" solve the problem you're encountering?

Re: How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Thu Dec 27, 2018 8:30 am
by vinaypundith
I simply did the do-release-upgrade from the terminal and it successfully upgraded without breaking any packages. The trick is probably to first fully update the existing version before upgrading.

Re: How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Mon Dec 31, 2018 9:59 am
by rmast
vinaypundith wrote:
Thu Dec 27, 2018 8:30 am
I simply did the do-release-upgrade from the terminal and it successfully upgraded without breaking any packages. The trick is probably to first fully update the existing version before upgrading.
I tried the same, do-release-upgrade without sudo, and type the password when asked from the 16.04.2 image. It first complains about lspci being unsuccessful, and breaks on the boot-partition appearing too small:

Code: Select all

The upgrade has aborted. The upgrade needs a total of 49,5 M free 
space on disk '/boot'. Please free at least an additional 5399 k of 
disk space on '/boot'. You can remove old kernels using 'sudo apt 
autoremove' and you could also set COMPRESS=xz in 
/etc/initramfs-tools/initramfs.conf to reduce the size of your 
initramfs.
In this thread a solution and a warning for do-release-upgrade on the rpi:
https://raspberrypi.stackexchange.com/q ... e-from-ubu

So I tried the script suggested here by code_exec:
https://ubuntu-mate.community/t/when-wi ... i/17542/18

However that script throws all errors and dialogs about replacing configuration files to /dev/null, for example the error for not being able to download sources.list from mediafire. I downloaded it by hand, but a better way would be putting scripts on git or gist.

I kept the configurationscript for powersaving (keeping it off) and replaced the other. Running some statements from the script again and following some repair-options after a no RAM-left message the upgrade succeeded.

Removing files to make space on /boot appeared not to be relevant for this upgrade on the RPi, it belongs to the PC-boot process.

Re: How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Mon Dec 31, 2018 5:39 pm
by code_exec
vinaypundith wrote:
Thu Dec 27, 2018 8:30 am
I simply did the do-release-upgrade from the terminal and it successfully upgraded without breaking any packages. The trick is probably to first fully update the existing version before upgrading.
"DO NOT run do-release-upgrade - it will attempt to install the standard boot loader and destroy your Pi image."

https://ubuntu-mate.community/t/when-wi ... i/17542/15

Re: How to upgrade to Ubuntu MATE 18.04 on the Raspberry Pi

Posted: Wed Jan 02, 2019 8:28 am
by vinaypundith
code_exec wrote:
Mon Dec 31, 2018 5:39 pm
vinaypundith wrote:
Thu Dec 27, 2018 8:30 am
I simply did the do-release-upgrade from the terminal and it successfully upgraded without breaking any packages. The trick is probably to first fully update the existing version before upgrading.
"DO NOT run do-release-upgrade - it will attempt to install the standard boot loader and destroy your Pi image."

https://ubuntu-mate.community/t/when-wi ... i/17542/15
What is the "standard bootloader" and how does installing it destroy my Pi OS image? I have run sudo do-release-upgrade twice on my Pi and now have Ubuntu Mate 18.10 running on it, without any damage to the bootloader. The only thing I noticed is that ever since the 18.04 upgrade, the boot time is significantly longer, and the 18.10 upgrade uses a little more RAM.
In response to the post mentioning the error about "not enough space on /boot", I had resized my /boot partition to 100MB right after the original 16.04 installation, because at the first package update itself I got the "not enough space on /boot" error.
Making a full backup of your system is still a very good idea. I had to reinstall my OS (from the backup) after an aborted upgrade due to not being able to find an option to "continue upgrade" after reading the upgrade details. I could not restart the upgrade either because it says "Install all updates to your existing version before upgrading", even though I had done that before starting the first (aborted) upgrade. This is because it had already changed the repositories to use that of the new version, and so found newer versions of everything. Running a package update only installed some but not all of what the upgrade would have done.