You are not logged in.

#1 2023-08-13 18:32:19

horus87
Member
From: Italy
Registered: 2023-08-11
Posts: 4

[SOLVED] Automatically reload vbox guest additions after kernel update

Hello guys,
I'd like to reload the kernel modules (vbox guest additions) automatically after the kernel update (using pacman).
ss
Now I need to run manually:

sudo /sbin/rcvboxadd quicksetup all

or reinstall the vbox images.

I found some way to do this task, but I'm not sure what is the best in general, then I'd like to know what way can be followed by other arch users.

I thought to insert a pacman hook like this:

[Trigger]
Operation=Install
Operation=Upgrade
Type=Package
Target=linux

[Action]
Description=Compiling and Loading Modules After Kernel Update
When=PostTransaction
Exec= /sbin/rcvboxadd quicksetup all

But I'm not sure if this way is a good idea.

Can you tell me do you think and if you have other suggestions?

Thanks a lot

Last edited by horus87 (2023-08-13 19:40:20)

Offline

#2 2023-08-13 19:22:48

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,569

Re: [SOLVED] Automatically reload vbox guest additions after kernel update

This makes no sense. If there's a kernel update, you have to reboot into that kernel, at which point it will be loading the new modules. If you don't reboot, you're running the old kernel and need the old modules anyway.

Online

#3 2023-08-13 19:29:43

horus87
Member
From: Italy
Registered: 2023-08-11
Posts: 4

Re: [SOLVED] Automatically reload vbox guest additions after kernel update

Scimmia wrote:

This makes no sense. If there's a kernel update, you have to reboot into that kernel, at which point it will be loading the new modules. If you don't reboot, you're running the old kernel and need the old modules anyway.

Ok I understand, it's not possible to load the kernel modules into new kernel if this isn't running!

Do you have any suggestions to automatically run these modules into the new kernel?

Thanks!

Offline

#4 2023-08-13 19:31:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,569

Re: [SOLVED] Automatically reload vbox guest additions after kernel update

When you reboot? They should be automatically loaded, or you can force them to load with /etc/modules-load.d/

Online

#5 2023-08-13 19:39:09

horus87
Member
From: Italy
Registered: 2023-08-11
Posts: 4

Re: [SOLVED] Automatically reload vbox guest additions after kernel update

Scimmia wrote:

When you reboot? They should be automatically loaded, or you can force them to load with /etc/modules-load.d/

Now I undestrand why the hook dosen't have sense, I agree! Thanks for your explanation!

Offline

Board footer

Powered by FluxBB