Subject: bug#27007: boot-parameters are not documented

From: [email-masked] (Ludovic Courtès)
Date: Tue, 23 May 2017 13:23:08 +0200

Hi,

Mathieu Othacehe <[email-masked]> skribis:

> We can ask him but I guess something like that :
>
> (boot-parameters
>   (label "openSUSE")
>   (root-device #f)
>   (boot-name 'grub)
>   (store-device #f)
>   (store-mount-point "/")
>   (kernel "(hd0,msdos1)/vmlinuz")
>   (kernel-arguments (list  "root=/dev/penguin/opensuse"  "init=/usr/lib/systemd/systemd"))
>   (initrd "(hd0,msdos1)/initrd"))
>
> Note that root-device, boot-name, store-device and store-mount-point are
> useless here.

I see.  The fact that there are these extra fields that are hard to
grasp as an external user of the API makes me thing that something
simpler like ‘menu-entry’ still makes sense for users.  (Of course
<boot-parameters> is the right thing to use internally, no argument
here.)

Concretely, I imagine the user-facing API would remain similar in
spirit; users would write

  (operating-system
    ;; …
    (bootloader (bootloader-configuration
                  ;; …
                  ;; Provide custom/extra menu entries here:
                  (entries (list (menu-entry …))))))

and those entries would be “lowered” to <boot-parameters> somewhere.
That way we’d provide the abstraction level that users may expect (“how
do I add a menu entry for my other distro?”) and at the same time reduce
the risk of mistakes (“I didn’t what to put in ‘store-device’ I put my
pet’s name there”).

WDYT?  :-)

>> Sounds good in general, as long as we have default values that make
>> sense.
>
> Ok.
>
>> Can we assume that all the bootloaders have a notion of “menu” and “menu
>> entries”?  Or do you think that very notion is not shared by all of
>> them?
>
> We can suppose that it's always possible to add custom entries to
> generated bootloader configuration. That would allow someone switching
> from grub to extlinux to keep his custom entries.

OK, sounds good.

Thanks,
Ludo’.