LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fstab fails to mount second hard drive to /run/media/$USER: "mount point does not exist". (https://www.linuxquestions.org/questions/linux-newbie-8/fstab-fails-to-mount-second-hard-drive-to-run-media-%24user-mount-point-does-not-exist-4175615372/)

MurderousMincePie 10-10-2017 03:51 AM

Fstab fails to mount second hard drive to /run/media/$USER: "mount point does not exist".
 
In the past I've lazily mounted my second hard drive to /mnt which worked fine until Thunar stopped recognising hard disks mounted there. You now need to mount to /run/media/$USER.

So I changed my /etc/fstab file and added this:

LABEL=2TB\040Internal /run/media/myuser/2TB\040Internal btrfs nosuid,nodev,nofail,x-gvfs-show 0 0

Then I ran "mount -a" to test it and got "mount: /run/media/myuser/2TB Internal: mount point does not exist". I created the mount point manually and it then mounted fine but if I restart my machine that mount point disappears and is not regenerated (is /run ephemeral?).

I was under the impression the udisks2 would create /run/media/$USER on boot, which I do have enabled (on Arch Linux with OpenRC, tried at both the default and boot runlevel).

jsbjsb001 10-10-2017 05:52 AM

Quote:

Originally Posted by MurderousMincePie (Post 5768275)
In the past I've lazily mounted my second hard drive to /mnt which worked fine until Thunar stopped recognising hard disks mounted there. You now need to mount to /run/media/$USER.

So I changed my /etc/fstab file and added this:

LABEL=2TB\040Internal /run/media/myuser/2TB\040Internal btrfs nosuid,nodev,nofail,x-gvfs-show 0 0

Then I ran "mount -a" to test it and got "mount: /run/media/myuser/2TB Internal: mount point does not exist". I created the mount point manually and it then mounted fine but if I restart my machine that mount point disappears and is not regenerated (is /run ephemeral?).

I was under the impression the udisks2 would create /run/media/$USER on boot, which I do have enabled (on Arch Linux with OpenRC, tried at both the default and boot runlevel).

I think one problem might be this:

Code:

LABEL=2TB\040Internal /run/media/myuser/2TB\040Internal btrfs nosuid,nodev,nofail,x-gvfs-show 0 0
It does not look correct to me.

The other problem might be that using the /run folder, might be problematic.

I would suggest you create a folder outside of the /run folder, like for example; /home/yourusername/mymountpointhere

Change mymountpointhere to a name not used by anything else.

Also, fstab mounts are usually done via UUID rather than the LABEL of the device.

Here's an example of my /etc/fstab for reference;

Code:

#
# /etc/fstab
# Created by anaconda on Sun Jul  9 07:31:41 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=0c2b3be3-f375-4af7-8f48-fa194aa08fbb swap swap defaults 0 0
UUID=e80910b3-fc9b-4218-afb9-9965ad8f699d /                      ext4    defaults        1 1
/dev/mapper/luks-f503b463-4d79-4fe3-8227-2408ad6130d8 /home                  ext4    defaults,x-systemd.device-timeout=0 1 2
# UUID=14f4df74-cc56-438f-bbc1-6e2eb52bb78e /restorevol ext4 defaults 1 2
UUID=70bffaeb-9171-4c23-81b5-2fee4a7842af /multimediavol ext4 defaults 1 2

Best of luck with it.

TobiSGD 10-10-2017 06:07 AM

Quote:

Originally Posted by MurderousMincePie (Post 5768275)
(is /run ephemeral?).

/run is a tmpfs and as such all its content will not survive a reboot.

MurderousMincePie 10-10-2017 06:41 AM

Quote:

Originally Posted by jsbjsb001 (Post 5768293)
I think one problem might be this:

Code:

LABEL=2TB\040Internal /run/media/myuser/2TB\040Internal btrfs nosuid,nodev,nofail,x-gvfs-show 0 0
It does not look correct to me.

The other problem might be that using the /run folder, might be problematic.

I would suggest you create a folder outside of the /run folder, like for example; /home/yourusername/mymountpointhere

Change mymountpointhere to a name not used by anything else.

Also, fstab mounts are usually done via UUID rather than the LABEL of the device.

Here's an example of my /etc/fstab for reference;

Code:

#
# /etc/fstab
# Created by anaconda on Sun Jul  9 07:31:41 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=0c2b3be3-f375-4af7-8f48-fa194aa08fbb swap swap defaults 0 0
UUID=e80910b3-fc9b-4218-afb9-9965ad8f699d /                      ext4    defaults        1 1
/dev/mapper/luks-f503b463-4d79-4fe3-8227-2408ad6130d8 /home                  ext4    defaults,x-systemd.device-timeout=0 1 2
# UUID=14f4df74-cc56-438f-bbc1-6e2eb52bb78e /restorevol ext4 defaults 1 2
UUID=70bffaeb-9171-4c23-81b5-2fee4a7842af /multimediavol ext4 defaults 1 2

Best of luck with it.

Just corrected my fstab file now. I thought it was necessary to mount to /run for some reason . Changed it to mount via the UUID of my hard drive and set the mount point as /home/myuser/Media/2TB Internal (or "/home/myuser/Media/2TB\040Internal" in fstabish). It now mounts properly and is registered by Thunar. Thanks.


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