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

nixos boot doc: document boot.debug1devices #73350

Merged
merged 2 commits into from Jun 1, 2020
Merged

Conversation

wmertens
Copy link
Contributor

This hopefully prevents other people from encountering #62049

Co-Authored-By: Jörg Thalheim <Mic92@users.noreply.github.com>
@wmertens wmertens requested a review from Mic92 November 13, 2019 19:39
@stale
Copy link

stale bot commented Jun 1, 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 1, 2020
@wmertens wmertens merged commit 9761877 into master Jun 1, 2020
@wmertens wmertens deleted the wmertens-nixos-boot-doc branch June 1, 2020 10:02
@jakobrs
Copy link
Contributor

jakobrs commented Jun 1, 2020

Maybe boot.debug1mounts should be documented as well? It's the same thing but it fails after neededForBoot file systems are mounted.

@wmertens
Copy link
Contributor Author

wmertens commented Jun 1, 2020

@jakobrs so what would you propose for the text

      Like <literal>boot.debug1devices</literal>, but continues stage1 until <literal>neededForBoot</literal> file systems are mounted.
      This may help with e.g. [making the keyboard work].

Does debug1mounts go further than debug1devices?

@jakobrs
Copy link
Contributor

jakobrs commented Jun 1, 2020

That's pretty much it, yes. It's basically just a variant of boot.debug1devices that fails only after all neededForBoot file systems are mounted, which may or may not be beneficial depending on what you're trying to do.

There are some technical details (see here), but those don't really matter. boot.debug1mounts fails right before stage 2 is launched, so it can be useful if you want to modify stuff inside the initrd with the system being "as usable as possible". And as a bonus, the file system is mounted for you.

It's also worth pointing out that if you exit from the shell launched by boot.debug1mounts, boot.debug1devices, boot.debug1, debug1 or boot.shell_on_fail, the boot will proceed normally, from where that option was handled. So you can, for example, use boot.debug1mounts to move system files before starting the rest of the system. And then you can just exit and the boot process will proceed as usual, provided you haven't broken anything. This does not apply if you choose the "start an interactive shell having pid 1" option, because the new shell is execed

@wmertens
Copy link
Contributor Author

wmertens commented Jun 2, 2020

@jakobrs you seem to know it in a lot more detail than me :) Would you mind updating the documentation for these options? If not, I'll try to copy what you wrote.

@jakobrs
Copy link
Contributor

jakobrs commented Jun 2, 2020

Is this fine?

@wmertens
Copy link
Contributor Author

merged, sorry for missing it

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

Successfully merging this pull request may close these issues.

None yet

3 participants