all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How do I set kernel command line arguments for all bootloader menu entries?
@ 2024-07-22 20:18 Zack Weinberg
  2024-07-22 21:33 ` Tomas Volf
  0 siblings, 1 reply; 5+ messages in thread
From: Zack Weinberg @ 2024-07-22 20:18 UTC (permalink / raw)
  To: help-guix

Suppose I want to append "console=ttyS0,115200n8" to every GRUB
bootloader menu entry. I can't figure out how to do that with a
(bootloader-configuration) recipe.  The manual talks about writing
*extra* menu entries, but not about tweaking the automatically
generated ones.  Is it possible, and if so, how?

Thanks,
zw


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How do I set kernel command line arguments for all bootloader menu entries?
  2024-07-22 20:18 How do I set kernel command line arguments for all bootloader menu entries? Zack Weinberg
@ 2024-07-22 21:33 ` Tomas Volf
  2024-07-23 14:17   ` Zack Weinberg
  0 siblings, 1 reply; 5+ messages in thread
From: Tomas Volf @ 2024-07-22 21:33 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

Hi,

On 2024-07-22 16:18:41 -0400, Zack Weinberg wrote:
> Suppose I want to append "console=ttyS0,115200n8" to every GRUB
> bootloader menu entry. I can't figure out how to do that with a
> (bootloader-configuration) recipe.  The manual talks about writing
> *extra* menu entries, but not about tweaking the automatically
> generated ones.  Is it possible, and if so, how?

I believe the kernel-arguments field can be of use.  For example I have this in
my configuration:

      (kernel-arguments (delete "quiet"
                                %default-kernel-arguments))

Hope this helps.

Tomas

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How do I set kernel command line arguments for all bootloader menu entries?
  2024-07-22 21:33 ` Tomas Volf
@ 2024-07-23 14:17   ` Zack Weinberg
  2024-07-23 14:25     ` Tomas Volf
  0 siblings, 1 reply; 5+ messages in thread
From: Zack Weinberg @ 2024-07-23 14:17 UTC (permalink / raw)
  To: Tomas Volf; +Cc: help-guix

On Mon, Jul 22, 2024, at 5:33 PM, Tomas Volf wrote:
> Hi,
>
> On 2024-07-22 16:18:41 -0400, Zack Weinberg wrote:
>> Suppose I want to append "console=ttyS0,115200n8" to every GRUB
>> bootloader menu entry. I can't figure out how to do that with a
>> (bootloader-configuration) recipe.  The manual talks about writing
>> *extra* menu entries, but not about tweaking the automatically
>> generated ones.  Is it possible, and if so, how?
>
> I believe the kernel-arguments field can be of use.  For example I have this in
> my configuration:
>
>       (kernel-arguments (delete "quiet"
>                                 %default-kernel-arguments))

Thanks, but kernel-arguments isn't recognized as a valid field of
bootloader-configuration.

# guix system reconfigure /etc/config.scm
/etc/config.scm:93:14: error: 
   (bootloader-configuration
     (bootloader grub-bootloader)
     (targets (list "/dev/vda"))
     (terminal-outputs (quote (serial)))
     (terminal-inputs (quote (serial)))
     (serial-speed 115200)
     (kernel-arguments (cons* "console=ttyS0,115200n8"
                         %default-kernel-arguments))
   ): extraneous field initializers (kernel-arguments)

It *is* recognized as a valid field of a menu-entry, but that
brings me back to my original problem. I don't want to write
additional menu entries, I want to modify the automatically
generated menu entries.

zw


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How do I set kernel command line arguments for all bootloader menu entries?
  2024-07-23 14:17   ` Zack Weinberg
@ 2024-07-23 14:25     ` Tomas Volf
  2024-07-23 14:46       ` Zack Weinberg
  0 siblings, 1 reply; 5+ messages in thread
From: Tomas Volf @ 2024-07-23 14:25 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]

On 2024-07-23 10:17:51 -0400, Zack Weinberg wrote:
> On Mon, Jul 22, 2024, at 5:33 PM, Tomas Volf wrote:
> > Hi,
> >
> > On 2024-07-22 16:18:41 -0400, Zack Weinberg wrote:
> >> Suppose I want to append "console=ttyS0,115200n8" to every GRUB
> >> bootloader menu entry. I can't figure out how to do that with a
> >> (bootloader-configuration) recipe.  The manual talks about writing
> >> *extra* menu entries, but not about tweaking the automatically
> >> generated ones.  Is it possible, and if so, how?
> >
> > I believe the kernel-arguments field can be of use.  For example I have this in
> > my configuration:
> >
> >       (kernel-arguments (delete "quiet"
> >                                 %default-kernel-arguments))
>
> Thanks, but kernel-arguments isn't recognized as a valid field of
> bootloader-configuration.

Ah, sorry, should have been more explicit.  In my case it is a field of
operating-system.  So in your case try something like

  (operating-system
    ...
    (host-name "foo")
    ...
    (kernel-arguments (cons* "console=ttyS0,115200n8"
                             %default-kernel-arguments))
    ...)

From there it should automatically propagate into all auto-generated boot menu
entries.

Hope it helps this time,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How do I set kernel command line arguments for all bootloader menu entries?
  2024-07-23 14:25     ` Tomas Volf
@ 2024-07-23 14:46       ` Zack Weinberg
  0 siblings, 0 replies; 5+ messages in thread
From: Zack Weinberg @ 2024-07-23 14:46 UTC (permalink / raw)
  To: Tomas Volf; +Cc: help-guix

On Tue, Jul 23, 2024, at 10:25 AM, Tomas Volf wrote:
> On 2024-07-23 10:17:51 -0400, Zack Weinberg wrote:
>> On Mon, Jul 22, 2024, at 5:33 PM, Tomas Volf wrote:
>> > Hi,
>> >
>> > On 2024-07-22 16:18:41 -0400, Zack Weinberg wrote:
>> >> Suppose I want to append "console=ttyS0,115200n8" to every GRUB
>> >> bootloader menu entry. I can't figure out how to do that with a
>> >> (bootloader-configuration) recipe.  The manual talks about writing
>> >> *extra* menu entries, but not about tweaking the automatically
>> >> generated ones.  Is it possible, and if so, how?
>> >
>> > I believe the kernel-arguments field can be of use.  For example I have this in
>> > my configuration:
>> >
>> >       (kernel-arguments (delete "quiet"
>> >                                 %default-kernel-arguments))
>>
>> Thanks, but kernel-arguments isn't recognized as a valid field of
>> bootloader-configuration.
>
> Ah, sorry, should have been more explicit.  In my case it is a field of
> operating-system.  So in your case try something like

Oh, that's why I couldn't find it! I was looking only at the
bootloader-configuration documentation, not at the operating-system
documentation.  Thanks, it works now.

zw


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-23 14:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 20:18 How do I set kernel command line arguments for all bootloader menu entries? Zack Weinberg
2024-07-22 21:33 ` Tomas Volf
2024-07-23 14:17   ` Zack Weinberg
2024-07-23 14:25     ` Tomas Volf
2024-07-23 14:46       ` Zack Weinberg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.