You are not logged in.
Pages: 1
Topic closed
I've been using Arch for about 5 years now, and there's one consistent issue I've noticed. When you upgrade the kernel, the old kernel modules are uninstalled and replaced with the newer ones. As a consequence, the currently running kernel can't load any new modules (eg if you plug in a USB stick that needs to use exfat). Is there any way to configure things so that the current kernel's modules are kept around until the system is restarted and the upgraded kernel is in use? Thanks.
Offline
I don't think so... have you poked around in the pacman man page?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
@Eschwartz This is a very old thread.
@all I have had problems with other things that the kernel and systemd make that worse. Systemd depends on a lot of daemon that get sometimes launched on demand. If you have a old daemon running with the new systemd files, it can leads to problems. Same for Xorg and many other things. Generally I just sync and reboot after each upgrade, which takes only a few seconds on my machines by the way. I understand this can be a problem with servers that must stay on 100% of the time but handling that properly would ask major investments and an added complexity.
Offline
@spease I have a hacky workaround that you might find helpful -- on boot, you can make kernel's modules directory immutable (unable to be deleted, even by root), eg:
MOD_PATH="/lib/modules/`cat /lib/modules/extramodules-ARCH/version`"
chattr -R +i $MOD_PATH
When the kernel package gets upgraded, pacman isn't able to delete the old modules (and, thankfully, doesn't fail with an error). The current kernel will keep running nicely.
On the next reboot, the boot script can notice that there is a new modules directory, make *that* one immutable, and remove the old modules directory.
Tell me how this works for you!
Offline
Here's a quick Ruby script I whipped up to accomplish this:
https://github.com/epitron/scripts/blob … el-modules
(I did it in Ruby because it's a lot easier to diff arrays of directories; if you're a bash wizard, I'd enjoy a ported version!)
Offline
Without having tried it, I would just write a script with two ALPM hooks that are executed before and after a kernel update to backup and restore the modules. However this issue is 1½ years old and OP might even no longer be interested in a solution.
macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }
Offline
There are n+1 solutions to this problem, pick any one of them. Please don't necrobump.
Closing.
Last edited by V1del (2019-03-17 13:13:05)
Offline
Pages: 1
Topic closed