Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Modules won't load due to wrong "version magic" [SOLVED]
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
Calemipe
n00b
n00b


Joined: 21 Nov 2017
Posts: 11

PostPosted: Tue Nov 21, 2017 9:46 am    Post subject: Modules won't load due to wrong "version magic" [S Reply with quote

I installed gentoo on my laptop a few days ago. Doing so I encrypted my home catalog (and swap), following the instructions in https://wiki.gentoo.org/wiki/Dm-crypt/en and https://www.lourdas.eu/blog/mini-howto-encrypt-your-home-and-swap-partitions-gentoo-linux. Everything went more or less OK, but since I didn't have any sound or wifi, I (after trying many other things) tired to regenerate the kernel with genkernel to test if I missed a module that genkernel would automatically include:
Code:

genkernel --makeopts=-j9 all

However, that only caused disaster.

Now, if I try to decrypt /home, it says (regardless of the password I provide):
Code:

device-mapper: reload iotcl on temporary-cryptsetup-3626 failed, invalid argument
Failed to setup dmcrypt key mapping for device /dev/sdb1
Check that kernel supports aes-xts-plain64 cipher (check syslog for more info).

Encrypting swap gives:
Code:

device-mapper: reload iotcl on swap failed, invalid argument


After this, dmesg is appended by
Code:

dax: version magic '4.12.14-gentoo SMP mod_unload modversions ' should be '4.12.14-gentoo SMP mod_unload '


The module xts exists, and I tried doing
Code:
modprobe xts
, which gives
Code:
 
modprobe: ERROR: could not insert 'xts': Exec format error

and adds
Code:

xts: version magic '4.12.14-gentoo SMP mod_unload modversions ' should be '4.12.14-gentoo SMP mod_unload '

to dmesg.

I have already tried to make mrproper, copy my old config to .config, and then make all, make modules_install and make install, but the encryption still doesn't work.

After starting to write this, I noticed that other modules give the same error when I try to load them as well. In fact, my entire dmesg is red with errors.

Please note that since I don't have any GUI or internet on my laptop I'm writing this on my work computer, and I've just visually copied the error messages from the laptop screen. Thus, there might be some errors. I'm very new to gentoo, so I appreciate any help I can get.

Thank you in advance.


Last edited by Calemipe on Tue Nov 21, 2017 1:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43395
Location: 56N 3W

PostPosted: Tue Nov 21, 2017 11:03 am    Post subject: Reply with quote

Calemipe,

Welcome to Gentoo.

dmesg:
wrong "version magic"
means that your kernel and modules have been compiled with different kernel configurations options.

As you are using
Code:
genkernel all
it suggests that something went wrong with your kernel install.
was boot mounted?
did you tell grub about the new kernel?

This results in using an old kernel with new modules.

The fix is to ensure that boot is mounted for kernel installs, or the kernel binary will be correctly installed to the wrong location and grub won't find it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Calemipe
n00b
n00b


Joined: 21 Nov 2017
Posts: 11

PostPosted: Tue Nov 21, 2017 11:29 am    Post subject: Reply with quote

Thank you NeddySeagoon, you're a lifesaver!

Now I just feel like an idiot. Trying to solve my problems, I've been looking through thread after thread and seen countless people mentioning forgetting to mount boot, but I assumed that since I was mounting the computer directly, not via liveCD, /boot would mount automatically.

As you suggested, I both mounted /boot and configured grub:
Code:

mount /dev/sda2 /boot
make install
grub-mkconfig -o /boot/grub/grub.cfg


However, now I get kernel panic after selecting gentoo at the grub menu :? . I'm guessing I'll be able to fix this, but I'm at work and forgot to bring my liveCD USB, so I'll only be able to try in a few hours.

Should I mark the thread as [Solved] since the cause of the original problem (seemingly) has been found out, or should I wait until I know for sure/my kernel boots correctly?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43395
Location: 56N 3W

PostPosted: Tue Nov 21, 2017 12:23 pm    Post subject: Reply with quote

Calemipe,

You are not an idiot provided you learn from your mistakes.
Its experience. As you see, experience is something you get just after you needed it :)

The default gentoo /etc/fstab has the noauto option for /boot. Remove that option if you prefer that /boot be auto mounted every time you start your PC.

Your kernel panic is a different problem, so deserves a new topic.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Calemipe
n00b
n00b


Joined: 21 Nov 2017
Posts: 11

PostPosted: Tue Nov 21, 2017 1:10 pm    Post subject: Reply with quote

Thanks for the help NeddySeagoon. My statement about feeling like an idiot wasn't meant to be taken seriously. I'll mark the thread as solved.
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