/mnt or /media?

Topics relating to MX Docs and MX Videos
Message
Author
User avatar
Gaer Boy
Posts: 862
Joined: Sat Jun 06, 2009 6:06 am

/mnt or /media?

#1 Post 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.

Gigabyte B550I Aorus Pro AX, Ryzen 5 5600G, 16GB, 250GB Samsung SSD (GPT), 2x1TB HDD (MBR), MX-21-AHS
Lenovo Thinkpad X220, dual-core i5, 4MB, 120GB Samsung SSD (GPT), MX-21

User avatar
wdscharff
Posts: 1134
Joined: Mon Feb 24, 2020 1:07 am

Re: /mnt or /media?

#2 Post 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
my working horse Desktop AMD Ryzen 9 3900x, 32GB Ram // SSD ... enough
mx-fluxbox, what else?

In nature there are neither rewards nor punishments.
There are consequences.


my wallpaper gallery

User avatar
linexer2016
Posts: 733
Joined: Thu Dec 15, 2016 8:15 pm

Re: /mnt or /media?

#3 Post 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.

User avatar
paddys-hill
Posts: 21
Joined: Sat Jul 31, 2021 12:45 am

Re: /mnt or /media?

#4 Post 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
Paddys-Hill Co-op co-ordinator & sysadmin
Front end: Acer Aspire A315-21G (AMD A9-9420 RADEON R5) running 5.10.0-5mx-amd64
Co-op VPN Server: HP 666161-B21 ProLiant BL460c Gen8 E5-2620 (in rebuild)
+ 6 other servers

User avatar
Gaer Boy
Posts: 862
Joined: Sat Jun 06, 2009 6:06 am

Re: /mnt or /media?

#5 Post 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.

Gigabyte B550I Aorus Pro AX, Ryzen 5 5600G, 16GB, 250GB Samsung SSD (GPT), 2x1TB HDD (MBR), MX-21-AHS
Lenovo Thinkpad X220, dual-core i5, 4MB, 120GB Samsung SSD (GPT), MX-21

User avatar
asqwerth
Developer
Posts: 8033
Joined: Sun May 27, 2007 5:37 am

Re: /mnt or /media?

#6 Post 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.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

drogon69
Posts: 38
Joined: Sat Jun 20, 2020 9:36 am

Re: /mnt or /media?

#7 Post 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:

MXRobo
Posts: 1840
Joined: Thu Nov 14, 2019 12:09 pm

Re: /mnt or /media?

#8 Post 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.

Post Reply

Return to “Documentation and videos”