You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qubes-installer-qubes-os/anaconda/scripts/anaconda-pre-log-gen

21 lines
581 B

#! /bin/bash
# Script to be run by anaconda-pre service before anaconda starts to gather
# information about previous system state
# where the resulting logs will be stored
TARGET_DIRECTORY=/tmp/pre-anaconda-logs
BOOT_OPTIONS_FILE=/proc/cmdline
DEBUG_ENABLED=`cat $BOOT_OPTIONS_FILE | egrep -c "\<debug\>|\<inst\.debug\>"`
# do not produce any logs unless debug is enabled
[ $DEBUG_ENABLED == '0' ] && exit 0
mkdir ${TARGET_DIRECTORY}
lsblk -a > ${TARGET_DIRECTORY}/block_devices.log
dmesg > ${TARGET_DIRECTORY}/kernel_ring_buffer.log
lvmdump -d ${TARGET_DIRECTORY}/lvmdump