mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
system: image: Factor out testing for grub-efi bootloader.
* gnu/system/image.scm (system-disk-image)[partition-image]: When testing if a partition needs to be GPT formatted, factor out the test for an grub-efi based bootloader. (bootloader-uses-grub-efi?): New variable. Change-Id: I62de5962b1246dcec15f0851e58234497d1426d9
This commit is contained in:
parent
f8d9981bc0
commit
5df3514ab0
1 changed files with 6 additions and 2 deletions
|
|
@ -355,6 +355,11 @@ set to the given OS."
|
|||
"Return the index of the root partition of the given IMAGE."
|
||||
(1+ (srfi-1:list-index root-partition? (image-partitions image))))
|
||||
|
||||
(define (bootloader-uses-grub-efi? bootloader)
|
||||
"Return true if the bootloader-name contains grub-efi."
|
||||
(memq (bootloader-name bootloader)
|
||||
(list grub-efi grub-efi32 grub-efi-removable-bootloader)))
|
||||
|
||||
|
||||
;;
|
||||
;; Disk image.
|
||||
|
|
@ -547,8 +552,7 @@ used in the image."
|
|||
(image-partition-table-type image)))
|
||||
(else "")))
|
||||
|
||||
(when (and (memq (bootloader-name bootloader)
|
||||
'(grub-efi grub-efi32 grub-efi-removable-bootloader))
|
||||
(when (and (bootloader-uses-grub-efi? bootloader)
|
||||
(not
|
||||
(gpt-image? image)))
|
||||
(raise
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue