-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grub: Update extraConfig example text #79406
Conversation
This expands the example to something one might actually want to use to set up a serial console.
This expands the example to something one might actually want to use to set up a serial console. (cherry picked from commit 4c5ea02)
@@ -224,7 +224,11 @@ in | |||
|
|||
extraConfig = mkOption { | |||
default = ""; | |||
example = "serial; terminal_output.serial"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the previous terminal_output.serial
actually wrong?
It seems so to me: My grub2 console does not accept terminal_output.serial
, only terminal_output.serial
(with space instead of dot).
This would be useful to know, because there's still a use of that on current master
, here:
nixpkgs/nixos/tests/installer.nix
Line 32 in 44a502b
boot.loader.grub.extraConfig = "serial; terminal_output.serial"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code originally introduced in a65b5ec#r38681077.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know terminal_output.serial
isn't going to work. That's what led me to writing up this change in the first place - the example didn't work when I tried it, and the grub docs indicated the syntax I replaced it with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benley Would you be up for PRing a fix for the test i linked as well then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing: #85832
grub.cfg before the menu entries. (This could also be done using `extraEntriesBeforeNixOS', but then you can't have entries *after* the main entry anymore.) * In the installer test, redirect GRUB output to the serial port. svn path=/nixos/branches/boot-order/; revision=22300
It looks like `terminal_output.serial` is incorrect, according to the grub documentation: https://www.gnu.org/software/grub/manual/grub/html_node/Serial-terminal.html Related PR: #79406
terminal_input --append serial | ||
terminal_output --append serial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is terminal_input console
terminal_output console
the default?
I usually have
terminal_input serial console; terminal_output serial console
so I wonder abotu the --append
here…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking at that as well; my understanding from https://www.gnu.org/software/grub/manual/grub/html_node/terminal_005finput.html is that it is good because with --append
you can say "also expose it to serial, no matter whether gfxterm
or console
is the main output".
I haven't actually tried that yet though, that is, I haven't checked whether the combination of gfxterm serial
actually works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't actually tried that yet though, that is, I haven't checked whether the combination of
gfxterm serial
actually works as expected.
I have checked it now, it works.
Motivation for this change
This expands the example to something one might actually want to use to set up a serial console.
(I know this works because I just set up a server using this exact set of options)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)