From: Lucas De Marchi Date: Thu, 29 Nov 2018 23:29:59 +0000 (-0800) Subject: Fix non-bootable Arch images X-Git-Tag: v5~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F298%2Fhead;p=thirdparty%2Fmkosi.git Fix non-bootable Arch images --- 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)