Page 1 of 1

/mnt or /media?

Posted: Sun Aug 15, 2021 5:03 am
by Gaer Boy
This question has been raised twice on the Forum recently and advice from members has been conflicting. viewtopic.php?f=107&t=65638 & viewtopic.php?f=107&t=65638

The Manual description of the file system says that physical storage devices should be mounted at /mnt and removable devices at /media. This used to be the case in Mepis and, I think, in the early versions of MX, but there was a change some years ago and everything was mounted at /media. Thunar auto-mounts removable devices at /media and manually mounted devices at /media/user. Disk Manger mounts devices at /media and adds an entry to /etc/fstab.

Unfortunately, gnome-disk-utility in MX-21 now defaults to mounting devices at /mnt, which will give rise to increasing confusion. It seems time to make a clear statement of standard practice for MX.

Re: /mnt or /media?

Posted: Sun Aug 15, 2021 6:04 am
by wdscharff
physical storage devices should be mounted at /mnt and removable devices at /media.
That's how I know it from opensuse and mint (in 2014/2015). I also found it a bit confusing at first when I switched to MX.

Personally, I do not care now, my additional disks, whether internal or external are mounted in my home directory.
if they change the "standards" every few years, I just make it fit for me.
my fstab is a bit bloated, but the stuff is where I expect it to be.

that can also change, but that is then my decision ;-}

example:

Code: Select all

# Pluggable devices are handled by uDev, they are not in fstab
UUID=fac314a9-6810-4282-808e-8cd967f66ec1 / ext4 defaults 0 1
UUID=29f39c82-9829-4154-b6a1-fd0d266e3125 swap swap defaults 0 0 
UUID=6c7dee4d-f437-484c-a464-5cd43af45128 /home/winnI/evo850/ auto defaults 0 1
UUID=e8a2b356-9190-4636-b3a3-67cb3633997e /home/winnI/qvo/ auto defaults 0 1
UUID=3b817b12-e514-4f6b-bba8-0b50d8db3cc2 /home/winnI/EVO500/ auto defaults 0 1
UUID=452de615-811d-42cf-9033-5778384c870e /home/winnI/sea3tb/ auto defaults 0 1
UUID=2400B42F-00B4-0A36-70ae-3d644fa69d61 /home/winnI/tosh3tb/ auto defaults 0 1
UUID=c640a5f8-23ee-46d8-a2f6-08e1db09a019 /home/winnI/wd4tb/ auto defaults 0 1

Re: /mnt or /media?

Posted: Sun Aug 15, 2021 8:27 am
by linexer2016
From the excellent ebook Linux Command Line (a link posted recently on this board) by William Schotts ...
/media On modern Linux systems the /media directory will contain the mount points for removable media such as USB drives, CD-ROMs, etc. that are mounted automatically at insertion

/mnt On older Linux systems, the /mnt directory contains mount points for removable devices that have been mounted manually.

Re: /mnt or /media?

Posted: Sun Aug 15, 2021 9:16 am
by paddys-hill
The FSH (v3) says

Code: Select all

3.12. /mnt : Mount point for a temporarily mounted filesystem
3.12.1. Purpose
This directory is provided so that the system administrator may temporarily mount a filesystem as needed. The content of this directory is a local issue and should not affect the manner in which any program is run.

This directory must not be used by installation programs: a suitable temporary directory not in use by the system must be used instead.
and

Code: Select all

3.11. /media : Mount point for removable media
3.11.1. Purpose

This directory contains subdirectories which are used as mount points for removable media such as floppy disks, cdroms and zip disks.
That, IMO, is L.A.W.

regards

Re: /mnt or /media?

Posted: Sun Aug 15, 2021 10:54 am
by Gaer Boy
That's fine but those two definitions don't cover mounting a permanently available partition. Practice varies - I haven't used /mnt in the past 5 years.

Re: /mnt or /media?

Posted: Sun Aug 15, 2021 11:00 am
by asqwerth
I've not had problems using /media for my Data partition the past 5 years.

When I use gnome-disk-utility, I use its edit function to change the mount point before saving the fstab details.

Re: /mnt or /media?

Posted: Sun Aug 15, 2021 11:13 am
by drogon69
as a few users have mentioned , these days on certain linux systems , if you plug in a usb hard drive it gets mounted under /media
in the early stages of linux , which would be a total disaster for most who discover linux now , let's be honest , because in the early fedora or even before redhat , was not mounted directly , you had to be a firm giant are to play a DVD movie and link it under mnt.
in the beginning of 1998/99 this was inlaugh in rain how can i play my dvd collection in redhat , but not everyone at that time succeeded in their aim.
because then also the right codecs have to be found, which was also quite a task for many.
now everything is served to you on a saucer.
I have experienced the pure internet in the beginning where you can still surf without blocks on the browsers.
I don't know how redhat and similar work nowadays, I never look at bad systems that are not user-friendly, I completely ignore everything that runs on redhat and similar .

I've even been online with dial-up and bbs systems , my first computer in front of me was in 1982 , with dir , list , copyx for amiga computers , that's quite a long time ago so we are getting old. :turtle:

Re: /mnt or /media?

Posted: Sun Aug 15, 2021 12:33 pm
by MXRobo
After looking at yesterday’s post about mounting an external hard drive,
viewtopic.php?f=104&p=648570#p648570
and recalling dolphin’s comment from an earlier post,
viewtopic.php?p=645518#p645518
;of which the two methods are diffeerent without context.

I stumbled upon this link:
https://askubuntu.com/questions/22215/w ... -and-media
which led to – among others – this link which in certain situations suggests mounting
with /mnt as opposed to /media to avoid potential umask issues.
https://samtinkers.wordpress.com/2015/0 ... a-servers/

Just for FYI, or any thoughts, and any thoughts on the umask issues if mounted at arbitrary mount points, e.g. /data.

Cheers.