![]() |
CIFS (samba) Auto load of kmod for OS2008
Hopefully this is useful for someone, some Linux users might already know this and is trivial, but for me I haven't had the N800 very long.
Ok, After reading up on CIFS for awhile I finally worked out how to get it to be usable by regular users (the standard mount by root doesn't allow users to access the mounted partition) and I've also written a bootup script to allow for any kernel modules that users want loaded to auto load at boot up (for me this is CIFS),. This is all command line stuff, I'm sure there is a better way, but so far this is how I do it, feel free to improve and let me know what I should do different. First I grabbed the CIFS kernel module for OS2008 that fanoush was kind enough to make available Quote:
This is the contents of my /etc/init.d/user-kmodules Code:
in each of those init levels I did a symlink back to the /etc/init.d/user-kmodules with the command: Code:
# cd /etc/rc2.d/ Code:
# lsmod Code:
Module Size Used by After you have logged in you should be able to run the following command to mount your samba share I created mine in the MyDocs section (make sure your user has access rights to the folder if you create it as root eg. #mkdir /home/user/MyDocs/samba #chown user:users /home/user/MyDocs/samba) Code:
sudo mount -t cifs //192.168.1.1/samba /home/user/MyDocs/samba -o noperm,sec=none,uid=user,user=foo,password=bar Code:
Nokia-N800-44-4:~# df -h but personally I find the command line much faster... Well I hope this is helpful to someone or gives em an Idea how to do it better, let me know what I have done wrong or screwed up :) as you might have noticed I'm not exactly that great at writing long winded posts on how to do something, sorry :p Cheers Rip |
Re: CIFS (samba) Auto load of kmod for OS2008
Oh as a side note, you should also be able to drop any modules you want into /lib/modules/ and the script on bootup should find them and auto insert them (if they work).
-Rip |
Re: CIFS (samba) Auto load of kmod for OS2008
Quote:
- some modules has dependencies so you need to load them in correct order e.g. for ext3 you need to insert mbcache.ko and jbd.ko before ext3.ko. You also need to unload them in opposite order. Fortunately unloading at system shutdown is not really needed so you don't need to figure out how to reverse the list :-) - it is better to call the directory /lib/modules/kernelversion and when inserting modules use /lib/modules/`uname -r` so you know you are trying to insert modules for same kernel. That will also allow you to have more sets of modules for more kernels. |
Re: CIFS (samba) Auto load of kmod for OS2008
Cool, the uname makes sense I'll get around to switching it over in my script, its not a show stopper though I guess,
With the ext3 on inserting the modules I guess you could rename the modules to make them show up in the correct order since its a pretty simple script.. eg, 1-mbcache.ko 2-jbd.ko 3-ext3.ko, Again the entire process of having to have a script like that isn't ideal, I just couldn't work out any other way of inserting the modules I wanted at bootup. thanks for the tips! Cheers Rip |
Re: CIFS (samba) Auto load of kmod for OS2008
Thanks for the init script -- kept me from having to build it. I did build a script that I sudo that mounts it and asks me for my password, I did find that on my server I actually had to pass a couple additional parameters. Otherwise I would get a DFS error.. What a pain.
Nathan |
All times are GMT. The time now is 11:52. |
vBulletin® Version 3.8.8