Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Autmount with /etc/fstab not working (Read 2238 times) previous topic - next topic
0 Members and 5 Guests are viewing this topic.

[SOLVED] Autmount with /etc/fstab not working

Hello. I have installed Artix on my computer, and everything works great--except on boot my external drives are not being mounted. I have defined them in /etc/fstab, I am using UUIDs--perhaps the options I am using are wrong? They're ntfs drives with the following lines in /etc/fstab:

Code: [Select]
UUID="3F8573B3660DF881"             /home/al/mount/TRANSCEND1       ntfs    auto,uid=1000,gid=998,rw,relatime,nofail,user,exec,umask=000 0
  2

UUID="42C508CF71F9C321"         /home/al/mount/Toshiba          ntfs    auto,uid=1000,gid=998,rw,relatime,nofail,user,exec,umask=000 0      2

I did manage to get them working at one point, but when I reformatted a drive due to what I think was a filesystem error it stopped working.

Update: Nevermind. Just decided to create a runit service that runs "mount -a" on startup. Works as well as expected.

 

Autmount with /etc/fstab not working

Reply #1
Hello. I have installed Artix on my computer, and everything works great--except on boot my external drives are not being mounted. I have defined them in /etc/fstab, I am using UUIDs--perhaps the options I am using are wrong? They're mostly ntfs drives with the following lines in /etc/fstab:

Code: [Select]
UUID="50EC96FA63CCEF02"             /home/al/mount/TRANSCEND1       ntfs    auto,uid=1000,gid=998,rw,relatime,nofail,user,exec,umask=000 0
  2

UUID="42C508CF71F9C321"         /home/al/mount/Toshiba          ntfs    auto,uid=1000,gid=998,rw,relatime,nofail,user,exec,umask=000 0      2

I did manage to get them working at one point, but when I reformatted a drive due to what I think was a filesystem error it stopped working.

I did manage to automount them via a runit service that runs "mount -a" on (I think) boot, but I want to learn/know how to do this without that.

Note: I have a third device which is a USB, but I decided not to list that one since it isn't as necessary and it doesn't change much either way (I suppose).

Re: Autmount with /etc/fstab not working

Reply #2
I did manage to get them working at one point, but when I reformatted a drive due to what I think was a filesystem error it stopped working.

Pretty sure if you reformat ntfs the UUID will change.

Other than that turn on verbose logging in
/etc/rc.conf
Code: [Select]
rc_logger="YES"
rc_verbose="YES"

And check the log at
/var/log/rc.log
after booting

and check the output of dmesg maybe.

Do they mount if you issue
Code: [Select]
sudo mount --all
?


Re: Autmount with /etc/fstab not working

Reply #3
It is generally a bad idea to automount external (removable) hard drives, to a subdirectory of /home nonetheless. Just use the mount function of your DE, or, if you aren't using a DE, mount them manually as root when you need them.

Furthermore, if an ordinary user tries to mount an NTFS filesystem, the attempt will fail with the following error message:
Code: [Select]
Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged
So the user option has no effect.

Why are you using nofail? It does the following:
Quote
       nofail
           Do not report errors for this device if it does not exist.
Reporting errors is very useful for diagnosing issues like the one from this thread.

Other than that, one of the main functions of /etc/fstab is exactly automounting. All filesystems which don't have the noauto option specified should be automounted, unless there were errors.

Re: Autmount with /etc/fstab not working

Reply #4
Pretty sure if you reformat ntfs the UUID will change.

Other than that turn on verbose logging in
/etc/rc.conf
Code: [Select]
rc_logger="YES"
rc_verbose="YES"

And check the log at
/var/log/rc.log
after booting

and check the output of dmesg maybe.

Do they mount if you issue
Code: [Select]
sudo mount --all
?



mount -a works. Gonna try your suggestion really quickly.

Re: Autmount with /etc/fstab not working

Reply #5
It is generally a bad idea to automount external (removable) hard drives, to a subdirectory of /home nonetheless. Just use the mount function of your DE, or, if you aren't using a DE, mount them manually as root when you need them.

Furthermore, if an ordinary user tries to mount an NTFS filesystem, the attempt will fail with the following error message:
Code: [Select]
Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged
So the user option has no effect.

Why are you using nofail? It does the following:Reporting errors is very useful for diagnosing issues like the one from this thread.

Other than that, one of the main functions of /etc/fstab is exactly automounting. All filesystems which don't have the noauto option specified should be automounted, unless there were errors.

So I turned off
Code: [Select]
nofail
, and it seems that the system cannot find the devices via their UUIDS on boot? However running
Code: [Select]
mount -a
works after boot.

Re: Autmount with /etc/fstab not working

Reply #6
At any rate, my thanks to you folks who are helping me out.

Re: Autmount with /etc/fstab not working

Reply #7
So I turned off
Code: [Select]
nofail
, and it seems that the system cannot find the devices via their UUIDS on boot? However running
Code: [Select]
mount -a
works after boot.
Most likely your initramfs isn't configured to load ntfs module, so it can't "see" the ntfs partitions at that stage of the boot process. Try including ntfs module in mkinitcpio.conf and rerunning mkinitcpio.

Re: Autmount with /etc/fstab not working

Reply #8
Most likely your initramfs isn't configured to load ntfs module, so it can't "see" the ntfs partitions at that stage of the boot process. Try including ntfs module in mkinitcpio.conf and rerunning mkinitcpio.
My thanks. One question, though, what line do I have to edit and what do I edit into it?

Re: Autmount with /etc/fstab not working

Reply #9
Is it ntfs3?


Re: Autmount with /etc/fstab not working

Reply #11
I had a similar problem with an external usb thumbdrive, and as a workaround I added this line to my root crontab:

Code: [Select]
@reboot sleep 20 && mount /dev/sdb1

It is a rather clumsy solution, but it works faultlessly for me.

Re: Autmount with /etc/fstab not working

Reply #12
That's interesting. When I add that to /etc/mkinitcpio.conf it gives an error message. Something about not finding the module or something. And when I run
Code: [Select]
modprobe -c | vim
and search for "ntfs," the only reference is to "fs_ntfs3" and what I assume is the alias of it, "ntfs3."

Note: it works fine when I edit in "ntfs3."

Re: Autmount with /etc/fstab not working

Reply #13
By "works fine" I mean that mkinitcpio works, but when I reboot the drives show an error and I can't even enter my window manager.

Re: Autmount with /etc/fstab not working

Reply #14
It seems that adding "fuse" module to /etc/mkinitcpio.conf worked!