mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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>
This commit is contained in:
parent
52d780ea2b
commit
1fc20e4c86
1 changed files with 42 additions and 29 deletions
|
@ -374,8 +374,11 @@ when booting a root file system on a Btrfs subvolume."
|
||||||
(let ((label (menu-entry-label entry))
|
(let ((label (menu-entry-label entry))
|
||||||
(linux (menu-entry-linux entry))
|
(linux (menu-entry-linux entry))
|
||||||
(device (menu-entry-device entry))
|
(device (menu-entry-device entry))
|
||||||
(device-mount-point (menu-entry-device-mount-point entry)))
|
(device-mount-point (menu-entry-device-mount-point entry))
|
||||||
(if linux
|
(multiboot-kernel (menu-entry-multiboot-kernel entry))
|
||||||
|
(chain-loader (menu-entry-chain-loader entry)))
|
||||||
|
(cond
|
||||||
|
(linux
|
||||||
(let ((arguments (menu-entry-linux-arguments entry))
|
(let ((arguments (menu-entry-linux-arguments entry))
|
||||||
(linux (normalize-file linux
|
(linux (normalize-file linux
|
||||||
device-mount-point
|
device-mount-point
|
||||||
|
@ -398,7 +401,8 @@ when booting a root file system on a Btrfs subvolume."
|
||||||
#$label
|
#$label
|
||||||
#$(grub-root-search device linux)
|
#$(grub-root-search device linux)
|
||||||
#$linux (string-join (list #$@arguments))
|
#$linux (string-join (list #$@arguments))
|
||||||
#$initrd))
|
#$initrd)))
|
||||||
|
(multiboot-kernel
|
||||||
(let ((kernel (menu-entry-multiboot-kernel entry))
|
(let ((kernel (menu-entry-multiboot-kernel entry))
|
||||||
(arguments (menu-entry-multiboot-arguments entry))
|
(arguments (menu-entry-multiboot-arguments entry))
|
||||||
(modules (menu-entry-multiboot-modules entry))
|
(modules (menu-entry-multiboot-modules entry))
|
||||||
|
@ -411,7 +415,16 @@ menuentry ~s {
|
||||||
#$kernel
|
#$kernel
|
||||||
#$root-index (string-join (list #$@arguments) " " 'prefix)
|
#$root-index (string-join (list #$@arguments) " " 'prefix)
|
||||||
(string-join (map string-join '#$modules)
|
(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-devices)
|
||||||
(define (crypto-device->cryptomount dev)
|
(define (crypto-device->cryptomount dev)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue