diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-12-05 23:41:30 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-12-05 23:41:30 +0100 |
commit | 77181815ae70cf573b6fa390a4400b718835aa8a (patch) | |
tree | 731ccaaccc7a69ddc90f04bb71a6a39aa5f3be5a /gnu/bootloader/extlinux.scm | |
parent | e3f9406b7c4b3b1afe3dd6affb7f7898434d607a (diff) | |
parent | 35377cfa908340e51fd22af7369aef15499d4a36 (diff) | |
download | patches-77181815ae70cf573b6fa390a4400b718835aa8a.tar patches-77181815ae70cf573b6fa390a4400b718835aa8a.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/bootloader/extlinux.scm')
-rw-r--r-- | gnu/bootloader/extlinux.scm | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm index e5fdeb5801..9b6e2c7f2a 100644 --- a/gnu/bootloader/extlinux.scm +++ b/gnu/bootloader/extlinux.scm @@ -53,7 +53,7 @@ corresponding to old generations of the system." APPEND ~a ~%" #$label #$label - #$kernel #$kernel #$initrd + #$kernel (dirname #$kernel) #$initrd (string-join (list #$@kernel-arguments))))) (define builder @@ -85,14 +85,6 @@ TIMEOUT ~a~%" ;;; Install procedures. ;;; -(define dd - #~(lambda (bs count if of) - (zero? (system* "dd" - (string-append "bs=" (number->string bs)) - (string-append "count=" (number->string count)) - (string-append "if=" if) - (string-append "of=" of))))) - (define (install-extlinux mbr) #~(lambda (bootloader device mount-point) (let ((extlinux (string-append bootloader "/sbin/extlinux")) @@ -101,9 +93,15 @@ TIMEOUT ~a~%" (for-each (lambda (file) (install-file file install-dir)) (find-files syslinux-dir "\\.c32$")) - - (unless (and (zero? (system* extlinux "--install" install-dir)) - (#$dd 440 1 (string-append syslinux-dir "/" #$mbr) device)) + (unless + (and (zero? (system* extlinux "--install" install-dir)) + (call-with-input-file (string-append syslinux-dir "/" #$mbr) + (lambda (input) + (let ((bv (get-bytevector-n input 440))) + (call-with-output-file device + (lambda (output) + (put-bytevector output bv)) + #:binary #t))))) (error "failed to install SYSLINUX"))))) (define install-extlinux-mbr |