Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#31694 - [mkinitcpio] Boot partition search: break boot without `udev` hook on slow hdd

Attached to Project: Arch Linux
Opened by Far Wayer (farwayer) - Tuesday, 25 September 2012, 18:31 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 24 October 2012, 01:31 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If you don't have udev running by initcpio (udev start latter by systemd on my system) and boot partition didn't detect enough fast than you have a chance to break in recovery shell. If than type 'exit' - booting continue successfully.

The problem is in /usr/lib/initcpio/init_function `pool_device` function:

...
if [ "$udevd_running" -eq 1 ]; then
msg "Waiting $seconds seconds for device $device ..." >&2
while [ ! -b "$device" -a "$seconds" -gt 0 ]; do
sleep 1
seconds=$(( $seconds - 1 ))
done
fi
...

Initcpio wait boot device if *only* udevd running.

P.S. IMHO waiting device for seconds is too long. Maybe you can add `usleep` or some other in mkinitcpio?
This task depends upon

Closed by  Dave Reisner (falconindy)
Wednesday, 24 October 2012, 01:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  linux 3.6
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 25 September 2012, 18:51 GMT
use sleep hook ;)
Comment by Dave Reisner (falconindy) - Tuesday, 25 September 2012, 19:00 GMT
or use udev?
Comment by Dave Reisner (falconindy) - Tuesday, 25 September 2012, 19:01 GMT
Please attach your initramfs (or upload it somewhere if it's too large to attach here).
Comment by Far Wayer (farwayer) - Tuesday, 25 September 2012, 19:37 GMT
I simply commented check udevd running and now system is booting good.

#if [ "$udevd_running" -eq 1 ]; then
...
#fi

And insert usleep instead sleep in initramfs for more fast booting.

Do you really need this initramfs?
Comment by Far Wayer (farwayer) - Tuesday, 25 September 2012, 19:57 GMT
I think waiting device must work with and without udevd.
Comment by Dave Reisner (falconindy) - Tuesday, 25 September 2012, 20:05 GMT
I think devices generally don't magically appear when udev isn't running, which is why poll_device does nothing when udev isn't running. We've had this behavior for years.
Comment by Far Wayer (farwayer) - Tuesday, 25 September 2012, 20:32 GMT
I have all needed modules in mkinitcpio.conf for find and booting kernel on my system (ahci, sd_mod, ext4) in initramfs, but booting fails anyway. Look like /dev/sda1 don't exist yet while `poll_device` try to check it. If i remove checking udevd from this function than system is booting ok. dmesg for both situation atached.
Comment by Dave Reisner (falconindy) - Tuesday, 25 September 2012, 20:52 GMT
Your "dmesg.txt" which I assume is the failure shows all the necessary modules the disk showing up EARLIER than your "dmesg_success.txt".

>Do you really need this initramfs?
Is there something preventing you from posting it?
Comment by Dave Reisner (falconindy) - Tuesday, 25 September 2012, 21:24 GMT
It'd be nice if you could try to reproduce this with the distro kernel. I don't have much interest in supporting kernels with non-mainline patches.
Comment by Far Wayer (farwayer) - Tuesday, 25 September 2012, 21:34 GMT
>>Is there something preventing you from posting it?
No problem.
http://dl.dropbox.com/u/8531768/initramfs-linux.img

>>It'd be nice if you could try to reproduce this with the distro kernel.
Booting also fail on archlinux kernel too.
Comment by Far Wayer (farwayer) - Tuesday, 25 September 2012, 21:38 GMT
Forget: boot break's in recovery shell with message "Unable to find root device '/dev/sda1'."
Comment by Dave Reisner (falconindy) - Saturday, 20 October 2012, 16:35 GMT
Is this still a problem with 3.6.x?
Comment by Far Wayer (farwayer) - Wednesday, 24 October 2012, 01:27 GMT
Look like all ok now.

Loading...