Can't mount any drive as read-write, external or internal

nobootwait is not a valid mount option for systemd. You must have gotten that from an old guide or something.

Try using the mount options described here instead: https://wiki.archlinux.org/title/fstab#Automount_with_systemd

For example:

Local partition

In case of a large partition, it may be more efficient to allow services that do not depend on it to start while it is checked by fsck. This can be achieved by adding the following options to the /etc/fstab entry of the partition:

x-systemd.automount

This will fsck and mount the partition only when it is first accessed, and the kernel will buffer all file access to it until it is ready. This method can be relevant if one has, for example, a significantly large /home partition.

If you want to give this option a try, change the option parameters to this for the NTFS and exfat entries:

nofail,x-systemd.automount

I’m not certain that will resolve your issue, but at the very least you should remove the invalid mount option.


If the NTFS drive is mounting read-only, you may need to repair it with ntfsfix like so:

sudo ntfsfix -d /dev/sda2

sda2 is given as an example there; obviously target whatever partition is appropriate when you run the command.

2 Likes

It’s actually probably is or was valid! But not for Arch Linux or anything based on it. So, yes, it doesn’t means anything for me.

Thank you, this solved my issue with internal NTFS partitions! But the issue with external exfat partitions sadly still exists…

It is not a valid mount option for systemd. Arch or not Arch has nothing to do with it. Probably it was copied from a guide or existing configuration that was intended for something else.

This suggests you may have taken on some filesystem corruption. The most common way this happens is the disks do not get properly unmounted. You can try changing the check digit from 0 to 2 in /etc/fstab:

The check digit is the second number here.

If the corruption is very minor, that change may be all that is needed. [Edit to say: obviously you need to reboot before this will do anything. :wink:]

If the issue persists, you may need to run a dedicated tool like you did with the NTFS partition. You could try dosfsck for example:

sudo dosfsck -a /dev/sdb2

It looks like it is, because they work all fine in Windows.

What I need to do after doing this, if it works? Should it stay 0 2?

It says Logical sector size is zero. for all partitions…

There is a good chance this is related to your issue. Make sure you disable the Windows “fast startup” feature because it can cause all manner of issues like this.

That’s up to you. Changing it to 2 enables a fsck scan to run when mounting the disk at boot time. It can find and repair disk errors but also will slow down the process of mounting the drive. If you are having issues with the disk I might just leave it on.

Before going any further I would just confirm “fast startup” is disabled (this is not the default setting, you must change it) and then reboot with the fsck option enabled.

If the issue persists after that, you could try using a disk utility like GParted or KDE Partition Manager to check the filesystem. These tools often have options to repair filesystems. Otherwise you can try forcing the filesystem check with the -f flag:

sudo dosfsck -f -a /dev/sdXY

Make sure you have a reliable backup before running repair utilities, in case data loss occurs during the repair.

Impossible, I disabled this feature way before even installing Linux due multiple reasons.

Gives the same error.

Rebooting right now.

Edit: Nothing changed. It gave the same error, which says that it can’t find the drives. The internal ones now work fine though. Going to try to mount external ones in a live enviroment.

Do you have these two packages installed?

extra/exfat-utils 1.4.0-2
Utilities for exFAT file system
extra/exfatprogs 1.2.2-1
exFAT filesystem userspace utilities for the Linux Kernel exfat driver

If not, install them, reboot and try mounting one of your exfat partitions in a terminal and see if it works:

sudo mount -t exfat /dev/sdXY /mnt

Change XY to correspond to the actual partition.

Yes, always had one them:

$ yay exfat
8 aur/grub-android-x86 0.0.2-2 (+0 0.00) 
    GRUB Configuration for Android x86 detection (Only works with NTFS, extFS and vFat/exFat)
7 aur/flakyflash-git r21.04bee13-1 (+1 0.21) 
    a Linux-based tool for diagnosing and salvaging FAT- and exFAT-formatted flash media having flaky sectors that do not retain data correctly
6 aur/exfat-utils-debug-git 1.3.0.r28.gab19b44-1 (+0 0.00) 
    Utilities for the exFAT file system with debugging enabled
5 aur/exfat-utils-debug 1.3.0-3 (+0 0.00) (Out-of-date: 2023-05-31) 
    Utilities for the exFAT file system with debugging enabled
4 aur/exfatprogs-git 1.1.3.r59.gb8a9b32-1 (+0 0.00) 
    exFAT filesystem userspace utilities
3 aur/exfat-utils-nofuse 1.4.0-2 (+31 0.00) 
    Utilities for the exFAT file system without fuse (to prefer exfat kernel module over fuse)
2 extra/exfat-utils 1.4.0-2 (60.8 KiB 237.9 KiB) 
    Utilities for exFAT file system
1 extra/exfatprogs 1.2.2-1 (62.3 KiB 181.6 KiB) (Installed)
    exFAT filesystem userspace utilities for the Linux Kernel exfat driver
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 2
Sync Explicit (1): exfat-utils-1.4.0-2
[sudo] password for otto500206: 
resolving dependencies...
looking for conflicting packages...
:: exfat-utils and exfatprogs are in conflict. Remove exfatprogs? [y/N]

Alright, run fsck.exfat on your exfat partition.

See: https://man.archlinux.org/man/fsck.exfat.8

Then:

:warning:

$ sudo fsck.exfat /dev/sdf1
[sudo] password for otto500206: 
exfatprogs version : 1.2.2
/dev/sdf1: clean. directories 6030, files 135646

sudo mount -t exfat /dev/sdf1 /mnt

Post the output in case of errors.

[otto500206@OttosPC ~]$ sudo mount -t exfat /dev/sdf1 /mnt/externalgaming
[sudo] password for otto500206: 
[otto500206@OttosPC ~]$

It looks alright to me.

Can you write to that directory: externalgaming ?

No. But mounting an internal disk works. Though, I can’t do that on any folder in /mnt/ if at least a drive is mounted as read-write.

Is this /dev/sdf1 ? If so edit that line in /etc/fstab:

UUID=5899-CCA7 /mnt/externalgaming exfat defaults,nofail,uid=1000,gid=1000,dmask=022,fmask=133 0 0

save the file.

Now:

sudo umount -R /mnt/externalgaming         
sudo systemctl  daemon-reload
sudo mount -a

Report back.

Solution! But why?

Because you would need to set the Linux-compatible permissions for the Linux non-compatible filesystems in the /etc/fstab. The example line given above takes care of that.

1 Like

What should I do in the future for avoiding any mistakes about this?

Follow the same example, I guess, for the non-linux filesystems like ntfs, exfat …

Have a read at ArchWiki about fstab and different filesystems.

Actually there are no pages for exfat in ArchWiki… :frowning: