FS#18413 - [mkinitcpio] default rootdelay waits 10 seconds every boot
Attached to Project:
Arch Linux
Opened by Paul Seropian (paranoos) - Saturday, 20 February 2010, 21:04 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 21 February 2010, 17:44 GMT
Opened by Paul Seropian (paranoos) - Saturday, 20 February 2010, 21:04 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 21 February 2010, 17:44 GMT
|
Details
The default rootdelay in mkinitcpio is to wait 10 seconds,
and does not allow the setting of rootdelay=0 (must wait at
least 1 second). My system does not require any delay,
however it waits a full 10 seconds (the delay is NOT
short-circuted as soon as the system is ready). IMO, default
should be no delay, and those who require it can set
whatever delay they wish in grub/lilo.
This change in behaviour is very simple to implement: /lib/initcpio/init: Change "export rootdelay=10" to "export rootdelay=0". This sets the default to no delay /lib/initcpio/init_functions: change "if [ "$2" -gt 0 ]; then" to "if [ "$2" -ge 0 ]; then". This allows the setting of no delay. Rebuild initcpio (easiest way is to pacman -S kernel26). http://bbs.archlinux.org/viewtopic.php?id=74563 |
This task depends upon
:-/
i just tested it again after overwriting my changes, and it does in fact wait.
perhaps it is due to my unusual mkinitcpio config? i don't like any "auto" configs, so i set it up manually like so:
MODULES="sata-nv sd-mod ext4"
BINARIES=""
FILES=""
HOOKS="base"
perhaps one of the default hooks that i am not using is responsible for short-circuting the wait time.
We should do two things:
1) Allow a delay of 0s. This may make sense for some people, but with 2) below shouldn't be necessary any more.
2) Do not "wait" for a device node in poll_device when udev is not running.
This is both trivial to implement and will be fixed before I release the next mkinitcpio version, so stay tuned.
So probably not a bug in poll_device itself.
ahh, I was in the middle of typing this when Thomas responded. Thanks, that sounds like it will definitely solve the problem. :)
1) http://projects.archlinux.org/mkinitcpio.git/commit/?id=c73baee87913e6e92f0cb82d1f999528b51c7bb7
2) http://projects.archlinux.org/mkinitcpio.git/commit/?id=ae65c7cc9577747104d2e7e9563a49f9f850eef9
Patch 2 should fix the behaviour as you expect it: If udev has not been launched (because it is not included), poll_device will exit instantly with the correct return value (false in your case) and the device will be created. There should be no need to set any rootdelay option then.