Hello Guixers !

I am adding some `menu-entries` to my bootloader-configuration.

>From `$ info "(guix)Bootloader Configuration"`
     ‘device’ (default: ‘#f’)
          The device where the kernel and initrd are to be found—i.e.,
          for GRUB, “root” for this menu entry (*note (grub)root::).

          This may be a file system label (a string), a file system UUID
          (a bytevector, *note File Systems::), or ‘#f’, in which case
          the bootloader will search the device containing the file
          specified by the ‘linux’ field (*note (grub)search::).  It
          must _not_ be an OS device name such as ‘/dev/sda1’.

My problem is that `device` (or no device at all) does not seem to
work as expected. Whatever the `device`, guix produces an identical
`search --file…` grub menuentry.

Attached are 3 configuration test entries and their resulting
`menuentry` in grub.cfg. Not sure how to produce a "bytevector"
for the UUID though, but at least the test with a label (literal
string) should produce something like :

  "search --label --set debian-stable"

Correct ? Or do I miss something ?!

Thanks for you time !
(menu-entries (list
  (menu-entry
    (label "TEST LABEL")
    (device "debian-stable")
    (linux "/boot/vmlinuz-4.19.0-14-amd64")
    (linux-arguments '("root=UUID=2b5cc508-e2ea-4c43-a1c4-2532553af654 ro 
quiet"))
    (initrd "/boot/initrd.img-4.19.0-14-amd64"))
  (menu-entry
    (label "TEST UUID")
    (device "2b5cc508-e2ea-4c43-a1c4-2532553af654")
    (linux "/boot/vmlinuz-4.19.0-14-amd64")
    (linux-arguments '("root=UUID=2b5cc508-e2ea-4c43-a1c4-2532553af654 ro 
quiet"))
    (initrd "/boot/initrd.img-4.19.0-14-amd64"))
  (menu-entry
    (label "TEST NO DEVICE")
    (linux "/boot/vmlinuz-4.19.0-14-amd64")
    (linux-arguments '("root=UUID=2b5cc508-e2ea-4c43-a1c4-2532553af654 ro 
single"))
    (initrd "/boot/initrd.img-4.19.0-14-amd64"))))
menuentry "TEST LABEL" {
  search --file --set /boot/vmlinuz-4.19.0-14-amd64
  linux /boot/vmlinuz-4.19.0-14-amd64 
root=UUID=2b5cc508-e2ea-4c43-a1c4-2532553af654 ro quiet
  initrd /boot/initrd.img-4.19.0-14-amd64
}
menuentry "TEST UUID" {
  search --file --set /boot/vmlinuz-4.19.0-14-amd64
  linux /boot/vmlinuz-4.19.0-14-amd64 
root=UUID=2b5cc508-e2ea-4c43-a1c4-2532553af654 ro quiet
  initrd /boot/initrd.img-4.19.0-14-amd64
}
menuentry "TEST NO DEVICE" {
  search --file --set /boot/vmlinuz-4.19.0-14-amd64
  linux /boot/vmlinuz-4.19.0-14-amd64 
root=UUID=2b5cc508-e2ea-4c43-a1c4-2532553af654 ro single
  initrd /boot/initrd.img-4.19.0-14-amd64
}

Reply via email to