LinuxQuestions.org
Register a domain and help support LQ
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
 
LinkBack Search this Thread
Old 07-12-2013, 12:03 AM   #1
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 194

Rep: Reputation: 21
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: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
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
 
Old 07-12-2013, 09:03 PM   #3
dchmelik
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 194

Original Poster
Rep: Reputation: 21
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: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
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
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 194

Original Poster
Rep: Reputation: 21
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: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
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
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 194

Original Poster
Rep: Reputation: 21
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
Member
 
Registered: Nov 2008
Location: Washington state, USA
Distribution: BSD, GNU/Linux (Slackware, etc.,) openSolaris
Posts: 194

Original Poster
Rep: Reputation: 21
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: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
So, just for interest sake, can you post your fstab here for us to view.
Quote:
That is a horrible-looking fstab.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 12:37 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration