Preparing for my first major upgrade (Kubuntu 25.04 to 25.10)

I’m accustomed to major upgrades and ZFS boot environments with FreeBSD.

The step up to 25.10 will be my first major upgrade with Linux. I have a few basic questions, please ELI5.

GRUB

If I find a significant problem following the upgrade, will there be a GRUB option to boot an earlier kernel?

If so: will the userland work with the booted kernel?

ZFS

I can create a checkpoint of rpool before the upgrade.

https://openzfs.github.io/openzfs-docs/man/master/8/zpool-checkpoint.8.html

Should I also create a checkpoint of bpool?

Recovery

If I need to use a recovery mode for Kubuntu, will it be something like what’s described in this 2022 post about Ubuntu?

Fixing a failed upgrade to Ubuntu 22.04 LTS in recovery mode | Koen Vervloesem - Technology Writer

Background

https://mastodon.bsd.cafe/@grahamperrin/114640816892663471 (2025-06-07)

I chose Ubuntu (for KDE Plasma) because the installer provides root-on-ZFS. …

I also chose encryption when installing.

Thanks

Hey Graham

Delighted you’re upgrading.
Grub, Yes Grub keeps previous kernels, you’ll need to boot with out the splash screen to access the menu → recovery mode

Checking pointing on a CoW filesystem makes sense, consider placing /home on a different volume if not already, as the upgrade doesn’t touch /home.

Recovery: Yes those steps in your post are correct (nice post btw). Also if you download the ISO onto a USB Key, then you’ve got a live boot to fix anything else.

Feel free to ask questions here, or catch up with us on Matrix at #kubuntu:matrix.org.

ttfn.
Rick

2 Likes

I wrote kubuntu-25.10-desktop-amd64.iso to a USB memory stick, booted, both displays work in live mode, so I don’t expect a problem with the upgrade.

Results of hardware probes:

LUKS, misunderstood

I sped through a few manual pages, with 25.10 in live mode, but could not figure out how to decrypt the LUKS volume where rpool is stored. I booted 25.04 to search the web and save results, much of what I found was way off. A handful, in chronological order:

  1. https://askubuntu.com/q/653408/25036boot - Mounting encrypted LUKS partition from Live CD - Ask Ubuntu
  2. https://unix.stackexchange.com/q/399620/13260ubuntu - How to decrypt a hard drive with LUKS encryption? - Unix & Linux Stack Exchange
  3. https://ubuntu-mate.community/t/how-to-decrypt-disk-on-linux/19140How to decrypt disk on Linux? - Support & Help Requests - Ubuntu MATE Community
  4. https://www.reddit.com/r/linux4noobs/comments/1jckz9u/comment/mi36pl6/ScratchHistorical507 comments on Could I decrypt a LUKS encrypted drive without booting into it?

I took a hint from https://ubuntu-mate.community/t/how-to-decrypt-disk-on-linux/19140/4 (2019), ignoring the preceding blurb about deleting partitions:

grahamperrin@mowa219-gjp4 ~> lsblk --fs /dev/sda
NAME           FSTYPE     FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                            
├─sda1         vfat       FAT32            A6F3-228F                                 1G     1% /boot/efi
├─sda2         zfs_member 5000  bpool      4044919440379282905                                 
├─sda3                                                                                         
│ └─dm_crypt-0 swap       1     dm_crypt-0 0df3b995-50bc-4780-828a-40d39e21e58c                [SWAP]
└─sda4         zfs_member 5000  rpool      2926510480119158627                                 
grahamperrin@mowa219-gjp4 ~> sudo cryptsetup isLuks /dev/sda4
grahamperrin@mowa219-gjp4 ~ [1]> lsblk /dev/sda
NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda              8:0    0 931.5G  0 disk  
├─sda1           8:1    0     1G  0 part  /boot/efi
├─sda2           8:2    0     2G  0 part  
├─sda3           8:3    0     8G  0 part  
│ └─dm_crypt-0 252:1    0     8G  0 crypt [SWAP]
└─sda4           8:4    0 920.5G  0 part  
grahamperrin@mowa219-gjp4 ~> 

So, I guess that (in live mode) I’ll need to decrypt /dev/sda4.

Taking a hint from something that I don’t want (https://wiki.archlinux.org/title/Resizing_LVM-on-LUKS#Boot_and_setup), for something that I might want:

cryptsetup luksOpen /dev/sda4 cryptdisk

Will that be correct?

From ScratchHistorical507 comments on Could I decrypt a LUKS encrypted drive without booting into it?:

… You can usually use the preinstalled disk managment tool to decrypt the partitions. …

I tried KDE Partition Manager with 25.10 in live mode, I saw nothing related to encryption or decryption (and KHelpCenter does not suggest using the app).

Similarly: nothing apparent in GParted.

In retrospect, I might have been wrong to assume that the partition is LUKS-encrypted.

OK, I had things back-to-front. I wrongly assumed that LUKS came first (because on FreeBSD, it’s necessary to decrypt at the GELI level before a pool on the decrypted device can be imported).

So: I could import a pool with an altroot e.g.

sudo zpool import -f -R /tmp/altroot rpool

– but then, I could not mount the ZFS file systems.

I found a helpful answer here:

encryption - How to mount an encrypted Ubuntu 20.10 ZFS file system from an Ubuntu live CD? - Ask Ubuntu

Successful use of the decrypted data, with 25.10 in live mode, although I don’t understand why the pool will not export:

no response to sudo zpool export rpool
kubuntu@kubuntu:~$ zfs list
NAME                                               USED  AVAIL  REFER  MOUNTPOINT
rpool                                              408G   484G   192K  /tmp/altroot
rpool/ROOT                                        25.2G   484G   192K  none
rpool/ROOT/ubuntu_v0hpws                          25.2G   484G  10.1G  /tmp/altroot
rpool/ROOT/ubuntu_v0hpws/srv                       192K   484G   192K  /tmp/altroot/srv
rpool/ROOT/ubuntu_v0hpws/usr                      11.8M   484G   192K  /tmp/altroot/usr
rpool/ROOT/ubuntu_v0hpws/usr/local                11.6M   484G  11.6M  /tmp/altroot/usr/local
rpool/ROOT/ubuntu_v0hpws/var                      15.1G   484G   192K  /tmp/altroot/var
rpool/ROOT/ubuntu_v0hpws/var/games                 192K   484G   192K  /tmp/altroot/var/games
rpool/ROOT/ubuntu_v0hpws/var/lib                  13.0G   484G  12.7G  /tmp/altroot/var/lib
rpool/ROOT/ubuntu_v0hpws/var/lib/AccountsService   212K   484G   212K  /tmp/altroot/var/lib/AccountsService
rpool/ROOT/ubuntu_v0hpws/var/lib/NetworkManager    384K   484G   384K  /tmp/altroot/var/lib/NetworkManager
rpool/ROOT/ubuntu_v0hpws/var/lib/apt               113M   484G   113M  /tmp/altroot/var/lib/apt
rpool/ROOT/ubuntu_v0hpws/var/lib/dpkg              112M   484G   112M  /tmp/altroot/var/lib/dpkg
rpool/ROOT/ubuntu_v0hpws/var/log                  2.08G   484G  2.08G  /tmp/altroot/var/log
rpool/ROOT/ubuntu_v0hpws/var/mail                  192K   484G   192K  /tmp/altroot/var/mail
rpool/ROOT/ubuntu_v0hpws/var/snap                 10.5M   484G  10.5M  /tmp/altroot/var/snap
rpool/ROOT/ubuntu_v0hpws/var/spool                 868K   484G   868K  /tmp/altroot/var/spool
rpool/ROOT/ubuntu_v0hpws/var/www                   192K   484G   192K  /tmp/altroot/var/www
rpool/USERDATA                                     383G   484G   192K  none
rpool/USERDATA/home_dz7uxs                         383G   484G   383G  /tmp/altroot/home
rpool/USERDATA/root_dz7uxs                        27.2M   484G  27.2M  /tmp/altroot/root
rpool/keystore                                    38.8M   484G  16.5M  -
rpool/var                                         1.98M   484G   192K  /tmp/altroot/var
rpool/var/lib                                     1.79M   484G   192K  /tmp/altroot/var/lib
rpool/var/lib/docker                              1.61M   484G  1.61M  /tmp/altroot/var/lib/docker
kubuntu@kubuntu:~$ sudo cryptsetup open /dev/zvol/rpool/keystore zfskey
Enter passphrase for /dev/zvol/rpool/keystore: 
kubuntu@kubuntu:~$ sudo cat /media/kubuntu/keystore-rpool/system.key | sudo zfs load-key -L prompt rpool
kubuntu@kubuntu:~$ sudo zfs mount -a
kubuntu@kubuntu:~$ mount | grep zfs | sort
/dev/mapper/zfskey on /media/kubuntu/keystore-rpool type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,stripe=8192,uhelper=udisks2)
rpool/ROOT/ubuntu_v0hpws on /tmp/altroot type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/srv on /tmp/altroot/srv type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/usr/local on /tmp/altroot/usr/local type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/games on /tmp/altroot/var/games type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/lib on /tmp/altroot/var/lib type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/lib/AccountsService on /tmp/altroot/var/lib/AccountsService type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/lib/NetworkManager on /tmp/altroot/var/lib/NetworkManager type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/lib/apt on /tmp/altroot/var/lib/apt type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/lib/dpkg on /tmp/altroot/var/lib/dpkg type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/log on /tmp/altroot/var/log type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/mail on /tmp/altroot/var/mail type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/snap on /tmp/altroot/var/snap type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/spool on /tmp/altroot/var/spool type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/ROOT/ubuntu_v0hpws/var/www on /tmp/altroot/var/www type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/USERDATA/home_dz7uxs on /tmp/altroot/home type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/USERDATA/root_dz7uxs on /tmp/altroot/root type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
rpool/var/lib/docker on /tmp/altroot/var/lib/docker type zfs (rw,nodev,relatime,xattr,posixacl,casesensitive)
kubuntu@kubuntu:~$ ls -hl /tmp/altroot/home/grahamperrin/Desktop/2025-09-*
-rw-rw-r-- 1 kubuntu kubuntu 423K Sep  6 18:55 '/tmp/altroot/home/grahamperrin/Desktop/2025-09-06 20-37 pkg issue 2475, 257 candidates, success.txt'
-rw-rw-r-- 1 kubuntu kubuntu  19K Sep  7 12:51  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-07 13- killing at 552 of 1309 (discount) during a major upgrade with 1 GB memory.png'
-rw-rw-r-- 1 kubuntu kubuntu 129K Sep 16 21:30  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-16 22-29 KDE Plasma, FreeBSD 16.0-CURRENT.png'
-rw-rw-r-- 1 kubuntu kubuntu  39K Sep 17 04:46  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-17 05-44 FreeBSD 15.0-ALPHA2 zpool scrub of a read-only pool.png'
-rw-rw-r-- 1 kubuntu kubuntu  90K Sep 17 05:29  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-17 06-29 Phoronix, unable to type a comment.png'
-rw-rw-r-- 1 kubuntu kubuntu 125K Sep 17 22:04  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-17 got on FreeBSD 15.0-ALPHA2 requires libretls.png'
-rw-rw-r-- 1 kubuntu kubuntu 712K Sep 20 13:30  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-20 14-27 Firefox, pkgbase.png'
-rw-rw-r-- 1 kubuntu kubuntu  59K Sep 20 13:43  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-20 14-42 Firefox bars.png'
-rw-rw-r-- 1 kubuntu kubuntu 3.0M Sep 21 06:48  /tmp/altroot/home/grahamperrin/Desktop/2025-09-21.06-21.typescript.txt
-rw-rw-r-- 1 kubuntu kubuntu  93K Sep 22 04:43 '/tmp/altroot/home/grahamperrin/Desktop/2025-09-22 05-38 pkg issue 2522 comment 3316711750 tail of typescript.txt'
-rw-rw-r-- 1 kubuntu kubuntu  69K Sep 22 20:43  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-22 21-21 ALPHA3 userland upgrade failed.png'
-rw-rw-r-- 1 kubuntu kubuntu  44K Sep 22 20:50  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-22 21-50 single user mode broken.png'
-rw-rw-r-- 1 kubuntu kubuntu  73K Sep 27 13:50  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-27 14-49 ignorant troublemaker.png'
-rw-rw-r-- 1 kubuntu kubuntu  54K Sep 27 23:58  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-28 00-58 118 to be removed.png'
-rw-rw-r-- 1 kubuntu kubuntu  55K Sep 28 00:00  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-28 01-00 proceeding.png'
-rw-rw-r-- 1 kubuntu kubuntu  69K Sep 28 00:16  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-28 01-15 -uY after upgrading the kernel alone.png'
-rw-rw-r-- 1 kubuntu kubuntu 320K Sep 28 10:30  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-28 11-30 swap off, reinstallation failed.png'
-rw-rw-r-- 1 kubuntu kubuntu  11K Sep 28 01:33  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-28 ALPHA4, base, the complete base.png'
-rw-rw-r-- 1 kubuntu kubuntu  30K Sep 28 05:46  '/tmp/altroot/home/grahamperrin/Desktop/2025-09-28-06-40 15.0-ALPHA4 REPOS_DIR.png'
kubuntu@kubuntu:~$ zpool export rpool
cannot unmount '/tmp/altroot/var/www': permission denied
kubuntu@kubuntu:~$ sudo zpool export rpool
^T^C

The tail:

kubuntu@kubuntu:~$ sudo zpool export rpool
^T^C
  • no response to Control-T or Control-C.

In a separate Konsole tab:

kubuntu@kubuntu:~$ sudo lsof /tmp/altroot
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
      Output information may be incomplete.
kubuntu@kubuntu:~$ sudo lsof /tmp/altroot
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
      Output information may be incomplete.
kubuntu@kubuntu:~$ mount | grep zfs
/dev/mapper/zfskey on /media/kubuntu/keystore-rpool type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,stripe=8192,uhelper=udisks2)
kubuntu@kubuntu:~$ zpool status -v
  pool: rpool
 state: ONLINE
  scan: scrub repaired 0B in 00:18:38 with 0 errors on Sat Oct 11 23:42:41 2025
config:

        NAME                            STATE     READ WRITE CKSUM
        rpool                           ONLINE       0     0     0
          wwn-0x5002538f42b2daed-part4  ONLINE       0     0     0

errors: No known data errors
kubuntu@kubuntu:~$ 

Glad it worked for you. I have a problem with ssh unfortunately.