Debian 13 “Trixie” has updated the minimum /boot
size to 768MiB. This laptop was installed with a /boot
of only 488MiB — just enough to upgrade to Trixie, but likely to cause issues in the future. Unfortunately, an encrypted LVM partition is directly adjacent to the /boot
partition, so we cannot simply resize it. Instead, we’ll recreate both partitions. Thanks to the magic of LVM, we’ll do this live and in place.
This process should be safe, but I have a backup in place using the excellent Relax and Recover.
We will attach an external drive (/dev/sdb
) to the volume group, move the logical volumes to it, repartition the internal drive (/dev/sda
), and then move everything back.
Step 1 — Prepare the External Drive
We’ll use an external disk (/dev/sdb
) as a temporary storage location.
- Wipe and partition the disk:
Wipe existing signatures:
wipefs -a /dev/sdb
Then usegpart
(or another partitioning tool) to create a single partition large enough to hold all the data from the LVM volumes you’ll move. - Encrypt the new partition:
cryptsetup luksFormat /dev/sdb1
- Open the encrypted partition:
cryptsetup luksOpen /dev/sdb1 sdb1_crypt
- Mark for LVM and add to VG:
pvcreate /dev/mapper/sdb1_crypt
vgextend laptop-vg /dev/mapper/sdb1_crypt
Step 2 — Move Data to the External Drive
Run the following to move all data off the internal encrypted volume:
pvmove --autobackup y --atomic /dev/mapper/sda3_crypt
If the volume group becomes inconsistent, re-add sda3_crypt
and clean it up:
cryptsetup luksOpen /dev/sda3 sda3_crypt
vgck --updatemetadata laptop-vg
vgreduce laptop-vg /dev/mapper/sda3_crypt
Step 3 — Resize /boot
- Unmount
/boot/efi
:umount /boot/efi
- Backup
/boot
:tar -cavf /boot.tar.xz /boot
- Unmount
/boot
:umount /boot
- Delete and recreate
/dev/sda2
as a 1GiB partition usinggpart
, then reload the partition table:partprobe /dev/sda
- Run
fsck /dev/sda2
andresize2fs /dev/sda2
Step 4 — Recreate the Encrypted Volume
- Create the partition using
gpart
, then reload the partition table:partprobe /dev/sda
- Encrypt the partition:
cryptsetup luksFormat /dev/sda3
- Open it:
cryptsetup luksOpen /dev/sda3 sda3_crypt
- Mark for LVM:
pvcreate /dev/mapper/sda3_crypt
- Add to VG:
vgextend laptop-vg /dev/mapper/sda3_crypt
- Move data back:
pvmove --autobackup y --atomic /dev/mapper/sdb1_crypt
- Remove temporary disk:
vgreduce laptop-vg /dev/mapper/sdb1_crypt
Step 5 — Update Configuration
- Get the new UUID:
lsblk --nodeps --noheadings -o uuid /dev/sda3
- Edit
/etc/crypttab
with the new UUID - Update initramfs:
update-initramfs -k all -u
- Mount
/boot
and/boot/efi
:mount /boot && mount /boot/efi
- Reboot and fix any unexpected issues