Skip to content

/etc/fstab down't work with RPI2 #824

Closed

Description

@pirulloz

Hello,

/etc/fstab doens't work in RPI2. Simply it doesn't mount anything.

You can see here a lot of people with this problem:
http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=99491

Activity

  1. notro commented on Feb 11, 2015

    @notro
    Contributor

    It does at least mount nfs for me on RPI2:

    192.168.10.92:/home/pi  /home/pi/work   nfs     rw      0       0
    
  2. popcornmix commented on Feb 11, 2015

    @popcornmix
    Collaborator

    @pirulloz
    Does same /etc/fstab mount okay on Pi1 with 3.18 kernel?

    @notro any guesses?

  3. pirulloz commented on Feb 11, 2015

    @pirulloz
    Author

    Yes, with 3.18.6+ on RPI1 it works good.

  4. popcornmix commented on Feb 11, 2015

    @popcornmix
    Collaborator

    Can you add maxcpus=1 to end of cmdline.txt and report if it works?

  5. pirulloz commented on Feb 11, 2015

    @pirulloz
    Author

    I've tried. With that command it works fine.....

    But now am i limited to 1 core? I don't know how that line works

  6. popcornmix commented on Feb 11, 2015

    @popcornmix
    Collaborator

    Yes, my suspicion was that /etc/fstab is being parsed before the disks have been identified (possibly through different parts of boot being done in parallel). There must be a way of ensuring /etc/fstab only occurs after disks are identified...

  7. pirulloz commented on Feb 11, 2015

    @pirulloz
    Author

    ok.... i understand..... so i wait for a patch from you :)

    If you need some support please let me know. I can do some tests.....

  8. notro commented on Feb 11, 2015

    @notro
    Contributor
  9. popcornmix commented on Feb 11, 2015

    @popcornmix
    Collaborator

    @pirulloz
    can you remove maxcpus and add rootdelay=10 to cmdline.txt?
    If that fixes it does a smaller number work?

    I've got a USB ssd disk here, but it seems to be mounted just fine (without any cmdline.txt changes)

  10. rutger1140 commented on Feb 11, 2015

    @rutger1140

    @popcornmix rootdelay=10 makes /etc/fstab work for me. Will try with lower values later on.

  11. pirulloz commented on Feb 11, 2015

    @pirulloz
    Author

    With rootdelay=10 it works fine.
    With rootdelay=5 it works fine
    With rootdelay=2 it doesn't work

  12. keithellis74 commented on Feb 15, 2015

    @keithellis74

    I can confirm rootdelay=5 works fine for me.
    Just as a bit of background, I did not have this problem with kernel 3.18.5 but when upgrading to 3.18.7 was when the issues started. All kernel versions worked find in a Pi rev 2 model B

  13. popcornmix commented on Feb 16, 2015

    @popcornmix
    Collaborator

    @keithellis74
    Can you confirm that downgrading kernel avoids the requirement of rootdelay?

    Look here: https://github.com/Hexxeh/rpi-firmware/commits/master
    each firmware update has a git hash (hex number) at the end of the URL. Run:

    sudo rpi-update <hash>
    

    To get a specific version. E.g.

    sudo rpi-update 96f2257f57196817ebb030096993823be721fb27
    

    will get the initial 3.18.5 kernel. Try to identify the first kernel that fails to mount disk without rootdelay.

  14. keithellis74 commented on Feb 16, 2015

    @keithellis74

    Hi, just tried to downgrade to 3.18.5 and get the following error.

    *** Updating kernel modules
    cp: cannot start '//root/.rpi-firmware/modules/*': No such file or directory

    Keith Ellis

    On 16 Feb 2015, at 14:14, popcornmix notifications@github.com wrote:

    @keithellis74
    Can you confirm that downgrading kernel avoids the requirement of rootdelay?

    Look here: https://github.com/Hexxeh/rpi-firmware/commits/master
    each firmware update has a git hash (hex number) at the end of the URL. Run:

    sudo rpi-update
    To get a specific version. E.g.

    sudo rpi-update 96f2257f57196817ebb030096993823be721fb27
    will get the initial 3.18.5 kernel. Try to identify the first kernel that fails to mount disk without rootdelay.

    —
    Reply to this email directly or view it on GitHub.

  15. keithellis74 commented on Feb 17, 2015

    @keithellis74

    Ok, I had a play about this morning. I downgraded to 3.18.6 using commit 3f11b3fb1f390b60daa22f2ca2ecda5266295a84 and still had the same problem. It booted using rootdelay=5 but once removed it failed to boot again.

    I then tried to downgrade to 3.18.5 using commit 67197d9d73c56570578cb2c6c188af263a37ecd9 (with the missing modules) This applies without any errors but upon reboot with rootdelay=5. uname -a reports kernel version 3.18.6 which is rather confusing. When rootdelay=5 is removed is fails to boot agian.

  16. 15 remaining items

  17. andre-dierker commented on Sep 21, 2015

    @andre-dierker

    I'm using wired ethernet too. The nfs timeout at boot time exist anyway.

  18. andre-dierker commented on Sep 21, 2015

    @andre-dierker

    NFS4 requires idmapd, did you configured it right?

  19. luispablo commented on Sep 25, 2015

    @luispablo

    Having the same issue as DavidCWGA and lathoub. No solution or workaround yet?

  20. luispablo commented on Sep 26, 2015

    @luispablo

    Solved it by adding the package usbmount. Hope it helps...

  21. popcornmix commented on Oct 29, 2015

    @popcornmix
    Collaborator

    @pirulloz Does this work for you with jessie?
    Does installing usbmount help?

  22. afspear commented on Jan 29, 2016

    @afspear

    I'm trying to mount an nfs volume via /etc/fstab, and installing usbmount did not help. sudo mount -a does work.

    uname -a
    Linux raspberrypi 4.1.15-v7+ #831 SMP Tue Jan 19 18:39:46 GMT 2016 armv7l GNU/Linux

  23. DavidCWGA commented on Jan 29, 2016

    @DavidCWGA

    Try adding "noauto,x-systemd.automount" to your mount options in fstab.

  24. afspear commented on Jan 29, 2016

    @afspear

    adding the options worked great! So, that says, don't use fstab to auto mount the volume, but ask systemd to do it?

  25. DavidCWGA commented on Jan 29, 2016

    @DavidCWGA

    Yes. Obviously this only works if you're using systemd.

  26. randoogle commented on Feb 8, 2016

    @randoogle

    you could simply write a cron under root that runs mount -a on reboot. Add in a sleep just in case things aren't ready yet. Worked for me.

    $sudo su -
    #crontab -e
    @reboot /root/mount_drives.sh

    /root/mount_drives.sh:

    #!/bin/bash
    sleep 10
    mount -a

  27. DavidCWGA commented on Feb 8, 2016

    @DavidCWGA

    you could simply write a cron under root that runs mount -a on reboot.

    This is a super-ugly hack. Until the problem is fixed for real (and given this issue is closed, they're clearly not in any hurry) the "noauto,x-systemd.automount" mount options are the best solution.

  28. ziesemer commented on Feb 8, 2016

    @ziesemer

    you could simply write a cron under root that runs mount -a on reboot.

    Agreed with @DavidCWGA - not only is this an ugly hack, please be aware that @reboot literally means reboot - and not a clean system start after a previous shutdown.

  29. randoogle commented on Feb 9, 2016

    @randoogle

    Thanks, ziesemer, for keying me in on that. I hadn't realized @reboot only works sometimes. As for the more elegant option of using systemd, I've tried installing it and adding the options above, but then my cifs shares won't mount at all. As I've already spent 1 1/2 hours looking into systemd, and trying different options, I think for now I'll just settle for putting "mount -a" in my /etc/rc.local, which seems to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions