mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
cleanup(boot): remove lingering dm-verity bits, cleanup kernel args.
Remove unused dev/dm-0 vs dm-1 logic from verity and the associated rootwait option it required (meaningless with our initrd). Move old cros_legacy to common instead of using it in every command line option. We should remove it entirely soon since it isn't useful for us. Remove unneeded intel graphics modeset option.
This commit is contained in:
parent
2edd22024e
commit
c21b8ee03d
@ -40,20 +40,9 @@ switch_to_strict_mode
|
|||||||
# Useful for getting partition UUID values
|
# Useful for getting partition UUID values
|
||||||
. "${BUILD_LIBRARY_DIR}/disk_layout_util.sh" || exit 1
|
. "${BUILD_LIBRARY_DIR}/disk_layout_util.sh" || exit 1
|
||||||
|
|
||||||
# Only let dm-verity block if rootfs verification is configured.
|
|
||||||
# Also, set which device mapper correspondes to verity
|
|
||||||
dev_wait=0
|
|
||||||
ROOTDEV=/dev/dm-0
|
|
||||||
if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
|
|
||||||
dev_wait=1
|
|
||||||
if [[ ${FLAGS_enable_bootcache} -eq ${FLAGS_TRUE} ]]; then
|
|
||||||
ROOTDEV=/dev/dm-1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Common kernel command-line args
|
# Common kernel command-line args
|
||||||
common_args="console=tty0 rootwait ro"
|
common_args="console=tty0 ro noswap cros_legacy"
|
||||||
common_args="${common_args} noswap ${FLAGS_boot_args}"
|
common_args="${common_args} ${FLAGS_boot_args}"
|
||||||
|
|
||||||
# Populate the x86 rootfs to support legacy and EFI bios config templates.
|
# Populate the x86 rootfs to support legacy and EFI bios config templates.
|
||||||
# The templates are used by the installer to populate partition 12 with
|
# The templates are used by the installer to populate partition 12 with
|
||||||
@ -77,23 +66,23 @@ timeout 0
|
|||||||
|
|
||||||
title CoreOS A Kernel
|
title CoreOS A Kernel
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz.A ${grub_args} root=gptprio: cros_legacy
|
kernel /syslinux/vmlinuz.A ${grub_args} root=gptprio:
|
||||||
|
|
||||||
title CoreOS B Kernel
|
title CoreOS B Kernel
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz.B ${grub_args} root=gptprio: cros_legacy
|
kernel /syslinux/vmlinuz.B ${grub_args} root=gptprio:
|
||||||
|
|
||||||
title CoreOS bootengine
|
title CoreOS bootengine
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz-boot_kernel ${grub_args} root=gptprio: cros_legacy
|
kernel /syslinux/vmlinuz-boot_kernel ${grub_args} root=gptprio:
|
||||||
|
|
||||||
title CoreOS A Root Rescue
|
title CoreOS A Root Rescue
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz.A ${grub_args} root=${ROOTA} cros_legacy
|
kernel /syslinux/vmlinuz.A ${grub_args} root=${ROOTA}
|
||||||
|
|
||||||
title CoreOS B Root Rescue
|
title CoreOS B Root Rescue
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz.B ${grub_args} root=${ROOTB} cros_legacy
|
kernel /syslinux/vmlinuz.B ${grub_args} root=${ROOTB}
|
||||||
EOF
|
EOF
|
||||||
info "Emitted ${GRUB_DIR}/menu.lst.A"
|
info "Emitted ${GRUB_DIR}/menu.lst.A"
|
||||||
|
|
||||||
@ -130,14 +119,14 @@ EOF
|
|||||||
label boot_kernel
|
label boot_kernel
|
||||||
menu label boot_kernel
|
menu label boot_kernel
|
||||||
kernel vmlinuz-boot_kernel
|
kernel vmlinuz-boot_kernel
|
||||||
append ${common_args} root=gptprio: cros_legacy
|
append ${common_args} root=gptprio:
|
||||||
EOF
|
EOF
|
||||||
info "Emitted ${SYSLINUX_DIR}/boot_kernel.cfg"
|
info "Emitted ${SYSLINUX_DIR}/boot_kernel.cfg"
|
||||||
cat <<EOF | sudo dd of="${SYSLINUX_DIR}/root.A.cfg" 2>/dev/null
|
cat <<EOF | sudo dd of="${SYSLINUX_DIR}/root.A.cfg" 2>/dev/null
|
||||||
label coreos.A
|
label coreos.A
|
||||||
menu label coreos.A
|
menu label coreos.A
|
||||||
kernel vmlinuz.A
|
kernel vmlinuz.A
|
||||||
append ${common_args} root=${ROOTA} i915.modeset=1 cros_legacy
|
append ${common_args} root=${ROOTA}
|
||||||
EOF
|
EOF
|
||||||
info "Emitted ${SYSLINUX_DIR}/root.A.cfg"
|
info "Emitted ${SYSLINUX_DIR}/root.A.cfg"
|
||||||
|
|
||||||
@ -145,7 +134,7 @@ EOF
|
|||||||
label coreos.B
|
label coreos.B
|
||||||
menu label coreos.B
|
menu label coreos.B
|
||||||
kernel vmlinuz.B
|
kernel vmlinuz.B
|
||||||
append ${common_args} root=${ROOTB} i915.modeset=1 cros_legacy
|
append ${common_args} root=${ROOTB}
|
||||||
EOF
|
EOF
|
||||||
info "Emitted ${SYSLINUX_DIR}/root.B.cfg"
|
info "Emitted ${SYSLINUX_DIR}/root.B.cfg"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user