LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 07-12-2013, 12:03 AM   #1
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,087

Rep: Reputation: 155Reputation: 155
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.
 
Old 07-12-2013, 08:33 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,681
Blog Entries: 33

Rep: Reputation: 286Reputation: 286Reputation: 286
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..
Quote:
...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
 
1 members found this post helpful.
Old 07-12-2013, 09:03 PM   #3
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,087

Original Poster
Rep: Reputation: 155Reputation: 155
Quote:
Originally Posted by GlennsPref View Post
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.
 
Old 07-12-2013, 09:31 PM   #4
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,681
Blog Entries: 33

Rep: Reputation: 286Reputation: 286Reputation: 286
Quote:
So you do not have the devices start in fstab
Not flashdrives,
Quote:
but you have them mount to places specified there?
Not that I can see.

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...
cat /etc/fstab
Code:
# Entry for /dev/sdb5 :
UUID=13d5963d-e719-4f21-8c0a-961a3cbbf639 / ext4 acl,relatime 1 1
# Entry for /dev/sdb1 :
UUID=61f81580-1eff-42b8-b699-8cf84f543e31 /boot ext4 acl,relatime 1 2
# Entry for /dev/sdb6 :
UUID=a6553178-8e7b-49da-815c-c738c1a4d54e /home ext4 acl,relatime 1 2
# Entry for /dev/sda7 :
UUID=6b198f0d-a1f1-4e7a-b4ea-3991bb8c6971 /home/glenn/local/Archive ext4 acl,relatime 1 2
# Entry for /dev/sda12 :
UUID=49ee8726-6d3f-4487-8405-68716f191d7f /home/glenn/local/backup ext4 acl,relatime 1 2
# Entry for /dev/sdc5 :
UUID=92702c8f-be86-4ef3-937e-4daf454193e5 /home/glenn/local/data ext4 acl,relatime 1 2
# Entry for /dev/sdc7 :
UUID=5d0126f8-cda3-46dd-8fbf-89ea3db6e6f7 /home/glenn/local/music ext4 acl,relatime 1 2
# Entry for /dev/sdb11 :
UUID=80afabb4-b9a3-448f-856f-5a583ce179bc /home/glenn/local/vm1 ext4 acl,relatime 1 2
# Entry for /dev/sdc6 :
UUID=a0b61e55-5353-4d2c-a111-64dcb3f6b385 /home/glenn/local/video ext4 acl,relatime 1 2
# Entry for /dev/sda11 :
UUID=8d40e507-73d5-4af3-8603-a39270b33c1e /home/glenn/local/spare ext4 acl,relatime 1 2
# Entry for /dev/sda8 :
UUID=FE2A27D12A27862D /media/win_c ntfs-3g defaults,umask=000 0 0
# Entry for /dev/sdc1 :
UUID=587C2B0D7C2AE60A /media/win_c2 ntfs-3g defaults,umask=000 0 0
none /proc proc defaults 0 0
# Entry for /dev/sdb8 :
UUID=c14ad173-62d7-45ac-9dd1-e9ca93539c0a /tmp ext4 acl,relatime 1 2
# Entry for /dev/sda1 :
UUID=a55b2d80-d67e-465a-92d4-e8e5caa48255 /usr ext4 acl,relatime 1 2
# Entry for /dev/sdb9 :
UUID=8469f117-92aa-4b7b-b8c7-232b347d6099 /usr/local ext4 acl,relatime 1 2
# Entry for /dev/sda9 :
UUID=a642f6dc-ad12-4580-b3ce-0a95398423ee /usr/src ext4 acl,relatime 1 2
# Entry for /dev/sdb10 :
UUID=5984d472-bb1b-4f27-b6c9-c0affcac8d47 /var ext4 acl,relatime 1 2
# Entry for /dev/sda5 :
UUID=e58b782d-da89-45e0-9c33-128887857be0 /var/spool ext4 acl,relatime 1 2
# Entry for /dev/sda10 :
UUID=793cff6f-5a0b-41e0-8984-dc899345ce93 /var/www ext4 acl,relatime 1 2
# Entry for /dev/sda6 :
UUID=dcd0b80e-51dd-4fee-a4f6-a0bf7217f903 swap swap defaults 0 0
# Entry for /dev/sdb7 :
UUID=70b0a67c-4b3f-40dc-9018-1cc534c833d2 swap swap defaults 0 0
# load tmpfs
tmpfs /dev/shm tmpfs defaults 0 0

glenn@GamesBox:~ »
Thats all I got.
 
Old 07-12-2013, 09:47 PM   #5
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,087

Original Poster
Rep: Reputation: 155Reputation: 155
Quote:
Originally Posted by GlennsPref View Post
Not flashdrives,
Not that I can see.

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.

Last edited by dchmelik; 07-12-2013 at 09:49 PM.
 
Old 07-12-2013, 10:10 PM   #6
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,681
Blog Entries: 33

Rep: Reputation: 286Reputation: 286Reputation: 286
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.
 
Old 07-13-2013, 12:25 AM   #7
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,087

Original Poster
Rep: Reputation: 155Reputation: 155
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.

Last edited by dchmelik; 07-13-2013 at 12:27 AM.
 
Old 11-16-2013, 03:29 AM   #8
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,087

Original Poster
Rep: Reputation: 155Reputation: 155
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.

Last edited by dchmelik; 11-16-2013 at 03:40 AM.
 
Old 11-18-2013, 04:21 PM   #9
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,681
Blog Entries: 33

Rep: Reputation: 286Reputation: 286Reputation: 286
So, just for interest sake, can you post your fstab here for us to view.
Quote:
That is a horrible-looking fstab.
 
Old 07-17-2015, 07:01 PM   #10
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,087

Original Poster
Rep: Reputation: 155Reputation: 155
Quote:
Originally Posted by GlennsPref View Post
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
 
1 members found this post helpful.
Old 07-18-2015, 04:50 AM   #11
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,681
Blog Entries: 33

Rep: Reputation: 286Reputation: 286Reputation: 286
Thats interesting, one thing I'm learning it the variety in nix's.

Regards Glenn
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] enabling KDE to auto-mount devices set to BSD-type mount points in fstab? dchmelik Calculate 1 07-12-2013 01:47 AM
fstab lists nonexistent mount points for some devices newbiesforever Linux - General 6 05-22-2013 12:44 PM
KDE fails to auto mount usb devices LordFrancis Linux - Desktop 7 03-17-2009 04:18 AM
devices in /etc/fstab don't auto mount at startup : jabka Linux - General 3 08-23-2006 03:28 PM
SCRIPT: check if auto-mount mount-points are still mounted markus1982 Linux - Software 0 05-25-2003 05:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration