Skip to content
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

Merged
merged 1 commit into from Feb 15, 2020
Merged

Conversation

benley
Copy link
Member

@benley benley commented Feb 7, 2020

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This expands the example to something one might actually want to use
to set up a serial console.
@benley benley merged commit 4c5ea02 into NixOS:master Feb 15, 2020
@benley benley deleted the grub-extraconfig branch February 15, 2020 21:45
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Feb 16, 2020
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";
Copy link
Contributor

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:

boot.loader.grub.extraConfig = "serial; terminal_output.serial";

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing: #85832

nh2 referenced this pull request Apr 23, 2020
  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
flokli pushed a commit that referenced this pull request Apr 23, 2020
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
Comment on lines +229 to +230
terminal_input --append serial
terminal_output --append serial
Copy link
Contributor

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…

Copy link
Contributor

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.

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants