payload=42218a2c-27af-a149-bc0c-7975b9a8e28b+1
cat /proc/cmdline:
cros_secure loglevel=7 console= init=/sbin/init cros_secure root=/dev/dm-0 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="1 vroot none ro 1,0 2097152 verity payload=42218a2c-27af-a149-bc0c-7975b9a8e28b+1 hashtree=42218a2c-27af-a149-bc0c-7975b9a8e28b+1 hashstart=2097152 alg=sha1 root_hexdigest=f99835bc4e44eb4f717564b0aa48971503dc88db salt=e67840f977911bca10efa61b7e7f15dda6b7e13ad04681088f679dd408739664" noinitrd vt.global_cursor_default=0 kern_guid=42218a2c-27af-a149-bc0c-7975b9a8e28b add_efi_memmap boot=local noresume noswap i915.modeset=1 tpm_tis.force=1 tpm_tis.interrupts=0 nmi_watchdog=panic,lapic
KERNEL_GUID+1 is the now old way of expressing
PARTUUID=[guid]/PARTNOFF=1 which the kernel supports itself. The
kernel guid is supplied by the firmware by replacing %U in the kernel
cmdline after it has signature checked it. We always keep the kernel
partition one before the root part (and dm-verity enforces that this
is true by integrity checking the blocks).
Ah yeah. Normally the kernel parses its commandline looking for"root=XXX". We tell it to use root=/dev/dm-0 (or dm-1 depending).
That represents the device-mapper device we want to treat as our root.
dm="" setups of the device mapper device we will treat as root. In
this case, payload= points to the real root drive, and then dm-verity
uses that to setup /dev/dm-0. When /dev/dm-0 becomes available, the
kernel continues ot boot.
Yup: root=/dev/dm-0
dm="stuff" -> dm-verity(%U+1) -> /dev/dm-0
Yup. The %U is the partition uuid. This is populated in the kernel
when it scans the partition table for block devices on the system.
Then the dm-verity code uses the partuuid to search through the block
devices for the matching partition uuid. This is the same as the code
is in the kernel if you do "root=PARTUUID=xxyyzz/PARTNROFF=1".
http://lxr.linux.no/linux+v3.8.4/init/do_mounts.c#L190
We haven't managed to get dm="blah" upstream yet, but I should try
again sometime soon.
Does that make more sense? Thanks!
will