You are not logged in.

#1 2013-08-27 17:12:32

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 243

Modules avalibility after kernel upgrade before reboot

Hello.

Sometimes I face with the following problem: when kernel is upgraded but no reboot performed, modules for currently loaded kernel are unavailable. It's obvious 'cos modules are removed from filesystem by pacman. I belive mandatory reboot isn't good solution.

So I propose to consider the following solution. Let we have `linux-x.x.x' version installed and upgrading to `linux--y.y.y' version. Modules for x.x.x are located at /usr/lib/modules/x.x.x.

In pre_upgrade section of the kernel package we copy current kernel's modules from /usr/lib/modules/x.x.x to /tmp/modules/x.x.x.
During upgrade pacman removes /usr/lib/modules/x.x.x directory and creates /usr/lib/modules/y.y.y.
In post_upgrade section we create symbolic link to /tmp/modules/x.x.x named /usr/lib/modules/x.x.x.
Thus modules for x.x.x kernel should be available untill reboot, and will be removed after reboot during /tmp directory cleanup.
Also we need simple script for systemd to remove unneeded symlinks from /usr/lib/modules at bootup, e.g. called from local-fs.target.wants.

What do you think about this?

Offline

#2 2013-08-27 17:28:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Modules avalibility after kernel upgrade before reboot

Offline

#3 2013-08-27 17:42:46

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 243

Re: Modules avalibility after kernel upgrade before reboot

As I understand dkms is designed for compiling modules from sources not included to the kernel tree. In my issue I mean modules included to the `linux' package.

Offline

#4 2013-08-27 17:57:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Modules avalibility after kernel upgrade before reboot

Offline

#5 2013-08-27 18:57:00

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Modules avalibility after kernel upgrade before reboot

dimich wrote:

I belive mandatory reboot isn't good solution.

Why not?

If you're not ready to reboot, don't upgrade the kernel. If you want to upgrade the kernel, make sure you're ready to reboot.

It's that simple.

Offline

#6 2013-08-27 21:59:43

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Modules avalibility after kernel upgrade before reboot

If this is a problem for you, then I think this simply implies that you don't pay attention to what is actually being updated. You should always have a glance at what is being updated when you '-Syu' your system. 

I think that this being an issue kind of fits into the same category as people who choose to do a serious update, without reading the news, on a machine that is essential for work/school/whatever.  You just simply need to pay better attention, and be prepared to administer your system.

Offline

#7 2013-10-18 14:52:12

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 243

Re: Modules avalibility after kernel upgrade before reboot

Of course I pay attention to packages being updated. And if I see linux package I should remeber can reboot the machine immediately after update ot not. Moreover, there may be remote sessions on the machine and I should check if tasks at that sessions may be stopped (BTW it's the reason why forced reboot isn't good: Arch Linux is multiuser OS). If i can't reboot immediately i should cancel update command and rerun it with `--ignore linux' etc. Sometimes update process is annoyng, so I propose a method to make it easier for administrator.
Well, anyway thanks for your answers.

Offline

#8 2013-10-18 15:21:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Modules avalibility after kernel upgrade before reboot

Partial upgrades are not supported and ignoring the kernel can hurt you more than not doing the update at all.

Offline

Board footer

Powered by FluxBB