Oh! That's good!

For anyone who needs a way to get a preinstalled image with the updated kernel 
I created a script.

1. Download the latest 24.04.2 preinstalled image for arm64 raspi.

2. Create or select a folder to use for mounting the image (i.e. /mnt)

Copy and run this script from a .sh file. Substitute "image_file" and
"rootfs_mnt_dir" for the location of the downloaded image and location
of the image file.

```
#!/bin/bash

image_file=/home/ubuntu/Downloads/ubuntu-24.04.2-preinstalled-server-arm64+raspi.img
rootfs_mnt_dir=/mnt/rootfs-mount

apt update 
apt install qemu-user-static

mount -o loop,offset=537919488 $image_file $rootfs_mnt_dir
mount --bind /dev $rootfs_mnt_dir/dev

cp /usr/bin/qemu-aarch64-static $rootfs_mnt_dir/usr/bin  
cp /run/systemd/resolve/stub-resolv.conf $rootfs_mnt_dir/etc/resolv.conf

chroot $rootfs_mnt_dir qemu-aarch64-static /bin/bash -c 'apt update &&
apt install linux-raspi -y && exit'

umount $rootfs_mnt_dir/dev 
rm $rootfs_mnt_dir/etc/resolv.conf
umount $rootfs_mnt_dir
```

The script will automatically update and exit leaving you with a working
24.04.2 preinstalled image for CM5.

the qemu-user-static package provides the qemu-aarch64-static binary
needed to run this on an x86 based system.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2089555

Title:
  mmc0 error on boot with eMMC CM5

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2089555/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to