Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have added a share in fstab to access a network drive with all my files on... fstab looks like:
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
//192.168.1.73/disk1 /media/disk1 cifs username=pi,password=raspberry,_netdev,uid=1000,gid=1000,iocharset=utf8, 0 0
# a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that
When I run sudo mount -a the network drive mounts successfully and I can do cd /media/disk1 then ls which correctly gives me a list of all the folders on said network drive.
However, after rebooting the pi when I cd to that location and run ls again, nothing is there. I have to manually run sudo mount -a again, which then mounts the drive.
I have seen this reported many times, and the consensus seems to be that the mounts in fstab are happening too early - before the network has been established. I've tried to implement the things I understand - but to be honest a lot of it is way over my head. I've added _netdev to the line in fstab, I've added rootdelay=10 into /boot/cmdline.txt, I've installed networkmanager... none of this has helped.
And so I turn to you, about ready to throw the pi out the window - followed by myself. Any help, much appreciated.
The '_netdev' option is not always sufficient for slow networks. In particular, if Network Manager is involved, and systemd there can be problems. So, you might want to tell us the OS and version. Are you using Network Manager? There are solutions for coping with that situation.
There are a number of possible options (depending on answers to the above). Anyway, 2 to start with...
1. You could try adding the 'noauto' option, so that the samba mounting does not occur at boot, but later on. For example, add the mount via /etc/rc.local
2. I recall an old openSUSE thread where it was suggested to remount via crontab.
If you use NetworkManager you can do this by enabling NetworkManager-wait-online.service:
systemctl enable NetworkManager-wait-online.service
If you use systemd-networkd you can do this by enabling systemd-networkd-wait-online.service:
systemctl enable systemd-networkd-wait-online.service
Sorry gooner47 I'm not good with NAS and the process by which you'd have to set up to make it work.