Skip to content

LVM on LUKS not working #3499

@elendi1

Description

@elendi1

Which ISO version are you using?

2025-05-01

The installation log

[2025-05-23 16:45:44] - DEBUG - Unmounting all existing partitions: /dev/nvme0n1
[2025-05-23 16:45:44] - DEBUG - Unmounting: /dev/nvme0n1p1
[2025-05-23 16:45:44] - DEBUG - Unmounting: /dev/nvme0n1p2
[2025-05-23 16:45:44] - INFO - Wiping partitions and metadata: /dev/nvme0n1
[2025-05-23 16:45:44] - INFO - Creating partitions: /dev/nvme0n1
[2025-05-23 16:45:44] - DEBUG - 	Type: primary
[2025-05-23 16:45:44] - DEBUG - 	Filesystem: fat32
[2025-05-23 16:45:44] - DEBUG - 	Geometry: 2048 start sector, 2097152 length
[2025-05-23 16:45:44] - DEBUG - 	Type: primary
[2025-05-23 16:45:44] - DEBUG - 	Filesystem: ext4
[2025-05-23 16:45:44] - DEBUG - 	Geometry: 2099200 start sector, 998113280 length
[2025-05-23 16:45:44] - DEBUG - Formatting boot partition: /dev/nvme0n1p1
[2025-05-23 16:45:44] - DEBUG - Formatting filesystem: mkfs.fat -F 32 /dev/nvme0n1p1
[2025-05-23 16:45:45] - DEBUG - partition information found: {"name":"nvme0n1p1","path":"/dev/nvme0n1p1","pkname":"nvme0n1","log_sec":512,"size":"1024 MiB","pttype":"gpt","ptuuid":"9e8d7140-196b-4e9f-ba46-be8634e3a883","rota":false,"tran":"nvme","partn":1,"partuuid":"14c6bbac-5dd9-496a-b59b-94bbb935d1bb","parttype":"c12a7328-f81f-11d2-ba4b-00a0c93ec93b","uuid":"6390-4590","fstype":"vfat","fsver":"FAT32","fsavail":null,"fsuse_percentage":null,"type":"part","mountpoint":null,"mountpoints":[],"fsroots":[],"children":[]}
[2025-05-23 16:45:45] - INFO - Setting up LVM config...
[2025-05-23 16:45:45] - DEBUG - Luks2 encrypting: /dev/nvme0n1p2
[2025-05-23 16:45:45] - DEBUG - cryptsetup format: cryptsetup --batch-mode --verbose --type luks2 --pbkdf argon2id --hash sha512 --key-size 512 --iter-time 10000 --use-urandom luksFormat /dev/nvme0n1p2
[2025-05-23 16:46:15] - DEBUG - cryptsetup luksFormat output: Key slot 0 created.
Command successful.
[2025-05-23 16:46:15] - DEBUG - Unlocking luks2 device: /dev/nvme0n1p2
[2025-05-23 16:46:25] - DEBUG - cryptsetup open output: 
[2025-05-23 16:46:25] - ERROR - Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/archinstall/__init__.py", line 98, in run_as_a_module
    rc = main()
  File "/usr/lib/python3.13/site-packages/archinstall/__init__.py", line 88, in main
    importlib.import_module(mod_name)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/lib/python3.13/site-packages/archinstall/scripts/guided.py", line 196, in <module>
    guided()
    ~~~~~~^^
  File "/usr/lib/python3.13/site-packages/archinstall/scripts/guided.py", line 191, in guided
    fs_handler.perform_filesystem_operations()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/filesystem.py", line 75, in perform_filesystem_operations
    self.perform_lvm_operations()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/filesystem.py", line 145, in perform_lvm_operations
    self._setup_lvm_encrypted(
    ~~~~~~~~~~~~~~~~~~~~~~~~~^
    	self._disk_config.lvm_config,
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    	self._enc_config,
     ^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/filesystem.py", line 157, in _setup_lvm_encrypted
    self._setup_lvm(lvm_config, enc_mods)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/filesystem.py", line 187, in _setup_lvm
    self._lvm_create_pvs(lvm_config, enc_mods)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/filesystem.py", line 257, in _lvm_create_pvs
    pv_paths |= self._get_all_pv_dev_paths(vg.pvs, enc_mods)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/archinstall/lib/disk/filesystem.py", line 273, in _get_all_pv_dev_paths
    pv_paths.add(pv.safe_dev_path)
                 ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/archinstall/lib/models/device_model.py", line 883, in safe_dev_path
    raise ValueError("Device path was not set")
ValueError: Device path was not set

[2025-05-23 16:46:25] - WARNING - Archinstall experienced the above error. If you think this is a bug, please report it to
https://github.com/archlinux/archinstall and include the log file "/var/log/archinstall/install.log".

Hint: To extract the log from a live ISO 
curl -F'file=@/var/log/archinstall/install.log' https://0x0.st

describe the problem

I am trying an archinstall with lvm on luks following these steps. However it fails with the provided log (don't know if I'm selecting something wrong).

Steps to reproduce:

  1. Disk configuration -> Partitioning -> Use a best effort default partition layout -> I select my SSD drive -> I answer no to the question about creating a separate home
  2. Disk configuration -> LVM -> Default Layout -> ext4
  3. Disk encryption -> Encryption Type -> LVM on LUKS
  4. Disk encryption -> Encryption Password -> I set my encryption password
  5. Disk encryption -> Partitions -> I select the root partition (the only available)

The configuration works as expected with LVM only (only steps 1 and 2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions