30

This is a loaded question because I'm already aware of, and am very interested in ksplice. The problem is that since they were bought by Oracle, they have been forced to pull numerous server distributions from the offerings. The answer isn't as simple as it once was.

I noticed a question on Unix.SE that states:

You can build your own ksplice patches to dynamically load into your own kernel

Great! But how?!

I've installed the free ksplice package in the repo on my desktop (not ksplice-uptrack which is non-free) and now want to generate and apply updates. What's the process? Are there any scripts out there to automate the process?

Moreover, if all the machinery required for rebootless upgrades is sitting there in the kernel (and ksplice package), why on earth aren't we taking advantage of it by default?


Quite recently kGraft was announced. It seems to be roughly the same result so if you have an answer that involves it, I'd be just as happy with that. It's currently a few months from being released though.


Note 1: I am happy for a solution beside ksplice but it has to deliver the same thing: rolling updates to the kernel that can be applied without rebooting the server.

Note 2: I'll say it again; the main ksplice "service" does not support Ubuntu Server. It used to but it doesn't any more. When I talk about wanting to use ksplice, I'm talking about the open source tools in the ksplice package. Any answer that talks about ksplice-uptrack is probably not what I'm after as this is the part that integrates directly with aforementioned "service".

0

6 Answers 6

6

All the other answers here are great, but for Ubuntu specifically, Canonical now delivers this service on 16.04.

This uses the live patching technology in the upstream Linux kernel since 4.0 was released.

6

I don't know much about ksplice but thought I'd mention it - have you heard about kexec? This might be what you need.

Regarding the question why haven't we adopted this as a default mechanism? Well, overwriting the memory of the current kernel while it's still running can cause potential issues. It also expects hardware devices to be in a well-defined state which isn't always possible.

You can take a look at the IBM developer works article about it to decide if it suits your needs.

4
  • 5
    +1 for kexec, but in essence it's a hot reboot - IE the kernel gets loaded again from scratch, so the init scripts etc. still get called. This isn't technically a reboot, but running services will stop.
    – jackweirdy
    Nov 24, 2012 at 0:56
  • Yeah, I'm aware of it but I haven't read anything on ksplice to find out how it's different. Nov 24, 2012 at 1:00
  • 1
    According to en.wikipedia.org/wiki/Ksplice, ksplice applies a binary diff patch to the running kernel whilst it's still in memory
    – jackweirdy
    Nov 24, 2012 at 1:07
  • 2
    I'll need to read a bit more about this since it's, interesting. So how much uptime you're trying to save from being reset? :D Nov 24, 2012 at 1:09
3

ksplice will allow kernel swap without needing reboot. Uptrack works within ksplice and has a editable config file in /etc/uptrack/uptrack.conf

2

There are a couple fully open-source alternatives to Ksplice that have both been submitted for inclusion in the mainline Linux kernel. It's too early to tell which will end up in the kernel, but you can still try them out if you're brave enough:

You can read more about both of them here: SUSE Posts kGraft, Red Hat Posts Kpatch Patches

1

The Arch Linux wiki had instructions: https://wiki.archlinux.org/index.php/ksplice

The only part that seems to be distro specific is how to install ksplice itself. Since you've already figured that out it seems, I think this should get you on your way.

1
  • 1
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Feb 4, 2014 at 14:26
0

Since 16 July 2015 "Oracle Ksplice is offered for free on Fedora and Ubuntu Desktop Editions.", officially.

Just install downloaded .deb file you can get here.

If you try sudo dpkg -i ksplice-uptrack.deb you might then have to fix dependencies with sudo apt-get install -f.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .