From 7c88deedc8081f98b07180867db60fc43a154696 Mon Sep 17 00:00:00 2001 From: Philip Date: Sat, 30 Dec 2017 02:48:00 -0500 Subject: [PATCH] [initcpiocfg] add 'lvm2' hook as needed --- src/modules/initcpiocfg/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/initcpiocfg/main.py b/src/modules/initcpiocfg/main.py index f8620b516..d63e8d497 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"] == "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"])