LUKS, "no device found"

Ian Eure ian at retrospec.tv
Wed Jan 26 01:06:52 CET 2022


Maximilian Stein <m at steiny.biz> writes:

>>
>>    Using config file: 
>>    /var/lib/fai/config/disk_config/LVM_LUKS_EFI
>>    Executing: wipefs -af /dev/sda1
>>    Executing: wipefs -af /dev/sda2
>>    Executing: vgchange -a y vg1
>>    Executing: wipefs -af /dev/vg1/root
>>    Executing: lvremove -f /dev/vg1/root
>>    Executing: head -c 2047 /dev/urandom | od | tee 
>> /tmp/fai/crypt_dev_sda3
>>    Executing: vgchange -a n vg1
>>    Executing: vgremove vg1
>>    pvremove  /dev/mapper/crypt_dev_sda3
>>    (STDERR)   No device found for /dev/mapper/cyrpt_dev_sda3
>>    Command had non-zero exit code
>>
> Are you sure that cryptsetup is installed on your stick/cd/nfs 
> installer? The log output does not have any
>
Yes, it’s installed.  When it’s missing, setup-storage terminates 
before creating any partitions.

Basically no part of this output makes any sense to me.  It’s 
activating a vg here:

    Executing: vgchange -a y vg1

But it either hasn’t (or isn’t logging) the creation of the VG.

Then it deactivates and removes the VG:

    Executing: vgchange -a n vg1
    Executing: vgremove vg1

Then tries to remove the PV.

Is it trying to tear down the existent (broken) disk structure 
instead of overwriting it?  Otherwise, I don’t understand what 
it’s trying to do by removing the PV containing the LVs it’s 
supposed to install onto.


> Maybe you could also try to use the "Plain disk + LUKS + LVM2" 
> example 
> directly (i.e., with a legacy PC bootloader, maybe even in a 
> VM). I 
> think I once had this running in the past for testing.
>
I can give that a shot, but I’ll need some kind of EFI solution 
for this.


> For debugging setup-storage related issues I found it useful to 
> add the 
> "-d" option. After an installation has failed, you can just run 
> setup-storage manually from the command line or via SSH and 
> check the 
> contents of its internal lists of the actual and desired config.
>

Sorry for the dumb question, but where would I add the "-d" flag? 
I’m creating a CD image and booting it on the target machine using 
Ventoy on a USB stick.

  -- Ian


More information about the linux-fai mailing list