From c642a6984d4961256f50ca5133d1eec5ca1af4e9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 7 Nov 2020 00:20:49 -0500 Subject: [PATCH 2/2] image: Only attempt bootloader installation when supported. Fixes . The initialize-root-partition in (guix build image) attempts to install a bootloader when BOOTLOADER-INSTALLER is defined. Unfortunately, it relies on a special #f value for the second argument (device), which only the INSTALL-GRUB procedure from (gnu bootloader grub) supports. * gnu/system/image.scm (system-disk-image): Only pass the bootloader installer argument when the bootloader name is 'grub. Add comment. --- gnu/system/image.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 4075a26552..d4932466e5 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -345,8 +345,16 @@ used in the image." #:grub-efi #+grub-efi #:bootloader-package #+(bootloader-package bootloader) + ;; Special case: most bootloaders can be copied + ;; directly at some fixed location on the image + ;; disk, but when installed to the master boot + ;; record (MBR), GRUB requires support files + ;; present under /boot/grub, which is handled by + ;; its 'installer' procedure. #:bootloader-installer - #+(bootloader-installer bootloader) + #+(if (eq? 'grub (bootloader-name bootloader)) + (bootloader-installer bootloader) + #f) #:bootcfg #$bootcfg #:bootcfg-location #$(bootloader-configuration-file bootloader)) -- 2.28.0