You are not logged in.

#1 2012-02-10 15:53:20

ulke
Member
Registered: 2011-04-29
Posts: 50

[SOLVED] mkinitcpio stalled at [autodetect]

I just updated from linux 3.2.2-1 to 3.2.5-1, and mkinitcpio hangs on "Parsing hook: [autodetect]". I have (maybe unwisely) tried killing it and starting it again manually, but have encountered the same problem again.

What should I do? I don't want to end up with an unbootable system...

Last edited by ulke (2012-02-11 20:50:03)

Offline

#2 2012-02-10 19:42:31

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: [SOLVED] mkinitcpio stalled at [autodetect]

When asking for help, please remember to supply useful information. In this case, we clearly need to know your mkinitcpio.conf in order to help.

These commands will output the differences between your personal mkinitcpio.conf and the one supplied by the mkinitpcio.conf package.

pkg=mkinitcpio
ver=0.8.2
wget --quiet ftp://ftp.archlinux.org/other/$pkg/$pkg-$ver.tar.gz
tar -xf $pkg-$ver.tar.gz $pkg-$ver/$pkg.conf
diff -d /etc/$pkg.conf $pkg-$ver/$pkg.conf

Edit: removed a useless use of cat.

Last edited by /dev/zero (2012-02-10 19:47:20)

Offline

#3 2012-02-10 19:47:06

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

Re: [SOLVED] mkinitcpio stalled at [autodetect]

Ancient bug:

https://bugs.archlinux.org/task/10061

It'd be useful to see debug output of mkinitcpio (so I know where it actually hangs):

BASH_XTRACEFD=4 bash -x mkinitcpio 4>mkinitcpio.log

Interrupt it when it hangs, post the log here.

Offline

#4 2012-02-10 20:27:47

ulke
Member
Registered: 2011-04-29
Posts: 50

Re: [SOLVED] mkinitcpio stalled at [autodetect]

Thanks for your replies, and sorry for not providing more information. I just did not know what might be helpful.

The mkinitcpio.conf diff:

7c7
< MODULES="i915"
---
> MODULES=""
51,53c51,53
< ##   This setup assembles a pata raid array with an encrypted root FS.
< ##   Note: See 'mkinitcpio -H raid' for more information on raid devices.
< #    HOOKS="base udev pata raid encrypt 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"
57c57
< HOOKS="base udev autodetect pata scsi sata keymap encrypt lvm2 filesystems resume"
---
> HOOKS="base udev autodetect pata scsi sata filesystems usbinput"
67a68
> #COMPRESSION="lzop"

The mkinitcpio log is here. Note that just running mkinitcpio without arguments did not work:

# mkinitcpio
==> ERROR: '/lib/modules/3.2.2-1-ARCH/' is not a valid kernel module directory

So I ran this instead (when generating the log):

mkinitcpio -g /boot/initramfs-linux.img -k 3.2.5-1-ARCH

Edited for clarity.

Last edited by ulke (2012-02-10 20:37:02)

Offline

#5 2012-02-10 21:05:42

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

Re: [SOLVED] mkinitcpio stalled at [autodetect]

Can you break down the mdadm pipeline? Run the following as root:

# mdadm -Esv /dev/[hrsv]d* /dev/{ida,cciss,ataraid,mapper}/*

If it doesn't hang, post the output, please.

If it hangs, re-run it in an strace as root, and post the output (saved as strace.log)

# strace -o strace.log mdadm -Esv /dev/[hrsv]d* /dev/{ida,cciss,ataraid,mapper}/*

Offline

#6 2012-02-11 07:19:54

ulke
Member
Registered: 2011-04-29
Posts: 50

Re: [SOLVED] mkinitcpio stalled at [autodetect]

Thanks, falconindy.
It hangs, strace log is here.

Offline

#7 2012-02-11 15:13:13

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

Re: [SOLVED] mkinitcpio stalled at [autodetect]

Figured as much. That part of the code needs fixing anyways to scan less. If you don't use mdadm, just uninstall it. If you do, you can still boot from the fallback image:

# mkinitcpio -g /boot/initramfs-linux-fallback.img -S autodetect -k /boot/vmlinuz-linux

edit: I think I have a fix for this for mkintcpio 0.8.3

Last edited by falconindy (2012-02-11 15:24:02)

Offline

#8 2012-02-11 20:49:42

ulke
Member
Registered: 2011-04-29
Posts: 50

Re: [SOLVED] mkinitcpio stalled at [autodetect]

Thanks. I built the fallback image and tried to reboot, but the system hung at "Stopping Laptop-Mode". I powered it off and on again, booted from the fallback image, ran "mkinitcpio -p linux", and everything is back to normal.

Offline

#9 2012-02-11 20:53:31

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

Re: [SOLVED] mkinitcpio stalled at [autodetect]

Yep, as expected. The patch linked below should actually fix the problem.

http://mailman.archlinux.org/pipermail/ … 02465.html

Offline

Board footer

Powered by FluxBB