On 2012-04-07 15:06, truemacias wrote:
>
> I am interested in general how to configure it – disable or enable,
> because obviously /etc/fstab no longer applies here.
>
> Currently I would like to disable it for /media directory. But if you
> know general answer please post it.
No, I don’t know the general answer. As I said, I think /media is created
directly by systemd somewhere. I would not change that by the way, it takes
very little memory, and systemd expects it.
If you need a mount path that does not clear on reboot, use /mnt.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
>
> Let’s say given directory /xyz (example) is automounted at start (by
> default) by OS 12.1 as tmpfs.
>
> I checked already /etc/fstab but there is no entry for any tmpfs
> directory.
>
> The question is – where does OS 12.1 keep configuration for
> automounting (at start) tmpfs directories? I am looking for it in order
> to change it.
>
> Thank you in advance.
>
>
Look in /etc/auto.master and any related auto.* files.
ob.
$ systemctl status media.mount
media.mount - Media Directory
Loaded: loaded (/lib/systemd/system/media.mount; static)
Active: active (mounted) since Sun, 15 Apr 2012 08:06:14 +0000; 1min 9s ago
Where: /media
What: tmpfs
Process: 351 ExecMount=/bin/mount tmpfs /media -t tmpfs -o mode=755,nosuid,nodev,noexec (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/media.mount
So the file you’re looking for is /lib/systemd/system/media.mount. You will probably find some more mount points in this directory (like run.mount for /run). Now if you want to disable such a mount point, do not edit those files. The next update will overwrite your changes and/or create a mess. Instead, create a file /etc/systemd/system/media.mount. Files in /etc/systemd/system take precedence over /lib/systemd/system files. To disable this mount point, simply do
ln -s /dev/null /etc/systemd/system/media.mount
btw, this Fedora wiki article explains why such filesystems are not listed in fstab (see “Why is this mount established via a systemd unit file, instead of an entry in /etc/fstab?” at the end). And it looks like/tmp will also become a tmpfs soon.