The officially official Devuan Forum!

You are not logged in.

#1 2023-06-07 13:23:42

driver
Member
Registered: 2022-09-25
Posts: 9  

[SOLVED] locked out & chrooting into encrypted install, trying update-initramfs

Messed something up in the process of adding a keyfile to avoid an extra passphrase prompt and now I can only access my Chimaera install from a Live USB.

I need to undo the modifications by editing the modified /etc/crypttab , /etc/cryptsetup-initramfs/conf-hook , /etc/initramfs-tools/initramfs.conf and running update-initramfs via chroot on a live booted system.
I fail at the latter, getting the following warning:
cryptsetup: WARNING: target 'luks-a01-b02-c03-d04-e05' not found in /etc/crypttab

My encryption/partitioning scheme looks like this:

NAME                          TYPE
sda                           disk
└─sda1                        part
  └─luks-a01-b02-c03-d04-e05  crypt
    ├─devuan-rootvol          lvm
    └─devuan-swap             lvm

How do I mount things the right way?

Last edited by driver (2023-06-07 13:28:08)

Offline

#2 2023-06-07 13:50:22

rolfie
Member
Registered: 2017-11-25
Posts: 1,172  

Re: [SOLVED] locked out & chrooting into encrypted install, trying update-initramfs

You need to open the luks volume with the same name as listed in the crypttab. An easy way to get a chroot is to use the rescue mode of the install medium, the netinstall is sufficient.

Offline

#3 2023-06-07 14:43:53

driver
Member
Registered: 2022-09-25
Posts: 9  

Re: [SOLVED] locked out & chrooting into encrypted install, trying update-initramfs

solved

cryptsetup luksOpen /dev/sda1 sda1_crypt

mnt /dev/mapper/devuan-rootvol /mnt

for name in proc sys dev ; do mount --bind /$name /mnt/$name; done

chroot /mnt/ /bin/bash

update-initramfs -u -k all

Last edited by driver (2023-06-07 19:00:13)

Offline

Board footer