User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

New Ubuntu Mate arm64 RaspberryPi 4 image (minimal and server images also available)

Mon Jul 06, 2020 2:57 pm

I wanted to use arm64 OS on RaspberryPi 4 and I was not quite satisfied with Ubuntu for RPi nor with (un)official RaspberryPI OS arm64 image.
So, I've created a new image built from scratch using core Ubuntu focal (20.04 LTS release) built with debootstrap, fine tuned Mate desktop and RaspberryPi related packages modified to work best on arm64.


Features:
  • Built from scratch using debootstrap and docker...
  • RaspberryPi related packages provided in my own repository (configured in apt sources), following packages are provided:
    • kernel packages for 4.19, 5.4 (default, installed), 5.6, 5.7 and 5.8 built from raspberry sources, header packages are also included, RaspberryPi boot files are included in the packages
    • Boot from USB supported
    • Chromium browser from Debian bullseye (installed), works better than Ubuntu's snap chromium-browser
    • pi-bluetooth (installed), BT works without issues
    • WiFi works without issues
    • libraspberrypi-bin, userspace programs (installed)
    • rc-gui, RaspberryPi graphical configuration (installed)
    • wiringpi, ver 2.60 (installed)
    • rpi-eeprom (installed)
    • rp-bookshelf (installed)
    • smplayer and smtube (recommended for watching Youtube videos), latest version (20.60), built from sources (installed)
    • ffmpeg, including ffplay, built with mmal video decoder
    • Eclipse for RPi (2020-03, arm64 only), thanks to Clicky
    • CodeLite, latest version, newer than Ubuntu's, built from source
    • WPS Office, excelent office package, latest version (only available on arm64)
    • and more...
    • The repositoy will be updated regularly with new kernels and other packages.
  • root file system installed on btrfs, subvolume is used which makes backups and snapshots easy
    Compression (zstd, level 3) is used which saves ~40% of the sdcard space and also makes sdcard access faster (if running from reletivelly slow cards)
  • SSH server installed and enebled, you can remote login as user (pi) or root
  • boots from sdcard, sdcard inserted into USB reader or from USB-SSD
Downloads: (updated on Jul 25. 2020.)
The image can be downloaded from Mega Cloud drive:
raspi_ubuntu_focal_arm64_btrfs.img.xz,
md5sum file
is also available, if you want to check downloaded file's integrity before writting to sdcard.


Ateranative download location: raspi_ubuntu_focal_arm64_btrfs.img.xz

Ubuntu Mate armhf image is also available if anyone needs it
raspi_ubuntu_focal_armhf_btrfs.img.xz (md5sum file)

Server image (no desktop), included: raspi-config, aptitude, LAMP, webmin, phpmyadmin, development tools, ...
raspi_ubuntu_focal_arm64_server_btrfs.img.xz (md5sum file)

Minimal image (no desktop), included only the base packages
raspi_ubuntu_focal_arm64_minimal_btrfs.img.xz (md5 csum file)

Anyone who prefers ext4 over btrfs can try images with ext4 file system:
arm64 Mate desktop image:
raspi_ubuntu_focal_arm64_ext4.img.xz (md5 csum file)
arm64 minimal image:
raspi_ubuntu_focal_arm64_minimal_ext4.img.xz (md5 scum file)
All images are for Raspberry Pi 4 only!
The image can be flashed with any image flashing program, for example Raspberry Pi Imager.
On first boot the system will be restarted once, after resizing the file system!

Notes:
  • Default user name is pi, password raspberry, you can change it in Mate Control Center Image
  • Default root's password is raspberry, root login over SSH is enabled
  • Default language is English, time zone UTC. You can change it from Control Center using Ubuntu provided tools or Raspberry Pi Configuration program.
  • Synaptic package manager is installed and recommended for updates and package installation/management
  • There is some screen tearing when moving windows horizontally with Marco adaptive compositor enabled (a known Rpi issue), you can disable it from MateTweaks in Control Center
  • Video playback is hw accelerated in VLC and SMPlayer, in Chromium, video playback is ok in 720p and 1080p/<=30Hz
  • On armhf image Chromium runs without sandbox!
  • If you want to boot this Ubuntu Mate image from USB drive (sdcard in usb reader, usb ssd, usb hd), the RPi4 eeprom must have new firmware (at least from Jul 15 2020).
    See this post for more info about how to update the eeprom.
  • You may experience some issues if/when using Update manager, explained here (only with older kernel versions).

__________________________________

Video review from leepspvideo
__________________________________

Image
Image
Image
Last edited by loboris on Thu Aug 27, 2020 11:05 am, edited 17 times in total.

NicknDi
Posts: 12
Joined: Tue Jul 07, 2020 9:47 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Sun Jul 19, 2020 5:46 pm

This is phenomenal! Thanks you so much for sharing your work on this! .... But why am I the only one saying this??! Compared with all the other RPi Ubuntu images I've tried, this is by far the fastest and smoothest - from power on to desktop on first boot in next to no time. Wonderful!

Furthermore, the checksum matches, which doesn't happen for me with the official 20.04 64bit release image, downloaded several times in different ways, but never verifying.

How do updates work? Once installed, continue as normal? Or does one need to add your repository and ensure updates come from there? (How do that?)

Thanks again!
Last edited by NicknDi on Mon Jul 20, 2020 8:00 am, edited 1 time in total.

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Sun Jul 19, 2020 5:56 pm

NicknDi wrote:
Sun Jul 19, 2020 5:46 pm
How do updates work?
My repository is already added, you don't need to do anything.

For updates and other software instalation I would recommend the included Synaptic package manager, it is simpler than working with apt from command line.

NicknDi
Posts: 12
Joined: Tue Jul 07, 2020 9:47 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Sun Jul 19, 2020 7:20 pm

Thanks, that's great.

Can you perhaps help with an issue I'm having?

I'm currently using Ubuntu 20.04 server, with Ubuntu-desktop installed on top. It works, but a tad slow and no tweaks - can't even get it onto a UK keyboard layout. But it fills the screen.

Everything else I've tried - ie images tweaked for the RPi4, and mainly via Desktopify - have resulted in a partially filled screen with a horizontally squashed desktop, ie wide black bar to left of desktop. I've tried several desktops - Mate, Xubuntu, Ubuntu - all with the same result. Display settings show the correct resolution (1680 x 1050) for my display (correctly identified as NEC 20""), a MultiSync 20WGX2, but it's not displaying correctly. I had wondered whether it was to do with the Desktopify process, but, alas, I get the same effect with your image too. Any ideas re what may be the problem?
NB I'm using a micro usb to dvi-d cable, though I can't see how that could be the problem as Ubuntu server + Ubuntu-desktop displays correctly. It's the 8gb Pi4, btw.

cjan
Posts: 862
Joined: Sun May 06, 2012 12:00 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Mon Jul 20, 2020 2:41 am

have try Wimpy's img & desktopify, both on Pi2 were fail while reboot.
found your repos have armhf package build, do you plan share 32bit img too?

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Mon Jul 20, 2020 9:47 am

NicknDi wrote:
Sun Jul 19, 2020 7:20 pm
Display settings show the correct resolution (1680 x 1050) for my display (correctly identified as NEC 20""), a MultiSync 20WGX2, but it's not displaying correctly.
The hdmi video mode is probably not detected correctly.
You can try to manualy set the 1680x1050 mode in config.txt (Video options in config.txt):

Code: Select all

hdmi_group=2
hdmi_mode=57 ( or 58 )
or set the custom hdmi timings (I think there is a thread about it on this forum).

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Mon Jul 20, 2020 9:51 am

cjan wrote:
Mon Jul 20, 2020 2:41 am
have try Wimpy's img & desktopify, both on Pi2 were fail while reboot.
found your repos have armhf package build, do you plan share 32bit img too?
I do have a armhf image but only for RPi4. I don't have any RPi2 to test it.

fruitoftheloom
Posts: 24038
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Mon Jul 20, 2020 9:56 am

.
Official Ubuntu-Mate Beta:

https://ubuntu-mate.org/ports/raspberry-pi/
Thinking outside the box is better than burying your head in the sand...

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Mon Jul 20, 2020 10:21 am

fruitoftheloom wrote:
Mon Jul 20, 2020 9:56 am
.
Official Ubuntu-Mate Beta:
https://ubuntu-mate.org/ports/raspberry-pi/
I'm aware of that. I still think my image works better (at least for my needs).
I don't think it is bad to have more choices...

NicknDi
Posts: 12
Joined: Tue Jul 07, 2020 9:47 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Mon Jul 20, 2020 4:39 pm

loboris wrote:
Mon Jul 20, 2020 9:47 am
The hdmi video mode is probably not detected correctly.
You can try to manualy set the 1680x1050 mode in config.txt (Video options in config.txt):

Code: Select all

hdmi_group=2
hdmi_mode=57 ( or 58 )
or set the custom hdmi timings (I think there is a thread about it on this forum).
Thank you so much for this further advice. Changing the hdmi mode and group settings didn't make any difference, but following your link and reading further, I tried adding hdmi_safe=1 and hdmi_drive=1 and that fixed it. I don't know which of those changes did the trick, or a combination of the two, but I'm so pleased to have it displaying correctly. Now I'm looking forward to putting the image on a USB SSD drive (which I understand from your original post needs no further tweaking - brilliant!) and we're away with a really good looking, fast and functional desktop experience. To my eyes yours knocks all the other attempts at an Ubuntu desktop on the RPi4 out of the water, so again, many, many thanks! :D

John600
Posts: 6
Joined: Mon Jul 20, 2020 6:28 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Mon Jul 20, 2020 6:34 pm

Great job! Thank you a lot!

It booted fine. Blank screen was worried me at first but then rebooted itself and booted into Ubuntu Mate.

Anyway, I had small network issue. Ethernet was not managed. After some googling, solution is:

Code: Select all

sudo nano /etc/NetworkManager/NetworkManager.conf
Change the line managed=false to managed=true

Save and restart network manager:

Code: Select all

sudo service network-manager restart
That didn't help so I did one more step:

Code: Select all

sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
File above didn't existed at all. Then reboot or restart network manager again and Ethernet is now manged by GUI.
Last edited by John600 on Tue Jul 21, 2020 3:53 am, edited 2 times in total.

larryr
Posts: 15
Joined: Mon Jul 20, 2020 7:28 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Mon Jul 20, 2020 7:36 pm

Much better than the Ubuntu-MATE version.

No screen tearing and full screen you tube works without hesitation.

Only issue is unable to get the nm-applet to allow configuring the eth0 - any idea why . I set the fasle to true but no change.

am using ifconfig to do it now - will try YAML to see if it can work

I am going to try to move it from btrfs to ext4 - I dislike btrfs.

Where did you get the source code for this and is there any chance you might do the same for opensuse 15.2 with mate - my 2nd pi4 runs it but no sound and poor video on full screen.

John600
Posts: 6
Joined: Mon Jul 20, 2020 6:28 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Tue Jul 21, 2020 1:21 am

larryr wrote:
Mon Jul 20, 2020 7:36 pm
Much better than the Ubuntu-MATE version.

No screen tearing and full screen you tube works without hesitation.

Only issue is unable to get the nm-applet to allow configuring the eth0 - any idea why . I set the fasle to true but no change.

am using ifconfig to do it now - will try YAML to see if it can work

I am going to try to move it from btrfs to ext4 - I dislike btrfs.

Where did you get the source code for this and is there any chance you might do the same for opensuse 15.2 with mate - my 2nd pi4 runs it but no sound and poor video on full screen.
Just read my post above yours to solve eth0 issue ;)

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Tue Jul 21, 2020 9:06 am

larryr wrote:
Mon Jul 20, 2020 7:36 pm
Only issue is unable to get the nm-applet to allow configuring the eth0 - any idea why . I set the fasle to true but no change.
John600 wrote:
Mon Jul 20, 2020 6:34 pm
I had small network issue. Ethernet was not managed...
This is how it is configured. I like it better that way, it is up to you to configure it differently.
There is rarely a need to manage Ethernet interface, if you do, just edit /etc/network/interfaces.
I mostly use static configuration, like this:

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

# network interface not managed by Network Manager
allow-hotplug eth0
iface eth0 inet static
address 192.168.0.33
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 83.139.103.3
dns-nameserver 83.139.121.8
dns-nameserver 8.8.8.8
larryr wrote:
Mon Jul 20, 2020 7:36 pm
I am going to try to move it from btrfs to ext4 - I dislike btrfs.
I'm using btrfs on all my machines, it works wery well and has many advantages over ext4.
Of course, if you like to use ext4, it is up to you.
You can do it easily. You can simply copy the file system to another media (or mount the image and copy from it).
First partition your destination sdcard (or other media) for 2 partitions (FAT32, 128MB + ext4, remaining space), simplest method is to use gparted.
Copy fat partition content to new drive's fat partition.
Copy the root file system,I would recommend to use rsync to do that, here is the command you can use:

Code: Select all

sudo rsync -r -t -p -o -g -x --delete-after -l -H -D --numeric-ids -s -W -S --inplace -h -h --exclude='boot/*' --info=name0 --info=progress2 <source_dir>/ <dest_dir>/
After that you only have to change the cmdline.txt and set the kernel command line to use ext4 filesystem type and edit /etc/fstab to mount / from ext4.
I would recommend to do that on your PC, if possible.
larryr wrote:
Mon Jul 20, 2020 7:36 pm
...is there any chance you might do the same for opensuse...
I'll publish my build scripts on GitHub when I'll find some time, so you can try to build the OpenSuse image, it should be easy.
The problem is that I would need to create OpenSuse compatible repository and package all RPi related packages as RPM, I'm not sure if I'll have a time for that.

larryr
Posts: 15
Joined: Mon Jul 20, 2020 7:28 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Tue Jul 21, 2020 1:59 pm

Thank you, I mounted your image on my main Linux Mate amd64 machine and successfully got it converted.
I did get it converted to ext 4 yesterday.
I dd'ed a copy of you micro sd to a duplicate - and deleted the btrfs and created the ext4 via gparted and set the UUID to the match the btrfs one.
I rsync'ed the image from the compressed btrfs to a non-compressed ext4 so that all were in the root file system.
Changed the reference to btrfs to the correct ext4 format in the cmdline.txt and edited the image's /etc/fstab to say that the root partition is ext4.
I added a script to set my forced my eth0 ip address and route to a startup script that is suid to root in /usr/local/bin.

I love that you included the obsolete ifconfig command - I dislike the new ip command that replaces it.

I know how to build an rpm package ( I retired from NCR - it is basically what we had as packageadd and packagerm from the 1980's in Unix)
- if you know the other format - maybe I can convert them to rpm's - Have nothing but time on my hands and 7 Opensuse Dell Laptops with 24 different virtualbox machines (ubuntu, mint, centos, opensuse Tumbleweed, and windows xp, vista, 7 ,8, 10) and 2 Loboris-Ubuntu Raspberry 4B's.

larryr
Posts: 15
Joined: Mon Jul 20, 2020 7:28 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Thu Jul 23, 2020 1:57 pm

In today's packagekit update it said ubuntu core needs 120mb free in /boot and I cancelled it.

Instead I ran the sudo apt update && apt upgrade, they ran fine, is there anything to worry about. Does your repo update kernel8.img in /boot when needed?

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Thu Jul 23, 2020 2:53 pm

larryr wrote:
Thu Jul 23, 2020 1:57 pm
In today's packagekit update it said ubuntu core needs 120mb free in /boot and I cancelled it.

Instead I ran the sudo apt update && apt upgrade, they ran fine, is there anything to worry about. Does your repo update kernel8.img in /boot when needed?
What did you use for update if not apt?
Have you changed anything after downloading the image (except installing on ext4, BTW, why do you think ext4 is better than btrfs...)?
As far as I know, packagekit has nothing to do with /boot directory (BTW, there was no packagekit update during the last 3 months...).
ubuntu-core package is not installed, and not needed.

Of course, when kernel (package: linux-image-5.4-rpi-lobo-arm64) update is available, kernel8.img is updated, as well as all the other files in /boot (preserving cmdline.txt & config.txt).

larryr
Posts: 15
Joined: Mon Jul 20, 2020 7:28 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Thu Jul 23, 2020 3:20 pm

Packagekit opened saying there was an update - with 3 boxes - cancel retry later and install now.

I selected the install now box and got that error - packagetkit seems to run from systemd every so often - journalctl shows it starting and stopping. When there is an update a box pops up saying so.

I have 2 pi4b's and on one I always cancel and use the apt to upgrade on the other I try the install now - they both seen to do the same except for the unable to install /boot needs 135MB free message today.

I will just cancel packagekit windows if that is recommended.

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Thu Jul 23, 2020 3:29 pm

larryr wrote:
Thu Jul 23, 2020 3:20 pm
... except for the unable to install /boot needs 135MB free message today...
Which package complained about needing 135MB free in /boot ?

larryr
Posts: 15
Joined: Mon Jul 20, 2020 7:28 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Thu Jul 23, 2020 7:49 pm

It was the window that opens when there is an update in Ubuntu.

larryr
Posts: 15
Joined: Mon Jul 20, 2020 7:28 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Fri Jul 24, 2020 12:27 pm

The title said system updater for the pop up window.

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Fri Jul 24, 2020 5:29 pm

larryr wrote:
Fri Jul 24, 2020 12:27 pm
The title said system updater for the pop up window.
I've finally found the reason for that bahaviour.
It is caused by update-manager (Administration/Softvare Updater) which expects large amount of free space in /boot when installing something related to linux kernel (Ubuntu for RPi handles kernel instalation differently than in my image...).
I'll try to fix it, for now don't use it.

The recommended update method is apt, or if you want a GUI, Synaptic package manager.

Update:
Ubuntu kernel has separate kernel (vlinuz) and initramfs (initrd.img) parts.
This image uses RPi style combined kernel (kernel8.img or kernel7l.img).
update manager (Administration/Softvare Updater) checks if there is enough free space on /boot when updating the kernel.
If initrd.img and/or vmlinuz are not found, it assumes the sizes are 100MB + 16MB. This size is doubled, as the old initrd.img and vmlinuz versions are preserved and the new ones are expected to be the same size.
As the default size of the /boot is only 128MB, it fails.

In the new kernel upgrades I'll include dummy initrd.img and vmlinuz and update manager will be able to run (tested).
Last edited by loboris on Sat Jul 25, 2020 8:51 am, edited 1 time in total.

number698
Posts: 6
Joined: Tue Jan 02, 2018 1:33 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Fri Jul 24, 2020 10:26 pm

Hi, is the image file available anywhere other than https://mega.nz/ ?

for the last 2 days all I get is "This site can’t be reached"

Brestois
Posts: 7
Joined: Wed Jul 22, 2020 7:24 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Fri Jul 24, 2020 10:28 pm

Hi I tried your image and it’s very good, could you also make it possible to tether from iPad or Mac as a gadget ? That’ll be very handy.

User avatar
loboris
Posts: 101
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image

Fri Jul 24, 2020 10:48 pm

number698 wrote:
Fri Jul 24, 2020 10:26 pm
Hi, is the image file available anywhere other than https://mega.nz/ ?

for the last 2 days all I get is "This site can’t be reached"
You can also download directly from my server:
raspi_ubuntu_focal_arm64_btrfs.img.xz

Return to “Ubuntu”