summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanneke Nieuwenhuizen <janneke@gnu.org>2023-05-23 16:03:53 +0200
committerJosselin Poiret <dev@jpoiret.xyz>2023-07-13 18:59:13 +0200
commitc22c29b0c4821ebe2c66a6c76562a41d33ff8392 (patch)
tree341d0d78a8ce6fd6edc900ac5a408427c366f2c6
parent7f86dad6115f9cc981a789c2c5ba0015206c5ee3 (diff)
bootloader: grub: Use rumpdisk-style root when booting with "noide".
* gnu/bootloader/grub.scm (make-grub-configuration): When "noide" is in arguments, use device name "wd0" rather than "hd0". Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
-rw-r--r--gnu/bootloader/grub.scm20
1 files changed, 13 insertions, 7 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index ecd44e7f3cc..5f3fcd7074c 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -3,7 +3,7 @@
3;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> 3;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
4;;; Copyright © 2017 Leo Famulari <leo@famulari.name> 4;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
5;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com> 5;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
6;;; Copyright © 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> 6;;; Copyright © 2019, 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
7;;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas <rosen644835@gmail.com> 7;;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas <rosen644835@gmail.com>
8;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> 8;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
9;;; Copyright © 2020 Stefan <stefan-guix@vodafonemail.de> 9;;; Copyright © 2020 Stefan <stefan-guix@vodafonemail.de>
@@ -404,17 +404,23 @@ when booting a root file system on a Btrfs subvolume."
404 #$linux (string-join (list #$@arguments)) 404 #$linux (string-join (list #$@arguments))
405 #$initrd))) 405 #$initrd)))
406 (multiboot-kernel 406 (multiboot-kernel
407 (let ((kernel (menu-entry-multiboot-kernel entry)) 407 (let* ((kernel (menu-entry-multiboot-kernel entry))
408 (arguments (menu-entry-multiboot-arguments entry)) 408 (arguments (menu-entry-multiboot-arguments entry))
409 (modules (menu-entry-multiboot-modules entry)) 409 ;; Choose between device names as understood by Mach's built-in
410 (root-index 1)) ; XXX EFI will need root-index 2 410 ;; IDE driver ("hdX") and those understood by rumpdisk ("wdX"
411 ;; in the "noide" case).
412 (disk (if (member "noide" arguments) "w" "h"))
413 (modules (menu-entry-multiboot-modules entry))
414 (root-index 1)) ; XXX EFI will need root-index 2
411 #~(format port " 415 #~(format port "
412menuentry ~s { 416menuentry ~s {
413 multiboot ~a root=device:hd0s~a~a~a 417 multiboot ~a root=part:~a:device:~ad0~a~a
414}~%" 418}~%"
415 #$label 419 #$label
416 #$kernel 420 #$kernel
417 #$root-index (string-join (list #$@arguments) " " 'prefix) 421 #$root-index
422 #$disk
423 (string-join (list #$@arguments) " " 'prefix)
418 (string-join (map string-join '#$modules) 424 (string-join (map string-join '#$modules)
419 "\n module " 'prefix)))) 425 "\n module " 'prefix))))
420 (chain-loader 426 (chain-loader