Skip to content

Commit 7313538

Browse files
committed
update examples to consider default autodetect_root
Signed-off-by: Zen <[email protected]>
1 parent fae8353 commit 7313538

File tree

8 files changed

+14
-41
lines changed

8 files changed

+14
-41
lines changed

examples/example.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ modules = [
2323
kmod_autodetect_lspci = true
2424
kmod_autodetect_lsmod = true
2525

26-
# Autodetect the root mountpoint
27-
autodetect_root = true
28-
2926
# Wait a few seconds for storage to settle after modules are loaded if external or slow storage is used
3027
#mount_wait = true
3128
#mount_timeout = 3

examples/raid_crypt_serial.toml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,17 @@
66

77
modules = [
88
"ugrd.base.base",
9-
"ugrd.base.console",
9+
# "ugrd.base.console", # implied by gpg
1010
"ugrd.crypto.gpg",
1111
]
1212

1313
# Set the key type for all cryptsetup keys
1414
cryptsetup_key_type = "gpg"
1515

1616
# Set the primary_console to ttyS1
17-
# The gpg module uses agetty on tty so this must be overridden
17+
# The gpg module uses agetty on tty1 so this must be overridden
1818
primary_console = "ttyS1"
1919

20-
# Define the root label
21-
[mounts.root]
22-
type = "btrfs"
23-
24-
[mounts.root.source]
25-
label = "rootfs"
26-
2720
# Define console information
2821
[console.ttyS1]
2922
baud = 115_200

examples/subvol.toml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
1-
# This config will decrypt the colume fdf442da-0574-4531-98c7-55227a041f1d, mapping it to "/dev/mapper/root"
1+
# This config will decrypt the volume fdf442da-0574-4531-98c7-55227a041f1d, mapping it to "/dev/mapper/root"
22
# It will attempt to mount the btrfs subvolume "gentoo" from the device with label "rootfs" to /root
3-
# It will pull all current kernel modules from the active kernel version
4-
# The kmod.novideo and kmod.nosound modules are pulled to help minmize pulled modules
3+
# It will pull kernel modules based on the hardware detected by lspci
4+
# The kmod novideo, nosound, and nonetwork modules will be used to restrict the kernel modules pulled
55

66

77
modules = [
88
"ugrd.base.base",
99
"ugrd.kmod.kmod",
1010
"ugrd.kmod.novideo",
1111
"ugrd.kmod.nosound",
12+
"ugrd.kmod.nonetwork",
1213
"ugrd.crypto.cryptsetup",
1314
"ugrd.fs.btrfs",
1415
]
1516

1617
# Optionally supply a kernel version
1718
#kernel_version = "6.1.53-gentoo-dist"
18-
kmod_autodetect_lsmod = true
19+
kmod_autodetect_lspci = true
1920

2021
root_subvol="gentoo"
2122

22-
[mounts.root]
23-
type = "btrfs"
24-
25-
[mounts.root.source]
26-
label = "rootfs"
27-
2823
# The UUID of the encrypted volume, mounted at /dev/mapper/root
2924
[cryptsetup.root]
3025
uuid = "fdf442da-0574-4531-98c7-55227a041f1d"

examples/subvol_selecttor.toml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
1-
# This config will decrypt the colume fdf442da-0574-4531-98c7-55227a041f1d, mapping it to "/dev/mapper/root"
1+
# This config will decrypt the volume fdf442da-0574-4531-98c7-55227a041f1d, mapping it to "/dev/mapper/root"
22
# It will pull all current kernel modules from the active kernel version
3-
# The kmod.novideo and kmod.nosound modules are pulled to help minmize pulled modules
4-
3+
# The kmod novideo, nosound, and nonetwork modules are pulled to help minmize pulled modules.
54

65
modules = [
76
"ugrd.base.base",
87
"ugrd.kmod.kmod",
98
"ugrd.kmod.novideo",
109
"ugrd.kmod.nosound",
10+
"ugrd.kmod.nonetwork",
1111
"ugrd.crypto.cryptsetup",
1212
"ugrd.fs.btrfs",
1313
]
1414

1515
# Optionally supply a kernel version
1616
#kernel_version = "6.1.53-gentoo-dist"
1717
kmod_autodetect_lsmod = true
18+
# Optionally kmod_autodetect_lspci could be used
19+
#kmod_autodetect_lspci = true
1820

1921
# Allows you to dynamically select root subvol at UGRD runtime
2022
subvol_selector = true
2123

22-
[mounts.root]
23-
type = "btrfs"
24-
25-
[mounts.root.source]
26-
label = "rootfs"
27-
2824
# The UUID of the encrypted volume, mounted at /dev/mapper/root
2925
[cryptsetup.root]
3026
uuid = "fdf442da-0574-4531-98c7-55227a041f1d"

examples/vm.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ modules = [
1212
# Optionally supply a kernel version
1313
#kernel_version = "6.1.57-gentoo-custom"
1414

15-
autodetect_root = true
16-
1715
# The UUID of the encrypted volume, mounted at /dev/mapper/root
1816
#[cryptsetup.root]
1917
#uuid = "38a5c4d2-f5af-404a-a663-d789e443a40c"

examples/yubikey.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ type = "vfat"
2727
[mounts.boot.source]
2828
uuid = "4886-A631"
2929

30-
# The label of the volume under the LUKS partition, a UUID could be used
31-
[mounts.root]
32-
type = "btrfs"
33-
34-
[mounts.root.source]
35-
label = "rootfs"
36-
3730
# Information about the LUKS volume
3831
[cryptsetup.root]
3932
uuid = "eee3611d-9b36-42b3-8ed2-62173064c76a"

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Similarly `ugrd.kmod.novideo` `nonetwork`, and `nosound` exist to ignore video,
261261

262262
### Filesystem modules
263263

264-
`autodetect_root` (false) Can be enabled with `--autodetect-root` and will set the root mount parameter automatatically based on the current root label or uuid.
264+
`autodetect_root` (true) Set the root mount parameter based on the current root label or uuid.
265265

266266
#### ugrd.fs.mounts
267267

src/ugrd/fs/mounts.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ binaries = [
88
]
99

1010
mount_wait = false
11+
autodetect_root = true
1112

1213
[imports.config_processing]
1314
"ugrd.fs.mounts" = [ "_process_mounts_multi" ]

0 commit comments

Comments
 (0)