docs:tips_n_tricks:luks.html
Table of Contents
LUKS
Resize an encrypted LV managed by cryptsetup
While it is seems to be quiet obvious for most people 1) how to resize any stack of LUKS, ext2,3,4, LVM, MSDOS or GPT partitions, it becomes strange if you're using Ubuntus package cryptsetup 2)
~ # lvresize -L 22.5G /dev/vg_sys/lv_home ~ # cryptsetup resize home ~ # resize2fs /dev/mapper/home resize2fs 1.42.10 (18-May-2014) resize2fs: Device or resource busy while trying to open /dev/mapper/home Couldn't find valid filesystem superblock. ~ # mount | fgrep home /dev/mapper/home_unformatted on /home type ext3 (rw,relatime,data=ordered) ~ # resize2fs /dev/mapper/home_unformatted resize2fs 1.42.10 (18-May-2014) open: No such file or directory while opening /dev/mapper/home_unformatted ~ #
The remedy is simple:
dmsetup rename home home_unformatted resize2fs /dev/mapper/home_unformatted dmsetup rename home_unformatted home
Prepare for low memory systems
Get current memory need:
cryptsetup luksDump /dev/<device> | fgrep Memory
Set new memory need:
cryptsetup luksConvertKey --key-file /path/to/keyfile --pbkdf-memory=10240 /dev/<device>
References:
Gnome Keyring
Not exactly LUKS related, but shows up in the context
Reset LUKS password accidently stored "forever"
gnome-keyring-daemon -r
Reference:
Change default answer to LUKS password question (e.g.) in Thunar
Reference article seems to be out of date.
Reference
List all available secrets
Um .. aeh … really
apt install libsecret-1-dev git clone https://gitlab.com/GrantMoyer/lssecret.git cd lssecret make DESTDIR=/usr/local/lssecret make install ln -s ../lssecret/bin/lssecret /usr/local/bin lssecret -s
References:
docs/tips_n_tricks/luks.html.txt · Last modified: 21.08.2022 19:06 CEST by peter