Installation on existing encrypted volume with two LVM logical volumes inside

I’m new to Manjaro, but not to Linux in general (LFS/BLFS in past and many other fun projects).

I’m trying to install Manjaro on my framework laptop and move out of Ubuntu/Pop OS ecosystem. I have a pretty unusual disk partitioning:

$ sudo parted /dev/nvme0n1 print
Model: WDS500G3X0C-00SJG0 (nvme)
Disk /dev/nvme0n1: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      17.4kB  4819MB  4819MB  fat32           EFI   boot, esp
 3      4819MB  496GB   491GB
 4      496GB   500GB   4295MB  linux-swap(v1)        swap

The first partition is the boot one and the second is an encrypted volume with two LVM logical volumes inside for root / and /home.

After unlocking /dev/nvme0n1p3 with cryptsetup these two volumes are visible and mountable.

$ lsblk 
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0                                           7:0    0    71M  1 loop  /run/miso/sfs/livefs
loop1                                           7:1    0 583.3M  1 loop  /run/miso/sfs/mhwdfs
loop2                                           7:2    0   1.8G  1 loop  /run/miso/sfs/desktopfs
loop3                                           7:3    0 743.4M  1 loop  /run/miso/sfs/rootfs
sda                                             8:0    1     0B  0 disk  
sdb                                             8:16   1  14.8G  0 disk  /run/miso/bootmnt
├─sdb1                                          8:17   1   3.2G  0 part  
└─sdb2                                          8:18   1     4M  0 part  
nvme0n1                                       259:0    0 465.8G  0 disk  
├─nvme0n1p1                                   259:1    0   4.5G  0 part  
├─nvme0n1p3                                   259:2    0 457.3G  0 part  
│ └─luks-XXXXXXXX-XXXX-XXX-XXXX-XXXXXXXXXXXX  254:0    0 457.3G  0 crypt 
│   ├─data-root                               254:1    0    80G  0 lvm   
│   └─data-home                               254:2    0 377.3G  0 lvm   
└─nvme0n1p4                                   259:3    0     4G  0 par

I formatted both /dev/nvme0n1p1

$ sudo mkfs.fat -F 32 -n EFI /dev/nvme0n1p1

and /dev/data/root,

$ sudo mkfs.ext4 -L root /dev/data/root

because if I check format option in the installer it crashes just at the beginning with the message

The installer failed to format partition /dev/data/root on disk 'data'.
==========================================================================================
Create filesystem ext4 on partition ‘/dev/data/root’
==========================================================================================
==========================================================================================
Job: Delete file system on ‘/dev/data/root’
==========================================================================================
Command: mkfs.ext4 -qF /dev/data/root
==========================================================================================

When I tied to manually preformat partitions and just run installation, installer unpacks both images and installs all packages but failed with follow message:

Bootloader installation error
The bootloader could not be installed. The installation command 
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro --force
returned error code 1.

Any idea on how to work around this problem will be highly appreciated.

Calamares installer does not support LVM.

You should be able to work around it by doing a manual installation.

The topic has been discussed and various solutions has been suggested.

Please us the search function :mag:

2 Likes

@linux-aarhus, thank you for pointing out the existence of the search button. I actually searched before posting the question, but I couldn’t find a solution on the first 3-4 pages. But I thought the problem was in encrypted volume, not LVM, so your answer is (a bit spicy by) very helpful, thank you.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.