Re: Pi 2 fstab not mounting usb disk
Just adding a "+1" on this, adding rootdelay=10 also fixed the problem I had when moving a (slow, old) USB drive from a Pi B to a Pi2 B. I had figured it must have been a timing problem given how fast the Pi2 boots, so was gratified to find this thread...
Are you intending to add a rootdelay value to the source distribution ? Although it's a bodge, this is likely to be a common problem until the boot dependencies are fixed correctly.
Are you intending to add a rootdelay value to the source distribution ? Although it's a bodge, this is likely to be a common problem until the boot dependencies are fixed correctly.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 5732
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: Pi 2 fstab not mounting usb disk
No. Most user's don't have disks mounted in /etc/fstab, and many that do don't have this issue. I don't think we want to be slowing down boot for everyone.tw99 wrote: Are you intending to add a rootdelay value to the source distribution ? Although it's a bodge, this is likely to be a common problem until the boot dependencies are fixed correctly.
We are planning to move to jessie in the future which we believe will resolve this issue, so that will be the official solution.
- DougieLawson
- Posts: 41035
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Pi 2 fstab not mounting usb disk
Please don't, because Jessie is in no way anywhere near ready to be let loose in the wild. I reverted my RPi2B to Wheezy because Jessie was so unstable. Running that with rootdelay=5 is good enough to get my USB root filesystem working.dom wrote:We are planning to move to jessie in the future which we believe will resolve this issue, so that will be the official solution.
Code: Select all
dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa01041 bcm2709.serial=0x5a67d427 smsc95xx.macaddr=B8:27:EB:67:D4:27 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1 root=UUID=296e7e22-8bb1-4970-8dfd-c24fd4f03346 rootfstype=ext4 elevator=deadline rootwait rootdelay=5
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 5732
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: Pi 2 fstab not mounting usb disk
jessie has been out a long time. My Ubuntu 14.4 distribution is based on jessieDougieLawson wrote:Please don't, because Jessie is in no way anywhere near ready to be let loose in the wild. I reverted my RPi2B to Wheezy because Jessie was so unstable. Running that with rootdelay=5 is good enough to get my USB root filesystem working.
Code: Select all
cat /etc/debian_version
jessie/sid
- DougieLawson
- Posts: 41035
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Pi 2 fstab not mounting usb disk
It's the systemd stuff that's badly broken. I had a 2B system that would successfully boot eight times out of ten then I installed an update for CUPS and the system would hang every time.
I don't understand systemd enough to debug it and I seemed to go down the big snake on every throw of the dice. Spent a lot of hours going one step forward and twenty back. I couldn't replace my home server with that, so back to Wheezy.
One of my Bs has been running for months on Jessie.
The debugging stuff for systemd is patchy bordering on nonexistent.
I don't understand systemd enough to debug it and I seemed to go down the big snake on every throw of the dice. Spent a lot of hours going one step forward and twenty back. I couldn't replace my home server with that, so back to Wheezy.
One of my Bs has been running for months on Jessie.
The debugging stuff for systemd is patchy bordering on nonexistent.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: Pi 2 fstab not mounting usb disk
Same problem here: Seagate Backup Plus 5TB, self-powered, formatted with ext4. Fstab reads as follows:
It will not auto mount on boot, but once booted, 'mount -a' works fine. This is really a nuisance because many of my services, i.e. nfs-kernel-server, minidlna, and forked-daapd, count on this drive being mounted. I had to disable those services from automatically starting at bootup until this is resolved.
Code: Select all
LABEL=mediafiles /media/mediafiles ext4 defaults 0 0
Re: Pi 2 fstab not mounting usb disk
Did you add the rootdelay=5 (or higher) to cmdline.txt as suggested in this topic?kegepet wrote:Same problem here: Seagate Backup Plus 5TB, self-powered, formatted with ext4. Fstab reads as follows:It will not auto mount on boot, but once booted, 'mount -a' works fine. This is really a nuisance because many of my services, i.e. nfs-kernel-server, minidlna, and forked-daapd, count on this drive being mounted. I had to disable those services from automatically starting at bootup until this is resolved.Code: Select all
LABEL=mediafiles /media/mediafiles ext4 defaults 0 0
Re: Pi 2 fstab not mounting usb disk
Yes "rootdelay=5" worked. Should have read the post all the way throughDirkS wrote:Did you add the rootdelay=5 (or higher) to cmdline.txt as suggested in this topic?

Re: Pi 2 fstab not mounting usb disk
I have the same problem...
...but try this:
1. Do not use FSTAB
2. in "/etc/rc.local" before "exit 0" line insert two more lines:
sleep 5
mount -t ntfs /dev/sda1 /media/myhdd
This works on my RPi2 (raspbian 3.18.10).
...but try this:
1. Do not use FSTAB
2. in "/etc/rc.local" before "exit 0" line insert two more lines:
sleep 5
mount -t ntfs /dev/sda1 /media/myhdd
This works on my RPi2 (raspbian 3.18.10).
-
- Posts: 4
- Joined: Thu Jul 24, 2014 8:52 pm
Re: Pi 2 fstab not mounting usb disk
I have a Pi1 which I just upgraded to Jessie and started experiencing the problem.
EDIT: Adding "rootdelay=5" did not solve it and increasing it to "10" did neither.
Code: Select all
$ uname -a
Linux mimir 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux
-
- Posts: 8
- Joined: Mon Aug 24, 2015 1:55 pm
Re: Pi 2 fstab not mounting usb disk
Hi,
I have kernel 3.18.11-v7 and added a 1TB WD drive powered by the PI.
No issues at all, I however did the following when I got the PI delivered.
# Raspberry PI 2
# More power to the usb ports
# You need a 2A power supply
# ======================
Checking if drive boot up and all works fine so far, coffee!
I have done several reboots after adding my NFS share and Enecsys monitoring on it and it works flawless. Hope it helps someone.
I have kernel 3.18.11-v7 and added a 1TB WD drive powered by the PI.
No issues at all, I however did the following when I got the PI delivered.
# Raspberry PI 2
# More power to the usb ports
# You need a 2A power supply
# ======================
Code: Select all
sudo nano /boot/config.txt
max_usb_current=1
sudo apt-get update
sudo apt-get upgrade
sudo reboot
# Update the RPI 2
# ================
sudo rpi-update
sudo reboot
sudo apt-get update
sudo apt-get upgrade
sudo reboot
# Add WD My Passport, red 1TB usb drive.
# This is the time to plug in the USB HDD
# =======================================
blkid
sudo mkdir /mnt/red
sudo nano /etc/fstab
#
# WD Red 1TB
#
UUID=f0775ce5-ebad-4d6f-9b05-4dfe7c685975 /mnt/red ext4 defaults,noatime 0 0
#
sudo reboot
I have done several reboots after adding my NFS share and Enecsys monitoring on it and it works flawless. Hope it helps someone.
Raspberry PI2 with Enecsys, Printserver, NAS, Webcams.
Re: Pi 2 fstab not mounting usb disk
Well, i spent way too long dinking with this, but i ended up having to do 20 seconds on a brand new usb 3.0 drive i got.
I also just started doing it all via ssh, and well, if some one would like a cheat:
sudo nano /boot/cmdline.txt
my first code i posted even as basic as it truely is.
5/10/15 did not work for me at all, 20 has been 100%
I also just started doing it all via ssh, and well, if some one would like a cheat:
sudo nano /boot/cmdline.txt
my first code i posted even as basic as it truely is.
5/10/15 did not work for me at all, 20 has been 100%
Re: Pi 2 fstab not mounting usb disk
So glad I found this topic. What a pain.
-
- Posts: 8
- Joined: Mon Aug 24, 2015 1:55 pm
Re: Pi 2 fstab not mounting usb disk
Has any one of you with the problems tried this?
Code: Select all
sudo nano /boot/config.txt
max_usb_current=1
Raspberry PI2 with Enecsys, Printserver, NAS, Webcams.
-
- Posts: 7
- Joined: Sat Apr 20, 2013 8:50 am
Re: Pi 2 fstab not mounting usb disk
I had the same issue with a USB HDD in /etc/fstab not mounting automatically on Pi 2, whereas it mounted without problems on a Pi 1 using the same fstab entry . I noticed in dmesg output that the HDD was only discovered after other drives/mounts had already been mounted, so I suspected that the device was simply not ready yet at the time of mounting. Adding rootdelay=5 to /boot/cmdline.txt solved the issue. Many thanks.
-
- Posts: 1
- Joined: Wed Jan 27, 2016 8:47 pm
Re: Pi 2 fstab not mounting usb disk
Thanks.
rootdelay=10 works perfectally fine for me.
rootdelay=10 works perfectally fine for me.
Re: Pi 2 fstab not mounting usb disk
I also had to run to mount my devices like scheduled in the fstab of my Raspberry Pi Model B+ running Raspbian Jessie. Adding to my mount options in fstab solved this for me.
EDIT: I did forget to mention that in my case I wasn't mounting a USB device but a network share. But I thought that this might be related.
Code: Select all
sudo mount -a
Code: Select all
noauto,x-systemd.automount
EDIT: I did forget to mention that in my case I wasn't mounting a USB device but a network share. But I thought that this might be related.
Re: Pi 2 fstab not mounting usb disk
Thank you.SimonSt wrote:I also had to runto mount my devices like scheduled in the fstab of my Raspberry Pi Model B+ running Raspbian Jessie. AddingCode: Select all
sudo mount -a
to my mount options in fstab solved this for me.Code: Select all
noauto,x-systemd.automount
EDIT: I did forget to mention that in my case I wasn't mounting a USB device but a network share. But I thought that this might be related.
I was trying (unsuccessfully) to mount box.com via webdav using fstab and it just wouldn't work. adding x-systemd.automount fixed it.
Re: Pi 2 fstab not mounting usb disk
I am running Jessie and also experiencing the same issue. I have also tried rootdelay=5, 10 and 15 without success. I am trying to mount a NAS drive.
Drive mounts perfectly when I run sudo mount -a
Drive mounts perfectly when I run sudo mount -a
Re: Pi 2 fstab not mounting usb disk
I am also getting this problem with both usb flash drives and a usb externally powered HDD. I've tried both with ext4 and btrfs filesystems. Same symptoms as above. Will not mount on boot but mount -a works fine.
I'm also getting disk corruption problems.
Code: Select all
uname -a
Linux mail 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
Re: Pi 2 fstab not mounting usb disk
Here's my workaround in case any one finds it useful. Make sure you edit the "/dev/sda" line to use your disk identifier. I have a btrfs raid thing going on and it seems that mounting by UUID or LABEL does not work until the disk has been mounted at least once since the system was booted. Also its not possible to tell whether sda or sdb is the identifier which will mount the volume, which is why I try mounting /dev/sda then if this does not work I try mounting /dev/sdb.
Your script file needs to be placed in /etc/init.d/ made executable then installed. See this article for instructions on how to install init scripts http://www.stuffaboutcode.com/2012/06/r ... rt-up.html
EDIT: I had left a touch() function in the script which is not needed, this is deleted now
Code: Select all
#!/usr/bin/python
# /etc/init.d/mount-usb
### BEGIN INIT INFO
# Provides: mount_ext_usb
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: A script to mount a usb disk at boot
# Description: A script to mount a usb disk at boot
### END INIT INFO
# If you want a command to always run, put it here
import syslog
from subprocess import check_output
try:
check_output(["/bin/mount", "/dev/sda", "/store"])
syslog.syslog('Mounting Store')
except:
syslog.syslog('Failed: Could not mount "store" from sda. Trying sdb')
try:
check_output(["/bin/mount", "/dev/sdb", "/store"])
except:
syslog.syslog('Failed: Could not mount "store" from sdb. Disk not mounted')
# Carry out specific functions when asked to by the system
exit(0)
EDIT: I had left a touch() function in the script which is not needed, this is deleted now
Last edited by willyt on Fri Sep 02, 2016 2:51 pm, edited 2 times in total.
-
- Posts: 1
- Joined: Thu Sep 01, 2016 4:03 pm
Re: Pi 2 fstab not mounting usb disk
Hi there,
I had the same problems mounting cifs points from my NAS. Based on the hints you gave me I investigated further and found some more "useful flags" to use in the FSTAB.
You may want to check this resource: https://wiki.archlinux.org/index.php/fstab
Within these flags, this one dragged my attention.
So my FSTAB for mounting CIFS looks like this:
//nas/nas-ext1/ /mnt/nas-ext1 cifs uid=0,gid=0,rw,credentials=/mnt/credentials/nas-ext1,noauto,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=5,x-systemd.idle-timeout=10min 0 0
In case is not available this link might help. I check my "/lib/systemd/system" for this service.
http://unix.stackexchange.com/questions ... ot-working
My NAS shares get reliable mounted every bootup without a forced delay.
Hope these information are helpful. (In case there is something totally wrong with my information please let me now. I am not a linux pro... more kind of a novice.)
Cheers Lars
I had the same problems mounting cifs points from my NAS. Based on the hints you gave me I investigated further and found some more "useful flags" to use in the FSTAB.
You may want to check this resource: https://wiki.archlinux.org/index.php/fstab
Code: Select all
noauto,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10,workgroup=workgroup,credentials=/foo/credentials
Code: Select all
x-systemd.requires=network-online.target
So my FSTAB for mounting CIFS looks like this:
//nas/nas-ext1/ /mnt/nas-ext1 cifs uid=0,gid=0,rw,credentials=/mnt/credentials/nas-ext1,noauto,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=5,x-systemd.idle-timeout=10min 0 0
In case
Code: Select all
network-online.target
http://unix.stackexchange.com/questions ... ot-working
My NAS shares get reliable mounted every bootup without a forced delay.
Hope these information are helpful. (In case there is something totally wrong with my information please let me now. I am not a linux pro... more kind of a novice.)
Cheers Lars
-
- Posts: 1
- Joined: Wed Oct 19, 2016 9:15 pm
Re: Pi 2 fstab not mounting usb disk
Just came here to hopefully help some poor soul in the future with some google keywords. My problem was almost the same as everyone else in this thread, and it was solved the same way (adding rootdelay=5 to cmdline.txt).
I have a Pi 3 running Raspbian 8 (jessie).
In my case, I have 2 USB drives configured in a RAID1 array with an entry in /etc/fstab to mount the array. It wasn't working and was halting the boot; removing the entry in /etc/fstab led to the conclusion that mdadm was not assembling the array on boot at all. However, after booting running a manual mdadm --assemble --scan would find the array just fine.
Googling for this was a pain in the arse, because most of the time (on a non-pi system) the root cause is that you're not loading the raid1 kernel module on boot, or you didn't configure mdadm correctly or some such like that. But I had all that set up correctly; the module was loaded and I had the right entry in /etc/mdadm/mdadm.conf
It appears that the USB drives simply weren't recognized yet by the kernel when mdadmn did its auto-assemble thing. Interestingly, I have one non-RAID partition on one of the USB drives that was being mounted fine, so again slightly different situation, same solution.
And please don't lecture me that I'm doing something dumb with RAID1 on 2 USB drives attached to a pi. I know it will be slow, thanks!
I have a Pi 3 running Raspbian 8 (jessie).
In my case, I have 2 USB drives configured in a RAID1 array with an entry in /etc/fstab to mount the array. It wasn't working and was halting the boot; removing the entry in /etc/fstab led to the conclusion that mdadm was not assembling the array on boot at all. However, after booting running a manual mdadm --assemble --scan would find the array just fine.
Googling for this was a pain in the arse, because most of the time (on a non-pi system) the root cause is that you're not loading the raid1 kernel module on boot, or you didn't configure mdadm correctly or some such like that. But I had all that set up correctly; the module was loaded and I had the right entry in /etc/mdadm/mdadm.conf
It appears that the USB drives simply weren't recognized yet by the kernel when mdadmn did its auto-assemble thing. Interestingly, I have one non-RAID partition on one of the USB drives that was being mounted fine, so again slightly different situation, same solution.
And please don't lecture me that I'm doing something dumb with RAID1 on 2 USB drives attached to a pi. I know it will be slow, thanks!
-
- Posts: 1417
- Joined: Fri Jan 04, 2013 1:57 pm
- Location: de_DE
Re: Pi 2 fstab not mounting usb disk
at the time, when i was installing mdadm to raspbian, i got a popup that gave me the choice to start mdadm automatically at boot time or manually later.appleshampooid wrote:the conclusion that mdadm was not assembling the array on boot at all. However, after booting running a manual mdadm --assemble --scan would find the array just fine.
i always let the choice empty to do not start mdadm automatically, because i only have it to rescue raid data in case of an emergency - so i always start it manually...
maybe your mdadm is configured for manually startup?
or, no idea if it is possible nor how to do, maybe you can change the dependencies for the mdadm service, so that it will be started later, after USB drives will be detected by the kernel.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)