Skip to content

WIP: Agnos Kernel Debugging

pencilpusher edited this page Dec 13, 2023 · 9 revisions

Common commands:

Mounting the drive for writing:

mount -o remount, rw /

Ubuntu system logs are located at /var/log and /sys/fs/pstore print the kernel logs to terminal:

dmesg

or print the last few lines with

dmesg | tail

if /sys/fs/pstore doesn't have any files, do a warm reboot then there should be logs.

tail -n 5 /sys/fs/pstore/console-ramoops-0

you may consider /sys/fs/pstore/console-ramoops-0 to be the live message ring you see with dmesg, but snapshotted from the prior boot. doesn't work across cold boots (it's in RAM, hence the name) but it's a fast easy way to glance back at a kernel panic

Connect to the device through a UART connection (slow):

On host computer:

sudo apt install screen
sudo screen /dev/ttyUSB* 115200`

press enter to wake up the UART connection and show the login prompt

username: comma

password: comma

Become root user at the root directory:

sudo -i && cd ..

Clone this wiki locally