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

Manual Chapter 2 has incorrect examples #39354

Closed
ghost opened this issue Apr 23, 2018 · 1 comment
Closed

Manual Chapter 2 has incorrect examples #39354

ghost opened this issue Apr 23, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 23, 2018

Issue description

The bullet points under Chapter 2, section 8 (the fdisk process) don't match up with what the real partitions are after write.

The last four lines of fdisk setup are relevant:

> x      # (enter expert mode)
> f      # (fix up the partition ordering)
> r      # (exit expert mode)
> w      # (write the partition table to disk and exit)

Earlier in the fdisk process, we create the partitions with the following numbering:

  1. /
  2. swap
  3. /boot

I believe the fix partition ordering re-numbers the partitions based on their location within the partition label. Since the boot partition is at the front of the disk and our / partition is at the end, fdisk reorders the partitions as follows:

  1. boot/
  2. swap
  3. /

The problem is when making the file systems. The manual still uses the initial partition numbers instead of the new, ordered numbers.

Thus:

# mkfs.ext4 -L nixos /dev/sda1

Creates an ext4 partition that is 512M big and is supposed to be boot. And:

# mkfs.fat -F 32 -n boot /dev/sda3

Creates a FAT32 partiton that's supposed to be our root labeled nixos.

Swap isn't affected being in the middle.

samueldr added a commit to samueldr/nixpkgs that referenced this issue 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 issue 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
Copy link
Member

samueldr commented Oct 4, 2018

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

As far as the ordering of partitions is concerned, the newly re-written partitioning instructions were written to ensure it wouldn't be an issue.

@samueldr samueldr closed this as completed Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant