USB hard drive delay
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?
Re: USB hard drive delay
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
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
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"
fi
# 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
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"
fi
# 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
Re: USB hard drive delay
Couldn't you leave the entries in fstab and just add 'mount -a' in /etc/rc.local?
Gr.
Dirk.
Gr.
Dirk.
Re: USB hard drive delay
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.
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.