Where is Auto-Mount Code?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

Where is Auto-Mount Code?

#1 Post by johnywhy »

hi

re: puppy lucid 5.2.8

i want to add some command-line options to the following scripts:
-The script that auto mounts a partition, as configured by StartMount
-The script that auto mounts a partition when it's drive icon on the desktop is clicked.

sorry if this info is already posted, feel free to point me to a wiki or man that contains this sort of thing.

i looked in root/startmount, fstab, and a few other places, but not expert enough to find the right file. Cannot find probepart3.

this is specifically for the ntfs partitions, so it's "ntfs-3g" options that i want to edit.

i grep'd my puppy partition for "ntfs-3g", but no luck (so far-- still running :)

Code: Select all

grep -r "ntfs-3g"
i read these pages:
http://www.murga-linux.com/puppy/viewto ... ?t=9581%20
http://puppylinux.org/wikka/ntfs3g
http://208.109.22.214/puppy/viewtopic.php?t=26664
http://www.murga-linux.com/puppy/viewtopic.php?p=126028
http://www.murga-linux.com/puppy/viewtopic.php?t=2996
http://puppylinux.org/wikka/TextSearchE ... rase=mount

most pages i found are pre-5.2.5

why i want to do this: for some reason, various apps are leaving goop in mnt/sda1 on reboot, which produces an ntfs-3g error, telling me the mountpoint is not empty, and that i should use the nonempty option. Note, it does mount the drive despite the error message. so i want to add the -nonempty option. i found that by manually deleting the contents of mnt/sda1, then i don't get this error. Am i the only one seeing this problem? Described here:
http://www.murga-linux.com/puppy/viewtopic.php?t=71571
Last edited by johnywhy on Thu 15 Sep 2011, 21:05, edited 1 time in total.

User avatar
Silent
Posts: 24
Joined: Fri 26 Aug 2011, 16:57
Location: Israel
Contact:

#2 Post by Silent »

- Thanks, Mike.
My website - [url]http://husky.co.cc/[/url]

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#3 Post by johnywhy »

thanks! so, i can put ntfs-3g options in the options column of fstab?

anyone know where to find script for auto-mounting on clicking desktop drive icon?l

an alternative, and maybe simpler fix, would be to delete the contents of mnt/sda1 on unmount. Can anyone direct me to the unmount script that runs when manually unmounting drive, or shutting down computer?

thanks!

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#4 Post by johnywhy »

the wikipedia page says "Modern Linux systems use udev as an automounter to handle hot swapping devices instead of rewriting the fstab file on the fly". Is this true of puppy?

The wikipedia udev page says "udev is the device manager for the Linux kernel. Primarily, it manages device nodes in /dev. It is the successor of devfs and hotplug, which means that it handles the /dev directory". Is this true of puppy?

thanks

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#5 Post by johnywhy »

there are three fstab files in my puppy:
./initrd/pup_ro2/etc/fstab
./initrd/pup_rw/etc/fstab
./etc/fstab

not sure which is the one to put ntfs-3g options, if any.

this page--
http://www.murga-linux.com/puppy/viewtopic.php?t=47699

--mentions the script file called "mount". There are two in my puppy
./initrd/pup_ro2/bin/mount
./bin/mount

not sure which is the right one, if either. the thread also mentions .xinitrc.

does anyone out there know the right place to put ntfs-3g options, to affect all mounting of sda1? (ie via desktop icon, startmount, or terminal mount). Any puppy gurus in da house?

thanks!

WillM
Posts: 173
Joined: Wed 30 Dec 2009, 04:42
Location: Oakland, California

#6 Post by WillM »

For information on those locations, checkout this page.

http://www.puppylinux.com/development/h ... works.html

As far as auto mounting ntfs is concerned try this one.

http://www.murga-linux.com/puppy/viewtopic.php?t=65046

That worked for me. Edit /etc/fstab and /etc/rc.d/rc.local like they said.

User avatar
Silent
Posts: 24
Joined: Fri 26 Aug 2011, 16:57
Location: Israel
Contact:

#7 Post by Silent »

Sorry I didn't explain it too well, I suck at helping people.
The above replies should help you. Be sure to tell us if it worked.

Good luck!
- Thanks, Mike.
My website - [url]http://husky.co.cc/[/url]

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#8 Post by johnywhy »

Thanks for all tips!

Something is leaving files inside the mount point. It might be wine.

I read all the puppy2 parts of how puppy works, which was educational, but did not talk about where the mount and unmount scripts are.

The other article shows command options in fstab, so I'll try putting nonempty in there and see what happens. Article also mentions rc.local, which I did not know about. So I have to edit that one too?

I don't know if using nonempty, and NOT deleting the remnant files would break something.

On the other hand, The drive is writable if I delete the contents of /mnt/sda1 before I mount the drive.

So the easy fix is to make the mounting script delete the contents of the mount point automatically before mounting, or make the unmount script delete the contents of the mount point automatically, after unmounting.

Ideally, I'd like to find or make the one mount or unmount code which will automatically get called by all other mount or unmount scripts or actions. Any ideas?

I don't know if simply deleting the contents of the mount point after unmounting could break something. Does something need those files?

Cheers!

User avatar
MinHundHettePerro
Posts: 852
Joined: Thu 05 Feb 2009, 22:22
Location: SE

Re: Where is Auto-Mount Code?

#9 Post by MinHundHettePerro »

johnywhy wrote: -The script that auto mounts a partition when it's drive icon on the desktop is clicked.
Just from the top of my head :wink: :P :) , for having edited those scripts many moons ago (and after a very quick gleaning through of these scripts just now), I would read through the scripts "/sbin/pup_event_frontend_d" and "/usr/local/bin/drive_all", especially the latter, which gets copied to each "root/.pup_event/drive_${ONEDRVNAME}/AppRun". Maybe there is a clue to your problem in the "unmount_func()" of "/usr/local/bin/drive_all".
johnywhy wrote:why i want to do this: for some reason, various apps are leaving goop in mnt/sda1 on reboot, which produces an ntfs-3g error, telling me the mountpoint is not empty, and that i should use the nonempty option.
In case the above is of absolutely no use at all, perhaps another route could be to check what goop-e-ti-goop are left by which goog-goog-a-joob application in /mnt/<drive>, and most importantly, why :wink:.

If not a solution, possibly a hint of where to continue looking, hth anyway :)/ MHHP
[color=green]Celeron 2.8 GHz, 1 GB, i82845, many ptns, modes 12, 13
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285[/color]
Slackos & 214X, ... and Q6xx
[color=darkred]Nämen, vaf....[/color] [color=green]ln -s /dev/null MHHP[/color]

Post Reply