aboutsummaryrefslogtreecommitdiff
path: root/www/faq.md
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2018-10-24 20:43:46 +0200
committerFedja Beader <fedja@protonmail.ch>2018-11-03 02:25:52 +0100
commit197a3fd2819313ede154baa622934f7a63ff71e9 (patch)
tree2118e6c386d22938f4230b7281794869f0fd2097 /www/faq.md
parent73465bd7750ebae55f31f9b9d38292297719cb84 (diff)
downloadlibrebootfr-197a3fd2819313ede154baa622934f7a63ff71e9.tar.gz
librebootfr-197a3fd2819313ede154baa622934f7a63ff71e9.zip
Add kernel panic/netconsole info to FAQ
Diffstat (limited to 'www/faq.md')
-rw-r--r--www/faq.md66
1 files changed, 66 insertions, 0 deletions
diff --git a/www/faq.md b/www/faq.md
index ccbee214..7fcc8ddd 100644
--- a/www/faq.md
+++ b/www/faq.md
@@ -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
======================