Changed linux command line to use the linux format for uuids
Changed the linux command line so UUIDs to use PARTUUID=%U[/PARNTOFF=%d].
The old command line format will still be accepted for the next month
before we delete the dual format support from the kernel.
For now, kern_guid is excluded until installer and any other
users of kern_guid can be fixed.
Added changes required to work with legacy systems and VMTest.
BUG=chromium:224066
TEST=booted with new format with verity, no verity, and bootcaches on legacy, chromebooks and try bots.
Change-Id: I9152250e7ad7fda5c7cfe9434c64362fcb57828c
Reviewed-on: https://gerrit.chromium.org/gerrit/57816
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
(cherry picked from commit b6cf37f7e2e2b925b852b2c2f752bc9b382c4115)
Reviewed-on: https://chromium-review.googlesource.com/167604
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Commit-Queue: Katie Roberts-Hoffman <katierh@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
diff --git a/build_kernel_image.sh b/build_kernel_image.sh
index 5ffe3f3..6130608 100755
--- a/build_kernel_image.sh
+++ b/build_kernel_image.sh
@@ -122,7 +122,7 @@
if [[ ${FLAGS_enable_bootcache} -eq ${FLAGS_TRUE} ]]; then
base_root='254:0' # major:minor numbers for /dev/dm-0
else
- base_root='%U+1' # kern_guid + 1
+ base_root='PARTUUID=%U/PARTNROFF=1' # kern_guid + 1
fi
table=${table//HASH_DEV/${base_root}}
table=${table//ROOT_DEV/${base_root}}
@@ -134,8 +134,9 @@
size_limit=512
max_trace=20000
max_pages=100000
- bootcache_args="%U+1 ${cachestart} ${signature} ${size_limit}"
- bootcache_args="${bootcache_args} ${max_trace} ${max_pages}"
+ bootcache_args="PARTUUID=%U/PARTNROFF=1"
+ bootcache_args+=" ${cachestart} ${signature} ${size_limit}"
+ bootcache_args+=" ${max_trace} ${max_pages}"
bootcache_dev="vboot none ro 1,0 ${cachestart} bootcache ${bootcache_args}"
device_mapper_args="dm=\"2 ${bootcache_dev}, ${verity_dev}\""
else
@@ -165,6 +166,7 @@
fi
fi
+# kern_guid should eventually be changed to use PARTUUID
cat <<EOF > "${FLAGS_working_dir}/boot.config"
root=${root_dev}
rootwait
diff --git a/update_bootloaders.sh b/update_bootloaders.sh
index 7738725..c7dfc7c 100755
--- a/update_bootloaders.sh
+++ b/update_bootloaders.sh
@@ -174,7 +174,7 @@
# Extract kernel flags
kernel_cfg=
- old_root="%U+1"
+ old_root='PARTUUID=%U/PARTNROFF=1'
if [[ -n "${FLAGS_kernel_cmdline}" ]]; then
info "Using supplied kernel_cmdline to update templates."
kernel_cfg="${FLAGS_kernel_cmdline}"