Hello everyone, I have a problem with my raspberry 2 and a portable drive. The hard drive is connected to the raspberry through a USB hub. Every time I turn off or reboot the system, the file system management I see the state that is missing. To do that I have to mount the hard Dsik disconnect and then reconnect it. Is there a way that every time I turn on the raspberry or restart mounts the hard drive automatically? I use it a lot outside and if it happens that the power goes off or do I restart the raspberry for some reason, then I can not use features such as the downloader or bitorrent. Can you help me please? Thanks in advance to all
Help auto mounting HDD rpi2
-
- Major Upgrade
- g14nluc4
-
-
Pretty sure this happens because there is no boot delay on the RPi. It is past the mounting stage before the usb drive is ready and doesn't mount. You could try putting the mount -a command in /etc/rc.local before the exit command.
-
Pretty sure this happens because there is no boot delay on the RPi. It is past the mounting stage before the usb drive is ready and doesn't mount. You could try putting the <code class="inlineCode">mount -a</code> command in <code class="inlineCode">/etc/rc.local</code> before the exit command.
Thank you, I try and update you if it solves the problem
-
-
Pretty sure this happens because there is no boot delay on the RPi. It is past the mounting stage before the usb drive is ready and doesn't mount. You could try putting the <code class="inlineCode">mount -a</code> command in <code class="inlineCode">/etc/rc.local</code> before the exit command.
Nothing, same problem
-
You could try creating another script like the following and call it from rc.local
put the following in /etc/rc.local before the exit command.
/root/wait_to_mount.sh &nano /root/wait_to_mount.sh
chmod +x /root/wait_to_mount.shIt would also be possible to loop until the device exists and then mount it but I would need to know more about the system.
-
Having the same problem, but not sure how to edit rc.local. I don't see an exit command...
This is my file, where do I put the command?
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.# Print the IP address
_IP=$(hostname -I) true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fitest -f /etc/ssh/ssh_host_dsa_key dpkg-reconfigure openssh-server
ntpdate -b pool.ntp.org
service ntp start -
-
exit 0 should be the last line. Just add it.
-
Works after setting sleep to 20.
Great, thanks a lot!!
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!