summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffery Miller <jefferymiller@google.com>2022-02-07 20:32:51 -0600
committerCommit Bot <commit-bot@chromium.org>2022-02-11 15:18:44 +0000
commit5e0626d006198c9571dc0ca107cd87e1ac9e13ac (patch)
treef892cb08b20f5f3c27fb33830e68b547436ade75
parent2b1e932c2fb06d5631eb21014c5fe93883193ccd (diff)
downloadvboot-5e0626d006198c9571dc0ca107cd87e1ac9e13ac.tar.gz
make_dev_ssd.sh: Update grub defaultA and defaultB
Update the defaultA=2 and defaultB=3 grub settings to remove verification. In change I930d0f3f1a3f8f54edd1dce7f8259e3c261af9a1 the default options for grub were changed to be defaultA and defaultB instead of 'set default=2'. Update the removal to support these new configuration settings. BRANCH=none BUG=b:186240229 TEST=on a reven build run `/usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --force`; reboot and confirm verity is disabled Change-Id: I70ceed432c29865715c525a6ae13f0e7da8ee0ba Signed-off-by: Jeffery Miller <jefferymiller@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3445175 Reviewed-by: Nicholas Bishop <nicholasbishop@google.com> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Nicholas Bishop <nicholasbishop@google.com>
-rwxr-xr-xscripts/image_signing/make_dev_ssd.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/image_signing/make_dev_ssd.sh b/scripts/image_signing/make_dev_ssd.sh
index 992d89c9..d9df52a5 100755
--- a/scripts/image_signing/make_dev_ssd.sh
+++ b/scripts/image_signing/make_dev_ssd.sh
@@ -106,8 +106,9 @@ remove_legacy_boot_rootfs_verification() {
debug_msg "Removing rootfs verification for legacy boot configuration."
mount_image_partition "$image" 12 "$mount_point" || return $FLAGS_FALSE
config_file="$mount_point/efi/boot/grub.cfg"
- [ ! -f "$config_file" ] ||
- sudo sed -i 's/^ *set default=2 *$/set default=0/g' "$config_file"
+ [ ! -f "${config_file}" ] ||
+ sudo sed -i -e 's/^ *defaultA=2 *$/defaultA=0/g' \
+ -e 's/^ *defaultB=3 *$/defaultB=1/g' "${config_file}"
config_file="$mount_point/syslinux/default.cfg"
[ ! -f "$config_file" ] ||
sudo sed -i 's/-vusb/-usb/g; s/-vhd/-hd/g' "$config_file"