Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Try to force a kernel panic for testing, need kernel source::
- sudo apt-get install linux-headers-server linux-source ncurses-dev
- cd ~/src
- tar xvjf /usr/src/linux-source-2.6.28.tar.bz2
- cd linux-source-2.6.28
- make menuconfig
- # Disabled a bunch of crap so kernel would compile faster
- make vmlinux
- make modules_prepare
- mkdir ~/module
- cd ~/module
- # Kbuild:
- #
- # obj-m := panic.o
- # Makefile:
- #
- # KERNELDIR := /home/garry/src/linux-source-2.6.28/
- #
- # all::
- # $(MAKE) -C $(KERNELDIR) M=`pwd` $@
- # panic.c:
- #
- # #include <linux/module.h>
- #
- # int init_module (void) /* Loads a module in the kernel */
- # {
- # panic("I'm sick :(\n");
- # return 0;
- # }
- make -C ~/src/linux-source-2.6.28/ M=`pwd`
- To crash the box::
- cd ~/module
- sudo insmod ./panic.ko
Add Comment
Please, Sign In to add comment