aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/vm.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-05-25 00:25:15 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-05-25 00:25:15 +0200
commit57df83e07d4b5e78d9a54c1a88d05b4a9ed65714 (patch)
tree76684e63965e9ad6e37d9d45bc3159e6c9782cd0 /gnu/build/vm.scm
parent43d9ed7792808638eabb43aa6133f1d6186c520b (diff)
parent136b7d81f0eb713783e9ea7cf7f260a2b6252dfd (diff)
downloadpatches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar
patches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar.gz
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/build/vm.scm')
-rw-r--r--gnu/build/vm.scm18
1 files changed, 16 insertions, 2 deletions
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index ac99d6b1a3..a5d9fefa62 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -423,7 +423,8 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
;; Graft the configuration file onto the image.
(string-append "boot/grub/grub.cfg=" config-file))))
-(define* (make-iso9660-image grub config-file os-drv target
+(define* (make-iso9660-image xorriso grub-mkrescue-environment
+ grub config-file os-drv target
#:key (volume-id "Guix_image") (volume-uuid #f)
register-closures? (closures '()))
"Given a GRUB package, creates an iso image as TARGET, using CONFIG-FILE as
@@ -431,6 +432,9 @@ GRUB configuration and OS-DRV as the stuff in it."
(define grub-mkrescue
(string-append grub "/bin/grub-mkrescue"))
+ (define grub-mkrescue-sed.sh
+ (string-append xorriso "/bin/grub-mkrescue-sed.sh"))
+
(define target-store
(string-append "/tmp/root" (%store-directory)))
@@ -483,9 +487,19 @@ GRUB configuration and OS-DRV as the stuff in it."
#x77777777)
16))
+ (setenv "MKRESCUE_SED_MODE" "original")
+ (setenv "MKRESCUE_SED_XORRISO" (string-append xorriso
+ "/bin/xorriso"))
+ (setenv "MKRESCUE_SED_IN_EFI_NO_PT" "yes")
+ (for-each (match-lambda
+ ((name . value) (setenv name value)))
+ grub-mkrescue-environment)
+
(let ((pipe
(apply open-pipe* OPEN_WRITE
- grub-mkrescue "-o" target
+ grub-mkrescue
+ (string-append "--xorriso=" grub-mkrescue-sed.sh)
+ "-o" target
(string-append "boot/grub/grub.cfg=" config-file)
"etc=/tmp/root/etc"
"var=/tmp/root/var"