mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 14:06:58 +02:00
commit
abc38e033b
@ -52,7 +52,7 @@ if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Common kernel command-line args
|
# Common kernel command-line args
|
||||||
common_args="init=/sbin/init console=tty0 boot=local rootwait ro noresume"
|
common_args="console=tty0 rootwait ro"
|
||||||
common_args="${common_args} noswap ${FLAGS_boot_args}"
|
common_args="${common_args} noswap ${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.
|
||||||
@ -69,28 +69,31 @@ if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then
|
|||||||
GRUB_DIR="${FLAGS_to}/boot/grub"
|
GRUB_DIR="${FLAGS_to}/boot/grub"
|
||||||
sudo mkdir -p "${GRUB_DIR}"
|
sudo mkdir -p "${GRUB_DIR}"
|
||||||
|
|
||||||
|
# Add hvc0 for hypervisors
|
||||||
|
grub_args="${common_args} console=hvc0"
|
||||||
|
|
||||||
cat <<EOF | sudo dd of="${GRUB_DIR}/menu.lst.A" 2>/dev/null
|
cat <<EOF | sudo dd of="${GRUB_DIR}/menu.lst.A" 2>/dev/null
|
||||||
timeout 0
|
timeout 0
|
||||||
|
|
||||||
title CoreOS A Kernel
|
title CoreOS A Kernel
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz.A ${common_args} root=gptprio: cros_legacy
|
kernel /syslinux/vmlinuz.A ${grub_args} root=gptprio: cros_legacy
|
||||||
|
|
||||||
title CoreOS B Kernel
|
title CoreOS B Kernel
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz.B ${common_args} root=gptprio: cros_legacy
|
kernel /syslinux/vmlinuz.B ${grub_args} root=gptprio: cros_legacy
|
||||||
|
|
||||||
title CoreOS bootengine
|
title CoreOS bootengine
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz-boot_kernel ${common_args} root=gptprio: cros_legacy
|
kernel /syslinux/vmlinuz-boot_kernel ${grub_args} root=gptprio: cros_legacy
|
||||||
|
|
||||||
title CoreOS A Root Rescue
|
title CoreOS A Root Rescue
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz.A ${common_args} root=${ROOTA} cros_legacy
|
kernel /syslinux/vmlinuz.A ${grub_args} root=${ROOTA} cros_legacy
|
||||||
|
|
||||||
title CoreOS B Root Rescue
|
title CoreOS B Root Rescue
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /syslinux/vmlinuz.B ${common_args} root=${ROOTB} cros_legacy
|
kernel /syslinux/vmlinuz.B ${grub_args} root=${ROOTB} cros_legacy
|
||||||
EOF
|
EOF
|
||||||
info "Emitted ${GRUB_DIR}/menu.lst.A"
|
info "Emitted ${GRUB_DIR}/menu.lst.A"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user