odroid M1: upgrade from Ubuntu 24.04 to 26.04

On my odroid M1, my Ubuntu install was 2 years old and I felt that the versions of various software started to get outdated. Time for an upgrade!

Damn! No direct update with « dist-upgrade » or « do-release-upgrade ». So the plan was 1) backup 2) change the apt version reference from « noble » to « resolute » 3) « apt-update » « apt-upgrade » 4) finger cross 5) fix things

1) Backup: new partition where to backup the existing partitions

Goal: if something goes wrong, I want to be able to restore everything immediately, not reinstalling and restoring files here and there. So an disk image back seems a good choice.

I had about 30GB to backup, located on an attached m.2 drive. So copying by network (i.e. ssh) would take ages. So my plan was to create a new dedicated partition.

Usually, my odroid sits near my router (without keyboard nor screen). I plugged it to my desktop monitor with a long RJ45 cable and attached an USB keyboard. Note that I could not find quickly how to use a French azerty keyboard layout.

  • I booted, and in the Petitboot menu selected « exit to shell » and executed « udhcpc« , which will autoconfigure the network. Then « exit » to go back to the menu.
  • I selected « Rescuezilla » to do a network book on this small distro. This way, the root partition is not mounted and I will be able to resize it. Maybe there was a better choice with a GUI repartition tool…
  • There, in the terminal, « sudo su -« , and entered « odroid » as password.
  • I executed « resize2fs /dev/nvme0n1p2 50G » (to be above the current disk usage, while still keeping some free space for the upgrade).
  • Then I resized this partition with « parted » to 70G. From memory: « parted », « resizepart« , « 2« , « 70GB« .
  • Then I created a new partition. From memory:
    • « parted« 
    • « unit s » (to use the number of sectors for partitions boundaries)
    • « print free » to see the next free space for the new partition.
    • Then, I calculated the start position of my new partition so it is optimally aligned. In my case, the free space started at « 136718751 » (in sectors units). To calculate, with python: « import math », then « (math.floor(136718751/2048)+1)*2048 » which gave me « 136720384« .
    • Then I could create the new partition. From memory: « parted », « mkpart primary ext4 136720384 100%« 
  • Then I could backup the partitions, with something like:
    • mkdir /tmp/aaa
    • mount /dev/nvme0n1p3 /tmp/aaa
    • cat dev/nvme0n1p1 /tmp/aaa/1.img
    • cat dev/nvme0n1p2 /tmp/aaa/2.img
    • umount /tmp/aaa

2) Upgrade

  • I rebooted to the installed Ubuntu
  • I logged in as root (with ssh from my desktop, because it’s more convenient with a French keyboard layout).
  • I made a backup copy of « /etc/apt/sources.list.d/ubuntu.sources« 
  • And in « /etc/apt/sources.list.d/ubuntu.sources« , I replaced all the « noble » occurrences (the current version for 24.04) by « resolute » (26.04).
  • Then « apt update« , « apt upgrade« .
  • I was prompted if I wanted to upgrade the Postgresql data (yes).
  • At some point, I got an error and what suggested to run « apt –fix-broken install« , which I did.
  • « apt upgrade » again. I was proposed to upgrade Postgresql dlata again (yes).
  • I was informed that some programs such as ssh may have to be restarted because of the libc.

Fix things (Wireguard)

Things seemed to work (Nextcloud, ssh, Transmission).

Excepted my Wireguard VPN server. My phone could still connect and get and IP, but I could only ping the odroid IP (no access to Internet). The cause? My system settings for the IP forwarding was not taken in account any more. They were previously located in « /etc/sysctl.conf« . But this file was renamed to « /etc/sysctl.conf.dpkg-bak« . I had to put these settings in a new file I called « /etc/sysctl.d/50-wireguard.conf » and apply them with « sysctl -p /etc/sysctl.d/50-wireguard.conf » for immediate testing. With that, my VPN client could access the public Internet again, and it also worked after a reboot.

Little disappointment: still the same kernel version (5.18.0-odroid-arm64)

That’s all!

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *