How does Mageia automatically mount devices?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

How does Mageia automatically mount devices?

Postby SgtCasper » Oct 15th, '16, 21:58

Hi, everybody!

How does Mageia automatically mount devices?

I used to use Linux a long, long time ago... And I used to mount everything manually.

I used to edit /etc/fstab and manually typed "Mount (...)"

But now, Linux automatically mounts everything. But there is no /etc/fstab, no /etc/mtab and /mnt is empty! :O

When I insert a DVD, it automatically appears on "Device" section, but if I navigate on the Linux filesystems, I see nothing.

The doubt is, I'm using Mageia 4.1 I have one tablet that doesn't appear on device section. If I connect the tablet and type "lsusb", my tablet appears. I've installed mtp and manually mount the tablet. But I think I'm doing it the "dirty" way because I need to create a directory on /mnt/Tablet" and manually mount my tablet there. Besides, my tablet doesn't appear on Nautilus, just on the terminal.

I've searched at Google to try to solve this issue, but I only get 8532 "tutorials" with some commands, but no explanation at all. Instead of Googling and typing some commands that I don't know, I would to understand what's happening behind the scenes.

I guess many people have these same difficulties, if someone thinks appropriate, I can create a Wiki article to help newcomers :)

Thanks anyway
SgtCasper
 
Posts: 4
Joined: Oct 3rd, '16, 13:41

Re: How does Mageia automatically mount devices?

Postby doktor5000 » Oct 18th, '16, 03:23

SgtCasper wrote:How does Mageia automatically mount devices?

Well, like nearly every other distribution does it? The kernel emits events when new devices are plugged/detected, either a kernel module is directly loaded or those events are processed by udev and udisks for storage devices, and eventually if there are partitions and filesystems which are mountable they will be passed to your desktop environment which usually will automount them.

SgtCasper wrote:But there is no /etc/fstab, no /etc/mtab and /mnt is empty! :O

/etc/fstab is still there, check again. /etc/mtab is now usually symlinked to /proc/self/mounts
Furthermore /media should be used for temporary mounts, which is more correct according to FHS, and which is what nearly everybody uses and we still do for windows partitions which are detected by our installer.
Although since some time the automatic mounts are done under /run/user/${uid}/media which is what e.g. mount or lsblk or so would have told you.

SgtCasper wrote:When I insert a DVD, it automatically appears on "Device" section, but if I navigate on the Linux filesystems, I see nothing.

Hmmm? You do an ls -al on the mountpoint, and what exactly happens - care to provide a complete example?
And please check the section above before you do.

SgtCasper wrote:The doubt is, I'm using Mageia 4.1 I have one tablet that doesn't appear on device section. If I connect the tablet and type "lsusb", my tablet appears. I've installed mtp and manually mount the tablet. But I think I'm doing it the "dirty" way because I need to create a directory on /mnt/Tablet" and manually mount my tablet there. Besides, my tablet doesn't appear on Nautilus, just on the terminal.

MTP devices are a different story and they are ugly IMHO, depends on the filemanager or desktop environment having MTP support and also the MTP libraries need to be current ...
For issues with a specific MTP device please start a separate thread and provide some more details about it, at least the lsusb output.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How does Mageia automatically mount devices?

Postby jiml8 » Oct 18th, '16, 18:11

Also, for finding where various devices are mounted, the df command is your friend, as is the mount command. :)
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: How does Mageia automatically mount devices?

Postby doktor5000 » Oct 18th, '16, 22:46

Mentioned already - althoug I prefer lsblk (and also findmnt) even when those are not as universal nor posix ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How does Mageia automatically mount devices?

Postby roti » Oct 19th, '16, 20:07

doktor5000 wrote:Although since some time the automatic mounts are done under /run/user/${uid}/media which is what e.g. mount or lsblk or so would have told you.


Yes, I always wondered why Mageia uses /run? All other distros I know use /media. Not that it hurts or something, just curious.
roti
 
Posts: 31
Joined: Nov 7th, '11, 10:05
Location: Bucharest, Romania

Re: How does Mageia automatically mount devices?

Postby doktor5000 » Oct 20th, '16, 15:17

Nope, all distros using systemd nowadays use /run. Check http://www.freedesktop.org/software/systemd/man/pam_systemd.html
The purpose that /run/user fulfills is basically also described in the crossdistro freedesktop specifications, see XDG_RUNTIME_DIR in https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
FWIW, since the UsrMove this is the same as/replaces /var/run which some may know from older setups.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: daniewicz and 1 guest