Whole document tree
4. Setup, Test, and Running crash4.1. Setting up crash dumpIn order to save a core image that has been written into swap, the image must be saved prior to swap being re-mounted during boot. To accomplish this, the sysinit startup file needs to be changed. The lkcd source includes a scripts directory which contains patches for various sysinit startup scripts. These patches add the lkcd config and lkcd save commands to enable crash dumps and to save any existing crash dumps upon startup. 4.2. Testing crashTo force a panic to test you new crash setup, compile the following code with cc -c -I/usr/src/linux/include panic.c . After building the panic.o module just insmod panic.o to panic the kernel.
4.3. Running crashTo view your kernel core file lcrash needs to be invoked with a couple of parameters:
It will take a minute to load the kernel image into memory and drop you into the crash shell. At the crash shell prompt you can type a ? to see the available commands. |