Don't use serial console with bare metal option and user provided kernel

This commit is contained in:
Paul Dersey 2023-06-19 08:49:04 -04:00
parent c61b4afd8a
commit 5b9fd08dc0
1 changed files with 9 additions and 3 deletions

View File

@ -33,9 +33,15 @@ go_sysb() {
mount -t proc proc /proc mount -t proc proc /proc
# kexec time # kexec time
echo "Loading kernel + sysb initramfs using kexec" echo "Loading kernel + sysb initramfs using kexec"
kexec -l "/boot/linux-4.9.10" --console-serial \ if [ "${BARE_METAL}" = True ]; then
--initrd="/boot/initramfs-sysb.cpio.gz" \ kexec -l "/boot/linux-4.9.10" \
--append="init=/init console=ttyS0" --initrd="/boot/initramfs-sysb.cpio.gz" \
--append="init=/init"
else
kexec -l "/boot/linux-4.9.10" --console-serial \
--initrd="/boot/initramfs-sysb.cpio.gz" \
--append="init=/init console=ttyS0"
fi
echo "kexecing into sysb" echo "kexecing into sysb"
kexec -e kexec -e
fi fi