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