Comment 23 for bug 2058511

Revision history for this message
Matt Borgerson (mborgerson) wrote (last edit ):

I also wanted to preserve some existing partitions (namely EFI/Windows) while replacing an older Ubuntu 22.04 LUKS setup. Since I could not find a way to get the installer to recognize the unlocked partition, I just installed to an unencrypted partition and migrated the installed filesystem into a new encrypted partition.

Basically: launch the installer, before continuing in the installer use the Disks utility to replace your encrypted partition with an EXT4 filesystem, select it as the root mount point during manual setup and continue installation normally.

Reboot to confirm installation success.

Reboot into the live installer once again. Mount the install partition and copy the installed filesystem contents out to /tmp/rootfs (via rsync -aXHAS /mnt /tmp/rootfs). Then unmount and use the Disks utility again to create your preferred encrypted partition setup, mount it and copy the filesystem contents back in. Finally, chroot into the filesystem, install cryptsetup, create an /etc/crypttab, update /etc/fstab, then run update-initramfs and update-grub. Once rebooting you should have a new Ubuntu 24.04 install on an encrypted partition along side your other, untouched partitions on the disk.

Hope this helps.