diff options
author | Fedja Beader <fedja@protonmail.ch> | 2018-10-24 20:43:46 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2018-11-03 02:25:52 +0100 |
commit | 197a3fd2819313ede154baa622934f7a63ff71e9 (patch) | |
tree | 2118e6c386d22938f4230b7281794869f0fd2097 | |
parent | 73465bd7750ebae55f31f9b9d38292297719cb84 (diff) | |
download | librebootfr-197a3fd2819313ede154baa622934f7a63ff71e9.tar.gz librebootfr-197a3fd2819313ede154baa622934f7a63ff71e9.zip |
Add kernel panic/netconsole info to FAQ
-rw-r--r-- | www/faq.md | 66 |
1 files changed, 66 insertions, 0 deletions
@@ -149,6 +149,72 @@ cryptomount command from `for` loop in libreboot's It could be fixed in upstream grub by contributing patch that would add quiet flag to it. +How to save kernel panic logs on thinkpad laptops? +-------------------------------------------------- + +The easiest method of doing so is by using the kernel's netconsole +and reproducing the panic. Netconsole requires two machines, the one that is +panicky (source) and the one that will receive crash logs (target). The +source has to be connected with an ethernet cable and the target has to be +reachable at the time of the panic. To set this system up, execute the +following commands as root on the source (`source#`) and normal user on +the target (`target$`): + +1. Start a listener server on the target machine (netcat works well): + + `target$ nc -u -l -p 6666` + +2. Mount configfs (only once per boot, you can check if it is already mounted + with `mount | grep /sys/kernel/config`. This will return no output + if it is not). + + `source# modprobe configfs` + + `source# mkdir -p /sys/kernel/config` + + `source# mount none -t configfs /sys/kernel/config` + +3. find source's ethernet interface name, it should be of the form `enp*` or + `eth*`, see `ip address` or `ifconfig` output. + + `source# iface="enp0s29f8u1"` change this + + Fill the target machine's IPv4 address here: + + `source# tgtip="192.168.1.2"` change this + + +3. Create netconsole logging target on the source machine: + + `source# modprobe netconsole` + + `source# cd /sys/kernel/config/netconsole` + + `source# mkdir target1; cd target1` + + `source# srcip=$(ip -4 addr show dev "$iface" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')` + + `source# echo "$srcip" > local_ip` + + `source# echo "$tgtip" > remote_ip` + + `source# echo "$iface" > dev_name` + + `source# arping -I "$iface" "$tgtip" -f | grep -o '..:..:..:..:..:..' > remote_mac` + + `source# echo 1 > enabled` + +4. Change console loglevel to debugging: + + `source# dmesg -n debug` + +5. Test if the logging works by e.g. inserting or removing an USB + device on the source. There should be a few lines appearing in the + terminal, in which you started netcat (nc), on the target host. + +6. Try to reproduce the kernel panic. + + Hardware compatibility ====================== |