Ubuntu Mate for NOOBS HowTo
download the lasted ubuntu mate image and uncompress it with:
unxz -k -v ubuntu-mate-20.10-desktop-armhf+raspi.img.xz
then mount the uncompressed image file for that type:
gnome-disk-image-mounter and select the image file
if you don't have it you can install it with:
sudo apt install gnome-disk-utility
now open the mounted "system-boot" in a terminal and type:
sudo tar -cvf ~/system-boot.tar *
sudo xz -0 -v ~/system-boot.tar
now open the mounted "writable" in a terminal and type:
sudo tar -cvf ~/writable.tar *
sudo xz -0 -v ~/writable.tar
this will create tar.xz archives from the partitions inside "your home folder"
create a noobs lite sdcard or usbstick if you don't have already
now create a folder named "ubuntu-mate" inside the "os" folder on the noobs sdcard
and copy the created archives to the "ubuntu-mate" folder
finaly you have to ceate these 3 files inside the "ubuntu-mate" folder
os.json
{
"name": "Ubuntu MATE",
"description": "Ubuntu MATE for NOOBS"
}
partitions.json
{
"partitions": [
{
"label": "system-boot",
"filesystem_type": "FAT",
"partition_size_nominal": 256,
"want_maximised": false,
"uncompressed_tarball_size": 64
},
{
"label": "writable",
"filesystem_type": "ext4",
"partition_size_nominal": 8192,
"want_maximised": true,
"mkfs_options": "-O ^huge_file",
"uncompressed_tarball_size": 6144
}
]
}
partition_setup.sh
#!/bin/sh
#supports_backup in PINN
set -ex
# shellcheck disable=SC2154
if [ -z "$part1" ] || [ -z "$part2" ]; then
printf "Error: missing environment variable part1 or part2\n" 1>&2
exit 1
fi
mkdir -p /tmp/1 /tmp/2
mount "$part1" /tmp/1
mount "$part2" /tmp/2
sed /tmp/1/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|"
sed /tmp/2/etc/fstab -i -e "s|^[^#].* / |${part2} / |"
sed /tmp/2/etc/fstab -i -e "s|^[^#].*\s/boot/firmware\s|${part1} /boot/firmware |"
cp /tmp/1/config.txt /tmp/1/config.bak
awk '1;/^\[all\]/ {print "kernel=vmlinuz\ninitramfs initrd.img followkernel"}' /tmp/1/config.bak >/tmp/1/config.txt
# shellcheck disable=SC2154
if [ -z "$restore" ]; then
if [ -f /mnt/ssh ]; then
cp /mnt/ssh /tmp/1/
fi
if [ -f /mnt/ssh.txt ]; then
cp /mnt/ssh.txt /tmp/1/
fi
if [ -f /settings/wpa_supplicant.conf ]; then
cp /settings/wpa_supplicant.conf /tmp/1/
fi
fi
umount /tmp/1
umount /tmp/2
finish! xD