gnu: bootloader: grub: Add support for chain-loader.
* gnu/bootloader/grub.scm (grub-configuration-file): Add support for chain-loader. Signed-off-by: Julien Lepiller <julien@lepiller.eu>master
parent
52d780ea2b
commit
1fc20e4c86
|
@ -374,8 +374,11 @@ when booting a root file system on a Btrfs subvolume."
|
|||
(let ((label (menu-entry-label entry))
|
||||
(linux (menu-entry-linux entry))
|
||||
(device (menu-entry-device entry))
|
||||
(device-mount-point (menu-entry-device-mount-point entry)))
|
||||
(if linux
|
||||
(device-mount-point (menu-entry-device-mount-point entry))
|
||||
(multiboot-kernel (menu-entry-multiboot-kernel entry))
|
||||
(chain-loader (menu-entry-chain-loader entry)))
|
||||
(cond
|
||||
(linux
|
||||
(let ((arguments (menu-entry-linux-arguments entry))
|
||||
(linux (normalize-file linux
|
||||
device-mount-point
|
||||
|
@ -398,7 +401,8 @@ when booting a root file system on a Btrfs subvolume."
|
|||
#$label
|
||||
#$(grub-root-search device linux)
|
||||
#$linux (string-join (list #$@arguments))
|
||||
#$initrd))
|
||||
#$initrd)))
|
||||
(multiboot-kernel
|
||||
(let ((kernel (menu-entry-multiboot-kernel entry))
|
||||
(arguments (menu-entry-multiboot-arguments entry))
|
||||
(modules (menu-entry-multiboot-modules entry))
|
||||
|
@ -411,7 +415,16 @@ menuentry ~s {
|
|||
#$kernel
|
||||
#$root-index (string-join (list #$@arguments) " " 'prefix)
|
||||
(string-join (map string-join '#$modules)
|
||||
"\n module " 'prefix))))))
|
||||
"\n module " 'prefix))))
|
||||
(chain-loader
|
||||
#~(format port "
|
||||
menuentry ~s {
|
||||
~a
|
||||
chainloader ~a
|
||||
}~%"
|
||||
#$label
|
||||
#$(grub-root-search device chain-loader)
|
||||
#$chain-loader)))))
|
||||
|
||||
(define (crypto-devices)
|
||||
(define (crypto-device->cryptomount dev)
|
||||
|
|
Reference in New Issue