Reply
Thread Tools
Posts: 74 | Thanked: 19 times | Joined on Dec 2009
#1
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
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#2
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
 

The Following User Says Thank You to Joorin For This Useful Post:
Posts: 74 | Thanked: 19 times | Joined on Dec 2009
#3
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.
 
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#4
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
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#5
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.
 
casper27's Avatar
Posts: 844 | Thanked: 521 times | Joined on Jan 2009 @ UK southampton
#6
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.
 
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#7
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
 
Posts: 74 | Thanked: 19 times | Joined on Dec 2009
#8
Thx for all your help.
I couldnt change permissions in MyDoc folder. Now I've moved the script an now its working fine!
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:32.