# Raspberry pi 64 bit can destroy itself through apt upgrade

**URL:** <https://hub.mender.io/t/raspberry-pi-64-bit-can-destroy-itself-through-apt-upgrade/8181>\
**Category:** Debian family\
**Created:** [January 28, 2026, 4:33pm UTC](https://hub.mender.io/t/raspberry-pi-64-bit-can-destroy-itself-through-apt-upgrade/8181 "2026-01-28T16:33:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user706](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@user706](https://hub.mender.io/u/user706)\
**Post date:** [January 28, 2026, 4:33pm UTC](https://hub.mender.io/t/raspberry-pi-64-bit-can-destroy-itself-through-apt-upgrade/8181/1 "2026-01-28T16:33:53Z")

</div>

Hi,

## Problem on 64-bit raspberry pi

did you know that for 64-bit raspberry pi, you “abusively” copy uboot into `/boot/firmware/kernel8.img`

thereby overwriting the official location of the actual Rpi kernel in the boot-partition.

(done here: [link](https://github.com/mendersoftware/mender-convert/blob/5.1.0/configs/raspberrypi/uboot/include/raspberrypi_64_config#L31))

If you now do

```bash
sudo apt update
sudo apt upgrade

```

it can happen that  
`/boot/firmware/kernel8.img` (which is uboot, not the kernel), is overwritten with an actual kernel (an update) via [this mechanism](https://forums.raspberrypi.com/viewtopic.php?p=2360755#p2360755), and then (re)booting fails with

```auto
${mender_kernel_root}: Can't lookup blockdev
mount: mounting ${mender_kernel_root} on /root/failed: No such file or directory
Failed to mount ${mender_kernel_root} as root file system.

```

## Did not happen on 32 bit raspberry pi (pre-bookworm)

On 32 bit raspberry pi (pre-bookworm, e.g. bullseye), this could not happen, because there you created `/uboot`, which it not part of the standard filesystem of raspberry pi. There we find a symlink:

```auto
/boot/kernel7l.img -> /uboot/kernel7l.img

```

(done here: [link](https://github.com/mendersoftware/mender-convert/blob/5.1.0/configs/raspberrypi/include/pre_bookworm_config#L12))

And then… if `apt upgrade` delivers a new kernel, it will simply overwrite the symlink `/boot/kernel7l.img`; but uboot will remain in `/uboot/kernel7l.img` and it will still boot fine.

## Possible fix for 64 bit

A fix for 64 bit is e.g. to make sure that uboot lands up in e.g. `/boot/firmware/u-boot.bin` and not `/boot/firmware/kernel8.img` and set `boot/firmware/config.txt` to have the line `kernel=u-boot.bin`

(By the way on RPi 5, you load kernel8.img. It would be better to use kernel\_2712.img. There’s a pull-request for that on the mender-convert repo)

---

<div class="post-metadata">

**Author:** ![user706](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@user706](https://hub.mender.io/u/user706)\
**Post date:** [February 27, 2026, 7:34am UTC](https://hub.mender.io/t/raspberry-pi-64-bit-can-destroy-itself-through-apt-upgrade/8181/2 "2026-02-27T07:34:54Z")

</div>

Unfortunately there’s a minor spelling mistake above, which is not good for people pasting their error message into a search engine.

The error is (with corrected spelling):

```auto
${mender_kernel_root}: Can't lookup blockdev
mount: mounting ${mender_kernel_root} on /root/failed: No such file or directory
Failed to mount ${mender_kernel_root} as root file system.

```
