Posts: 1
Joined: Fri Apr 26, 2013 7:55 pm

USB hard drive delay

Fri Apr 26, 2013 9:13 pm

Hello I'm having a problem I'm hoping someone can help me with. I have an external USB hard drive hooked to my raspberry pi. I also have the hard drive identified by you you UUID in /etc/fstab. However, It appears that the hard drive doesn't spin up fast enough when I turn my power switch on which activates the USB hard drive and the raspberry pi. As a result when the boot process gets to /etc/fstab, it produces an error and fails to mount the drive. Is there any way to produce a delay in the boot process of the raspberry pi. Normally I would accomplish this through the grub boot loader, But I've been told the pi doesn't have grub. Any suggestions?

User avatar
Posts: 17965
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: USB hard drive delay

Sat Apr 27, 2013 3:11 am

Are you using the external HDD for your root filesystem?

If so, have you added "rootwait" into the kernel command line in /boot/cmdline.txt (or just cmdline.txt if viewed on another computer)?

I have no problems booting my Pi with that setup :)

Posts: 25
Joined: Sun Oct 14, 2012 10:40 am

Re: USB hard drive delay

Sat Apr 27, 2013 4:38 pm

I had the same problem so mount the disks using /etc/rc.local.

Heres my file for info - notice I moved the exit 0 line and I labeled my disks to make sure the right disk is mounted in the right place!

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"

# mount USB disks
mount -L wd1tbp1 -t ntfs /media/wd1tb
mount -L wd1tbp2 -t ntfs /media/wd1tbp2

mount -L WD-1TB /media/wd-1tb
mount -L Hitachi-1TB /media/hit-1tb

# exit 0 must go at end to show we ended without error!
exit 0

Posts: 10497
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: USB hard drive delay

Sat Apr 27, 2013 11:28 pm

Couldn't you leave the entries in fstab and just add 'mount -a' in /etc/rc.local?


Posts: 1
Joined: Tue Oct 15, 2013 6:19 pm

Re: USB hard drive delay

Sun Nov 01, 2015 2:55 pm

simple add :
rootdelay=25 rootwait
to the end of the cmdline.txt.
For a PI 2 use 25 for a PI1 use 5. Obviously the PI 2 is quicker so you have to slow it down more so the drives can catch up.
don't bother using boot_delay='a number' as some have suggested it justs slows down the initialization of the drive which is exactly the opposite of what you want.

Return to “Beginners”