While upgrading kernel in a linux server, we will have to reboot the machine to bring up the new kernel. Now, if there is some problem with new kernel, then we may end up in kernel panic. Inorder to avoid this situation, we have boot once option.
With this option, we can bring back the machine to old kernel with the very next reboot after panic.
Step 1: Update kernel as below:
-----------
root@MANINMANOJ:~# yum update kernel
The new/updated kernel will be in 0th position in /etc/grub.conf. Then change the 'default' value to 1 in /etc/grub.conf
default=1
Step 2: - Run this at shell:
----------
echo "savedefault --default=0 --once" | grub --batch
This means that, boot once to new kernel. In the next reboot go to the kernel at the 1 position of /etc/grub.conf.
With this option, we can bring back the machine to old kernel with the very next reboot after panic.
Step 1: Update kernel as below:
-----------
root@MANINMANOJ:~# yum update kernel
The new/updated kernel will be in 0th position in /etc/grub.conf. Then change the 'default' value to 1 in /etc/grub.conf
default=1
Step 2: - Run this at shell:
----------
echo "savedefault --default=0 --once" | grub --batch
This means that, boot once to new kernel. In the next reboot go to the kernel at the 1 position of /etc/grub.conf.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.