Added a mode to boot installer and dump console and journal to terminal

This commit is contained in:
Bruce Leidl 2019-01-07 18:55:57 -05:00
parent aafe29e2dd
commit a07d8d7511

View File

@ -35,6 +35,7 @@ OPTIONS
--no-efi Do not use OVMF UEFI bios
--memory size Set custom guest RAM size
--debug Boot installer with console and journald dumped to terminal
To exit kernel boot type 'ctrl-a x' (See escape sequences in qemu-system man page)
@ -44,6 +45,7 @@ exit 0
BOOT_TARGET=""
MEMORY_ARG="-m 4G"
INSTALLER_DEBUG=0
while [[ $# -gt 0 ]]; do
key=${1}
@ -52,6 +54,10 @@ while [[ $# -gt 0 ]]; do
EFI_BIOS=""
shift
;;
--debug)
INSTALLER_DEBUG=1
shift
;;
--memory)
MEMORY_ARG="-m ${2}"
shift
@ -75,16 +81,25 @@ while [[ $# -gt 0 ]]; do
esac
done
boot_installer() {
${QEMU} \
COMMON_INSTALLER_ARGS="\
${ENABLE_KVM} \
${EFI_BIOS} \
${MEMORY_ARG} \
${EFI_BIOS} \
-vga virtio \
-usb -device usb-tablet,id=input0 \
-drive format=raw,file=${BUILD_ROOT}/images/citadel-installer.img \
-net none \
-smp 2
-smp 2"
boot_installer() {
if [[ ${INSTALLER_DEBUG} -eq 1 ]]; then
${QEMU} ${COMMON_INSTALLER_ARGS} \
-serial stdio \
-kernel ${BUILD_ROOT}/images/bzImage \
-append "console=ttyS0 earlyprintk=ttyS0 root=/dev/mapper/rootfs citadel.verbose citadel.live fstab=no luks=no systemd.journald.forward_to_console=1"
else
${QEMU} ${COMMON_INSTALLER_ARGS}
fi
}
boot_kernel() {