defaultA=2
defaultB=3
gptpriority $grubdisk 17 prioA
gptpriority $grubdisk 19 prioB
if [ $prioA -lt $prioB ]; then
set default=$defaultB
else
set default=$defaultA
fi
set timeout=0
set color_normal=black/black
# NOTE: These magic grub variables are a Chrome OS hack. They are not portable.
menuentry "local image A" {
linuxefi /syslinux/vmlinuz.A init=/sbin/init boot=local rootwait ro noresume
noswap quiet loglevel=3 noinitrd console= i915.modeset=1 cros_efi
cros_debug root=/dev/$linuxpartA
}
menuentry "local image B" {
linuxefi /syslinux/vmlinuz.B init=/sbin/init boot=local rootwait ro noresume
noswap quiet loglevel=3 noinitrd console= i915.modeset=1 cros_efi
cros_debug root=/dev/$linuxpartB
}
menuentry "verified image A" {
linuxefi /syslinux/vmlinuz.A init=/sbin/init boot=local rootwait ro noresume
noswap quiet loglevel=3 noinitrd console= dm_verity.error_behavior=3
dm_verity.max_bios=-1 dm_verity.dev_wait=1 i915.modeset=1 cros_efi
cros_debug root=/dev/dm-0 dm="DMTABLEA"
}
menuentry "verified image B" {
linuxefi /syslinux/vmlinuz.B init=/sbin/init boot=local rootwait ro noresume
noswap quiet loglevel=3 noinitrd console= dm_verity.error_behavior=3
dm_verity.max_bios=-1 dm_verity.dev_wait=1 i915.modeset=1 cros_efi
cros_debug root=/dev/dm-0 dm="DMTABLEB"
}
# FIXME: usb doesn't support verified boot for now
menuentry "Alternate USB Boot" {
linuxefi (hd0,18)/boot/vmlinuz init=/sbin/init boot=local rootwait ro
noresume noswap quiet loglevel=3 noinitrd console= root=HDROOTUSB
i915.modeset=1 cros_efi cros_debug
}