From 44d5f54e31039d78f156bd9562dca293124eaa76 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 9 Sep 2016 23:27:00 +0200 Subject: system: grub: Allow arbitrary kernel file names in 'menu-entry'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by Tomáš Čech . * gnu/system.scm (system-linux-image-file-name) (operating-system-kernel-file): New procedures. (operating-system-grub.cfg): Use 'operating-system-kernel-file' for the 'kernel' field of 'menu-entry'. (operating-system-parameters-file): Likewise for the 'kernel' entry. (read-boot-parameters): Adjust 'kernel' field so that it contains the absolute file name of the image. * gnu/system/grub.scm (grub-configuration-file)[linux-image-name]: Remove. [entry->gexp]: Assume LINUX is the absolute file name of the kernel image. * doc/guix.texi (GRUB Configuration): Add an example, and adjust 'kernel' field documentation accordingly. --- doc/guix.texi | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 6d3361878b..7ed8ee8130 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10622,9 +10622,23 @@ The @code{grub-theme} object describing the theme to use. @end deftp +@cindex dual boot +@cindex boot menu Should you want to list additional boot menu entries @i{via} the @code{menu-entries} field above, you will need to create them with the -@code{menu-entry} form: +@code{menu-entry} form. For example, imagine you want to be able to +boot another distro (hard to imagine!), you can define a menu entry +along these lines: + +@example +(menu-entry + (label "The Other Distro") + (linux "/boot/old/vmlinux-2.6.32") + (linux-arguments '("root=/dev/sda2")) + (initrd "/boot/old/initrd")) +@end example + +Details below. @deftp {Data Type} menu-entry The type of an entry in the GRUB boot menu. @@ -10635,7 +10649,11 @@ The type of an entry in the GRUB boot menu. The label to show in the menu---e.g., @code{"GNU"}. @item @code{linux} -The Linux kernel to boot. +The Linux kernel image to boot, for example: + +@example +(file-append linux-libre "/bzImage") +@end example @item @code{linux-arguments} (default: @code{()}) The list of extra Linux kernel command-line arguments---e.g., -- cgit 1.4.1