diff --git a/src/modules/initcpiocfg/main.py b/src/modules/initcpiocfg/main.py index 051167d22..7df2ea9e3 100644 --- a/src/modules/initcpiocfg/main.py +++ b/src/modules/initcpiocfg/main.py @@ -100,6 +100,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point): cpu = cpuinfo() swap_uuid = "" btrfs = "" + lvm2 = "" hooks = ["base", "udev", "autodetect", "modconf", "block", "keyboard", "keymap"] modules = [] @@ -122,6 +123,9 @@ def modify_mkinitcpio_conf(partitions, root_mount_point): if partition["fs"].lower() == "btrfs": btrfs = "yes" + if partition["fs"] == "lvm2 pv": + lvm2 = "yes" + if partition["mountPoint"] == "/" and "luksMapperName" in partition: encrypt_hook = True @@ -137,6 +141,9 @@ def modify_mkinitcpio_conf(partitions, root_mount_point): ): files.append("/crypto_keyfile.bin") + if lvm2: + hooks.append("lvm2") + if swap_uuid != "": if encrypt_hook and openswap_hook: hooks.extend(["openswap"])