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?

  • 1
    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. – vikraman Mar 7 '13 at 14:09
  • 1
    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
  • 1
    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. – Tamara Wijsman Apr 7 '13 at 9:05

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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