diff options
author | Danny Milosavljevic <dannym@scratchpost.org> | 2019-05-18 17:49:05 +0200 |
---|---|---|
committer | Danny Milosavljevic <dannym@scratchpost.org> | 2019-05-18 18:35:37 +0200 |
commit | 1d86b05618a063378d7ffc89a9b4c33dd65a760c (patch) | |
tree | 1507fc79ed5a3966d0a9488da703985017664499 /gnu/build/vm.scm | |
parent | 08eafef8650922681bad10d9f5a3f92ff91616b6 (diff) |
vm: Create installation media with MBR and HFS only, no GPT.
* gnu/build/vm.scm (make-iso9660-image): Accept XORRISO,
GRUB-MKRESCUE-ENVIRONMENT.
* gnu/system/vm.scm (iso9660-image): Pass XORRISO; accept
GRUB-MKRESCUE-ENVIRONMENT.
(system-disk-image): Pass GRUB-MKRESCUE-ENVIRONMENT.
* gnu/packages/patches/xorriso-no-mbr-in-inner-efi.patch: New file.
* gnu/packages/patches/xorriso-no-partition-table-in-inner-efi.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/cdrom.scm (xorriso)[source]: Add patches.
[arguments]<#:phases>[install-frontends]:
Add phase.
Diffstat (limited to 'gnu/build/vm.scm')
-rw-r--r-- | gnu/build/vm.scm | 18 |
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" |