Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

rootwait and rootdelay are used in situations when the filesystem is not immediately available, for example if it's detected asynchroneously or mounted via usb. The thing is, it should be obvious based on the root bootarg if that's the case or not, so why can't the kernel realize automatically that it needs to wait for the filesystem to appear? Are there some technical constraints preventing this automatization from being implemented?

share|improve this question
    
I think the kernel does wait for the filesystem to appear. The issue is that it cannot be mounted as soon as it appears, because the driver needs some time to initialize even after reading the partition table. –  vh4x0r Mar 7 '13 at 14:09
    
Why is it obvious on the root bootarg? How do you know that /dev/sda1 is a usb device and you have wait for a while or that /dev/sda1 is on a scsi system which has to scan? –  Ulrich Dangel Mar 7 '13 at 14:22
    
On a Raspberry Pi, if you don't wait, you may not be able to mount root; this is because the device may not be fast enough to initialize the slow card in time. –  Tom Wijsman Apr 7 '13 at 9:05

1 Answer 1

up vote 1 down vote accepted

Sometimes the OS can't distinguish a peripheral that's slow to respond from a peripheral that's not there or completely hosed. The most obvious example is a root filesystem coming from the network (TFTP, NFS) where a slow network link or an overloaded server are difficult to distinguish from a severed network link or a crashed server. A timeout tells the kernel when to give up.

This can also happen with disks that are slow to spin up, RAID arrays that need to be verified and so on. rootdelay instructs the kernel not to give up immediately if the device isn't available. The kernel can't know whether a SCSI drive is a local disk or some kind of RAID bay.

rootwait is provided to wait indefinitely. It's not always desirable, for example a system may want to fall back to a different root filesystem if the normal one takes too long to respond.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.