Automount for 0.3.x

3rd Party Package Requesting

Postby Peppe/Sweden » Thu Apr 29, 2004 12:40 pm

When using Samba you can easily share a floppy or cdrom .
However , it still bugs me that I have to mount/umount a device and sometimes it takes forever to make it unmounted.

Searching the net turned up a nice feature called "Automount" that was implemented to the 2.0 kernel but I guess this was removed in the Freesco kernel to save space.

I had a hard time finding any Zipslack 2.0 kernel packages , however I found some info <a href='http://www.freenix.fr/unix/linux/HOWTO-vo/mini/Automount' target='_blank'>here</a> <a href='http://www.poulpetersen.dk/linux/ukautofs.htm' target='_blank'>and over here.</a>

So would it be possible?! :confused:
[COLOR=blue] You mean that I don?t fly airplanes , I don?t have a grilfriend and don?t have a dog ? Buuh , I grow up to be a real loser! (The Kid , walt disney) [COLOR=blue]
User avatar
Peppe/Sweden
Junior Advanced Member
 
Posts: 161
Joined: Wed Feb 05, 2003 4:41 pm

Postby snow » Thu Apr 29, 2004 3:10 pm

hi,

today for first time i've tried to compile a kernel... <and it's done>
there /in zipslack 3.9/ was an option for "automount" but as i .ve seen it was an experimental stage /may be kernel stabilility /

i think Lightning or some of GURUS will say to us :D

thanks
http://freescosoft.valkovi.org/ FREESCOSoft Bulgarian mirror
User avatar
snow
Newbie
 
Posts: 18
Joined: Sat May 10, 2003 3:27 pm
Location: bulgaria

Postby tom » Thu Apr 29, 2004 10:41 pm

I agree, automount would be handy.

I use a shell script for mounting a samba share on another computer only if that computer is online. It runs in the background (fork) every ten seconds and is called from rc_user.

At work, my backup computer has a shared folder called /backups

When it's online, Freesco mounts it at /home/ftp/backups

On Freesco, /home/ftp/backups has a dummy file in it called "test". If /backups is not mounted , "test" will be found. If it's mounted, "test" will not be found.

You could probably use this same method for mounting (or not mounting) a shared cdrom.

Code: Select all
if [ -f /mnt/cdrom/test ]; then
echo "test was found so that means it's not mounted... trying to mount it"
umount /mnt/cdrom
smbmount //192.168.1.19/cdrom /mnt/cdrom
else
sleep 10
fi


This isn't the exact script that I use but it's the same concept. If you need the actual code, just let me know and I'll post it tomorrow from work.

NOTE: You won't want to use this method on a local cdrom or floppy because it'll make the drive spin up every ten seconds

Tom
User avatar
tom
Junior Advanced Member
 
Posts: 115
Joined: Sun Oct 27, 2002 4:39 pm

Postby Lightning » Sat May 01, 2004 10:48 pm

All of the components are availible and/or included with the 2.0.x kernel and it should not a difficult task to just make the autofs.o as a module and include the configuration file to get auto mounting to actually work. I did look into it some time back, but I haven't attempted the project because of time constraints.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12081
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Postby Peppe/Sweden » Sun May 02, 2004 3:34 am

Ooops! :blush1:

(Should have inclued this in my first post!)

Could this be worth looking at : <a href='http://sourceforge.net/projects/autorun/' target='_blank'>another type of autorun?</a>

(swedish users have a look in datormagazin nr 10 2003 , sida 061).

This program seems to do the same but , are easier to run and simpler to config.
[COLOR=blue] You mean that I don?t fly airplanes , I don?t have a grilfriend and don?t have a dog ? Buuh , I grow up to be a real loser! (The Kid , walt disney) [COLOR=blue]
User avatar
Peppe/Sweden
Junior Advanced Member
 
Posts: 161
Joined: Wed Feb 05, 2003 4:41 pm

Postby tom » Sun May 02, 2004 9:51 am

Peppe/Sweden,

the autorun program that you posted the link to needs at least a 2.2.4 kernel. I tried all three released versions (2.63, 2.7, 3.10) and no go.

I'll see what I can do with autofs as suggested by lightning and hopefully you'll see me in the third party package release section soon :D

Tom
User avatar
tom
Junior Advanced Member
 
Posts: 115
Joined: Sun Oct 27, 2002 4:39 pm

Postby critor » Sat Dec 18, 2004 4:45 pm

I'd like to use autofs/automount too.


For me it's only too automatically mount/unmount some ext2 hard drives shared by samba when they are used/not used.
(cause some people in my house will turn off the FreeSco box a little to fast... so each time e2fsck runs on boot-up, and some files are lost...)

I'm using zipslack:
- I've recompiled the kernel with autofs support.
- Then I've compiled and installed the automount program (3.1.7 which is the last 3.x release, 4.x compilation seems to fail...)
=> The automount program seems to work properly.

Now, I want to put all this under FreeSco.
I've replaced the kernel...
But I can't do "make install" under FreeSco.
So I'm copying all files manually in the proper folders...

And...

Automount program doesn't seem to work.
Unfortunately it says nothing; it just doesn't run: ps doesn't list it.

Do I have to start copying all files again and checking the locations and rights?
Or did I miss something?

Automount uses some libraries (built .so files) which are located in /usr/lib on zipslack.

On Zipslack, automount acts the same way (exiting without any message) when the kernel has no autofs support, or when the libraries are moved to another location.

But I think I have replaced the FreeSco kernel by the new one, and I think I have copied all libraries with correct rights in the proper place.


Does someone have any hints to test what automount doesn't like?

If some of you did install automount completly, can you help me migrating the program from zipslack to freesco and making it work?


Thanks.
User avatar
critor
Newbie
 
Posts: 14
Joined: Mon Aug 02, 2004 2:55 pm

Postby tom » Sat Dec 18, 2004 6:37 pm

Could you post a link to the kernel that you compiled, the autofs.o that you compiled and the sources that you're using to compile?

If so, I'll see what I can do to help out.

Tom
User avatar
tom
Junior Advanced Member
 
Posts: 115
Joined: Sun Oct 27, 2002 4:39 pm

Postby critor » Sat Dec 18, 2004 7:07 pm

Hi,

Here are the autofs (automount) sources:
<a href='http://ftp.slackware.cz/slackware/slackware-current/slackware/n/autofs-3.1.7-i386-1.tgz' target='_blank'>autofs-3.1.7 sources</a>

The kernel I've compiled is the FreeSco 0.3.3 kernel (on sourceforge).
I've used all default options, and I've just added 2 things (as compiled in the kernel and not as module): support for IDE floppies, and support for automount (experimental).

If you need anything else, just ask :)

Thanks for wanting to help me.
User avatar
critor
Newbie
 
Posts: 14
Joined: Mon Aug 02, 2004 2:55 pm

Postby tom » Sat Dec 18, 2004 8:01 pm

critor,

The reason I asked if you could upload your binaries is that it takes WAYYY to long to compile a kernel with Bochs which is my only development platform at the moment.

Also, I think that Lightning has decided to switch back to the 2.0.39 kernel (when 0.3.4 comes out). Would a 2.0.39 kernel be a better choice? Maybe not for your situation...

Either way, could you provide a link to what you've already compiled?

Tom
User avatar
tom
Junior Advanced Member
 
Posts: 115
Joined: Sun Oct 27, 2002 4:39 pm

Postby critor » Sat Dec 18, 2004 8:09 pm

I'm going to see if I can upload the binaries somewhere.

What was the problem with 2.0.40?
User avatar
critor
Newbie
 
Posts: 14
Joined: Mon Aug 02, 2004 2:55 pm

Postby Peppe/Sweden » Sun Dec 19, 2004 4:39 am

critor,
This is a package/kernel i?ve been wating for a while.

Thank you for taking the time to look into making it work. :colgate:
And this is not to be disrespectful against Tom , I know you have yours hand full.

As for your question:

What was the problem with 2.0.40?


I belive that it had something to do with the PPPeO and the PPPtO modes that didn?t work right.
Lightning then made a 2.0.3.9 kernel for these modes.

So i think that you should try this on 0.3.2 or why not on 0.3.4 ?
Lighting is looking for tester for 0.3.4 and it?s approaching it final stages.

Once again , your work is much appreciated.

Peter :colgate:
[COLOR=blue] You mean that I don?t fly airplanes , I don?t have a grilfriend and don?t have a dog ? Buuh , I grow up to be a real loser! (The Kid , walt disney) [COLOR=blue]
User avatar
Peppe/Sweden
Junior Advanced Member
 
Posts: 161
Joined: Wed Feb 05, 2003 4:41 pm

Postby critor » Sun Dec 19, 2004 6:06 am

Thank you for your support.
I think that package when it will be available will be very usefull.
Cause you won't need physical acces to the router to mount/unmount cds, floppies, or samba shares; you won't need to login root in telnet server...

Again for me, this would be to automatically mount/unmount samba ext2 shares, so that they won't be damaged when someone turns off the box little too "fast"...


Here are the binaries and sources of the autofs-3.1.7.
<a href='http://xandrean.free.fr/autofs-3.1.7(source+binaries){test-configuration-by-critor}.zip' target='_blank'>autofs-3.1.7(source+binaries){test-configuration-by-critor}.zip</a>


You'll find the automount program in the deamon directory, and all the .so libraries in the modules directory.
To run the program, everything (program + so libraries) has to be copied to the /autofs directory and run from there.
(seems, the libraries path is hard-compiled in the program... so I've made that dirty hack to be sure the program will find its libraries; you may cancel that by using ./configure again)

To make it work, you need 2 configurations files (usually in /etc):
Those are simple samples:

/etc/auto.master:
/misc /etc/auto.misc

/etc/auto.misc:
floppy -fstype=auto :/dev/fd0

When someone will be accessing /misc/floppy, then the folder should be automatically mounted, and then unmounted when not used any more.


With the same kernel (autofs experimental support enabled), the binary seems to work under zipslack (remains loaded in memory), but just returns to the command line unloaded under FreeSco (ps -ax doesn't list it).
The problem is the binary gives no error message, so I don't know at all what it doesn't like. I haven't seen any option in the help to make it more verbose/debug...


Will be posting the kernel later.
Thank you for helping.
User avatar
critor
Newbie
 
Posts: 14
Joined: Mon Aug 02, 2004 2:55 pm

Postby Lightning » Sun Dec 19, 2004 1:26 pm

One thing to understand about libraries is that there actual location is not critical, but that they are in the search PATH is. So even though the Slackware install put those libraries in /usr/lib has nothing to do with FREESCO. What you MUST do is to copy all of those libraries to /pkg/lib and once they are there use

pkg -rescan

Also it would be much bettter package wise if you compiled the autofs in the kernel as a module rather than directly into the kernel. But for developement purposes it should not make much difference.

I also recommend that if you want to make sure all of these components are are correct for a package. That you download and install the "packager". The new version will test all needed libraries and give you the proper directory structure for your aplications. The other thing to make sure of is that you have all of the installed files. Personally I use mc and then set it to sort by date in reverse order. This makes finding what was just installed much easier.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12081
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Postby tom » Mon Dec 20, 2004 12:03 am

hmm, this is a tough one...

I've compiled a new kernel, compiled autofs-3.1.7 and it works like a charm with zipslack but can't get it working with Freesco either.

On Freesco, I do this:
Code: Select all
mkdir /misc
insmod /pkg/bin/autofs.o


and lsmod shows the module loaded.

Code: Select all
automount /misc file /etc/auto.misc


seems to do nothing!

/etc/auto.misc and auto.master DO exist

I'm not sure what to try next. I almost know the man pages for autofs, automount and auto.master by heart and google doesn't seem to be much help with this one.

I've tried copying the libraries to /pkg/lib and running "pkg -rescan" before doing any of the avove commands.

I don't understand? It's the same kernel, same binaries and the same libraries.

automount uses libdl.so.5 and libc.so.5

On zipslack, libc.so.5 is a symlink to libc.so.5.4.46 and libdl.so.1 is a symlink to libdl.so.1.9.9

I'm not sure what to do next. Anyone up for a challenge?

Tom
User avatar
tom
Junior Advanced Member
 
Posts: 115
Joined: Sun Oct 27, 2002 4:39 pm

Next

Return to 3rd Party Package Requesting

Who is online

Users browsing this forum: No registered users and 6 guests