GNU bug report logs -
#27007
'menu-entry' disappeared from the bootloader API
Previous Next
Reported by: Tomáš Čech <sleep_walker <at> gnu.org>
Date: Sat, 20 May 2017 20:01:02 UTC
Severity: important
Done: Mathieu Othacehe <m.othacehe <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #86 received at 27007 <at> debbugs.gnu.org (full text, mbox):
Hi Mathieu,
Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:
> * gnu/bootloader.scm (<menu-entry>): New variable. Export associated getters,
> This record is extracted from grub module.
> * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Use
> menu-entry->boot-parameters to convert menu-entry records to
> boot-parameters.
> * gnu/bootloader/grub.scm (<menu-entry>): Remove.
> (boot-parameters->menu-entry): Remove.
> (grub-configuration-file): Use boot-parameters to create configuration
> entries.
> * gnu/system.scm (menu-entry->boot-parameters): New exported procedure.
Overall LGTM. Some comments and questions:
> +(define-record-type* <menu-entry>
> + menu-entry make-menu-entry
> + menu-entry?
> + (label menu-entry-label)
> + (device menu-entry-device ; file system uuid, label, or #f
> + (default #f))
> + (device-mount-point menu-entry-device-mount-point
> + (default "/"))
> + (linux menu-entry-linux)
> + (linux-arguments menu-entry-linux-arguments
> + (default '())) ; list of string-valued gexps
> + (initrd menu-entry-initrd)) ; file name of the initrd as a gexp
Do we still need ‘device-mount-point’ now? For the dual-boot use case,
I don’t see how this would be used.
> +(define (menu-entry->boot-parameters menu-entry)
> + "Convert a <menu-entry> instance to a corresponding <boot-parameters>."
> + (boot-parameters
> + (label (menu-entry-label menu-entry))
> + (root-device #f)
> + (boot-name 'custom)
> + (store-device (menu-entry-device menu-entry))
> + (store-mount-point (menu-entry-device-mount-point menu-entry))
> + (kernel (menu-entry-linux menu-entry))
> + (kernel-arguments (menu-entry-linux-arguments menu-entry))
> + (initrd (menu-entry-initrd menu-entry))))
It’s weird to set ‘store-device’ and ‘store-mount-point’ here since
there’s no store (at least when defining a menu entry for another distro
or OS). Should we set them to #f?
BTW, this is unrelated to this patch series, but I think ‘boot-name’
should be renamed to ‘bootloader-name’ since that’s what it is.
Thank you for working on this!
Ludo’.
This bug report was last modified 8 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.