1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Quick start for kdb using a keyboard connected console</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Using kgdb, kdb and the kernel debugger internals"><link rel="up" href="usingKDB.html" title="Chapter&#160;4.&#160;Using kdb"><link rel="prev" href="usingKDB.html" title="Chapter&#160;4.&#160;Using kdb"><link rel="next" href="EnableKGDB.html" title="Chapter&#160;5.&#160;Using kgdb / gdb"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Quick start for kdb using a keyboard connected console</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="usingKDB.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;4.&#160;Using kdb</th><td width="20%" align="right">&#160;<a accesskey="n" href="EnableKGDB.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="quickKDBkeyboard"></a>Quick start for kdb using a keyboard connected console</h2></div></div></div><p>This is a quick example of how to use kdb with a keyboard.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Configure kgdboc at boot using kernel parameters:
2  </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="constant">kgdboc=kbd</code></p></li></ul></div><p>OR</p><p>Configure kgdboc after the kernel has booted:
3  </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="constant">echo kbd &gt; /sys/module/kgdboc/parameters/kgdboc</code></p></li></ul></div><p>
4  </p></li><li class="listitem"><p>Enter the kernel debugger manually or by waiting for an oops or fault.  There are several ways you can enter the kernel debugger manually; all involve using the sysrq-g, which means you must have enabled CONFIG_MAGIC_SYSRQ=y in your kernel config.</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>When logged in as root or with a super user session you can run:</p><p><code class="constant">echo g &gt; /proc/sysrq-trigger</code></p></li><li class="listitem"><p>Example using a laptop keyboard</p><p>Press and hold down: <code class="constant">Alt</code></p><p>Press and hold down: <code class="constant">Fn</code></p><p>Press and release the key with the label: <code class="constant">SysRq</code></p><p>Release: <code class="constant">Fn</code></p><p>Press and release: <code class="constant">g</code></p><p>Release: <code class="constant">Alt</code></p></li><li class="listitem"><p>Example using a PS/2 101-key keyboard</p><p>Press and hold down: <code class="constant">Alt</code></p><p>Press and release the key with the label: <code class="constant">SysRq</code></p><p>Press and release: <code class="constant">g</code></p><p>Release: <code class="constant">Alt</code></p></li></ul></div></li><li class="listitem"><p>Now type in a kdb command such as "help", "dmesg", "bt" or "go" to continue kernel execution.</p></li></ol></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="usingKDB.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="usingKDB.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="EnableKGDB.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;4.&#160;Using kdb&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;5.&#160;Using kgdb / gdb</td></tr></table></div></body></html>
5