Skip to content

nixos docs: Update installation partitioner instructions - #39942

Closed
srl295 wants to merge 1 commit into
NixOS:masterfrom
srl295:patch-1
Closed

srl295 wants to merge 1 commit into
NixOS:masterfrom
srl295:patch-1

Conversation

@srl295

@srl295 srl295 commented May 3, 2018

Copy link
Copy Markdown

Updating the instructions to match experience

  • added:
> g      # <lineannotation>(create an empty GPT table)</lineannotation>
  • Remove this line, because there's only one partition (so you aren't prompted for the partition number)
> 3      # <lineannotation>(... of the boot partition ...)</lineannotation>
  • for GPT partitions, the bootable option is under x (expert mode). I updated the commands to x-A-1 for bootable.
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Updating the instructions to match experience 

- added:

```
> g      # <lineannotation>(create an empty GPT table)</lineannotation>
```

- Remove this line, because there's only one partition (so you aren't prompted for the partition number)

```
> 3      # <lineannotation>(... of the boot partition ...)</lineannotation>
```

- for GPT partitions, the bootable option is under `x` (expert mode). I updated the commands to x-A-1 for bootable.
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels May 3, 2018

@matthewbauer matthewbauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me! This should fix #39354. We've been wanting to automate this process for a while (#2079) but it has yet to make it to a release.

@matthewbauer
matthewbauer requested review from Mic92, abbradar and globin May 9, 2018 08:03
@matthewbauer

Copy link
Copy Markdown
Member

I will merge & cherry-pick this onto release-18.03 unless anyone has objections.

@abbradar

abbradar commented May 9, 2018

Copy link
Copy Markdown
Member

@srl295 I cannot immediately find this -- what does fdisk do with a partition when you "set bootable flag"? Sets GUID to C12A7328-F81F-11D2-BA4B-00A0C93EC93B?

@Mic92

Mic92 commented May 10, 2018 •

Copy link
Copy Markdown
Member

@abbradar yes it marks it as a EFI system partition.

This is what happens:

Expert command (m for help): A
Partition number (2,3, default 3): 2
The LegacyBIOSBootable flag on partition 2 is enabled now.

> a # <lineannotation>(make the partition bootable)</lineannotation>
> x # <lineannotation>(enter expert mode)</lineannotation>
> A # <lineannotation>(make the partition bootable)</lineannotation>
> 1 # <lineannotation>(...partition one, the boot partition)</lineannotation>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was partition 1 no the root partition in this example?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

good catch, this is probably my typo. I was copying from line 108 above which was the last partition mentioned. Probably should be partition 3.

samueldr added a commit to samueldr/nixpkgs that referenced this pull request Oct 4, 2018
The tests in <nixos/tests/installer.nix> are using `parted`, so they are
bound to be better tested than `fdisk`.

This is brought on by a couple issues, plus reports on IRC that the
`fdisk` instructions didn't work as expected.

 * NixOS#39354
 * NixOS#46309
 * NixOS#39942
 * NixOS#45478

Care was taken so that the other documented steps did not need changes.

In all this kerfufle, a slight re-organization of the Chapter has been
made, allowing better deep linking.
grahamc pushed a commit that referenced this pull request Oct 4, 2018
The tests in <nixos/tests/installer.nix> are using `parted`, so they are
bound to be better tested than `fdisk`.

This is brought on by a couple issues, plus reports on IRC that the
`fdisk` instructions didn't work as expected.

 * #39354
 * #46309
 * #39942
 * #45478

Care was taken so that the other documented steps did not need changes.

In all this kerfufle, a slight re-organization of the Chapter has been
made, allowing better deep linking.

(cherry picked from commit 6cfbf40)
@samueldr

samueldr commented Oct 4, 2018

Copy link
Copy Markdown
Member

Hi! Closing this issue since the partitioning instructions are now re-written for 18.09. (See #47697)

@samueldr samueldr closed this Oct 4, 2018
@Janik-Haag Janik-Haag added the 12.first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants