You are not logged in.

#1 2012-04-03 17:27:24

ionthas
Member
Registered: 2012-04-03
Posts: 7

[SOLVED] mkinitcpio no modules were added to the image

This is my first post in this forum. I hope that this is the correct place for my problem.

Let's get to the point. I'm compiling kernel 3.3.1 manually from the image downloaded at www.kernel.org. So far, everything is correct, “make” and “make modules_install” don't show up anything strange.

The problem starts when I generate initramfs with mkinitcpio. Herewith the message showed:

$ sudo mkinitcpio -g /boot/initramfs-vanilla-3.3.1.img -k 3.3.1 
==> Starting build: 3.3.1
  -> Parsing hook: [base]
  -> Parsing hook: [udev]
  -> Parsing hook: [autodetect]
  -> Parsing hook: [pata]
  -> Parsing hook: [scsi]
  -> Parsing hook: [sata]
  -> Parsing hook: [filesystems]
  -> Parsing hook: [usbinput]
  -> Parsing hook: [fsck]
  -> Parsing hook: [lvm2]
==> ERROR: module not found: `dm-mod'
==> ERROR: module not found: `dm-snapshot'
==> ERROR: module not found: `dm-mirror'
==> WARNING: No modules were added to the image. This is probably not what you want.
==> Creating gzip initcpio image: /boot/initramfs-vanilla-3.3.1.img
==> WARNING: errors were encountered during the build. The image may not be complete.
==> Image generation successful

I found similar post https://bbs.archlinux.org/viewtopic.php?id=135851 but the solution doesn't work for me.

I have symbolic link created because my kmod version is 7 and I have /sbin already in the path.

$ ls -l /sbin/depmod 
lrwxrwxrwx 1 root root 15 Apr  2 23:23 /sbin/depmod -> ../usr/bin/kmod

$ kmod --version
kmod version 7

Any idea?

Last edited by ionthas (2012-04-03 20:49:46)

Offline

#2 2012-04-03 17:46:35

yasar11732
Member
Registered: 2010-11-29
Posts: 127

Re: [SOLVED] mkinitcpio no modules were added to the image

Do you have these?

/lib/modules/[your kernel version]/kernel/drivers/md/dm-mod.ko.gz
/lib/modules/[your kernel version]/kernel/drivers/md/dm-snapshot.ko.gz
/lib/modules/[your kernel version]/kernel/drivers/md/dm-mirror.ko.gz

If not, then either you compiled them into the kernel, thus you don't need them in initrd, or you didn't compiled them at all. In latter case, you may need to recompile your kernel with required modules compiled as modules.


Yo Dawg, I heard you likes patches, so I have created a patch for your patch, so you can patch your patches before you patch.

Offline

#3 2012-04-03 17:57:01

ionthas
Member
Registered: 2012-04-03
Posts: 7

Re: [SOLVED] mkinitcpio no modules were added to the image

Thanks for your fast reply yasar.

I don't have these modules in /lib/modules/[your kernel version]/kernel/drivers, are compiled in the kernel as modules.

I generate a new mkinitcpio.conf whithout lvm2 module loaded, the annoying ERROR messages dissapear but the main problem still here.

$ sudo mkinitcpio -g /boot/initramfs-vanilla-3.3.1.img -k 3.3.1 -c mkinitcpio-custom.conf 
Password: 
==> Starting build: 3.3.1
  -> Parsing hook: [base]
  -> Parsing hook: [udev]
  -> Parsing hook: [autodetect]
  -> Parsing hook: [pata]
  -> Parsing hook: [scsi]
  -> Parsing hook: [sata]
  -> Parsing hook: [filesystems]
  -> Parsing hook: [usbinput]
  -> Parsing hook: [fsck]
==> WARNING: No modules were added to the image. This is probably not what you want.
==> Creating gzip initcpio image: /boot/initramfs-vanilla-3.3.1.img
==> Image generation successful

Offline

#4 2012-04-03 18:26:06

yasar11732
Member
Registered: 2010-11-29
Posts: 127

Re: [SOLVED] mkinitcpio no modules were added to the image

Can you try givin absolute path to -k argument? Something like this:

sudo mkinitcpio -g /boot/initramfs-vanilla-3.3.1.img -k /boot/vmlinuz-linux-3.3.1 -c mkinitcpio-custom.conf 

Yo Dawg, I heard you likes patches, so I have created a patch for your patch, so you can patch your patches before you patch.

Offline

#5 2012-04-03 19:00:46

ionthas
Member
Registered: 2012-04-03
Posts: 7

Re: [SOLVED] mkinitcpio no modules were added to the image

Problem still here. Thanks for your help.

Offline

#6 2012-04-03 20:49:28

ionthas
Member
Registered: 2012-04-03
Posts: 7

Re: [SOLVED] mkinitcpio no modules were added to the image

SOLVED. As yasar said, I load lvm2 kernel as modules and recompiled the kernel and issue is gone.

Offline

Board footer

Powered by FluxBB