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

Enable grub debug output by default #62905

Closed
deliciouslytyped opened this issue Jun 9, 2019 · 8 comments
Closed

Enable grub debug output by default #62905

deliciouslytyped opened this issue Jun 9, 2019 · 8 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@deliciouslytyped
Copy link
Contributor

Apparently grub has a grub_dprintffunction that's used for some manner of debug output. I Could we enable showing it by default?

@davidak
Copy link
Member

davidak commented Jun 15, 2019

I think most desktop users want a start without annoying messages. So i would not enable it by default, at least when boot.plymouth.enable = true;. But an option to enable it is useful.

@deliciouslytyped
Copy link
Contributor Author

deliciouslytyped commented Jun 15, 2019

I don't mean this to sound snarky: Should we hide the nixos stage1/etc output as well then?

@deliciouslytyped
Copy link
Contributor Author

deliciouslytyped commented Jun 15, 2019

My rationale is that it's usually harder to enable boot debug stuff when your system is failing to boot - but if you've explicitly chosen boot eye candy/hiding information over boot output, sure why not I guess. The ideal case would be if the eye candy can fall back to showing the failure information on failure.

@davidak
Copy link
Member

davidak commented Jun 15, 2019

Should we hide the nixos stage1/etc output as well then?

sure (#32556)

The ideal case would be if the eye candy can fall back to showing the failure information on failure.

yes, it would be useful when the system fails to boot. but on NixOS you can just start with previous configuration, so less important than with other distros.

@deliciouslytyped
Copy link
Contributor Author

deliciouslytyped commented Jun 15, 2019

Rollbacks don't necessarily fix filesystem configuration issues. E.g. when you're migrating to ZFS.
Edit: Ideally this probably wouldn't be a problem because you wouldn't transition your system in an unsafe manner, however it's precisely the non-ideal situations where things like this would help more, I think.

@deliciouslytyped
Copy link
Contributor Author

deliciouslytyped commented Jun 15, 2019

FWIW I haven't actually had a chance to test this functionality, which would be important in this going forward in any case.
Edit: To clarify, though i think samueldr will comment shortly: at the least I just want something more than getting dumped in a grub rescue prompt and "lol fix me bro."

@samueldr
Copy link
Member

It's unclear in what way this is printed, from my research, it might expect to be printed to a serial port. I haven't been able to find documentation as apparently some of these things are willfully undocumented.

Configuring it to use debug print by default is probably a bad idea. The main issue would be the firehose of debugging text, which is not necessarily helpful.

Another issue, yet untested, is that when grub prints things, like error messages, it will do it in an intrusive way. When developing the installer image's boot menu, I found out that any error print in their script will pause the menu to show you the errors, even if they are expected and benign under ifconditionals. If they are printed using the same system, it would likely be an issue to users.

What could be done, instead, is to simplify installation of a debug-enabled grub to the system. Either as configured in the NixOS configuration, or even out-of-band by replacing a Grub from the ESP/legacy offsets. (The latter allowing one not to mount a complex system in the installer only to switch to debug mode.)

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@SuperSandro2000 SuperSandro2000 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

4 participants