AArch64 on Raspberry Pi 2 (rev 1.2), 3B, 3B+

I’ve seen a few posts requesting this. Well I can’t give you arm64 Ubuntu-Mate, but I can offer (unofficial) Xubuntu 18.04!

Download link - https://1drv.ms/u/s!AvHY_kl4hMB4gQHfDAh2SYG_Q4Bt

This is NOT an image. This is the standard *ubuntu installer for the Raspberry Pi. Copy the zipped files (including the usually hidden ‘.disk’ folder) to a fat formatted partition (it has to be an MBR/msdos partition table) and you are ready to install.

Be aware the installer has a large initrd.lz file, so you will be staring at the rainbow screen for a long time before the installer boot messages/splash screen can be seen.

The installer works just like the installation media for ‘normal’ computers. Everything you can do with a normal computer (like usb persistence) should be possible with the Pi (you just need to add the necessary parameters to cmdline.txt), but be warned the Pi has limited memory.

This is a pure Ubuntu system with the exception of the bootloader files (which have been updated so they work on the Pi 3B+) and the Pi 3B/B+ wifi firmware. It is NOT a hybrid like Ubuntu-Mate 16.04. The 64 bit kernel is a Ubuntu kernel. No ppa’s are used. The setup is exactly as it is for the 32bit Pi server images, except u-boot is not used. See the wiki for more details: https://wiki.ubuntu.com/ARM/RaspberryPi .

If you have a problem and it is nothing to do with the installation process then raising a bug on Launchpad is the thing to do.

There is plenty of scope for the user to tinker and optimise things for the Pi. For example, uninstalling apps/daemons that you don’t use. I haven’t tried the vc4 graphics driver yet. Changing the swapfile for zram? You get the idea… perhaps together we could come up with a list of things to do?

Hopefully somebody finds this useful. I enjoyed putting it together (sort of). I did learn a few things anyway!


Very interesting @stillwinter. Thanks for posting.

It’s a good idea. But install desktop is easy, remove it fully is quite hard. Why not to build a version without desktop?

You should be able to remove the desktop with:

sudo apt install dctrl-tools
sudo apt purge $(apt-cache dumpavail | grep-dctrl -nsPackage \( -XFArchitecture arm64 -o -XFArchitecture all \) -a -wFTask xubuntu-desktop | tr '\n' ' ')
sudo apt autoremove

Then you can:

sudo tasksel

and install what you want!

apt upgrade failed in flash-kernel:

Creating config file /etc/default/flash-kernel with new version
Processing triggers for libc-bin (2.27-3ubuntu1) …
Processing triggers for linux-image-4.15.0-1011-raspi2 (4.15.0-1011.12) …
update-initramfs: Generating /boot/initrd.img-4.15.0-1011-raspi2
flash-kernel: deferring update (trigger activated)
flash-kernel: deferring update (trigger activated)
Processing triggers for flash-kernel (3.90ubuntu3) …
Unsupported platform.
dpkg: error processing package flash-kernel (–configure):
installed flash-kernel package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

when retrying apt upgrade:
Setting up flash-kernel (3.90ubuntu3) …
W: APT had planned for dpkg to do more than it reported back (0 vs 4).
Affected packages: flash-kernel:arm64

after a reboot, system now is not usable.
No network support, no ifconfig…

I don’t understand. I thought I had made flash-kernel pretty bomb proof. That’ll teach me for trying to be clever!

Does this problem occur with the xubuntu system or after you’ve removed the xubuntu-desktop?

You should have an entry for the pi 3B+ in /etc/flash-kernel/db . It should be put there by the installer unless I made a mistake. See https://wiki.ubuntu.com/ARM/RaspberryPi#Update_flash-kernel_database

It looks like you’ve purged flash-kernel and re-installed it. Is that right? This shouldn’t happen with the command I gave to remove xubuntu-desktop, so you’ve done something else I think?

As for no network after reboot, this is expected behaviour. You’ve removed the network-manager GUI. ifconfig is not normally installed. To bring the network up temporarily I used:

sudo ip link set dev eth0 down
sudo dhclient eth0

but there is probably a more modern way.

The thing I did:

Install from this release;
switch to console by ctrl-alt-f2;
sudo service lightdm stop;
run commands provided in reply to remove xubuntu; (no reboot)
apt update;
apt upgrade: failed.

Tested: upgrade with xubuntu-desktop will NOT fail in the same way. But upgrading will fail always when xubuntu-desktop removed.

Thanks for posting. This live xubuntu starts and works fine. After booting from the sdcard …p1 (2GB,vfat), I installed xubuntu to …p2 (8GB,ext4).
However, I cannot boot it. When I reboot, the live xu starts from …p1. Is there a method to switch to booting the installed xubuntu from …p2? Thanks

The installer is designed to be run from a flash usb drive and installed to another device (SD card, hard drive). Usb booting is enabled by default on the Pi3B+, but for the 3B you have to turn it on, or you can enable it temporarily by copying the bootcode.bin file to an SD card (see https://wiki.ubuntu.com/ARM/RaspberryPi#USB_booting ). You must keep a copy of bootcode.bin on the usb drive as it is used by the installer.

If you haven’t got a spare usb flash drive then it’s not a problem to use the same device for installer and installation, but you need to know more how the system works. The pi needs its bootloader files on a fat partition on partition number 1. This partition should be mounted at /boot/firmware. Move the files you have in the /boot/firmware folder to p1. You’ll want to update /etc/fstab to mount p1 at /boot/firmware. You should now be able to reboot into the installed system. p1 at 2GB is way bigger than you need, around 128MB is all you need.

I think the best thing to do is to script converting the official server arm64 iso to the raspi2 kernel. That shouldn’t be very hard to do, and people will then be using official installation media. I’ve got a pretty good idea how it can be done.

Great! Waiting for your further release.

@stillwinter, I wanted to use that odd layout because my Pi3 doesn’t boot from USB (OTP changed… I will dig into this problem later). Although I didn’t manage to hack my device with the /boot/firmware files and /etc/fstab as you suggested, I could install xubuntu8 64 to another SD card with an external USB card reader (it was /dev/sda1 /dev/sda2 while installing). This second card boots as a charm as mmcblk0p1, p2. Thanks for your help and for the link with useful booting info. The primary info page, https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/sdcard.md is empty and so, is not very useful.

Glad you got it working! Usb booting can be funny on the pi. I’ve got an old external hard drive that absolutely refuses to boot using the pi bootloader, and my usb flash drive will not work with u-boot.

The ultimate workaround is to copy the pi bootloader files and kernel/initrd files to an SD card. On the installer these are bootcode.bin, fixup*.dat, start*.elf, config.txt, cmdline.txt, *.dtb, casper/initrd.lz and casper/vmlinuz. Adjust the config.txt on the SD card as necessary. Once they are loaded you are in the Linux world and the rest of usb booting should work.

The same technique can be used if you are using a single SD card for installer and installation. Pre-partition the card so that p1 is a small fat, p2 is ext4 and p3 is fat. Copy the above files to p1. Copy all the original installer files to p3 (including bootcode.bin etc). Boot the pi, the installer should load. Choose manual partitioning. Give p1 the mount point “/boot/firmware”. Give p2 the mount point “/”. Install. Once installed you can remove the p3 installer partition and extend p2 to fill the space.

@Thomas_Kings Does that answer your question?

Thanks I got it working.
Is there a possibility you can make one for Lubuntu 18.04?

If bootable partition can be found in your SD, it won’t boot from USB.

You can try to remove the SD first while booting. If succeeded, insert an SD card without any partition with booting from the installation media in USB should work, IMHO.

Hi, thank you very much for offering this installer! I had an issue when I was installing the system. I partitioned my micro sd card into two partions, one is FAT32, and the other is ext4. Then I put all the files extracted from the zipped package into the FAT32 partition, then put the micro sd card into the Raspberry Pi, and powered it on. The installer showed up as you described, and I followed the installer until it said the installation was complete and I should restart the device to use the new operation system. However, when I restarted the device, the installer popped up again, and it seems it wants me to install the system again. I get stuck in the loop.

I’m pretty new to Raspberry Pi and Linux, and I’m probably not doing things the right way. Could you help me out and let me know what I did wrong? Thanks in advance!

Unless there is a reason why you need a 64 bit os, I would recommend sticking to 32 bits. Firefox is working now in 18.04 armhf (32 bit) and it not working was one of the main reasons for using 64 bits. The xubuntu-core armhf image I linked above is installed onto an sd card in just the same way as Ubuntu server, Ubuntu-mate and raspbian.

The 64 bit installer works just like the installer for a pc. Which is different to the images for raspbian etc. The installer expects to be booted from a different device (e.g. USB flash drive) to the installed system (e.g. sd card).

If you’ve only got an sd card, then it can be done this way. I’ve explained how I would tackle that in a couple of posts above. If you still need help after reading those, then please don’t hesitate to post your question.

Thank you so much! I am trying to install Hyperledger Fabric on my pi, and it requires a 64-bit system. I have Raspbian on another micro sd card, but Fabric cannot be installed on it.

I do have usb drives. Should I just copy all the files unzipped from the installer package into a flash drive, let the pi boot from usb, and follow the steps of the installer to install the system onto the micro sd card? Just to confirm, in this case, the micro sd card needs to be formatted as ext4, right? Is there anything else that I need to pay attention to?

Yes just copy all the files to a fat formatted USB drive. If you have the original 3B then there is a bit of extra stuff (see above).

If you boot from USB, then all you have to do is select the “erase disk and install” (can’t remember the exact wording) option. It will sort out the partitioning/formatting of the sd card for you.