From ef653f5cbee72874788891f7944fc559c18c696c Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 29 Nov 2018 15:29:59 -0800 Subject: [PATCH] Fix non-bootable Arch images --- mkosi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mkosi b/mkosi index dca365eb2..fdb4bb728 100755 --- a/mkosi +++ b/mkosi @@ -1626,12 +1626,13 @@ SigLevel = Required DatabaseOptional # Set up system with packages from the base group run_pacstrap(packages) - # Patch mkinitcpio configuration so: 1) we remove autodetect and - # 2) we add the modules needed for encrypt. - patch_file(os.path.join(workspace, "root", "etc/mkinitcpio.conf"), - lambda line: "HOOKS=\"systemd modconf block sd-encrypt filesystems keyboard fsck\"\n" if line.startswith("HOOKS=") and args.encrypt == "all" else - "HOOKS=\"systemd modconf block filesystems fsck\"\n" if line.startswith("HOOKS=") else - line) + if args.bootable: + # Patch mkinitcpio configuration so: 1) we remove autodetect and + # 2) we add the modules needed for encrypt. + patch_file(os.path.join(workspace, "root", "etc/mkinitcpio.conf"), + lambda line: "HOOKS=\"systemd modconf block sd-encrypt filesystems keyboard fsck\"\n" if line.startswith("HOOKS=") and args.encrypt == "all" else + "HOOKS=\"systemd modconf block filesystems fsck\"\n" if line.startswith("HOOKS=") else + line) # Install the user-specified packages and kernel packages = set(args.packages) -- 2.47.2