summaryrefslogtreecommitdiff
path: root/gnu/bootloader/extlinux.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2017-06-26 00:00:58 -0400
committerMark H Weaver <mhw@netris.org>2017-06-26 00:00:58 -0400
commited068b960eeedb92823238783779730319b8ba0e (patch)
tree36a4de280458d52520b911b2716eb5cea309fd78 /gnu/bootloader/extlinux.scm
parenta9308efec642bfbce480545a22fce848e6212456 (diff)
parentffc015bea26f24d862e7e877d907fbe1ab9a9967 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/bootloader/extlinux.scm')
-rw-r--r--gnu/bootloader/extlinux.scm20
1 files changed, 16 insertions, 4 deletions
diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm
index 0a1263aed..219b058e5 100644
--- a/gnu/bootloader/extlinux.scm
+++ b/gnu/bootloader/extlinux.scm
@@ -25,7 +25,8 @@
#:use-module (guix monads)
#:use-module (guix records)
#:use-module (guix utils)
- #:export (extlinux-bootloader))
+ #:export (extlinux-bootloader
+ extlinux-bootloader-gpt))
(define* (extlinux-configuration-file config entries
#:key
@@ -93,7 +94,7 @@ TIMEOUT ~a~%"
(string-append "if=" if)
(string-append "of=" of)))))
-(define install-extlinux
+(define (install-extlinux mbr)
#~(lambda (bootloader device mount-point)
(let ((extlinux (string-append bootloader "/sbin/extlinux"))
(install-dir (string-append mount-point "/boot/extlinux"))
@@ -103,9 +104,15 @@ TIMEOUT ~a~%"
(find-files syslinux-dir "\\.c32$"))
(unless (and (zero? (system* extlinux "--install" install-dir))
- (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device))
+ (#$dd 440 1 (string-append syslinux-dir "/" #$mbr) device))
(error "failed to install SYSLINUX")))))
+(define install-extlinux-mbr
+ (install-extlinux "mbr.bin"))
+
+(define install-extlinux-gpt
+ (install-extlinux "gptmbr.bin"))
+
;;;
@@ -116,6 +123,11 @@ TIMEOUT ~a~%"
(bootloader
(name 'extlinux)
(package syslinux)
- (installer install-extlinux)
+ (installer install-extlinux-mbr)
(configuration-file "/boot/extlinux/extlinux.conf")
(configuration-file-generator extlinux-configuration-file)))
+
+(define extlinux-bootloader-gpt
+ (bootloader
+ (inherit extlinux-bootloader)
+ (installer install-extlinux-gpt)))