dmverity: use dedicated command-line argument for the root device#30
Open
michaelolbrich wants to merge 1 commit intopengutronix:mainfrom
Open
dmverity: use dedicated command-line argument for the root device#30michaelolbrich wants to merge 1 commit intopengutronix:mainfrom
michaelolbrich wants to merge 1 commit intopengutronix:mainfrom
Conversation
Using root= is problematic. If for some reason the verity-params or the entire initramfs are lost during build, then rsinit or the kernel will happily mount the rootfs without dm-verity. Instead, use rsinit.verity_root= as command-line option to specify the root device. The case above will now trigger a kernel panic because no rootfs is found. This makes it less likely to accidentally mount the rootfs without dm-verity. If the old behaviour is desired, then a custom init can copy CmdlineOptions.root to CmdlineOptions.verity_root after the command-line is parsed but before the rootfs is mounted. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
KarlK90
approved these changes
Mar 10, 2026
gumulka
approved these changes
Mar 11, 2026
Member
gumulka
left a comment
There was a problem hiding this comment.
Tested-by: Fabian Pflug f.pflug@pengutronix.de
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using root= is problematic. If for some reason the verity-params or the entire initramfs are lost during build, then rsinit or the kernel will happily mount the rootfs without dm-verity.
Instead, use rsinit.verity_root= as command-line option to specify the root device. The case above will now trigger a kernel panic because no rootfs is found.
This makes it less likely to accidentally mount the rootfs without dm-verity.
If the old behaviour is desired, then a custom init can copy CmdlineOptions.root to CmdlineOptions.verity_root after the command-line is parsed but before the rootfs is mounted.