Avoiding kernel panic during upgrade. Fallback Kernel for CloudLinux?

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
I know this is an ancient post:
http://forums.cpanel.net/f34/kernel-upgrade-77114.html

But i am interested in the technique for coming up with a fallback kernel by inserting "kernel=5" at the end of the kernel version lines in grub.conf prior to reboot.

Seems logical to me, and a CloudLinux tech says that this should work with their system as well. My question for this method however is this - Correct me if I'm wrong, but should "panic=5" only be added to the kernel version lines for the newly installed kernel, and not all of them?

Anyone have any experience with CL kernel upgrades using this method?

Also, here is the post that the CL tech directed me to:
Configuring grub to boot a fallback kernel | nfolamp blog

Therein I seem to have differing instructions, i.e. this:


------------------
# grub

grub> savedefault --default=1 --once
savedefault --default=1 --once
grub> quit
------------------

... verses running this at shell:

echo "savedefault --default=1 --once" | grub --batch

Wouldn't the two, effectively do the same thing?

So here's my total step-by-step, if anyone could correct me if I'm wrong or the lest bit inaccurate with any of this, I would highly appreciate it:

------------------------------------
Step #1 - Run this at shell:
yum update kernel

Step #2 - Run this at shell:
pico -w /boot/grub/grub.conf

Then add "panic=5" at the end of ALL of the the kernel version lines.
(Again, I wonder if "all" or just the new kernel version line here.)

Step #3 - Run this at shell:
echo "savedefault --default=1 --once" | grub --batch

Step #4 - Run this at shell:
reboot
------------------------------------
 

vipoint

Registered
Mar 10, 2014
4
0
1
cPanel Access Level
Root Administrator
For setting boot once, the following steps will do the job.

-----------------------------------
Step #1 - Run this at shell:

[email protected]:~# yum update kernel

The new/updated kernel will be in 0th position. Then change the 'default's' value to 1 in /etc/grub.conf

-----------------
default=1
-----------------

Step #2 - Run this at shell:

echo "savedefault --default=0 --once" | grub --batch

Step #3 - Run this at shell:

reboot
-------------------------------------
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

I don't believe the steps would be any different with a Cloud Linux kernel compared to a stock kernel. Feel free to update us with the outcome after using the steps provided to you by CL or in the previous post.

Thank you.