Apr 7

The kernel has a log message ring buffer that messages are stored in before they go to syslog. When you just want to get a quick look at what the kernel has to say, you can view that buffer by running dmesg.

dmesg

Mar 20

This was borrowed from Sebastien Wains website and then paraphrased.

To upgrade a linux kernel when you don’t have physical access to the machine, it’s important to give yourself a backout plan. Should the box panic and die, it’ll just sit there and wait for a user to come and start pressing buttons by default. Kinda sucks. So here is a way to upgrade to that new kernel and revert automatically to old faithful should the box puke. Keep in mind, if you do something brain dead like forgetting to compile in your NIC drivers into the new kernel, this method isn’t going to help you out. This will only protect you in the event of a hard panic.

First thing to go under the knife is the grub menu.lst file

default saved
timeout 5
# new kernel, not tested
title Untested Kernel
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/sda1 ro panic=5
initrd /boot/initrd.img-2.6.18-6-686
savedefault 1

# tested and working kernel
title Old Faithful
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-5-686 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.18-5-686
savedefault

Now tell grub to use the new kernel on the next boot, but not subsequent boots. e.g., boot the new kernel now, but not next time.

grub-set-default 0

Boot away! We’ve really done two things here. The first is telling grub to boot a different kernel then the configured default and the second is telling Linux to reboot if it should kernel panic instead of just sitting there. Neat trick and props to Sebastien Wains.