You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+52-51Lines changed: 52 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,50 +81,6 @@ Creates `/dev/console` with permissions `0o644`
81
81
82
82
> Using `mknod_cpio` from `ugrd.base.cpio` will not create the device nodes in the build dir, but within the CPIO archive
83
83
84
-
#### base.mounts
85
-
86
-
`mounts`: A dictionary containing entries for mounts, with their associated config.
87
-
88
-
`root_mount` Is a dict that acts similarly to user defined `mounts`. `destination` is hardcoded to `/mnt/root`.
89
-
90
-
Each mount has the following available parameters:
91
-
92
-
*`type` (auto) the mount or filesystem type. Setting the `type` to `vfat` includes the `vfat` kernel module automatically.
93
-
*`destination` (/mount name) the mountpoint for the mount, if left unset will use /mount_name.
94
-
*`source` The source string or a dict with a key containing the source type, where the value is the target.
95
-
-`uuid` Mount by the filesystem UUID.
96
-
-`partuuid` Mount by the partition UUID.
97
-
-`label` Mount by the device label.
98
-
*`base_mount` (false) is used for builtin mounts such as `/dev`, `/sys`, and `/proc`. Setting this to mounts it with a mount command in `init_pre` instead of using `mount -a` in `init_main`.
99
-
*`skip_unmount` (false) is used for the builtin `/dev` mount, since it will fail to unmount when in use. Like the name suggests, this skips running `umount` during `init_final`.
100
-
*`remake_mountpoint` will recreate the mountpoint with mkdir before the `mount -a` is called. This is useful for `/dev/pty`.
101
-
102
-
The most minimal mount entry that can be created must have a name, which will be used as the `destination`, and a `source`.
103
-
104
-
The following configuration mounts the device with `uuid``ABCD-1234` at `/boot`:
105
-
106
-
```
107
-
[mounts.boot.source]
108
-
uuid = "ABCD-1234"
109
-
```
110
-
111
-
The following configuration mounts the device with `label``extra` to `/mnt/extra`:
112
-
113
-
```
114
-
[mounts.extra]
115
-
destination = "/mnt/extra"
116
-
117
-
[mounts.extra.source]
118
-
label = "extra"
119
-
```
120
-
121
-
##### General mount options
122
-
123
-
These are set at the global level and are not associated with an individual mount:
124
-
125
-
*`mount_wait` (false) waits for user input before attenmpting to mount the generated fstab at `init_main`.
126
-
*`mount_timeout` timeout for `mount_wait` to automatically continue.
127
-
128
84
#### base.console
129
85
130
86
This module creates an agetty session. This is used by the `ugrd.crypto.gpg` module so the tty can be used for input and output.
@@ -199,29 +155,74 @@ Similarly `base.ugrd.kmod_novideo` and `kmod_nosound` exist to ignore video and
199
155
200
156
### Filesystem modules
201
157
202
-
#### fs.btrfs
158
+
#### ugrd.fs.mounts
159
+
160
+
`mounts`: A dictionary containing entries for mounts, with their associated config.
161
+
162
+
`root_mount` Is a dict that acts similarly to user defined `mounts`. `destination` is hardcoded to `/mnt/root`.
163
+
164
+
Each mount has the following available parameters:
165
+
166
+
*`type` (auto) the mount or filesystem type. Setting the `type` to `vfat` includes the `vfat` kernel module automatically.
167
+
*`destination` (/mount name) the mountpoint for the mount, if left unset will use /mount_name.
168
+
*`source` The source string or a dict with a key containing the source type, where the value is the target.
169
+
-`uuid` Mount by the filesystem UUID.
170
+
-`partuuid` Mount by the partition UUID.
171
+
-`label` Mount by the device label.
172
+
*`base_mount` (false) is used for builtin mounts such as `/dev`, `/sys`, and `/proc`. Setting this to mounts it with a mount command in `init_pre` instead of using `mount -a` in `init_main`.
173
+
*`skip_unmount` (false) is used for the builtin `/dev` mount, since it will fail to unmount when in use. Like the name suggests, this skips running `umount` during `init_final`.
174
+
*`remake_mountpoint` will recreate the mountpoint with mkdir before the `mount -a` is called. This is useful for `/dev/pty`.
175
+
176
+
The most minimal mount entry that can be created must have a name, which will be used as the `destination`, and a `source`.
177
+
178
+
The following configuration mounts the device with `uuid``ABCD-1234` at `/boot`:
179
+
180
+
```
181
+
[mounts.boot.source]
182
+
uuid = "ABCD-1234"
183
+
```
184
+
185
+
The following configuration mounts the device with `label``extra` to `/mnt/extra`:
186
+
187
+
```
188
+
[mounts.extra]
189
+
destination = "/mnt/extra"
190
+
191
+
[mounts.extra.source]
192
+
label = "extra"
193
+
```
194
+
195
+
##### General mount options
196
+
197
+
These are set at the global level and are not associated with an individual mount:
198
+
199
+
*`mount_wait` (false) waits for user input before attenmpting to mount the generated fstab at `init_main`.
200
+
*`mount_timeout` timeout for `mount_wait` to automatically continue.
201
+
202
+
203
+
#### ugrd.fs.btrfs
203
204
204
205
Importing this module will run `btrfs device scan` and pull btrfs modules. No config is required.
205
206
206
207
### Cryptographic modules
207
208
208
209
Several cryptographic modules are provided, mostly to assist in mounting encrypted volumes and handling keyfiles.
209
210
210
-
#### crypto.gpg
211
+
#### ugrd.crypto.gpg
211
212
212
213
This module is required to perform GPG decryption within the initramfs. It depends on the `ugrd.base.console` module for agetty, which is required for input.
213
214
214
215
No configuration options are provided by this module, but it does set the `primary_console` to `tty0` and creates the console entry for it.
215
216
This configuration can be overriden in the specified user config if an actual serial interface is used, this is demonstrated in `config_raid_crypt_serial.toml`
216
217
217
-
#### crypto.smartcard
218
+
#### ugrd.crypto.smartcard
218
219
219
220
Depends on the `ugrd.crypto.gpg` submodule, meant to be used with a YubiKey.
220
221
221
222
`sc_public_key` should point to the public key associated with the smarcard used to decrypt the GPG protected LUKS keyfile.
222
223
This file is added as a dependency and pulled into the initramfs.
223
224
224
-
#### crypto.cryptsetup
225
+
#### ugrd.crypto.cryptsetup
225
226
226
227
This module is used to decrypt LUKS volumes in the initramfs.
227
228
@@ -271,7 +272,7 @@ For example:
271
272
272
273
```
273
274
[imports.build_tasks]
274
-
"base.base" = [ "generate_fstab" ]
275
+
"ugrd.fs.mounts" = [ "generate_fstab" ]
275
276
```
276
277
277
278
Is used in the base module to make the initramfs generator generate a fstab durinf the `build_tasks` phase.
@@ -327,7 +328,7 @@ This module is loaded in the imports section of the `base.yaml` file:
327
328
328
329
```
329
330
[imports.config_processing]
330
-
"ugrd.base.base" = [ "_process_mounts_multi" ]
331
+
"ugrd.fs.mounts" = [ "_process_mounts_multi" ]
331
332
```
332
333
333
334
#### build_tasks
@@ -338,7 +339,7 @@ The base module includes a build task for generating the fstab, which is activat
0 commit comments