system: Adjust 'grub.cfg' to work on systems with a separate /boot.
Fixes <http://bugs.gnu.org/19220>. Reported by Nikita Karetnikov <nikita@karetnikov.org>. * gnu/system/grub.scm (grub-configuration-file)[entry->gexp]: Add 'search --file --set'. (grub-configuration-file)[builder]: Remove 'search.file'.
This commit is contained in:
parent
5c5e7bdafd
commit
6c777cf88c
1 changed files with 6 additions and 8 deletions
|
|
@ -209,11 +209,14 @@ entries corresponding to old generations of the system."
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <menu-entry> label linux arguments initrd)
|
(($ <menu-entry> label linux arguments initrd)
|
||||||
#~(format port "menuentry ~s {
|
#~(format port "menuentry ~s {
|
||||||
|
# Set 'root' to the partition that contains the kernel.
|
||||||
|
search --file --set ~a/bzImage~%
|
||||||
|
|
||||||
linux ~a/bzImage ~a
|
linux ~a/bzImage ~a
|
||||||
initrd ~a
|
initrd ~a
|
||||||
}~%"
|
}~%"
|
||||||
#$label
|
#$label
|
||||||
#$linux (string-join (list #$@arguments))
|
#$linux #$linux (string-join (list #$@arguments))
|
||||||
#$initrd))))
|
#$initrd))))
|
||||||
|
|
||||||
(mlet %store-monad ((sugar (eye-candy config #~port)))
|
(mlet %store-monad ((sugar (eye-candy config #~port)))
|
||||||
|
|
@ -223,14 +226,9 @@ entries corresponding to old generations of the system."
|
||||||
#$sugar
|
#$sugar
|
||||||
(format port "
|
(format port "
|
||||||
set default=~a
|
set default=~a
|
||||||
set timeout=~a
|
set timeout=~a~%"
|
||||||
search.file ~a/bzImage~%"
|
|
||||||
#$(grub-configuration-default-entry config)
|
#$(grub-configuration-default-entry config)
|
||||||
#$(grub-configuration-timeout config)
|
#$(grub-configuration-timeout config))
|
||||||
#$(any (match-lambda
|
|
||||||
(($ <menu-entry> _ linux)
|
|
||||||
linux))
|
|
||||||
all-entries))
|
|
||||||
#$@(map entry->gexp all-entries)
|
#$@(map entry->gexp all-entries)
|
||||||
|
|
||||||
#$@(if (pair? old-entries)
|
#$@(if (pair? old-entries)
|
||||||
|
|
|
||||||
Reference in a new issue