Summary: | [NeedPatch] sys-kernel/genkernel: implement rootwait parameter | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | skolima |
Component: | genkernel | Assignee: | Gentoo Genkernel Maintainers <genkernel> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | beandog, ski.brimson |
Priority: | High | Keywords: | NeedPatch |
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | This adds a loop of up to 3 seconds to wait for the device |
Description
skolima
2008-07-23 09:43:40 UTC
Why should the initramfs's linuxrc do anything with that parameter? That's a kernel thing, which is only effective when it's doing the mounting itself. initrd in debian/ubuntu does handle this. So does geninitrd in PLD. I'll change this to an enhancement request. However, there is the 'doslowusb' parameter, which will probably do what you want. Unfortunately doslowusb does not work for me. Also, please note that the kernel has two similar parameters: rootdelay=n (wait for n seconds then try to mount root) rootwait (wait until root is available for mount, as long as it takes) While the delay is certainly usable, the automatic rootwait is much nicer. Whatever is chosen for implementation, genkernel probably should keep the semantics of existing kernel parameters. I have the same problem, I think. The kernel and initrd starts, then a message comes up, that the device (e.g. /dev/sda5) could not be found. Then I type in "/dev/sda5" and the system starts as expected. I tried "doslowusb" but it did not work. I use genkernel-3.4.10-r2. I think you guys should check the manual, the parameter is called "scandelay=" on genkernels initrd! 1. rootwait is an existing kernel parameter, overriding that could be bad. 2. Genkernel already has: 2.1 At the bootloader prompt: scandelay=N 2.2 At the bootloader prompt: doslowusb 2.3 During build time, genkernel --slowusb "slowusb" causes a number of extra 10 second delays (non-configurable) to be added. "scandelay=N" (default value 10) sets the $SDELAY value, which is used: - Always once between loading modules and starting the device manager. - If slowusb is set or forced, an extra pair of times on either side of the device manager. I do see a case where the existing delays don't provide sufficient flexibility or time for the root device to turn up: Specifically fibre-channel cards. After the module is loaded, it takes 15-120 seconds for the LIP discovery to finish. The rootwait kernel parameter isn't useful here, because the kernel itself only waits for the initrd root to come up. So I'd like to propose that we DO detect the rootwait in the initrd as well, and wait that long until the specified root device becomes available. While the kernel version does not support a timeout, we should, as well as having a sane default if not timeout is specified (maybe 60 seconds). I missed one more kernel parameter: rootdelay=N, that provides an initial delay in the probing.
> The rootwait kernel parameter isn't useful here, because the kernel itself only
> waits for the initrd root to come up. So I'd like to propose that we DO detect
> the rootwait in the initrd as well, and wait that long until the specified root
> device becomes available. While the kernel version does not support a timeout,
> we should, as well as having a sane default if not timeout is specified (maybe
> 60 seconds).
>
Just for the record ..
rootdelay=[secs] - Delay (in seconds) to pause before attempting to mount the root filesystem
rootwait - Wait (indefinitely) for root device to show up. Useful for devices that are detected asynchronously (e.g. USB and MMC devices).
From kernel-parameters.txt.
So, rootwait doesn't take a parameter.
And I'd really like to see support for it. :)
I like the idea, but how about a patch then? (against the git repo) Created attachment 434238 [details, diff]
This adds a loop of up to 3 seconds to wait for the device
I see a wait for CD in linuxrc code, but no wait for disk root.
One of the comments is right. If this were a big system with lots of disks, the delay could be long finding the disk. I think there should be a loop, with a time limit set by genkernel.
[master ba69a90] defaults/linuxrc: bug #232733: implement rootwait. 1 file changed, 8 insertions(+) John Klug: not a 1-1 copy of your patch, I tweaked it and made it count down to zero from an initial counter, w/ sane defaults and ability to specify the counter start per rootwait/rootdelay. |