The usual IT babble
Posts tagged Kernel
Rescuing a rebooting machine that’s hanging
May 24th
One of my co-worker approached me today with a weird problem. Yesterday he had a disk in a 900GiB array failing which he replaced. After that, he run a rebuild/verification, fsck’ed the file system and tried to mount the volume again.
Apparently the mount produced a kernel oops (guess what, the 900GiB is running reiserfs), thus leaving the kernel tainted (or what do they call it ?). So he tried to reboot the box but it didn’t reboot. It started rebooting but then hung (as in not continuing the reboot). He tried to ssh back to the box, and it worked just fine.
This is where sysrq comes in handy.
1 2 3 4 5 6 | # This is gonna activate the sysrq echo 1 > /proc/sys/kernel/sysrq # Now, since we ain't at a console, we can't use the sysrq keys # ("b" for reboot, "o" for shutdown) echo b > /proc/sysrq-trigger |
That’ll restart the box, and cha-ching ..
git-lkml for stupid people (like me)
Aug 16th
OK, as Stephen recently asked why there is a double inclusion of
But, git ain’t easy for people like me (who are used to the easiness of say – subversion or even cvs). So here’s what I did (thanks to Fernando for the help earlier today):
$ vim kernel/sysctl.c // change something $ git checkout -b sysctl // create a new branch from your changes, based upon the master repository $ git commit -a -s // commit the changes to your newly created branch $ git format-patch master..sysctl // Enter a subject and then a separate description // and you should have a new file in the current working directory starting like 0001-*.patch
Now you should have a mailable patch, ready to be sent upstream that looks like this:
From 839ce261cf688d62bebd9ae3a0101dd672018940 Mon Sep 17 00:00:00 2001 From: Christian Heim <phreak@gentoo.org> Date: Sun, 19 Aug 2007 12:51:52 +0200 Subject: [PATCH] Remove double inclusion of linux/capability.h Remove the second inclusion of linux/capability.h, which has been introduced with "[PATCH] move capable() to capability.h" (or commit c59ede7b78db329949d9cdcd7064e22d357560ef). Signed-off-by: Christian Heim <phreak@gentoo.org> --- kernel/sysctl.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8bdb8c0..9029690 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -27,7 +27,6 @@ #include <linux/capability.h> #include <linux/ctype.h> #include <linux/utsname.h> -#include <linux/capability.h> #include <linux/smp_lock.h> #include <linux/fs.h> #include <linux/init.h> -- 1.5.3.rc4
And if you wanna delete the branch afterwards again, just do this:
$ git checkout master // Switch back to the master branch $ git branch -D sysctl // Delete the old branch named "sysctl"