← All notes

Check Kernel Tainted

This prints every bit of the kernel tainted info:

for i in $(seq 18); do echo $(($i-1)) $(($(cat /proc/sys/kernel/tainted)>>($i-1)&1));done

As an example:

[ecomaikgolf@laptop ~/]$ for i in $(seq 18); do echo $(($i-1)) $(($(cat /proc/sys/kernel/tainted)>>($i-1)&1));done
0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0

Every bit shows a reason why the kernel got tainted

Bit tables: https://docs.kernel.org/admin-guide/tainted-kernels.html

Source: https://docs.kernel.org/admin-guide/tainted-kernels.html