Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

fstab mount on reboot not working
Thank you for your donation

Pages (2): 1 2 Next »
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
fstab mount on reboot not working
5th Jan, 2014, 06:28 AM
Post: #1
stumax Offline
Registered
Posts: 8
Joined: Jan 2014
Reputation: 0
fstab mount on reboot not working
Hi,

I'm trying to configure Transmission to download to a drive connected to my router as a NAS.

The router is a Huawei HG533 , it has some basic samba config available you can create user accounts and set them as read only or read/write also set the root folder for the user ... There's no options for a guest account or much else.

So after much reading and playing about I have the set up half working. (users and passwords have been ****'d out for obvious reasons)

To get the drive mounted manually this works, although it does prompt for a password afterwards -
Code:
sudo mount -t cifs //192.168.1.1/router /mnt/router -o user=******

So I added this to fstab to match the above
Code:
//192.168.1.1/router /mnt/router cifs username=******,password=****** 0  0

I had a few problems getting the drive to mount under xbian, one thing I have found is that it appears that you MUST include the domain parameter in the fstab file..

I have added this to /etc/fstab

Code:
//192.168.1.1/router /mnt/router cifs username=******,password=******,domain=WORKGROUP 0 0

Then I run -
Code:
sudo mount -a

It mounts fine , but on reboot it doesn't mount at all !

Anyone know of a fix for this ?

Thanks,
Stu
Find all posts by this user
Quote this message in a reply
7th Jan, 2014, 07:45 PM
Post: #2
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: fstab mount on reboot not working
@stumax

edit /etc/init/xbian-net.conf and take this first lines:

Code:
#!upstart

start on ………….
stop on started xbian-net and (net-device-up and (started gssd and started idmapd or started statd) or xbian-nowait)

change to:
("………" just means whatever is there, keep "start on" as is - important is change "stop on …." to "stop on started xbian-net")

Code:
#!upstart

start on ………….
stop on started xbian-net

report back.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
7th Jan, 2014, 08:11 PM
Post: #3
stumax Offline
Registered
Posts: 8
Joined: Jan 2014
Reputation: 0
RE: fstab mount on reboot not working
Thanks mk01, I'll give this a try this evening and let you know how I get on !
Stu
Find all posts by this user
Quote this message in a reply
8th Jan, 2014, 07:40 AM
Post: #4
stumax Offline
Registered
Posts: 8
Joined: Jan 2014
Reputation: 0
RE: fstab mount on reboot not working
Hi mk01,

Unfortunatlely it didn't do the trick Sad

So the first few lines of xbian-net.conf looks like so, is this what you meant ?

Code:
#!upstart

nice -4

start on mountall
task

in fstab I have -
Code:
//192.168.1.1/router /mnt/router cifs username=******,password=******,domain=WORKGROUP 0 0

Thanks,
sTu
Find all posts by this user
Quote this message in a reply
8th Jan, 2014, 08:55 AM
Post: #5
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: fstab mount on reboot not working
realized just now, updated the post

how I wrote it at first will not change the logic (to start and then stop). now should be ok.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
8th Jan, 2014, 11:47 PM
Post: #6
stumax Offline
Registered
Posts: 8
Joined: Jan 2014
Reputation: 0
RE: fstab mount on reboot not working
Hi mk01,

OK so now I have -

Code:
#!upstart

nice -4

start on mountall
stop on started xbian-net

Same result on boot i'm afraid (not mounting)!

Thanks,
Stu
Find all posts by this user
Quote this message in a reply
9th Jan, 2014, 04:24 AM
Post: #7
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: fstab mount on reboot not working
ok, can you post to pastebin:

Code:
cat /run/upstart-ev.log

tail /var/log/upstart/xbian-net.log

also what happens if you do from command line:
Code:
sudo mount -avs -t cifs

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
9th Jan, 2014, 05:02 AM
Post: #8
Enferax Offline
Registered
Posts: 10
Joined: Jan 2014
Reputation: 1
RE: fstab mount on reboot not working
Hi there,

my results: pastebin

Just for your info, the harddrives weren't in any form of sleep state so this doesn't seem to be a problem.
Find all posts by this user
Quote this message in a reply
9th Jan, 2014, 05:09 AM
Post: #9
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: fstab mount on reboot not working
ok, got the point

change "stop on started xbian"

to

Code:
stop on started xbian-net and (net-device-up IFACE!=lo or xbian-nowait)

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
9th Jan, 2014, 07:49 PM
Post: #10
Enferax Offline
Registered
Posts: 10
Joined: Jan 2014
Reputation: 1
RE: fstab mount on reboot not working
Hi mk01,

seems like it's still not working. I get the same errors on nzbget.

Here's the logs from the three commands. pastebin
Find all posts by this user
Quote this message in a reply
9th Jan, 2014, 08:20 PM
Post: #11
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: fstab mount on reboot not working
can you please post your xbian-update version ? i will check the source as original B2 was a bit different than i'm testing on.

and yes, the mount.nfs output "nothing was mounted" is confusing, but it because current "new" linux implementation joined nfs4 and nfs2/3 under one helper so as you use mount -a -t nfs it actually runs two programs, one for nfs4 and second for nfs2/3 . of course one will report failure, second one will succeeded . people programming it should be sometimes think rather twice (btw: me too Smile) )

or maybe to speed this up - can you replace your /etc/init/xbian-net.conf with this content?

Code:
#!upstart

start on started xbian-run
stop on started xbian-net and (net-device-up IFACE!=lo or xbian-nowait)

nice -6

pre-start script
    splash --msgtxt="configuring network..." --percentage
    net="$(printf "%b" "$(ip a | grep "state UP" | awk -F': ' '{print $2}')\n$(ifquery -la | grep -vw lo)\neth0" | sort | uniq)"
    for i in $net; do start -q network-interface INTERFACE=$i IFACE=$i || :; done
end script

post-stop script
    timeout 20 sh -c "while true; do timeout -k 15 -s 9 10 mount -avs -t nfs4,nfs,cifs -o wsize=65536,rsize=262144 && break; done"
    [ $? -ne 124 ] || mount -aFs -t nfs4,nfs,cifs &
    exit 0
end script

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
9th Jan, 2014, 08:39 PM
Post: #12
Enferax Offline
Registered
Posts: 10
Joined: Jan 2014
Reputation: 1
RE: fstab mount on reboot not working
Looks like editing it broke my setup. At least it doesn't come up again. Have to investigate further by the time i get home.
Find all posts by this user
Quote this message in a reply
9th Jan, 2014, 08:58 PM
Post: #13
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: fstab mount on reboot not working
ok now I have the feeling we are hitting two problems one maybe solved masked by the other.
can you refer to this post ?

and the linked link http://forum.xbian.org/thread-1770-post-19570.html#pid19570

(if you have "nfs" type in fstab, the new joined mount helper is trying nfs4 first. unfortunately under some conditions can't fallback correctly. according to the last changes in man pages around nfs, stating the vers= is highly recommended).

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
10th Jan, 2014, 01:12 AM
Post: #14
stumax Offline
Registered
Posts: 8
Joined: Jan 2014
Reputation: 0
RE: fstab mount on reboot not working
Thanks for the updates .. I won't get chance to test this until tomorrow evening. I'll let you know how I get on!

Cheers,
Stu
Find all posts by this user
Quote this message in a reply
10th Jan, 2014, 03:34 AM
Post: #15
Enferax Offline
Registered
Posts: 10
Joined: Jan 2014
Reputation: 1
RE: fstab mount on reboot not working
So finnaly got my fingers on the box.

Adding vers=3 to the options in the fstab finally worked.

If I would have started xbian while watching the output on the screen and comparing it to the logs on the nas would have showed me 2 things:

1. Xbian isn't going through its "normal" routine. It stops at the login prompt only to start xbmc after the internal timer counted down
2. There was no attempt to mount an nfs share in the logs of the nas

Btw, I am back to the "old" Version of the xbian-net.conf


Thanks for your help and your hard work for xbian.
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  Cannot Mount SMB share via Fstab ttsk8r 1 9,807 17th Jul, 2013 09:55 PM
Last Post: Gwystyl

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 18th May, 2025, 07:13 AM Powered By MyBB, © 2002-2025 MyBB Group.