You are not logged in.

#1 2012-03-23 13:03:05

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

[SOLVED] Mkinitcpio fails after kernel upgrade.

Yesterday when running a -Syu which included kernel 3.2.12 mkinitcpio was unable to build a complete initrd. It ran fine until it got to parsint the fsck hook, after which it was unable to find dozens of files which it wanted to inculde with the kernel. Of course this meant that I could not reboot the system as it would not boot, so I restarted to a flash drive and chrooted into arch from the drive, so I do have access to my arch system. When I looked at the error message I saw that it was looking for a bunch of .ko files. When I entered the directories that these files were expected to be in I found instead .ko.gz files. As I did not know whether this was a change in how the recent kernel was packaged or a change in mkinitcpio causing the problem I examined the contents of older kernels and saw that they had .ko.gz files too. I even tried downgrading my kernel but mkinitcpio still failed, so this lead me to conclude that mkinitcpio is looking for the wrong files so something has to be wrong with it, though I don't know how that could have happened because I haven't messed with it. Is anyone having the same issues, or has any idea about this. I am happy to post additional files, but I will not be able to until later tonight or tomorrow because I am not at home right now. Any help is greatly appreciated, thanks.

Last edited by magicalChicken (2012-03-24 16:03:00)

Offline

#2 2012-03-23 19:21:26

aking9
Member
Registered: 2009-03-30
Posts: 65

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

Did you recently update mkinitcpio? It left a pacnew file, did you replace that properly?
Post your mkinitcpio.conf please. I'm not on arch at the moment, it should be this

/etc/mkinitcpio.conf

Offline

#3 2012-03-23 19:26:06

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

I will do that soon, thanks for replying. (ps. I think there may have been an update)

Offline

#4 2012-03-24 00:01:19

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

As asked for here is the mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run first, so it may be used to
# override the actual binaries used in a given hook.
# (Existing files are NOT overwritten if already added)
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options
# like so:
#    FILES="/etc/modprobe.d/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
##   This is identical to the above, except the old ide subsystem is
##   used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev pata mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    fsck and shutdown hooks.
HOOKS="base udev autodetect pata scsi sata filesystems usbinput fsck"

# COMPRESSION
# Use this to compress the initramfs image. With kernels earlier than
# 2.6.30, only gzip is supported, which is also the default. Newer kernels
# support gzip, bzip2 and lzma. Kernels 2.6.38 and later support xz
# compression.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""

There was no .packnew of this file so this is the up to date version. Hope this helps.

Offline

#5 2012-03-24 00:07:23

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

Posting the actual errors would be even more useful... files missing from the fsck hook would not prevent you from booting. More likely, the errors came from what happens after hook processing, which is module installation.

Last edited by falconindy (2012-03-24 00:07:46)

Offline

#6 2012-03-24 12:35:00

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

Ok here is the error from mkinitcpio:

 sudo mkinitcpio -p linux
Password: 
==> Building image from preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 3.2.12-1-ARCH
  -> 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]
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/ata/ata_generic.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/ata/ata_piix.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/ata/pata_acpi.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-a4tech.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-apple.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-axff.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-belkin.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-cherry.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-chicony.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-cypress.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-dr.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-elecom.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-emsff.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-ezkey.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-gaff.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-gyration.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-holtekff.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-kensington.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-keytouch.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-kye.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-lcpower.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-logitech-dj.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-logitech.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-magicmouse.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-microsoft.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-monterey.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-multitouch.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-ntrig.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-ortek.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-petalynx.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-picolcd.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-pl.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-primax.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-prodikeys.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-quanta.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-roccat-arvo.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-roccat-common.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-roccat-kone.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-roccat-koneplus.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-roccat-kovaplus.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-roccat-pyra.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-roccat.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-samsung.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-sjoy.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-sony.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-speedlink.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-sunplus.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-tmff.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-topseed.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-twinhan.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-uclogic.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-wacom.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-waltop.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-wiimote.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-zpff.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/hid-zydacron.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/hid/usbhid/usbhid.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/scsi/sd_mod.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/usb/host/ehci-hcd.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/drivers/usb/host/uhci-hcd.ko': No such file or directory
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/fs/ext4/ext4.ko': No such file or directory
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux.img
==> WARNING: errors were encountered during the build. The image may not be complete.
==> Image generation successful

I think that the problem is finding the files in the fsck hook, but it may be after they are found. Also the actual error during boot is that /dev/sda6 cannot be found in fstab or mtab, and fstab is empty when examined on the fallback shell, so maybe this is the problem, that fstab is not being generated for the initrd when it should be. Hope this helps, thanks.

Last edited by magicalChicken (2012-03-24 12:37:41)

Offline

#7 2012-03-24 13:59:19

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

Ok so there is a weird development in this. I had been running off of the arch linux installer flash drive and chrooted into my system, but just because I had wanted to try it for a while and this problem gave me an excuse I downloaded slacko-puppy, put it on a flash drive and booted from it, chrooted into my arch system and just for the heck of it ran

 mkinitcpio -p linux 

and it ran without a problem and now my arch system boots from the initrd. What possibly could have been different, I was chrooted into the same system in the same way. Just to be certain about this I went back to the arch installer and chrooted in again in the same way, mkinitcpio fails, back to puppy, works again. I guess this is sort of solved, so maybe soon I will mark it as such but this is very weird and I have no idea how this worked.

Offline

#8 2012-03-24 15:02:53

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

magicalChicken wrote:
cp: cannot stat `/lib/modules/3.2.12-1-ARCH/kernel/fs/ext4/ext4.ko': No such file or directory

So the problem here is that it's looking for uncompressed modules. The only reason such a thing would happen is because depmod failed on installation of the kernel package. The kernel runs depmod on its own and generates the modules.dep files, but the modules aren't compressed yet. If at some point in your liveCD hopping, you decided to reinstall the linux package or run depmod yourself, this is what fixed it for the next run of mkinitcpio.

magicalChicken wrote:

I think that the problem is finding the files in the fsck hook, but it may be after they are found.

No, I already pointed out where the errors are from. It's unrelated to the fsck hook.

magicalChicken wrote:

Also the actual error during boot is that /dev/sda6 cannot be found in fstab or mtab, and fstab is empty when examined on the fallback shell, so maybe this is the problem, that fstab is not being generated for the initrd when it should be.

/dev/sda6 is what you specify in the bootloader for the root= parameter. /etc/fstab is empty, and that's intended. There is no need for /etc/fstab in early userspace.

Offline

#9 2012-03-24 16:02:33

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

Thanks falconindy, I guess I will just run depmod if this ever happens again. I will mark as solved now.

Offline

#10 2012-03-27 23:10:54

plc
Member
Registered: 2012-03-27
Posts: 1

Re: [SOLVED] Mkinitcpio fails after kernel upgrade.

Ah, thanks so much for clarifying this.. I always get a bit anxious when my bootstrap files are not rebuilt properly :-)

Offline

Board footer

Powered by FluxBB