Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Remote Kernel Upgrade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
folderman
n00b
n00b


Joined: 14 Dec 2012
Posts: 7

PostPosted: Fri Jan 20, 2017 1:51 am    Post subject: Remote Kernel Upgrade Reply with quote

Hi All,

I have used Gentoo for around 6-7 years, mainly for my desktop. I am thinking to use Gentoo on my server farm. However, I have a quick question.

For other distribution, I can update the kernel easily by upgrade and reboot, usually, the server can reboot without problem.

But for Gentoo, as the kernel is compiled from source, there maybe chance for the server not bootable. Is there any way to minimize this problem? Of course, upgrading kernel should be done locally, just see whether there is a way to solve. Is kexec a solution?

Thanks a lot!

Rgds,
Kenneth
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7249
Location: Saint Amant, Acadiana

PostPosted: Fri Jan 20, 2017 1:57 am    Post subject: Reply with quote

First hit in a search engine:
http://www.linuxscrew.com/2012/04/24/grub-fallback-boot-good-kernel-if-new-one-crashes/
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5912

PostPosted: Fri Jan 20, 2017 8:14 pm    Post subject: Reply with quote

If you control the hardware you could give them kernels via DHCP/PXE. If it fails to boot you just correct the error and remote reset.
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 309

PostPosted: Sat Jan 21, 2017 1:05 am    Post subject: Reply with quote

You should setup IPMI network to control servers remotely: power on/off/reset, and access boot/VGA console.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7228
Location: almost Mile High in the USA

PostPosted: Sat Jan 21, 2017 10:11 am    Post subject: Reply with quote

The main difference between Gentoo and binary distributions is that usually those binaries are tested before you get it. Tested on another machine.

The only way for you to get better confidence is to have a local machine that you can make an identical change with the exact same command sequence that you can execute remotely. Then this will reduce the chance of a fsckup.

Note that you have to have an virtually identical setup - if your initial attempt at upgrading your local test machine failed, you have to revert it before trying again and not just try again...

The remote console/IPMI/Management engine solutions would be "last resort" as other distributions don't need it...why does Gentoo need it? Gentoo doesn't have a hardcoded boot/kernel solution as there are too many choices.

And yes, I always screw up a remote upgrade (I upgrade other peoples' machines remotely). Sigh... Very dangerous indeed. Then again I end up doing these things blindly as there's no way for me to get an "identical setup" - mostly due to video and network hardware differences.

The thing that scares me the most: fscking up grub.conf or reinstalling grub. I have to be very careful editing the config file and completely against reinstalling the bootloader. Next is network driver fsckups (including possibly wifi)... Very Dangerous Indeed!
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
folderman
n00b
n00b


Joined: 14 Dec 2012
Posts: 7

PostPosted: Sun Jan 22, 2017 9:45 am    Post subject: Reply with quote

Hi all,

Thanks for the reply.

I think I would try grub fallback.

Kenneth
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7228
Location: almost Mile High in the USA

PostPosted: Sun Jan 22, 2017 7:20 pm    Post subject: Reply with quote

Be careful with the grub fallback, if the kernel boots but not completely due to missing kernel drivers, you'll still end up with a dead machine that will require console access to "fix". At least you can simply switch to the old kernel, as long as you can actually switch it.

Grub fallback is basically only good for file not found, corrupt kernel (wrong file?), or disk not found situations - versus missing drivers.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
folderman
n00b
n00b


Joined: 14 Dec 2012
Posts: 7

PostPosted: Mon Jan 23, 2017 11:56 pm    Post subject: Reply with quote

Hi eccerr0r,

I realize this potential problem too, but I think grub fallback is better than hardcoding to boot with single kernel. Of course, if grub can handle driver missing scenario would be great. but seems not logically possible.

Thanks!

Kenneth
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum