Drives not automounting at boot

I just switched from manjaro to endeavour OS and I seem to be having issues getting endeavour to automatically mount my drives at boot.
I went into removable devices and checked all to mount on login, attempting both each individually as well as all known and both options still require me to click on each drive and log in to each to mount.

What filesystem is on the drives? So we can have a look, post the output of:

lsblk -f

and

sudo parted -l

When you say “log in”, what are you logging in to?

Sorry I meant “enter password” not log in.
The filesystem in question is ntfs and was created on a windows installation.

NAME   FSTYPE FSVER LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                     
├─sda2 ntfs         Bulk Storage    3AF2A34FF2A30E67                                    
└─sda3 vfat   FAT32 LINUX BOOT      7854-9717                                           
sdb                                                                                     
├─sdb1                                                                                  
└─sdb2 ntfs         Mod Drive       6C3062EF3062BFA6                                    
sdc                                                                                     
├─sdc1 vfat   FAT32 BOOT            D937-B68D                             499.2M     0% /efi
│                                                                                       /boot/efi
├─sdc2                                                                                  
├─sdc3 ntfs                         02F60CCEF60CC3BF                                    
├─sdc4 ntfs         Shared Volume   0A62ACB06338C871                      199.4G     0% /run/media/gohstly/Shared Volume
├─sdc5 ext4   1.0   Root            be482c44-5fa2-4952-990f-1f3de6cb5467  299.5G     8% /
└─sdc6 swap   1     Swap            b36ad84b-a7d1-4632-84ba-651e923520d7                [SWAP]
sdd                                                                                     
├─sdd1                                                                                  
└─sdd2 ntfs         Emulation Drive A85080DD5080B39A                                    
sde                                                                                     
├─sde1 vfat   FAT32                 D6DA-7147                                           
├─sde2                                                                                  
├─sde3 ntfs         Game Drive      CA5EF50D5EF4F2D5                                    
└─sde4 ntfs                         CAE8F3A1E8F38A49

sudo parted -l output

Model: ATA WDC WD20EZRZ-00Z (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 2      135MB   2000GB  2000GB  ntfs         Basic data partition  msftdata
 3      2000GB  2000GB  1122kB  fat32                              boot, esp


Model: ATA WDC WDS100T2B0A (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  16.8MB  16.8MB               Microsoft reserved partition  msftres
 2      16.8MB  1000GB  1000GB  ntfs         Basic data partition          msftdata


Model: ATA WD Blue SA510 2. (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start  End     Size    File system     Name                          Flags
 2      106MB  123MB   16.8MB                  Microsoft reserved partition  msftres, no_automount
 3      123MB  354GB   354GB   ntfs            Basic data partition          msftdata
 1      354GB  354GB   525MB   fat32                                         boot, esp
 5      354GB  730GB   376GB   ext4
 6      730GB  746GB   16.1GB  linux-swap(v1)                                swap
 4      785GB  1000GB  215GB   ntfs                                          msftdata


Model: ATA WDC WD10EZEX-75Z (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  16.8MB  16.8MB               Microsoft reserved partition  msftres
 2      16.8MB  1000GB  1000GB  ntfs         Basic data partition          msftdata


Model: ATA WDC WDS100T2B0A (scsi)
Disk /dev/sde: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size   File system  Name                          Flags
 1      1049kB  106MB   105MB  fat32        EFI system partition          boot, esp, no_automount
 2      106MB   240MB   134MB               Microsoft reserved partition  msftres, no_automount
 3      240MB   1000GB  999GB  ntfs         Basic data partition          msftdata
 4      1000GB  1000GB  512MB  ntfs                                       hidden, diag, no_automount

I have too many drives as you can see

One way you can get these frives to automatically mount is to add them to /etc/fstab. Here is the relevant instructive document from the ArchWiki: https://wiki.archlinux.org/title/NTFS-3G#Configuring

Default settings

Using the default settings will mount the NTFS partition(s) at boot. With this method, if the parent folder that it is mounted upon has the proper user or group permissions (e.g. /run/media//), then that user or group will be able to read and write on that partition(s).

/etc/fstab
# <file system> <dir> <type> <options> <dump> <pass> 
/dev/*NTFS-part* /mnt/windows ntfs-3g defaults 0 0

Read through the rest of the article for more advanced configuration options, like setting user- or group-specific permissions.

In a nutshell:

Create a mount point for a drive.

sudo mkdir /mnt/my_cool_mount_point

Edit fstab.

sudo nano /etc/fstab

Add an entry for a drive.

/dev/sda2   /mnt/my_cool_mount_point   ntfs-3g   defaults   0   0

Make an entry for each of your NTFS partitions you wish to mount from Linux (in your case you may need to set aside a good ten minutes or so because you have so many :stuck_out_tongue_winking_eye:). Then save and exit the file.

To immediately mount them after setting up your fstab, reload the daemon:

sudo systemctl daemon-reload

Then mount all devices.

sudo mount -a

If you encounter any errors, paste them into the thread so we can take a look.

Would this be the correct formatting for fstab?

do you have the ntfs-3g package installed?

pacman -Q ntfs-3g

Pudge

Thank you! this works. I just want to know, do I have to edit fstab through nano each time or will kate work just as well?

Edit: seems Kwrite doesnt have the permissions to do so.
I have to ask, does this method move or change any of the file directories for these drives?

Turns out, this isnt an ideal solution. I still dont have file permissions to the drives which I need to access steam games to play through proton. as it seems steam is unable to run proton games without proper file permissions

I do have it installed yes. 2022.10.3-1

Welcome !

You need to change them :

sudo chown -R your_username:your_username /mnt/mountshared
My bad
https://wiki.archlinux.org/title/NTFS-3G#Linux_compatible_permissions
Your id and gid should be 1000, use the id command for confirmation.

1 Like

chown (and chmod) cannot actually be used to change ownership (and permissions) on non posix file systems. The permissions need to be set in /etc/fstab instead:

https://wiki.archlinux.org/title/NTFS-3G#Linux_compatible_permissions

1 Like

It seems that i’ve found my answer here.

Though I guess all of these replies are technically solutions.
thank you for the help!

Seem to have encountered an error on boot trying to add another drive to my fstab


How do i fix this?

I wouldn’t use a mount point under /run/media to mount a partition permanently via /etc/fstab.

/run is a temporary filesystem (tmpfs) which is used to store runtime data that are not permanent between reboots.

However systemd seems to recreate a mountpoint under /run/media during boot if there is an entry in /etc/fstab.

I would use the live EnOS’ usb, mount the system partition, make a new mountpoint for the partition in question elsewhere and edit /etc/fstab accordingly.

Also, I think using the UUID (or PARTUUID) in fstab is a more robust way to reference a partition.

:eye: https://wiki.archlinux.org/title/Persistent_block_device_naming

I linked that article so you wouldn’t have to do any digging! :face_with_hand_over_mouth:

The very next section discusses setting up permissions in your fstab:

Linux compatible permissions

Permissions on a Linux system are normally set to 755 for folders and 644 for files. It is recommended to keep these permissions in use for the NTFS partition as well if you use the partition on a regular basis. The following example assigns the above permissions to a normal user:

# Mount internal Windows partition with linux compatible permissions, i.e. 755 for directories (dmask=022) and 644 for files (fmask=133) 
/dev/*NTFS-partition* /mnt/windows ntfs-3g uid=*userid*,gid=*groupid*,dmask=022,fmask=133 0 0

Alternatively, if the Windows permissions do matter to you, you can use the ntfsusermap(8) command to map Windows users to Linux ones. ntfs-3g will handle the translation of these permissions.

Allowing group/user

In /etc/fstab you can also specify other options like those who are allowed to access (read) the partition. For example, for you to allow people in the groupid group to have access:

/dev/*NTFS-partition* /mnt/windows ntfs-3g gid=*groupid*,umask=0022 0 0

By default, the above line will enable write support for root only. To enable user writing, you have to specify the user who should be granted write permissions. Use the uid parameter together with your user id to enable user writing:

/dev/*NTFS-partition* /mnt/windows ntfs-3g uid=*userid*,gid=*groupid*,umask=0022 0 0

If you are running on a single user machine, you may like to own the file system yourself and grant all possible permissions:

/dev/*NTFS-partition* /mnt/windows ntfs-3g uid=*userid*,gid=*groupid* 0 0

That looks like a systemd-mount error. If you aren’t sure what that is, my guess would be it is related to the auto-mount configuration you were trying to set up in the GUI. Perhaps this error is related to your original issue (how the auto-mount was not working through the GUI).

I would choose one or the other, as far as getting the mounts going: either chase down those systemd-mount errors (you could start looking for clues with the suggestion in the error: “run systemctl status run-media-gohstly-Bulk.mount for details”), or work on fixing up the fstab entry so it works with the permissions, etc how you need it to.

If you want to just get rid of that error and push forward with fstab, it is likely all you need to do is undo this effort:

As far as this:

Yes, that looks good. A couple considerations:

  1. It sounds like you’ll have to add options for permissions, as previously mentioned.
  2. You may wish to include the nofail option. See here: https://wiki.archlinux.org/title/Fstab#External_devices
  3. @pebcak’s suggestion of using the UUID instead of the device identifier is a good one, since how the devices get labeled can change if you add or remove devices. The UUID can be grabbed right out of the lsblk -f output above (for example, the UUID of /dev/sdc4 is 0A62ACB06338C871).

So it would look something like this, depending on what options you decide to go with and the UID/GID you need:

UUID=0A62ACB06338C871   /mnt/mountshared   ntfs-3g   nofail,uid=1000,gid=1000,dmask=022,fmask=133   0   0