Problems installing the kernel 4.15 on Raspberry Pi 3

So I have Ubuntu 18.04 on a Raspberry Pi 3 right now, and after installing linux-raspi2 metapackage, I got this error:

ln: failed to create symbolic link '/boot/dtb-4.15.0-1026-raspi2': Operation not permitted
run-parts /etc/initramfs/post-update.d//flash-kernel exited with return code 1
run-parts /etc/kernel/postinist.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.15.0-1026-raspi2 (--configure): installed linux-image-4.15.0-1026-raspi2 package post-installation script subprocess returned exit status 1

Does anyone know how to fix this?

And I don’t see the file dtb-4.15.0* anywhere in boot, but I do see /boot/dtbs directory.

You have /boot mounted as a fat partition?

yes, my /boot is FAT32

That’s the cause of the problem. Deb packages usually don’t install to fat.

The ubuntu packages expect the firmware partition to be mounted at /boot/firmware not /boot. See https://wiki.ubuntu.com/ARM/RaspberryPi#Raspberry_Pi_packages

Really? Why was Ubuntu MATE using FAT32 on PI_BOOT?

So I just format the PI_BOOT partition to ext4, and everything should be fine?

No. You change the mount point.

But isn’t PI_BOOT already mounted on /boot?

In a pure Ubuntu/Debian system you can’t have /boot as fat.

I know

that’s why I was asking if I should just format it to ext4, or get rid of it altogether, and place the files in /boot that’s in PI_ROOT

If you format pi_boot as ext4 then it can’t be booted by the pi firmware. It needs to be fat. It just shouldn’t be mounted as /boot.

If not /boot, then where?

/boot/firmware if you are using flash-kernel. /boot/efi if you are using grub2 (which currently doesn’t work in ubuntu armhf).

Did that, but now raspi-config is returning this error sudo raspi-config not working: boot partition not mounted

Anyway to fix that?

I will remind you that we don’t have a version of 18.04 for the pi. No devs can help you sadly.

raspi-config is just a script so you can edit it to fix it. You could put a symlink between /boot/config.txt and /boot/firmware/config.txt.

But raspi-config is not needed at all. Just edit config.txt directly.