Go Back   maemo.org - Talk > OS / Platform > Maemo 5 / Fremantle
 
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
  #1  
Old 2010-05-21, 11:57
LippiVan LippiVan is offline
 
Join Date: Dec 2009
Posts: 74
Thanks!: 593
Thanked 19 Times in 13 Posts
Send a message via Skype™ to LippiVan
Default Permanently mount a samba share on N900 (help nedded)

I'm desperatly trying to permanently mount my smb shares of my fileserver to my N900.

with titan's kernel the smb shares are working really great (i can finally stream my movie collection from my fileserver without the need of the lacking upnp support)
i mounted my shares to a tmp directory with the following command
Code:
mount -t cifs //192.168.0.2/multimedia /home/user/MyDocs/tmp/ -o username=MYUSERNAME,password=MYPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
this way i have access to all my files, streaming of videos works like a charm.
i don't want to type the code everytime i restart my phone, so i tried to modify the /etc/fstab. as it seems, the fstab gets autogenerated everytime i reboot the phone.

is there any other way to permanetly mount my samba shares? (i've already tried wizard mounter, but streaming videos does only work very laggy with it)

thx in advance!

Last edited by LippiVan; 2010-05-21 at 11:58. Reason: Typo
Reply With Quote
  #2  
Old 2010-05-21, 12:03
Joorin Joorin is offline
 
Join Date: Apr 2010
Location: Sweden
Posts: 726
Thanks!: 30
Thanked 345 Times in 218 Posts
Default Re: Permanently mount a samba share on N900 (help nedded)

Put it in a script? Then all you need to do is run the script.

The script would be
Code:
#!/bin/sh
mount -t cifs //192.168.0.2/multimedia /home/user/MyDocs/tmp/ -o username=Lippivan,MYUSERNAME=MYPASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777
Call it something like smb_mount.sh and don't forget to set its execute bit
Code:
chmod 755 smb_mount.sh
The permanent solution is to find the right part of the start up mechanics and add a call to your script there.

But, remember that if you lose your network connection, booting might hang for a while. And if you lose network connection after mounting, that directory will be marked as mounted and you will get interesting timeouts for some file system operations.

Last edited by Joorin; 2010-05-21 at 12:03. Reason: Typo
Reply With Quote
The Following User Says Thank You to Joorin For This Useful Post:
  #3  
Old 2010-05-21, 12:12
LippiVan LippiVan is offline
 
Join Date: Dec 2009
Posts: 74
Thanks!: 593
Thanked 19 Times in 13 Posts
Send a message via Skype™ to LippiVan
Default Re: Permanently mount a samba share on N900 (help nedded)

thx Joorin, I've already tried the way with the script, i always geht a "Permission denied" when i want to start it out of x-terminal. and yes, i did make it executeable.
Reply With Quote
  #4  
Old 2010-05-21, 14:07
GameboyRMH GameboyRMH is offline
 
Join Date: Dec 2009
Posts: 692
Thanks!: 201
Thanked 264 Times in 151 Posts
Send a message via AIM to GameboyRMH Send a message via MSN to GameboyRMH Send a message via Yahoo to GameboyRMH Send a message via Skype™ to GameboyRMH
Default Re: Permanently mount a samba share on N900 (help nedded)

I use scripts to mount samba shares so you're doing something wrong (although I use Nathan's CIFS module with a stock kernel).

make sure you chown the scripts to user and run a chmod ug+x on them.
__________________
"Impossible is not in the Maemo vocabulary" - Caballero
Reply With Quote
  #5  
Old 2010-05-21, 14:15
Joorin Joorin is offline
 
Join Date: Apr 2010
Location: Sweden
Posts: 726
Thanks!: 30
Thanked 345 Times in 218 Posts
Default Re: Permanently mount a samba share on N900 (help nedded)

Quote:
Originally Posted by LippiVan View Post
thx Joorin, I've already tried the way with the script, i always geht a "Permission denied" when i want to start it out of x-terminal. and yes, i did make it executeable.
Mounting requires root bits. So, become root and call the script or make it suid root as suggested above.

EDIT: suid root wasn't suggested so I suggest that now.
Reply With Quote
  #6  
Old 2010-05-21, 14:21
casper27's Avatar
casper27 casper27 is offline
 
Join Date: Jan 2009
Location: UK southampton
Posts: 843
Thanks!: 728
Thanked 520 Times in 257 Posts
Default Re: Permanently mount a samba share on N900 (help nedded)

why not use wizard mounter forget which repo its in.
This has a graphical user intrface. If you have toi reboot then your mount is just one click away. You can also save more than one mount directory. This also includes NTFS as well as SAMBA.
Reply With Quote
  #7  
Old 2010-05-21, 14:22
GameboyRMH GameboyRMH is offline
 
Join Date: Dec 2009
Posts: 692
Thanks!: 201
Thanked 264 Times in 151 Posts
Send a message via AIM to GameboyRMH Send a message via MSN to GameboyRMH Send a message via Yahoo to GameboyRMH Send a message via Skype™ to GameboyRMH
Default Re: Permanently mount a samba share on N900 (help nedded)

Quote:
Originally Posted by Joorin View Post
Mounting requires root bits. So, become root and call the script or make it suid root as suggested above.

EDIT: suid root wasn't suggested so I suggest that now.
or start your mount command with rootsh.
__________________
"Impossible is not in the Maemo vocabulary" - Caballero
Reply With Quote
  #8  
Old 2010-05-21, 16:42
LippiVan LippiVan is offline
 
Join Date: Dec 2009
Posts: 74
Thanks!: 593
Thanked 19 Times in 13 Posts
Send a message via Skype™ to LippiVan
Default Re: Permanently mount a samba share on N900 (help nedded)

Thx for all your help.
I couldnt change permissions in MyDoc folder. Now I've moved the script an now its working fine!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 21:37.