@@ -422,7 +422,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 mkrescue-sed-mode
+ 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
@@ -430,6 +431,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)))
@@ -482,9 +486,12 @@ GRUB configuration and OS-DRV as the stuff in it."
#x77777777)
16))
+ (setenv "MKRESCUE_SED_MODE" mkrescue-sed-mode)
(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"
@@ -164,6 +164,15 @@ libcdio.")
(base32
"0aq6lvlwlkxz56l5sbvgycr6j5c82ch2bv6zrnc2345ibfpafgx9"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-frontends
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (out-bin (string-append out "/bin")))
+ (install-file "frontend/grub-mkrescue-sed.sh" out-bin)
+ #t))))))
(inputs
`(("acl" ,acl)
("readline" ,readline)
@@ -259,7 +259,8 @@ made available under the /xchg CIFS share."
bootcfg-drv
bootloader
register-closures?
- (inputs '()))
+ (inputs '())
+ (mkrescue-sed-mode "original"))
"Return a bootable, stand-alone iso9660 image.
INPUTS is a list of inputs (as for packages)."
@@ -301,7 +302,9 @@ INPUTS is a list of inputs (as for packages)."
inputs)))
(set-path-environment-variable "PATH" '("bin" "sbin") inputs)
- (make-iso9660-image #$(bootloader-package bootloader)
+ (make-iso9660-image #$xorriso
+ #$mkrescue-sed-mode
+ #$(bootloader-package bootloader)
#$bootcfg-drv
#$os
"/xchg/guixsd.iso"
@@ -673,7 +676,8 @@ to USB sticks meant to be read-only."
#:bootloader (bootloader-configuration-bootloader
(operating-system-bootloader os))
#:inputs `(("system" ,os)
- ("bootcfg" ,bootcfg)))
+ ("bootcfg" ,bootcfg))
+ #:mkrescue-sed-mode "original")
(qemu-image #:name name
#:os os
#:bootcfg-drv bootcfg