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

add documentation for booting ISO image via grub #70859

Closed
wants to merge 2 commits into from

Conversation

pille
Copy link

@pille pille commented Oct 9, 2019

Motivation for this change

documentation for #67627

Things done

was not able to check how these changes compile, since the process core-dumped on my system.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.
Notify maintainers

cc @

@Lassulus
Copy link
Member

Lassulus commented Oct 9, 2019

hey, which process core dumped exactly and what do you want to document?

@pille
Copy link
Author

pille commented Oct 9, 2019

i was adding a short paragraph to the manual on how to use what you've developed with #67627.
i tried building the manual to review my changes, but it failed:

pille@saba ~ % cd /tmp/nixpkgs/nixos/doc/manual 
pille@saba manual % make                                                                                                                                                                                                                                               (git)[grub-loopback.cfg-iso-doc(4450)| U116]
nix-build ../../release.nix \
	--attr manualGeneratedSources.x86_64-linux \
	--out-link ./generated
error: value is an integer while a list was expected, at /tmp/nixpkgs/nixos/doc/manual/default.nix:14:48
(use '--show-trace' to show detailed location information)
make: *** [Makefile:28: generated] Error 1
pille@saba manual [2] % nix-build ../../release.nix \                                                                                                                                                                                                                  (git)[grub-loopback.cfg-iso-doc(4450)| U116]
                --attr manualGeneratedSources.x86_64-linux \
                --out-link ./generated --show-trace
[1]    64735 abort (core dumped)  nix-build ../../release.nix --attr manualGeneratedSources.x86_64-linux   
pille@saba manual [134] %                                                                                                                                                                                                                                              (git)[grub-loopback.cfg-iso-doc(4450)| U116]

i was running this on a sabayon machine via their nix package https://packages.sabayon.org/show/nix,227342,sabayonlinux.org,amd64,5,standard, so this may be out of scope.


<screen>
<prompt>$ </prompt>cd /boot
<prompt>$ </prompt>mkdir -p iso && cd iso
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to be rendered as &amp;

@pille pille closed this Oct 10, 2019
@pille pille deleted the grub-loopback.cfg-iso-doc branch October 10, 2019 10:36
@pille pille restored the grub-loopback.cfg-iso-doc branch October 10, 2019 10:39
@pille pille reopened this Oct 10, 2019
<screen>
<prompt>$ </prompt>cd /boot
<prompt>$ </prompt>mkdir -p iso; cd iso
<prompt>$ </prompt>wget https://releases.nixos.org/nixos/unstable/nixos-20.03pre196201.07d4df59626/nixos-graphical-20.03pre196201.07d4df59626-x86_64-linux.iso
Copy link
Member

Choose a reason for hiding this comment

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

wget is not installed by default on NixOS, use curl -O instead

Copy link
Member

Choose a reason for hiding this comment

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

Might also want to add a comment to get the URL themselves

Copy link
Author

Choose a reason for hiding this comment

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

this is just an example and i'd much rather have a generic name like stable instead of a certain release.

@Lassulus
Copy link
Member

I currently have this config to boot the isos, maybe you also want to document the "nixos" way. I also have to find a nicer way to get the autoiso.cfg from the source..

  boot.loader.grub = {
    extraEntries = ''
      submenu isos {
        source /grub/autoiso.cfg
      }
    '';
    extraFiles."/grub/autoiso.cfg" = (pkgs.stdenv.mkDerivation {
      name = "autoiso.cfg";
      src = pkgs.grub2.src;
      phases = [ "unpackPhase" "installPhase" ];
      installPhase = ''
        cp docs/autoiso.cfg $out
      '';
    });
  };

Copy link
Contributor

@mrVanDalo mrVanDalo left a comment

Choose a reason for hiding this comment

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

Nice.

Place the ISO image on your boot partition in a <literal>iso</literal> sub-directory, e.g. <literal>/boot/iso</literal>.
Source the <literal>autoiso.cfg</literal> from <literal>/docs</literal> of the <literal>grub</literal> package.
You can also get it from <link xlink:href="https://git.savannah.gnu.org/gitweb/?p=grub.git;a=blob_plain;f=docs/autoiso.cfg;hb=HEAD">https://git.savannah.gnu.org/gitweb/?p=grub.git;a=blob_plain;f=docs/autoiso.cfg;hb=HEAD</link>.
and it will be detected by https://github.com/rhboot/grub2/blob/master/docs/autoiso.cfg, when you source it in your <literal>grub.cfg</literal> or <literal>custom.cfg</literal>.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@mrVanDalo mrVanDalo Oct 22, 2019

Choose a reason for hiding this comment

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

although the "nixos way" described by @Lassulus seem to be more elegant.

@mrVanDalo
Copy link
Contributor

@pille is this dead?

@pille
Copy link
Author

pille commented Mar 8, 2020

@mrVanDalo: i've left this here as-is, to take care of documenting a feature that i requested. i'm not working on this, since i'm not using NixOS and can't compile the docs.

@stale
Copy link

stale bot commented Sep 4, 2020

Hello, I'm a bot and I thank you in the name of the community for your contributions.

Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do:

If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list.

If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past.

If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments.

Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 4, 2020
@pille
Copy link
Author

pille commented Sep 5, 2020

please leave this open, wrt my last comment.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 5, 2020
@stale
Copy link

stale bot commented Mar 5, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 5, 2021
@Artturin Artturin closed this Apr 19, 2022
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

6 participants