You are not logged in.

#1 2013-01-06 16:32:48

waldauf
Member
Registered: 2012-07-15
Posts: 57

mkinitcpio failed due bad kernel modules

Hi,

I did new installation of ARCH from existing linux (LiveCD). I have all configured (lvm2, encrypt, rc.conf, mkinitcpio.conf) but if I try to generate new img file for GRUB so it fails with this error:

# mkinitcpio -p linux
==> Building image from preset: 'default'
  -> -v -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Building image from preset: 'fallback'
  -> -v -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect

My kernel is: 3.6.11-1-ARCH

I tried to set kernel version but it didn't help:

# mkinitcpio -p linux -k 3.6.11-1-ARCH

==> Building image from preset: 'default'
  -> -v -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Building image from preset: 'fallback'
  -> -v -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect

Then I tried it to generate from Live ARCH but it finished with the same result. Can you help me?

Waldauf

Offline

#2 2013-01-06 16:36:41

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

Re: mkinitcpio failed due bad kernel modules

You mention rc.conf.  You know that there has been a move to systemd, and rc.conf is no longer used.  So now those configurations are in various files within /etc.  You can use the archlinux man page to see what is needed, but it tells you to use native systemd tools that might not be available from a chroot.  Still a place to start I guess.

Also, with your problem there, you say if fails with errors, I don't see any errors... so really anybody reading this post would not have the slightest clue what is actually going on here.

Offline

#3 2013-01-08 12:30:11

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: mkinitcpio failed due bad kernel modules

waldauf wrote:

if I try to generate new img file for GRUB so it fails with this error:

# mkinitcpio -p linux
==> Building image from preset: 'default'
  -> -v -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Building image from preset: 'fallback'
  -> -v -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect

I don't see an error message here. In fact, I don't see any relevant output at all.

Offline

#4 2013-01-09 11:12:36

waldauf
Member
Registered: 2012-07-15
Posts: 57

Re: mkinitcpio failed due bad kernel modules

Hi all,

damn... I'm sorry for my stupid^3 mistake. I redirected output via tee but not stderr to stdout. So you can't see the ERROR message :]. I'll post there new post till end of this week. Thanks you for your alert.


Walda

Last edited by waldauf (2013-01-09 11:17:49)

Offline

#5 2013-01-09 20:50:46

waldauf
Member
Registered: 2012-07-15
Posts: 57

Re: mkinitcpio failed due bad kernel modules

Hi,

so again and better :]

My ARCH linux is installed on LVM, where the root's LV is crypted by LUKS (HDD --> LVM --> LUKS) that is why I need to create IMG file by mkinitcpio. I booted SystemRescueCD from USB key, encrypted my root's LV, mounted it (then /dev, /sys, ... ) and then chrooted to ARCH. Then I tried to generate IMG:

[root@chroot /]# mkinitcpio -p linux
==> Building image from preset: 'default'
  -> -v -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: '/lib/modules/3.6.6-1-ARCH' is not a valid kernel module directory
==> Building image from preset: 'fallback'
  -> -v -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: '/lib/modules/3.6.6-1-ARCH' is not a valid kernel module directory


This is listing of my /lib/mobules:

# [root@chroot /lib/modules]# ll
drwxr-xr-x 3 root root 480 Jan  6 15:49 3.6.11-1-ARCH
drwxr-xr-x 2 root root  72 Dec 18 08:04 extramodules-3.6-ARCH

And kernel of SystemResCD which is the same like in chrooted ARCH:

# uname -a
Linux sysresccd 3.2.34-std312-amd64 #2 SMP Sat Nov 17 08:06:32 UTC 2012 x86_64 Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz GenuineIntel GNU/Linux

Offline

#6 2013-01-10 09:52:41

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: mkinitcpio failed due bad kernel modules

Your kernel in /boot does not match your /lib/modules directory.

Offline

#7 2013-01-10 11:00:25

waldauf
Member
Registered: 2012-07-15
Posts: 57

Re: mkinitcpio failed due bad kernel modules

brain0 wrote:

Your kernel in /boot does not match your /lib/modules directory.

Yes, you're right. I used yet installed grub from previous ARCH. That means I have to reinstall GRUB?

Offline

#8 2013-01-10 11:28:05

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,272

Re: mkinitcpio failed due bad kernel modules

This has nothing to do with GRUB.

I suspect that you have a dedicated /boot partition that you're either forgetting to mount, or are mounting erroneously (e.g. it's for another installation), or forgot to mount it when you last updated your kernel.

The kernel in /boot is version 3.6.6, whereas your system has version 3.6.11 installed. Presumably your actual 3.6.11 kernel is still around somewhere.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

Board footer

Powered by FluxBB