Added a mode to boot installer and dump console and journal to terminal
This commit is contained in:
parent
aafe29e2dd
commit
a07d8d7511
@ -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
|
||||||
|
|
||||||
boot_installer() {
|
COMMON_INSTALLER_ARGS="\
|
||||||
${QEMU} \
|
|
||||||
${ENABLE_KVM} \
|
${ENABLE_KVM} \
|
||||||
${EFI_BIOS} \
|
|
||||||
${MEMORY_ARG} \
|
${MEMORY_ARG} \
|
||||||
|
${EFI_BIOS} \
|
||||||
-vga virtio \
|
-vga virtio \
|
||||||
-usb -device usb-tablet,id=input0 \
|
-usb -device usb-tablet,id=input0 \
|
||||||
-drive format=raw,file=${BUILD_ROOT}/images/citadel-installer.img \
|
-drive format=raw,file=${BUILD_ROOT}/images/citadel-installer.img \
|
||||||
-net none \
|
-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() {
|
boot_kernel() {
|
||||||
|
Loading…
Reference in New Issue
Block a user