Prevent kernel Panic on kernel compilation
This is how you can insure that after compiling a kernel on a remote system you can still have a running system without much bother about kernel panic
This is what the original grub.conf looks like
default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.9-prep) root (hd0,0) kernel /vmlinuz-2.6.9-prep ro root=LABEL=/ initrd /initrd-2.6.9-prep.img
Ok so now we have compiled a new kernel (for example 2.6.18-prep) and the grub looks like I’ve added the command of panic=5 (can have panic=* where * is the number of seconds it waits on a panic) at the end this is to reboot the computer in 5 seconds if kernel panics and will boot with default=1 kernel.
default=1 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-prep) root (hd0,0) kernel /vmlinuz-2.6.18-prep ro root=LABEL=/ panic=5 initrd /initrd-2.6.18-prep.img title CentOS (2.6.9-prep) root (hd0,0) kernel /vmlinuz-2.6.9-prep ro root=LABEL=/ panic=5 initrd /initrd-2.6.9-prep.img
or run
perl -pi -e's/LABEL\=\//LABEL\=\/ panic\=5/g' /etc/grub.conf
But we need to test the default=0 kernel to do this before reboot type
echo "savedefault --default=0 --once" | grub --batch
And then reboot. It will boot once with new kernel. you can check it by uname -r
If the m/c successfully boots with the new kernel go ahead and change the grub to defaults to 0 and reboot once more.
Sorry, the comment form is closed at this time.
-
Recent
- Set Time Zone + Fedora 18
- Fedora 17 + Tata Photon (Huawei)
- Fedora 17: Install OpenSSH Server
- Change the default keyring password
- Error: Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!
- Gnone 3.X adding personal launcher
- Gnome 3.x Change Panel
- KDE remove autostart programs
- GPS on Linux
- Debian Squeeze change root password
- Download YouTube Videos on Linux
- Pidgin + The certificate for omega.contacts.msn.com could not be validated
-
Links
-
Archives
- April 2013 (1)
- September 2012 (2)
- August 2012 (2)
- July 2012 (2)
- November 2011 (1)
- July 2011 (1)
- April 2011 (1)
- January 2011 (1)
- November 2010 (1)
- September 2010 (2)
- July 2010 (3)
- March 2010 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS