maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs) (https://talk.maemo.org/showthread.php?t=38536)

Nathan 2010-02-12 15:50

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by slewis1972 (Post 522566)
Hi Guys

Last night I created a folder called NAS under media and mounted it via:

mount -tcifs //xxx.xxx.xxx.xxx/media/Music/Music /media/NAS -ouser=xxxx,pass=xxxxxx,ip=xxxxxx

1. Do a 'lsmod' from the terminal and make sure that cifs shows up in the modules list.
2. If it does then try your mount command above, and then do a 'dmesg' and see what the error message is.

Nathan

Nathan 2010-02-12 18:27

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by luigi (Post 522778)
@Nathan: I've tried the ",direct" option in an attempt to increase the speed of the cifs mount, but for me it turns out there is no noticeable difference with or without that option.

The average time it takes to copy 100Mbit from my server is nearly 30sec. - compared with the 12 sec. it takes to scp it. Browsing through a folder with images or viewing a video is hardly possible.

I'm curious to know experiences of others.

On a connection that shows quality of about 27% in wifiinfo -- Yeah, I'm a ways from my router. So I'm sure this actually slows things down a bit. But I did all my measurements multiple times from the same place.

Well, in my tests this is what occurred:
- scp was almost twice as fast as cifs
- cifs with "direct" was twice as fast as cifs without it.

Direct numbers
- I can copy a 30 meg file in 60 seconds (Cifs, direct mode)
- I can copy the same 30 meg file in 33 seconds, via scp.

Doing some google research, it does appear that cifs is known to be slower than ftp/nfs/scp. So this is probably not going to improve any, as it is a protocol issue.

Nathan

Nathan 2010-02-12 18:39

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
I also dropped a new version of TrueCrypt into the repository with the missing control files and the sudoers addition. Please vote on it so that we can move it out of "testing" and into extras. (Truecrypt itself is unchanged -- just install related stuff).

Nathan

maartenmk 2010-02-12 19:11

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
For me the direct mode actually seems to be slower. 500KB/s would be plenty for streaming, but I reach nowhere near that speed, more like 50. Any ideas?

I did manage to get it working without the script of GameboyRMH now. Nathan, could it be your instructions in the 1st post are incorrect? Looking at the script, I tried this:
mount -t cifs //<server>/<path> /<your>/<local>/<path> -o user=<user>,pass=<pass>,ip=<ip of server>,direct

And it worked, while the original instructions didn't.

Nathan 2010-02-12 22:19

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by maartenmk (Post 523550)
For me the direct mode actually seems to be slower. 500KB/s would be plenty for streaming, but I reach nowhere near that speed, more like 50. Any ideas?

I did manage to get it working without the script of GameboyRMH now. Nathan, could it be your instructions in the 1st post are incorrect? Looking at the script, I tried this:
mount -t cifs //<server>/<path> /<your>/<local>/<path> -o user=<user>,pass=<pass>,ip=<ip of server>,direct

And it worked, while the original instructions didn't.

You have to have the original "mount.cifs" installed (see the attachment on post #1), to use it. I haven't used the script that others developed -- so I have no idea how it works.

Now, you can use either "mount.cifs" or "mount -t cifs" -- the rest of the command line is identical. I just ran the tests again using both commands to verify "direct" worked with both of them and was getting <400k (no direct) vs >600k (direct). It does fluctuates quite a bit on large files without direct, where it is consistent on large files with "direct". I also tried my next set of tests close to my router and my non-direct was a bit faster than before. But using "direct" on the command line with mount.cifs and mount -t cifs was still much better.

This is my hardware setup.
A Server which is physically wired to the Linksys 54g Access Point, using only wireless G on Channel 1. I have the "larger" linksys antennas, and am also running running ddt-wrt on the AP. I tried messing with the xmit power but that didn't help a bit. I do have the access point set to use one antenna as Transmit and the other as Receive (rather than auto).

On my n900 I have cifs & ntfs all auto loading on startup. I have
- wireless power savings set to on (intermediate)
- wifi transmissions power to 100mw
- wpa encryption (not wpa2)
- scanning = never.

Nathan

wmarone 2010-02-12 22:21

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
For the next release could you include nls_utf8.ko?

I've got a bunch of files with Japanese filenames shared from my desktop that don't appear properly with the default ANSI encoding. I built and loaded the module myself and confirmed it worked, but it'd be nice to have it as part of an official, managed package.

Nathan 2010-02-12 22:47

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by wmarone (Post 523911)
For the next release could you include nls_utf8.ko?

I've got a bunch of files with Japanese filenames shared from my desktop that don't appear properly with the default ANSI encoding. I built and loaded the module myself and confirmed it worked, but it'd be nice to have it as part of an official, managed package.

Actually it is already also in extras-testing, I stuck it their a while back since someone else had the same issue as you. "kernel-modules-nls-utf8" I think is its name. ;-)

Out of curiosity, do you have to manually load the utf8 module; or does the os auto load it when it detects a utf8 name?

I've been meaning to test this; but haven't had time. I have a script in the kernel module that loads it on startup; but if the os is smart enough to load it when it needs it then I don't need to auto-load it on startup.


Nathan

wmarone 2010-02-12 22:58

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Doh, didn't think to look for it. And there it is. I was too busy trying to figure out why the "user" option in my fstab was being ignored (apparently busybox doesn't acknowlege it?)

I had to manually insert it into the modules.dep and move it into /lib/modules/`uname -r`, after which I modprobe'd it. I suspect it would probably have automatically loaded it, but didn't try. I can this evening however, after I clean out my existing changes and install the package.

qwazix 2010-02-17 12:28

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
as I suspect I got the wifi bug, the weird thing is that it started only after installing the cifs module.
I just updated to pr1.1.1 and waiting to see if it is resolved (cifs installed)
________
Kinky_lola

wickedgtr1 2010-02-18 18:30

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
After installing the Cifs Kernel module, it breaks the built in screen calibration utility -- tested on my very used nokia, and a friends brand new one.

I have just done a complete flash/emmc flash using the command line flasher and will re-test.

Other then that - it works great, thank you.

mrmza 2010-02-19 09:39

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
This is FYI only
If you try mount share in windows domain and use following syntax:

mount -t cifs //<server>/<path> /<your>/<local>/<path> -o user=<domain>/<user>,pass=<pass>,ip=<ip of server>,direct

You get message: "Mounting the DFS root for domain not implemented yet"


This is without troubles:
mount.cifs //<server>/<path> /<your>/<local>/<path> -ouser=<domain>/<user>,pass=<pass>,ip=<ip of server>,direct

BTW tx Nathan

davidh101 2010-02-19 23:36

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Did anyone solve the printf %q problems??

davidh101 2010-02-20 00:08

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
I have also just tried the script with the printf's commented out, copied to my /home/user as a file called cifsmount.sh

I tried to run it, but got an error to do with permissions, so ran the command: chmod u+x cifsmount.sh, this appears to run ok

Now when i try to run the script, i get cifsmount.sh: not found.
i have tried it with the variations of ./ or /home/user beofre running it

Any suggestions??

Cue 2010-02-20 10:43

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
you probably already know this but my suggestions are

1) watch out, things are case sensetive so make sure you used cifsmount.sh and not Cifsmount.sh
2) to execute any script you must give the path of the script.

find the script first. do

ls

in the directory you're in to see the actual name of the script and to make sure it's there.

./cifsmount.sh

should work since the "." means current directory .

3) my final sugesstion is probably the more likely one since you seem to have found the script already but didn't have the privilages to run it. to me it sounds like you perhaps edited the script and added cifsmount.sh in it. did you?

davidh101 2010-02-20 12:46

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Ok, I am pretty certain that I had already checked those areas. So a full step-by-step of what I am doing.

On my Windows 7 (sorry for not being linux) laptop, I created a file in notepad (basically copied and pasted the previously quoted script), and then commented out the printf lines with a #, and added ,direct to the end of each of the mount lines. Saved this file in ANSI format as cifsmount.sh (definately no .txt at the end), plugged in the USB cable, selected Mass Storage Mode and copied the file to the root of the N900.

On the N900:
1. Take out USB Cable
2. Open xTerminal
c. Type the following:
Code:

~ $ sudo gainroot
/home/user # rm cifsmount.sh
/home/user # cd MyDocs/
/home/user/MyDocs # mv cifsmount.sh ../

(removing the previous version and then moving the newly copied one)

Code:

/home/user/MyDocs # cd ..
/home/user # ls
/home/user # chmod u+x ./cifsmount.sh
/home/user # ./cifsmount.sh

when is type ls i do get the file listed in the current directory, the chmod line, I have tried without the ./ at the beginning, it appears to work fine. When I type the last line (I am hapy about . meaning the current directory, but it helps with the TAB autocomplete), I get the following displayed on the screen:

/bin/sh: ./cifsmount.sh: not found

I also tried the command with the full path of /home/user/cifsmount.sh, exactly the same error showing (obviously giving a different path for cifsmount.sh)

GameboyRMH 2010-02-20 15:48

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Sounds like some of you are using older versions of the script. The printf %q issue has been solved. Here is the final, working version again:

Code:

#!/bin/sh
#arguments: servername serverip share username password mountpoint
#username, password and mountpoint are optional arguments
if [ $# -lt 3 ] ; then
    #Go into "wizard mode" if there are no arguments
    echo -e "Not enough arguments passed - running wizard"
    echo -e "Enter the server name:"
    read servername
    echo -e "Enter the server IP"
    read serverip
    echo -e "Enter the share name or path"
    read sharename
    echo -e "Enter a username, or leave blank for anonymous"
    read username
    username_orig=$username
    if [ "${username}" != "" ]; then
        echo -e "Enter a password"
        read password
    fi
    echo -e "Enter a mount point, or leave blank for automatic"
    read mountpoint
fi
#if arguments were passed from the command line, use them:
if [ $# -gt 2 ]; then
    servername=$1
    serverip=$2
    sharename=$3
    username=$4
    username_orig=$username
    password=$5
    mountpoint=$6
fi
#set default mountpoint if the user didn't enter one
if [ "${mountpoint}" = "" ]; then
    mountpoint="/media/Remote_Filesystems/$servername@$sharename"
    #make sure the Remote_Filesystems directory exists
    mountparentdir="/media/Remote_Filesystems"
    if [ -d $mountparentdir ]; then
        echo -e "$mountparentdir found."
    else
        echo -e "Creating $mountparentdir"
        mkdir $mountparentdir
    fi
fi
#requote variables to escape special characters
#servername=$(printf '%q' "$servername")
#serverip=$(printf '%q' "$serverip")
#sharename=$(printf '%q' "$sharename")
#username=$(printf '%q' "$username")
#password=$(printf '%q' "$password")
#mountpoint=$(printf '%q' "$mountpoint")
#check for mountpoint and create it if it doesn't exist
if [ -d $mountpoint ]; then
    echo -e "Mount point already exists - will attempt to use."
else
    echo -e "Creating mountpoint $mountpoint"
    mkdir $mountpoint
fi
echo -e "Attempting to mount //$servername/$sharename at $mountpoint"
#Run the mount command
if [ "${username_orig}" != "" ]; then
mount -t cifs //$servername/$sharename $mountpoint -o user=$username,pass=$password,ip=$serverip
else
mount -t cifs //$servername/$sharename $mountpoint -o ip=$serverip
fi
#chown mountpoint to user
chown -R user $mountpoint
echo -e "To unmount this share, run umount $mountpoint as root"


davidh101 2010-02-20 16:09

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by GameboyRMH (Post 538575)
Sounds like some of you are using older versions of the script. The printf %q issue has been solved. Here is the final, working version again:

How has the printf issue been solved, those lines are just commented out aren't they?

I have tried this to, and get exactly the same error, I guess I am doing something very wrong, but have no idea what

Cue 2010-02-20 16:47

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
I don't know which script you used but please try this and tell me what you get.

cat cifsmount.sh | grep cifsmount.sh

try creating the script on the N900 itself perhaps.

davidh101 2010-02-20 17:01

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
3 Attachment(s)
Quote:

Originally Posted by Cue (Post 538641)
I don't know which script you used but please try this and tell me what you get.

cat cifsmount.sh | grep cifsmount.sh

try creating the script on the N900 itself perhaps.

Ok, I have used the script that GameboyRMH has shown in the post above

I'm not sure what the above command should do, but I have tried a couple of things, typing it all in one go just appears to do nothing, just gives me the # prompt to enter a new command.

However, if I enter the cat command, i get the contents of the file shown.

If I do the grep one on its own, i get a blank line to type on (not sure what it does.

Added some images to try and show the results

davidh101 2010-02-20 17:04

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Surely it doesn't matter where I created the file if the result is teling me it isn't found......even when it is showing up in the directory????

Cue 2010-02-20 18:49

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by davidh101 (Post 538657)
Surely it doesn't matter where I created the file if the result is teling me it isn't found......even when it is showing up in the directory????

because then you do not have to worry about how you save, EOL characters or how you transfer the file, which can cause a problem.
http://www.unix.com/unix-desktop-dum...d-notepad.html

edit: the command before was to check that cifsmount.sh isn't in your script. showing nothing and going back to command prompt means it isn't in your script.

Nathan 2010-02-21 11:09

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Hey, instead of using the script, and doing it manually via command line:
http://talk.maemo.org/showthread.php?t=44188

Wizard Mounter has been release about a week or so ago.

Nathan.
P.S. I still use the command line in some cases; but WM is much, much faster!

SubCore 2010-02-24 14:28

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by GameboyRMH (Post 538575)
Sounds like some of you are using older versions of the script. The printf %q issue has been solved. Here is the final, working version again:

Code:

#! /bin/sh

there must not be a space between ! and /

this is probably the reason why it doesn't work for davidh101

GameboyRMH 2010-02-24 14:44

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by SubCore (Post 544369)
there must not be a space between ! and /

this is probably the reason why it doesn't work for davidh101

Whoops, sorry, I don't have any N900 to test on (still in shipping). I corrected the script in my previous post.

Cue 2010-02-24 16:30

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
it should work with any amount of whitespace.
http://en.wikipedia.org/wiki/Shebang_%28Unix%29

Cue 2010-02-24 16:34

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by Nathan (Post 539522)
Hey, instead of using the script, and doing it manually via command line:
http://talk.maemo.org/showthread.php?t=44188

Wizard Mounter has been release about a week or so ago.

Nathan.
P.S. I still use the command line in some cases; but WM is much, much faster!

Nathan when you say faster do you mean just mounting or somehow faster browsing directories?

slewis1972 2010-02-24 17:52

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
When I mount a drive with:
mount -tcifs //xx.xx.xx.xx/media /media/NAS -ouser=xxxx,pass=xxxxx,ip=xxxxxxxxxxxx

and then a rsync, it works but i get chown errors not being able to access files. Do i need to mount the drive with specific dmask setting?

Scott

jukey 2010-02-24 23:14

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by slewis1972 (Post 544670)
When I mount a drive with:
mount -tcifs //xx.xx.xx.xx/media /media/NAS -ouser=xxxx,pass=xxxxx,ip=xxxxxxxxxxxx

and then a rsync, it works but i get chown errors not being able to access files. Do i need to mount the drive with specific dmask setting?

Scott

I solved these problems using the uid and gid option. The 'user' uid and gid is 29999. gid and uid are included between pass=xxxx, and ip=xxxxxxxxxxxxxx.

Update. The correct line for your example is:
Code:

mount -tcifs //xx.xx.xx.xx/media /media/NAS -ouser=xxxx,pass=xxxxx,uid=29999,gid=29999,ip=xxxxxxxxxxxx
HTH, jukey

wickedgtr1 2010-03-02 07:55

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Has no one noticed you can't calibrate the screen ???

This is totally a deal breaker --- and I know its specifically the CIFS module now.

I have installed the joydev+mouse for PS3 sixaxis support, and it doesnt break anything.



Please test for your self:

Launcher -> Settings -> Screen calibration -> click first bulls-eye -- crashes to 'desktop'

Let me know if I am doing something stupid

Nathan 2010-03-06 07:38

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by wickedgtr1 (Post 552108)
Has no one noticed you can't calibrate the screen ???

This is totally a deal breaker --- and I know its specifically the CIFS module now.

I have installed the joydev+mouse for PS3 sixaxis support, and it doesnt break anything.



Please test for your self:

Launcher -> Settings -> Screen calibration -> click first bulls-eye -- crashes to 'desktop'

Let me know if I am doing something stupid

Doesn't crash for me; I hit three of the targets before I hit the backspace to quit. ;-)

I have cifs, ntfs kernel modules -- plus dozens of apps installed from, Extras, Extras-Testing and even Extras-Devel. ;-)

Nathan.

deti 2010-03-16 00:18

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by Nathan (Post 557600)
Doesn't crash for me; I hit three of the targets before I hit the backspace to quit. ;-)

Same problem here. The application terminates on the first touch with this message:

Quote:

Nokia-N900-51-1:~# /usr/bin/tscalibrate
evdev: short read: Success
Running version 1.10-1+0m5 with extras-devel enabled.

Deti

Nathan 2010-03-19 19:18

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by deti (Post 568618)
Same problem here. The application terminates on the first touch with this message:



Running version 1.10-1+0m5 with extras-devel enabled.

Deti

I'll try and pull this version and see if the auto-builders did something during compiling. I'm pretty sure I'm using the version I compiled on my dev box.

Nathan

rooted 2010-04-12 14:54

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
To developers of wizard-mounter:

There is a mistake in .deb, because two files are installed in the root directory, where they don't belong.

GameboyRMH 2010-05-26 13:11

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Hey all, with PR1.2 coming out I was looking for a safe way to upgrade, since we don't know for sure if this CIFS module will work with the new kernel. My plan is:

1. Disable auto-startup by moving /etc/events.d/cifs to another location
2. Perform upgrade (I'm doing it OTA)
3. Use insmod to load module and test. If I don't get any trouble it should be safe to auto-load (right)?
4. Re-enable auto-load by replacing /etc/events.d/cifs

Sound good?

luigi 2010-05-27 17:58

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Does anyone have experience with PR1.2 and the cifs kernel module?

GameboyRMH 2010-05-27 18:01

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Oh yeah I was gonna update, it works fine. For safety I'd rmmod it before starting the update though.

jackspost 2010-06-02 02:07

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
get some problems after installing wizard mounter and "apt-get install kernel-module-nls-utf8 kernel-module-ntfs samba-common nfs-common"

when I want to remove it again I get the following error message:

Errors were encountered while processing:
samba-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

What does it mean, and how can I remove all changes I have made when installing packages from above?

Thank you!

jackspost 2010-06-05 20:38

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Solution:

/var/lib/dpkg/info # rm samba-common.postrm
/var/lib/dpkg/info # apt-get remove samba-common

bonsai009 2010-06-08 08:07

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
solution? I think no, wizard-mounter after this step not working. How we can install samba-common correcly?

Nathan 2010-06-10 17:23

Re: How to Distribute? (TrueCrypt, Cifs.ko, ntfs.ko, mount.cifs)
 
Quote:

Originally Posted by Nathan (Post 573813)
I'll try and pull this version and see if the auto-builders did something during compiling. I'm pretty sure I'm using the version I compiled on my dev box.

Nathan

Btw, I installed kernel-module-cifs from the repository on PR1.2 and had no issues re-calibrating the screen fully.

Nathan


All times are GMT. The time now is 11:43.

vBulletin® Version 3.8.8