Help with fsck and tune2fs

This commit is contained in:
Martin Blazik
2022-04-15 16:53:05 +02:00
parent d46e312af4
commit 2b40e0c838

24
scripts/fsck-help.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# https://unixadminguide.blogspot.com/2013/12/how-to-disable-fsck-on-reboot-in-linux.html
#
# tune2fs:
# -l -> list
# -c max-mount-counts, 0 or -1 -> disabled
# -i interval-between-checks[d|m|w] , 0 -> disabled
set -E -o errexit -o nounset -o pipefail
readonly SCRIPT_NAME=$(basename "${BASH_SOURCE[0]}")
function show() {
local device=$1
tune2fs -l $device | egrep -i 'mount count|check' | egrep -i -v checksum
}
if [[ $# -lt 1 ]]; then
echo "use: $SCRIPT_NAME <disk-device>"
exit 1
fi
show $1