mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
treewide: reformat with nix fmt
This commit is contained in:
1 parent
dd378f1d58
commit
804ab2de77
7 files changed
+31
-20
No files matched your search
@@ -80,8 +80,8 @@ In the this example we create a flake containing a nixos configuration for
|
||||
|
||||
The script will generate the actual image outside of the nix store in the
|
||||
current working directory. The create image names depend on the names used in
|
||||
`disko.devices.disk` attrset in the NixOS configuration. In our code example it will
|
||||
produce the following image:
|
||||
`disko.devices.disk` attrset in the NixOS configuration. In our code example
|
||||
it will produce the following image:
|
||||
|
||||
```
|
||||
$ ls -la vdb.raw
|
||||
|
||||
@@ -41,4 +41,3 @@ Options:
|
||||
* --debug
|
||||
run with set -x
|
||||
```
|
||||
|
||||
+16
-7
@@ -58,16 +58,21 @@ for example like this:
|
||||
|
||||
## Remediation
|
||||
|
||||
The new GPT layout (`type = "gpt"`) uses partlabels to realize the partiton numbering. For this reason you have to manually set up partition labels, if you want to resolve this issue.
|
||||
The new GPT layout (`type = "gpt"`) uses partlabels to realize the partiton
|
||||
numbering. For this reason you have to manually set up partition labels, if you
|
||||
want to resolve this issue.
|
||||
|
||||
### Create GPT partition labels
|
||||
|
||||
For each partition involved, create the partition label from these components:
|
||||
|
||||
- The partition number (e.g. /dev/nvme0n**1**, or /dev/sda**1**)
|
||||
- The parent type in your disko config (value of `disko.device.disk.example.type = "disk";`)
|
||||
- The parent name in your disko config (attribute name of `disko.devices.disk.example`, so `example` in this example)
|
||||
- The partition name in your disko config (attribute name of `disko.devices.disk.content.partitions.*.name`)
|
||||
- The parent type in your disko config (value of
|
||||
`disko.device.disk.example.type = "disk";`)
|
||||
- The parent name in your disko config (attribute name of
|
||||
`disko.devices.disk.example`, so `example` in this example)
|
||||
- The partition name in your disko config (attribute name of
|
||||
`disko.devices.disk.content.partitions.*.name`)
|
||||
|
||||
```bash
|
||||
# sgdisk -c 1:disk-example-ESP /dev/nvme0n1
|
||||
@@ -84,14 +89,18 @@ Make the following changes to your disko configuration:
|
||||
|
||||
1. Set `disko.devices.disk.example.content.type = "gpt"`
|
||||
1. Remove `disko.devices.disk.example.format`
|
||||
1. Convert `disko.devices.disk.example.partitions` to an attribute set and promote the `name` field to the key for its partition
|
||||
1. Add a `priority` field to each partition, to reflect the intended partition number
|
||||
1. Convert `disko.devices.disk.example.partitions` to an attribute set and
|
||||
promote the `name` field to the key for its partition
|
||||
1. Add a `priority` field to each partition, to reflect the intended partition
|
||||
number
|
||||
|
||||
Then rebuild your system and reboot.
|
||||
|
||||
### Recovering from mistake
|
||||
|
||||
If you made a mistake here, your system will be waiting for devices to appear, and then run into timeouts. You can easily recover from this, since rebooting into an old generation will still use the legacy way of numbering of partitions.
|
||||
If you made a mistake here, your system will be waiting for devices to appear,
|
||||
and then run into timeouts. You can easily recover from this, since rebooting
|
||||
into an old generation will still use the legacy way of numbering of partitions.
|
||||
|
||||
## Result
|
||||
|
||||
|
||||
Reference in new issue
Block a user