Bootdelay Option Values Explained
What is Bootdelay?
The bootdelay option is a U-Boot parameter that controls the delay (in seconds) before the bootloader automatically boots the kernel. It’s commonly used in embedded systems to give developers or users time to interrupt the boot process and access the U-Boot command-line interface.
Common Bootdelay Values
0 (Zero Delay)
- Behavior: No delay—U-Boot immediately boots the kernel
- Use case: Production systems where interruption isn’t needed
- Trade-off: No opportunity to access U-Boot without serial console hacking
1-3 (Short Delay)
- Behavior: Brief window (1-3 seconds) to press a key and interrupt boot
- Use case: Development with faster iteration; some production systems
- Practical: 2 seconds is a common middle ground
5-10 (Standard Delay)
- Behavior: Comfortable window for manual intervention
- Use case: Embedded development; systems requiring frequent adjustments
- Standard: Many devices default to 5-10 seconds
-1 (Wait Indefinitely)
- Behavior: U-Boot waits at the prompt until user input
- Use case: Lab environments; debugging; recovery scenarios
- Note: Blocks automated boot entirely
Configuration Methods
Via U-Boot Environment
setenv bootdelay 2
saveenv
Via Kernel Command Line
Some systems support passing bootdelay through the kernel command line:
bootdelay=2
Via Device Tree
Embedded systems may define bootdelay in the device tree:
bootdelay = <2>;
Practical Recommendations
| Environment | Recommended Value | Reason |
|---|---|---|
| Production | 0 | Fastest boot; no user intervention expected |
| Field Deployment | 1-2 | Quick boot with minimal recovery window |
| Development | 3-5 | Reasonable time for serial console access |
| Lab/Debug | -1 or 10 | Maximum control; extensive troubleshooting |
Performance Impact
- Bootdelay directly adds to boot time
- Each second of delay ≈ 1 second added to startup
- For IoT/edge devices, consider cost of delay × device count
Checking Current Value
# Inside U-Boot
printenv bootdelay
# In Linux (if exposed via /proc or sysfs)
cat /proc/cmdline | grep bootdelay
Key Takeaway
Choose bootdelay based on your use case:
- 0 for speed-critical production
- 2-3 for balanced dev/production deployments
- 5+ for lab environments requiring frequent intervention
- -1 only for dedicated debug scenarios
Further Reading: U-Boot documentation, kernel boot parameters documentation, embedded Linux boot optimization.