Skip to content

Commit

Permalink
show kernel messages in verbose mode
Browse files Browse the repository at this point in the history
skips using "quiet" kernel parameter

introducing --verbose option
  • Loading branch information
adrianschroeter committed Jan 12, 2022
1 parent fc4e083 commit 0eba40b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ definesnstuff=()
repos=()
old_packages=()

# set all verbose modes to off by default
verbose_vm=

# slurp in vm support
. "$BUILD_DIR/build-vm"

Expand Down Expand Up @@ -333,6 +336,10 @@ Known Parameters:
--emulator-script SCRIPT
specify another emulator instead of emulator.sh
--verbose STACK
Verbose output, STACK can be 'all' or a specific one:
vm: includes kernel and initrd messages
--vm-type TYPE
Use virtual machine instead of chroot
TYPE is one of xen|kvm|uml|qemu|lxc|zvm|openstack|ec2|docker|pvm|nspawn
Expand Down Expand Up @@ -1240,6 +1247,22 @@ while test -n "$1"; do
RSYNCDEST=$ARG
shift
;;
-verbose)
needarg
case "$ARGS" in
all)
verbose_vm=true
;;
vm)
verbose_vm=true
;;
*)
echo "WARNING: unknown verbose option $ARGS"
;;
esac
verbose=("${verbose[@]}" "$ARG")
shift
;;
-uid)
needarg
if test -n "${ARG//[0-9:]/}" ; then
Expand Down
3 changes: 2 additions & 1 deletion build-vm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# so disabling spectre/meltdown mitigations doesn't hurt security and gains performance
vm_linux_kernel_parameter="mitigations=off"
# Make sure that dodgy kernels fail quickly and early
vm_linux_always_append="oops=panic panic=1 quiet"
vm_linux_always_append="oops=panic panic=1"

# guest visible devices
VM_ROOTDEV=/dev/hda1
Expand Down Expand Up @@ -101,6 +101,7 @@ vm_detach_swap() {
}

vm_fixup() {
test -z "$verbose_vm" && vm_linux_always_append="$vm_linux_always_append quiet"
vm_fixup_$VM_TYPE "$@"
}

Expand Down

0 comments on commit 0eba40b

Please sign in to comment.