clearlinux / clr-installer

Clear Linux* OS Installer
GNU General Public License v3.0
92 stars 42 forks source link

Installer fails when root is on existing LVM on LUKS #765

Open edrex opened 2 years ago

edrex commented 2 years ago

I have an existing Arch install which I am trying to install alongside:

root@clr-live/home/clrlinux # lsblk
...
nvme0n1            259:0    0 476.9G  0 disk  
├─nvme0n1p1        259:1    0   350M  0 part  
└─nvme0n1p3        259:2    0 476.6G  0 part  
  └─vg0            252:0    0 476.6G  0 crypt 
    ├─vg0-CLR_SWAP 252:1    0     8G  0 lvm   
    ├─vg0-root     252:2    0   340G  0 lvm   
    └─vg0-CLR_ROOT 252:3    0 120.6G  0 lvm   

I know this isn't yet a fully supported storage layout, but it looks like it should work and I am willing to help troubleshoot.

The installer sees the magic labels CLR_[ROOT|SWAP|BOOT] and attempts to install, but fails after prompting for LUKS password+confirm on the console (which seems broken). It seems like it's trying to recreate the encryption:

2022/01/07 21:25:14 [DBG] partprobe /dev/nvme0n1
2022/01/07 21:25:14 [DBG] Using default shellProxy.DefaultGetProxyValue
2022/01/07 21:25:14 [DBG] [Previous line repeated 4 times]
2022/01/07 21:25:14 [DBG] cmd.Env: []
2022/01/07 21:25:18 [DBG] Skipping new file system for nvme0n1p1
2022/01/07 21:25:18 [DBG] Skipping new file system for nvme0n1p3
2022/01/07 21:25:18 [INF] Mapping vg0 partition to an encrypted partition
2022/01/07 21:25:18 [DBG] cryptsetup --batch-mode --hash=sha256 --cipher=aes-xts-plain64 --key-size=512 luksFormat /dev/mapper/vg0 -
2022/01/07 21:25:18 [DBG] Using default shellProxy.DefaultGetProxyValue
2022/01/07 21:25:18 [DBG] [Previous line repeated 4 times]
2022/01/07 21:25:18 [DBG] cmd.Env: []
2022/01/07 21:25:18 [DBG] Device /dev/mapper/vg0 is in use. Cannot proceed with format operation.
root@clr-live/home/clrlinux # clr-installer
Please report this crash using GitHub Issues:
https://github.com/clearlinux/clr-installer/issues

Include the following as attachments to enable diagnosis:
/root/pre-install-clr-installer.yaml
/root/clr-installer.log

You may need to remove any personal data of concern from the attachments.
The Installer will now exit.
exit status 1

Error Trace:
errors.Wrap()
     /builddir/build/BUILD/clr-installer-2.7.2/errors/errors.go:85
storage.(*BlockDevice).MapEncrypted()
     /builddir/build/BUILD/clr-installer-2.7.2/storage/encrypt.go:86

clr-installer.log pre-install-clr-installer.yaml.txt