Skip to content

Commit 35c1705

Browse files
committed
Dependency adjust for Verity and UKI.
1 parent e1f69b9 commit 35c1705

8 files changed

Lines changed: 9 additions & 11 deletions

File tree

docs/imagecustomizer/how-to/verity-and-uki.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ the future.
9090
install:
9191
- veritysetup
9292
- systemd-boot
93-
- efibootmgr
94-
- lvm2
93+
- device-mapper
9594
```
9695
9796
2. Run Image Customizer to create the image file.

toolkit/tools/pkg/imagecustomizerlib/customizeuki.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ func validateUkiDependencies(imageChroot *safechroot.Chroot) error {
144144
// The following packages are required for the UKI feature:
145145
// - "systemd-boot": Checked as a package dependency here to ensure installation,
146146
// but additional configuration is handled elsewhere in the UKI workflow.
147-
// - "efibootmgr": Used for managing EFI boot entries.
148-
requiredRpms := []string{"systemd-boot", "efibootmgr"}
147+
requiredRpms := []string{"systemd-boot"}
149148

150149
// Iterate over each required package and check if it's installed.
151150
for _, pkg := range requiredRpms {

toolkit/tools/pkg/imagecustomizerlib/customizeverity.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ func parseSystemdVerityOptions(options string) (imagecustomizerapi.CorruptionOpt
325325
}
326326

327327
func validateVerityDependencies(imageChroot *safechroot.Chroot) error {
328-
requiredRpms := []string{"lvm2"}
328+
// "device-mapper" is required for dm-verity support because it provides "dmsetup",
329+
// which Dracut needs to install the "dm" module (a dependency of "systemd-veritysetup").
330+
requiredRpms := []string{"device-mapper"}
329331

330332
// Iterate over each required package and check if it's installed.
331333
for _, pkg := range requiredRpms {

toolkit/tools/pkg/imagecustomizerlib/testdata/artifacts-output.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ os:
5858
- grub2-efi-binary
5959
install:
6060
- systemd-boot
61-
- efibootmgr
6261
- openssh-server
6362

6463
services:

toolkit/tools/pkg/imagecustomizerlib/testdata/verity-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ os:
6565
- openssh-server
6666
- veritysetup
6767
- vim
68-
- lvm2
68+
- device-mapper
6969

7070
additionalFiles:
7171
# Change the directory that the sshd-keygen service writes the SSH host keys to.

toolkit/tools/pkg/imagecustomizerlib/testdata/verity-partition-labels.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ os:
6969
- openssh-server
7070
- veritysetup
7171
- vim
72-
- lvm2
72+
- device-mapper
7373

7474
additionalFiles:
7575
# Change the directory that the sshd-keygen service writes the SSH host keys to.

toolkit/tools/pkg/imagecustomizerlib/testdata/verity-usr-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ os:
6767
- openssh-server
6868
- veritysetup
6969
- vim
70-
- lvm2
70+
- device-mapper
7171

7272
services:
7373
enable:

toolkit/tools/pkg/imagecustomizerlib/testdata/verity-usr-uki.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,4 @@ os:
6868
install:
6969
- veritysetup
7070
- systemd-boot
71-
- efibootmgr
72-
- lvm2
71+
- device-mapper

0 commit comments

Comments
 (0)