[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian-10.6.0-amd64 cryptsetup: Waiting for encrypted source device sdb2_crypt



On Sat, 28 Nov 2020 at 17:39, David <bouncingcats@gmail.com> wrote:
> On Sat, 28 Nov 2020 at 16:22, David Christensen <dpchrist@holgerdanske.com> wrote:

> What you need to do is get the system up and running in the
> configuration you want, by handling the timeouts and running
> 'cryptsetup open' (with whatever <names> and devices you
> like to use) in busybox, as you described doing.

I checked some of my notes (my situation was different) and I may
have mis-remembered and perhaps given bad advice.
I don't know if cryptsetup can be run at that point in busybox.

I did reach the goals you want, but I don't exactly recall enough to
provide you a detailed method.

> Once the system is up and running in the configuration you
> want, make sure the same <names> and any device specifications
> you like are used in /etc/crypttab. The rootfs device must also be
> correct in /etc/fstab.
>
> Then, run update-initramfs whose scripts will read those two files
> and should update your initramfs with appropriate 'cryptsetup open'
> commands and arguments so that things work properly at the next boot.

I am sure about this:
A crypt device mapping <name> cannot be changed when the device is
open (and therefore cannot be changed from any OS inside it).

So you need a separate rescue environment that has cryptsetup available.
If you don't attempt to change the crypt device <name>, then
it might be possible to just 'cryptsetup open' it in some rescue environment
and then fix the devices as I described, but not changing the names.
You might also need to chroot, see next paragraph.
Also the rescue environment needs to use the same kernel.

My notes tell me that to successfully change the <name>, I needed to
do all that, plus chroot into the crypt device before running
'update-initramfs'.
I don't have time to spend figuring out a recipe solution for you, but hopefully
these clues help if you are interested in finding your own way towards
a solution.


Reply to: