[SOLVED] enabling KDE to auto-mount devices set to BSD-type mount points in fstab?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
enabling KDE to auto-mount devices set to BSD-type mount points in fstab?
I always mounted my floppy, optical discs, then USB drives to BSD-type mount points. In the last few years I learned you can set mount points in fstab,but is there any way to get KDE (3/TDE and/or 4) to auto-mount devices according to fstab? I think I ruined one or two USB flash drives by removing before unmounting, because KDE will not unmount them for me, and I am used to just pulling them out after I think they have stopped writing, since they days of floppy & optical RW discs on older OSes. Maybe most people reading this will see no reason to mount something as defined in fstab, but I am a long-time BSD, Slackware, Solaris user (if I use Solaris again, it will be OpenIndiana or something,) and I like doing things the standard, hardcore, advanced POSIX-based computer science way.
Not sure about your system but a package "autofs" seems to be required for this to work on my kde4 system. (Kernel, x86_64 3.9.8-desktop-1.mga4)
The stick comes up with (Device Notifier) knotify when plugged in, for mount/dismount
afaik, ntfs and window$ has a problem with dismount failures.
I believe the flash drives, as long as they're not too old, can be re-initalised with
Code:
to clean/wipe mbr...including partition table....
dd if=/dev/zero of=/dev/foo7 bs=512 count=1
sudo dd if=/dev/zero of=/dev/sdd bs=512 count=1
http://www.gnu.org/software/grub/grub.html
retain partition table...clear only first 446 bytes.
sudo dd if=/dev/zero of=sd(x) bs=446 count=1
NOT sda1, for flashdrives type mount and note the usb device info.
unmount the device and check you have the correct info, it should be gone.
Remount the device and continue.
I hope this helps you, Regards Glenn
Last edited by GlennsPref; 07-12-2013 at 08:34 PM.
Reason: typo
Hi, I don't list my usb flash drives in /etc/fstab because the system won't boot without them/it plugged in.
I have probably never tried..
Sure it will: read the fstab manpage and set the right options. I have done it myself many times, but I forget the options other than they are the numbers at the end. Once I found my system mounting an external drive, so I knew this was possible, so this should be enough info for you to find out relatively easily.
Quote:
Not sure about your system but a package "autofs" seems to be required for this to work on my kde4 system. (Kernel, x86_64 3.9.8-desktop-1.mga4)
The stick comes up with (Device Notifier) knotify when plugged in, for mount/dismount
So you do not have the devices start in fstab, but you have them mount to places specified there?
After a few months of painful KDE4 usage when it came out, I switched back to KDE3 when I learned it was available for Slackware, then I switched to Trinity... but I am trying KDE4 on a faster system now, though it is not as user-friendly (for many, many reasons--it just has more nice programs) and the version I have even starts with some unnecessary average file indexer--for average user purposes--that can immediately halt the system depending how many system resources you have left, and that thing indexes even a database size of GBs. I almost hate KDE4 as much as Apple OSes and Windows now--sure they have more nice software, but what were the designers thinking?! Anyway, if you were mounting those devices according to fstab, I will see if I can figure out what to do from what you say.
Thanks for the other info; I will try that with my USB flash drive.
for instance when I plugin, knotify pops up with mount and what program to use, It mounted to here...
Code:
/run/media/glenn/3459-C199/
My fstab looks like this... [...]
That is a horrible-looking fstab. When I say BSD-style mount points, I mean such as floppy and optical/CD discs being mounted at /fd, or /fd0 & fd1, cd, or cd0 & cd1. Similar to that, one would mount a USB device at /ud, or /ud0, /ud1... This makes it easier when one mounts and unmounts things on the command line. I know KDE is automatically set up to auto-mount stuff where it wants, and I am not at all interested in doing that. Ever since the days computers got popular, user interfaces have largely been going downhill. Having a GUI mount things in places too hard to remember for the command line is exactly what I am trying to get around with this question. No program other than the installer should really even be editing fstab. If KDE or something wants to mount something separately, that is fine... and if it wants to read fstab after one writes reasonable mount points in it, that is fine, and is what I am trying to do.
Ah, Yeah! I'm in way over my head. Sorry for the bum steer.
man fstab says,
Code:
The fourth field (fs_mntops).
...noauto do not mount when "mount -a" is given (e.g., at boot time)
The fifth field (fs_freq).
This field is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. If
the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be
dumped.
The sixth field (fs_passno).
This field is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time.
The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2.
Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same
time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is
returned and fsck will assume that the filesystem does not need to be checked.
Regards Glenn
Last edited by GlennsPref; 07-12-2013 at 10:20 PM.
Reason: man fstab says, But that's really all I got.
No problem... and as that manpage says, if you want your POSIX-type OS to not be required to mount a filesystem, then I think you give it options '0 0' where appropriate, but if you say 'auto,' the OS will try if the device is available, and with 'noauto' the OS will wait for a command from you or a program. Someone on Freenode IRC ##slackware said I would have to write a udev rule to do this. Maybe since this is more oriented to that type of distro, I should have posted there, but I am 99% sure if what I want to do can be done on minimalist Slackware it can be done elsewhere such Arch and other relatively minimalist stuff.
After posting here, I posted on Usenet's (FYI, part of the 'net before WWW existed) Slackware newsgroup (2012-8-28 'auto-mounting to BSD-style mount points?' post), where people described how I could do what I asked. It would be too involved for me to bother without help, and though I have customized fstab for years, I may not have tried re-enabling mounting in KDE and seeing if it used fstab. Hopefully KDE would check fstab first, but I would not assume it does. Until the POSIX-based OS standardizers, or more accurately, mainly the standardizers of its GUI programs, start cleaning up their act and allowing people to have their configuration files and mount points, etc. in a more Unix standard way, maybe this will not be solved, unless it already is. I suspect I checked it, but I will check it again shortly. New stuff like systemd and maybe LSB (though the latter may be more of some sort of opinion of one or a few people, or a democracy, that are trying to make things less Unix-like) are one thing, but when people start making too many configuration files in the home directory, and changing mount points, things just get absurd.
So, just for interest sake, can you post your fstab here for us to view.
Sure, and I have gotten used to using USB devices in KDE now, or I do not care that it does not auto-mount them. I just set their mount points in fstab, then when I plug them in in KDE, a message pops up asking if I want to mount them, so I either do that or use a command-line alias I wrote, both of which may be better. Here is my fstab, which is a more normal one and what it should look like rather than one a distribution does their own way and is incompatible with others.
Code:
/dev/sda1 / ext4 defaults 1 1
/dev/sdb1 /home ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro,comment=x-gvfs-show 0 0
#/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/sr0 /cd0 auto noauto,user,ro,comment=x-gvfs-show 0 0
/dev/sr1 /cd1 auto noauto,user,ro,comment=x-gvfs-show 0 0
/dev/sdc1 /ud0 auto user 0 0
/dev/sdd1 /ud1 auto user 0 0
/home/d/math/ware/slackware64-14.1-install+source-dvd.iso /fs1 iso9660 user 0 0
#/home/d/math/ware/slackware/slackware64-14.1-iso/slackware64-14.1-install-dvd.iso /fs1 iso9660 user 0 0
#/home/d/math/ware/slackware/slackware64-14.1-iso/slackware64-14.1-source-dvd.iso /fs1 iso9660 user 0 0
m:/ /fs0 fuse.sshfs defaults,_netdev 0 0
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.