create live USB
- download {ISO} and put it in a folder in Downloads
- download matching SHA256 checksum file and put it in a folder in Downloads
-
sha256sum path/to/{checksum_file}
-
lsblk # to find USB device and partition for ISO setup
-
sudo dd bs=4M if=/path/to/{ISO} of=/dev/{usb_partition} status=progress
plug in live USB and Librem key and boot from USB
find LUKS (crypto) partition
lsblk -f # will be /dev/nvme0n1p2 on Librem 14
verify that gpg finds Librem key
gpg --card-status
verify that pcscd is running
systemctl status pcscd
systemctl start pcscd
unlock LUKS partition with Librem key passphrase that you wrote down before
sudo cryptsetup luksOpen /dev/nvme0n1p2 <crypt_root>
when asked for passphrase, enter it
mount decrypted LUKS partition
sudo mount /dev/mapper/<crypt_root> /mnt
mount other required devices
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run
#change root into /mnt
sudo chroot /mnt
you are now in the LUKS as root
%
fix the system
in my case I had to reinstall two packages I had removed
sudo apt upgrade
sudo apt update
sudo apt install xdg-dektop-portal
sudo apt install xdg-desktop-portal-gtk
but this didn’t fix the problem, so I reinstalled all the related packages I could find
sudo apt reinstall [pureos-desktop-settings; pureos-flatpak-defaults; pureos-gnome; pureos-gnome-settings; gdm3]
that seemed to do it
after applying fixes; leave chroot env, cleanup, and reboot
leave chroot env
exit
unmount those five points
sudo umount -f /dev /mnt/dev
sudo umount -f /dev/pts /mnt/dev/pts
sudo umount -f /proc /mnt/proc
sudo umount -f /sys /mnt/sys
sudo umount -f /run /mnt/run
end
reboot
exercise caution when mucking around in chroot environment. apt should work fine, but when you look at the /home folders, the ownership will reflect the live USB environment and not the LUKS part. environment. You can edit other config files that are causing your specific problem.