nixos/manual: rectify partitioning commands for UEFI/GPT
For GPT partition tables, there is no primary/logical/extended partition type, and the layout of the mkpart command options slightly differs depending on whether parted operates on an MBR or a GPT partition table. This has so far resulted in the string `primary` being assigned to the GUID partition name field, which is probably unintended. Rectify this by giving the GUID partitions sensible names and setting `fs-type` where applicable.
This commit is contained in:
parent
a4b47b6824
commit
f652c83354
1 changed files with 4 additions and 4 deletions
|
@ -249,14 +249,14 @@ update /etc/fstab.
|
||||||
which will be used by the boot partition.
|
which will be used by the boot partition.
|
||||||
|
|
||||||
```ShellSession
|
```ShellSession
|
||||||
# parted /dev/sda -- mkpart primary 512MB -8GB
|
# parted /dev/sda -- mkpart root ext4 512MB -8GB
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Next, add a *swap* partition. The size required will vary according
|
3. Next, add a *swap* partition. The size required will vary according
|
||||||
to needs, here a 8GB one is created.
|
to needs, here a 8GB one is created.
|
||||||
|
|
||||||
```ShellSession
|
```ShellSession
|
||||||
# parted /dev/sda -- mkpart primary linux-swap -8GB 100%
|
# parted /dev/sda -- mkpart swap linux-swap -8GB 100%
|
||||||
```
|
```
|
||||||
|
|
||||||
::: {.note}
|
::: {.note}
|
||||||
|
@ -550,8 +550,8 @@ corresponding configuration Nix expression.
|
||||||
### Example partition schemes for NixOS on `/dev/sda` (UEFI)
|
### Example partition schemes for NixOS on `/dev/sda` (UEFI)
|
||||||
```ShellSession
|
```ShellSession
|
||||||
# parted /dev/sda -- mklabel gpt
|
# parted /dev/sda -- mklabel gpt
|
||||||
# parted /dev/sda -- mkpart primary 512MB -8GB
|
# parted /dev/sda -- mkpart root ext4 512MB -8GB
|
||||||
# parted /dev/sda -- mkpart primary linux-swap -8GB 100%
|
# parted /dev/sda -- mkpart swap linux-swap -8GB 100%
|
||||||
# parted /dev/sda -- mkpart ESP fat32 1MB 512MB
|
# parted /dev/sda -- mkpart ESP fat32 1MB 512MB
|
||||||
# parted /dev/sda -- set 3 esp on
|
# parted /dev/sda -- set 3 esp on
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue