Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
176
views
How to avoid "cannot find in /etc/fstab" problem
I have just opened my `GParted` application and did a format for `/dev/sdc1` to `exfat` type. But while trying to mount the drive after formatting is completed I am getting the following error. It is external hard disk connected through USB port to the Linux system. user-1@inc:~$ sudo mount /dev/sdc...
I have just opened my
GParted
application and did a format for /dev/sdc1
to exfat
type. But while trying to mount the drive after formatting is completed I am getting the following error.
It is external hard disk connected through USB port to the Linux system.
user-1@inc:~$ sudo mount /dev/sdc1
mount: /dev/sdc1: can't find in /etc/fstab.
Dev Anand Sadasivam
(131 rep)
Jun 18, 2025, 07:08 PM
• Last activity: Jun 19, 2025, 01:22 PM
9
votes
1
answers
4434
views
How can I make my ExFAT partition unmount cleanly?
I've got Raspbian running on a Raspberry Pi 4 B. I have a USB hard disk that I'm using with it. The hard disk is a 1TB drive formatted with a single partition using ExFAT. I've got `exfat-fuse` and `exfat-utils` installed. The problem is that every time I unmount the partition, when I run `fsck` on...
I've got Raspbian running on a Raspberry Pi 4 B. I have a USB hard disk that I'm using with it. The hard disk is a 1TB drive formatted with a single partition using ExFAT. I've got
exfat-fuse
and exfat-utils
installed. The problem is that every time I unmount the partition, when I run fsck
on that partition, it gives me this warning:
WARN: volume was not unmounted cleanly.
That makes me nervous. This happens no matter how the partition is unmounted. It happens on shutdown and subsequent bootup, it happens on reboots, it happens if I just manually sudo umount /dev/sda1
and sudo mount /dev/sda1
Here's some system information:
Linux rpi4b 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
exfat-fuse/stable,now 1.3.0-1 armhf [installed]
exfat-utils/stable,now 1.3.0-1 armhf [installed]
This is the line concerning the partition in my /etc/fstab
.
UUID=BE1B-4EFA /media/BE1B-4EFA exfat defaults,auto,users,rw,nofail 0 0
Why isn't my partition unmounting cleanly? How can I make sure it does?
user403386
Apr 1, 2020, 03:34 PM
• Last activity: May 18, 2025, 11:07 PM
1
votes
2
answers
92
views
Files that end with a period are inaccessible on an exFAT drive
I have a backup that was copied from Linux (ext4) to an exFAT filesystem. File and directory names that end with a period are inaccessible. I can (partly) list them, but `ls` behaves strangely. It prints errors like `ls: cannot access '….': No such file or directory`, and then prints the file name (...
I have a backup that was copied from Linux (ext4) to an exFAT filesystem.
File and directory names that end with a period are inaccessible.
I can (partly) list them, but
ls
behaves strangely.
It prints errors like
ls: cannot access '….': No such file or directory
,
and then prints the file name (with final period included), but reports -?????????
for the permissions and ?
for user, group, etc.
I also can't move, rename, or delete any of the affected files. Using wildcards for the offending .
does not work.
This isn't a permissions issue. It might be a filesystem corruption issue, but if it is, it is a systematic one caused by rsync
'ing a directory from an ext4
to exFAT
filesystem, and affects *all* files and directories whose name ends in .
. The command sudo fsck.exfat -v -p /dev/sd**
reports volume clean.
#### System info
This is a Ubuntu Studio Ubuntu 22.04.1 LTS
machine running the 6.2.0-1018-lowlatency
kernel.
The exFAT is an external USB drive (WD MyBook). I am mounting it via the system default mount option via the disks
graphical user utility.
The output of cat /proc/filesystems
includes exfat
, indicating kernel support; exfat-fuse
is not installed, so it is probably not mounting via fuse.
#### My questions:
1. What is going on here?
2. Do these files really exist, or are they ghosts (failed to copy to exFAT for *reasons*)?
3. Can I recover this? I'd like to rename all affected nodes by removing the trailing period.
MRule
(249 rep)
May 13, 2025, 04:51 PM
• Last activity: May 16, 2025, 10:05 AM
3
votes
3
answers
879
views
How to determine, with certainty, the filesystem type of a partition from the outputs of the Linux "file -s" command?
My problem is to *decode* the output of the command `file -s /dev/sdX` on my system (where `/dev/sdX` is the device file associated to a USB key). Below I'll show the output of the command `file -s /dev/sdX` where the device file `/dev/sda1` is a partition formatted with a `FAT32` filesystem, while...
My problem is to *decode* the output of the command
file -s /dev/sdX
on my system (where /dev/sdX
is the device file associated to a USB key).
Below I'll show the output of the command file -s /dev/sdX
where the device file /dev/sda1
is a partition formatted with a FAT32
filesystem, while the device /dev/sdb
is a partition formatted with a NTFS
filesystem.
### Output of file
command for a FAT32
filesystem ###
In the case of the FAT32
filesystem the output of the file
command is:
> file -s /dev/sda1
/dev/sda1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "mkfs.fat", sectors/cluster 8, Media descriptor 0xf8, sectors/track 62, heads 31, hidden sectors 2048, sectors 1966080 (volumes > 32 MB), FAT (32 bit), sectors/FAT 1920, reserved 0x1, serial number 0x4ba3ff5b, unlabeled
In the output is present the information , FAT (32 bit), sectors/FAT 1920,
which could be enough to say that the filesystem type is FAT32, but in the next paragraph I'll show that the string FAT
is also present in the output of the file
command in the case of an NTFS
filesystem.
### Output of file
command for a NTFS
filesystem ###
In the case of a NTFS
filesystem the output of the file
command is:
> file -s /dev/sdb
/dev/sdb: DOS/MBR boot sector, code offset 0x52+2, OEM-ID "NTFS ", sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255, dos file -s /dev/sdf
/dev/sdf: DOS/MBR boot sector
In this case exfat
is not present in the output.
### Output of file
for ext4
###
file -s /dev/sdb1
/dev/sdb1: Linux rev 1.0 ext4 filesystem data, UUID=38bc3d5b-381e-4f19-8640-c77d9483882b (needs journal recovery) (extents) (64bit) (large files) (huge files)
In this case is present the info ext4 filesystem data,
.
In these 4 examples (FAT32, NTFS, EXFAT, EXT4) the output of the file
command appears very different for different filesystem types, so it is difficult to find a simple rule to decide the filesystem type by this output.
___
**EDIT**
To clarify why I'm trying to use the file
command *to get information about the filesystem type of a USB*, please read [this post](https://unix.stackexchange.com/questions/794029/how-to-find-the-filesystem-type-of-the-partition-of-an-usb-before-mount-it) .
User051209
(498 rep)
Apr 22, 2025, 04:00 PM
• Last activity: Apr 24, 2025, 03:24 PM
0
votes
2
answers
157
views
On yocto distribution I'm not able to mount an USB key formatted with exfat filesystem
On my yocto distribution I can't mount USB key with `exfat` filesystem. If I execute the command: ``` > blkid /dev/sda /dev/sda: LABEL="my-label" UUID="FC4D-5949" BLOCK_SIZE="512" TYPE="exfat" ``` So I'm sure that the USB filesystem is `exfat`, but when I try to execute the `mount` command I get the...
On my yocto distribution I can't mount USB key with
exfat
filesystem.
If I execute the command:
> blkid /dev/sda
/dev/sda: LABEL="my-label" UUID="FC4D-5949" BLOCK_SIZE="512" TYPE="exfat"
So I'm sure that the USB filesystem is exfat
, but when I try to execute the mount
command I get the following error:
> mount /dev/sda /media
mount: /media: unknown filesystem type 'exfat'.
If I execute the command cat /proc/filesystems
([here](https://unix.stackexchange.com/questions/230755/how-can-i-know-if-my-kernel-has-exfat-support/230757#230757) I have found the cat
command) I can find that the list of file systems supported by the kernel is:
> cat /proc/filesystems
nodev sysfs
nodev tmpfs
nodev bdev
nodev proc
nodev cgroup
nodev cgroup2
nodev cpuset
nodev devtmpfs
nodev debugfs
nodev tracefs
nodev securityfs
nodev sockfs
nodev bpf
nodev pipefs
nodev ramfs
nodev hugetlbfs
nodev rpc_pipefs
nodev devpts
ext3
ext2
ext4
vfat
msdos
iso9660
nodev nfs
nodev nfs4
nodev cifs
nodev smb3
nodev autofs
nodev overlay
nodev efivarfs
nodev mqueue
btrfs
exfat
is missing.
Could someone explained me how can I mount an exfat
USB in my yocto distribution?
User051209
(498 rep)
Mar 21, 2025, 05:11 PM
• Last activity: Apr 16, 2025, 02:56 PM
0
votes
0
answers
884
views
How to allow users to mount FUSE/exfat filesystems in fstab without root?
I have a filesystem listed in `/etc/fstab` and I'd like a normal user to be able to mount it. Normally I would just add the `users` option and it will work, however it seems that if the filesystem is mounted by a FUSE helper, this doesn't work: /dev/disk/by-label/SDCARD /mnt/sdcard exfat x-gvfs-hide...
I have a filesystem listed in
/etc/fstab
and I'd like a normal user to be able to mount it.
Normally I would just add the users
option and it will work, however it seems that if the filesystem is mounted by a FUSE helper, this doesn't work:
/dev/disk/by-label/SDCARD /mnt/sdcard exfat x-gvfs-hide,users,noatime,fmask=0133,dmask=0022,codepage=437,iocharset=iso8859-1,uid=1000,gid=985,noauto
Should a normal user try to mount this:
$ mount /mnt/sdcard/
FUSE exfat 1.4.0 (libfuse3)
ERROR: failed to open '/dev/sda1': Permission denied.
It seems that although the users
option allows the mount
command to run, it still only runs as a normal user and not as root.
I don't particularly want to give the normal user direct access to the device, and sudo
will already solve the problem but I am trying to make this work without it. The SD card is used in a device that requires exfat, so reformatting to FAT32 won't work.
Is there any way that will allow this to proceed as it does when using a non-FUSE filesystem, specifically that the device file has the same restrictions but a normal user can mount and unmount the device without root or sudo access?
Malvineous
(7395 rep)
Sep 17, 2023, 11:42 AM
• Last activity: Mar 18, 2025, 01:26 PM
1
votes
1
answers
407
views
Can't mount exfat external hard disk drive: "Volume was not properly unmounted."
I can't mount my HDD anymore. After the last time I used it, I clicked "**Remove safely**" in my file browser, and now I can't read data on it anymore. Here are some diagnostic commands I executed: ```` # fdisk -l Disk /dev/sdb: 465.73 GiB, 500074283008 bytes, 976707584 sectors Disk model: Elements...
I can't mount my HDD anymore. After the last time I used it, I clicked "**Remove safely**" in my file browser, and now I can't read data on it anymore.
Here are some diagnostic commands I executed:
`
# fdisk -l
Disk /dev/sdb: 465.73 GiB, 500074283008 bytes, 976707584 sectors
Disk model: Elements 10A8
Units: sectors of 1 × 512 = 512 bytes
Sector size (logical / physical): 512 bytes / 512 bytes
I/O size (minimum / optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xf2c19c1e
Device Boot Start End Sectors Size Id Type
/dev/sdb1 256 976707583 976707328 465.7G 7 HPFS/NTFS/exFAT
`
# fsck.exfat /dev/sdb1
exfatprogs version : 1.2.2
too long label. 139
failed to read volume label
invalid start cluster of allocate bitmap. 0x34c04c90
failed to read bitmap
failed to verify root directory.
/dev/sdb1: clean. directories 1, files 0
---
# mount /dev/sdb1 /media/myself/Medias/
mount: /media/myself/Medias: can't read superblock at address /dev/sdb1.
dmesg(1) may have more information after failed mount system call.
---
Here are the messages seen in dmesg
when attempting the previous mount command:
`
[ 1439.474346] exFAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 1439.516358] exFAT-fs (sdb1): failed to read sector(0xd57a397000)
[ 1439.516365] exFAT-fs (sdb1): failed to load upcase table
[ 1439.516367] exFAT-fs (sdb1): failed to recognize exfat type
`
I'm trying TestDisk to analyze/repair my HDD, but how can I repair my HDD?
I have no issues booting into my system, this question is about **repairing an external drive**, used for data storage.
Be Chiller Too
(13 rep)
Mar 4, 2025, 01:50 PM
• Last activity: Mar 7, 2025, 12:19 PM
2
votes
2
answers
226
views
mount options of udisks2 (dmask, fmask) are not applied when mounted with udisksctl (exfat fs)
I have a removable SD Card formatted with **exfat** which I would like to mount with `udisksctl`via the `udisks2` mechanism. What I want to do is to replicate a `noexec` option by using `dmask=0002` and `fmask=0113`. I have the following line in `/etc/udisks2/mount_options.conf`: ```bash exfat_defau...
I have a removable SD Card formatted with **exfat** which I would like to mount with
udisksctl
via the udisks2
mechanism.
What I want to do is to replicate a noexec
option by using dmask=0002
and fmask=0113
.
I have the following line in /etc/udisks2/mount_options.conf
:
exfat_defaults=uid=$UID,gid=$GID,iocharset=utf8,errors=remount-ro,dmask=0002,fmask=0113
When I check with a ls -al
, these are not applied. Files have a .rwxr-xr-x
(0755) permission and directories have drwxr-xr-x
(0755).
What do I need to do to make udisks2
accept the configuration file and not ignore it? The options were written according to [the latest storaged.org specifications](http://storaged.org/doc/udisks2-api/latest/mount_options.html) .
All existing questions on https://unix.stackexchange.com do not have a solution. I hope that the collective mind now has better knowledge.
emk2203
(838 rep)
Oct 25, 2024, 04:55 PM
• Last activity: Oct 26, 2024, 06:06 AM
0
votes
0
answers
261
views
rsync causes exFAT filesystem error: Drive set to read-only, fsck fails to resolve
I have an external HDD (15 TB) that I use as a backup storage. Usually I perform the command ``` rsync -aluv /mylocalfolder /mytargetfolder ``` to save my data. But this time Linux sets the file system to "read-only" during the rsync process. Output from dmesg is: ``` [ 2247.831348] exFAT-fs (sdc2):...
I have an external HDD (15 TB) that I use as a backup storage. Usually I perform the command
rsync -aluv /mylocalfolder /mytargetfolder
to save my data. But this time Linux sets the file system to "read-only" during the rsync process.
Output from dmesg is:
[ 2247.831348] exFAT-fs (sdc2): error, found bogus dentry(64528) beyond unused empty group(64526) (start_clu : 37895, cur_clu : 173924)
[ 2247.831351] exFAT-fs (sdc2): Filesystem has been set read-only
Then I tried to fix the file system error with (sdc2 refers to the drive with corrupted file system):
sudo fsck.exfat -p /dev/sdc2
However, the answer I received was:
exfatprogs version : 1.1.0
failed to get stream dentry. 0
/dev/sdc2: checking stopped. directories 11500, files 676064
/dev/sdc2: files corrupted 1, files fixed 0
So I have no idea how to proceed. I want to avoid setting up the whole file system again, because it would take days to copy all the data to the HDD again.
More information about my system:
Linux: 5.10.0-21-amd64
fsck: fsck from util-linux 2.36.1
Any advice on how to fix this error and avoid it in the future is appreciated. Many thanks in advance.
Dabo84
(1 rep)
Oct 2, 2024, 07:01 PM
• Last activity: Oct 4, 2024, 08:43 AM
0
votes
1
answers
48
views
obtain time and information about file/folder name change of exfat file system
If I do a `stat` on a file of a exfat file system, it does provide me the modify/change/creation times. Is there a way to find if the file name has changed? I know there are likely lower level commands to find information about files, locations of names etc, but how do I access these? Where does a e...
If I do a
stat
on a file of a exfat file system, it does provide me the modify/change/creation times.
Is there a way to find if the file name has changed? I know there are likely lower level commands to find information about files, locations of names etc, but how do I access these?
Where does a exfat file system store the name of a file? Is there a way to access where the name of a file is located, and see if the location was updated later than when the file was created?
CarriMegrabyan
(163 rep)
Sep 7, 2024, 10:01 AM
• Last activity: Sep 7, 2024, 11:52 AM
2
votes
2
answers
4663
views
Mac OS cannot mount exFAT disk created on (Ubuntu) linux
I formatted an external hard disk on my ubuntu linux system with exfat. 1. First I installed the exfat utilities: `sudo apt-get install parted exfat-utils` 2. Then I partitioned the disk with a mbr boot record and one primary partition using `parted` 3. Finally I formatted the partition with `mkfs.e...
I formatted an external hard disk on my ubuntu linux system with exfat.
1. First I installed the exfat utilities:
sudo apt-get install parted exfat-utils
2. Then I partitioned the disk with a mbr boot record and one primary partition using parted
3. Finally I formatted the partition with mkfs.exfat -n ShareDisk /dev/sdX1
Then I copied about 300 GB of data onto the disk. Everything worked fine on my linux machine - so far so uneventful.
However, when I plug the disk into my Mac, it says it cannot handle that file system and proposes to initialize or eject it. Now I explicitly chose exfat so the disk would work with any operating system and I have been successfully using exfat formatted disks on my Mac before.
Thawn
(1030 rep)
Aug 2, 2018, 05:56 PM
• Last activity: Aug 19, 2024, 06:59 AM
0
votes
1
answers
288
views
Have drwxrwxrwx permissions on folder, but after mounting to it it becomes drwxr-xr-x which disalows members of the group to write. How do I fix it?
I have a folder under /mnt/ with **drwxrwxrwx** permissions and under root:root I then mount a USB drive (exFAT) to this folder and it becomes **drwxr-xr-x** The issue is that now I cannot scp to that folder via WinSCP since there is no permission for group to write to folder, and I am unable to scp...
I have a folder under /mnt/ with **drwxrwxrwx** permissions and under root:root
I then mount a USB drive (exFAT) to this folder and it becomes **drwxr-xr-x**
The issue is that now I cannot scp to that folder via WinSCP since there is no permission for group to write to folder, and I am unable to scp as root user.
I am mounting the drive via fstab with the following:
/dev/sdb2 /mnt/USB exfat defaults,dmask=0000,umask=0000,rw 0 0
How do I either: 1) Give permission to group write or 2) Mount it as a non root user so that that user can write?
ive attempted chown and chmod to no avail. Chown even when run as root returns **Operation not permitted**
I am able to write to the mount as root user when in SSH (such as mkdir), so the mount is writable, but only by root.
Duxa
(103 rep)
May 24, 2024, 11:57 PM
• Last activity: May 25, 2024, 01:59 AM
4
votes
2
answers
13194
views
ExFat mount permission
I am trying to mount an exfat drive using fstab with read/write permission for both user and group. The line of `etc/fstab` for this drive is: ```sh UUID=5E98-37EA /home/ftagliacarne/data/media exfat defaults,rw,uid=1000,gid=1001,umask=002 0 1 ``` Using these option the drive gets mounted to the cor...
I am trying to mount an exfat drive using fstab with read/write permission for both user and group.
The line of
etc/fstab
for this drive is:
UUID=5E98-37EA /home/ftagliacarne/data/media exfat defaults,rw,uid=1000,gid=1001,umask=002 0 1
Using these option the drive gets mounted to the correct location to the correct user and group, however, the group does not have read-write access. i.e. the permission are set to:
drwxr-xr-x 7 ftagliacarne docker-media 262144 Sep 24 20:40 media
Is there any way of setting the group permission to also have read-write access?
Desired outcome:
drwxrwxr-x 7 ftagliacarne docker-media 262144 Sep 24 20:40 media
Some of the things I tried:
- Setting umask
to 002
- Using chmod
before/after mounting
- Using chmod
recursively on the parent directory
Appreciate any help you can give me.
**Update 1:**
I also tried changing the fstab file to the following:
UUID=5E98-37EA /home/ftagliacarne/data/media exfat defaults,uid=1000,gid=1001,dmask=0002,fmask=0113 0 1
Alas, it still does not work.
**Update 2:**
After having issues at boot due to the configurations above, I changed the /etc/fstab
entry to the following:
UUID=5E98-37EA /home/ftagliacarne/data/media exfat defaults,uid=1000,gid=1001,fmask=0113,dmask=0002,nofail 0 0
And now it works. I suspect the issue was with the pass
option being 1, as changing that to 0 seems to have fixed it. Thank you to everyone who helped!
Ftagliacarne
(143 rep)
Oct 8, 2022, 06:39 PM
• Last activity: May 23, 2024, 10:39 AM
1
votes
1
answers
596
views
Creating a compressed image of an exFAT USB drive using dd
My system is running Ubuntu 22.04.3 LTS. I plug a USB drive into that system. That USB drive (/dev/sdb) contains an Ubuntu installation, mostly in an ext4 partition (/dev/sdb3). That installation fills about 25GB of drive space. With /dev/sdb3 unmounted, I use `sudo zerofree -v /dev/sdb3` to zero fr...
My system is running Ubuntu 22.04.3 LTS. I plug a USB drive into that system. That USB drive (/dev/sdb) contains an Ubuntu installation, mostly in an ext4 partition (/dev/sdb3). That installation fills about 25GB of drive space.
With /dev/sdb3 unmounted, I use
sudo zerofree -v /dev/sdb3
to zero free space on that USB drive. Then I use the following command to create a compressed image:
sudo dd if=/dev/sdb bs=16M conv=sync,noerror | pv | sudo pigz -c > /media/TargetDrive/UbuntuImage.dd.gz
This seems effective. The resulting .gz file weighs only 12GB.
Now I remove that USB drive (/dev/sdb) and replace it with a USB drive containing a YUMI exFAT installation.
When I seek information on this /dev/sdb drive using GParted, I get a warning - "Unable to read the contents of this file system!" - and an indication that exfatprogs
is required for exfat file system support. I install exfatprogs
and restart GParted. That eliminates that warning.
This YUMI exFAT installation fills 43GB on the USB drive. I understand that zerofree
and Microsoft's sdelete -z E:
don't zerofill on exFAT, so I follow advice that seems to recommend the following:
sudo mount -o rw /dev/sdbX /mnt
sudo dd if=/dev/zero of=/mnt/zero_file bs=32M
sudo sync
sudo rm /mnt/zero_file
sudo umount /dev/sdbX
Those commands duly produce and then remove a zero_file whose size does appear to fill empty space. (I saw but did not try this alternative, which was less clear to me: cat > /dev/sdbX/zeros < /dev/zero ; sync ; rm /dev/sdbX/zeros
.)
Then I run substantially the dd
command shown above. This time, dd
and pigz
do not achieve comparable compression. The 43GB exFAT installation is saved in an image file of 42GB.
Granted, the exFAT drive's contents are produced by Windows. But experience with Windows drive imaging software indicates that I should expect substantial compression.
My question: can the dd
command be improved to yield better compression for this exFAT drive?
Note: I seem to have obtained similarly poor compression with an NTFS USB drive, but did not document each step in that case.
Ray Woodcock
(123 rep)
Sep 29, 2023, 12:00 AM
• Last activity: Apr 9, 2024, 07:57 PM
0
votes
0
answers
771
views
Recover exFAT filesystem after bad fsck operation
I spotted a message in dmesg: "Volume was not properly unmounted. Some data may be corrupt. Please run fsck.", and so I ended up running a command: `doas fsck /dev/sda`. This produced some errors, which I promptly ignored: ```text fsck from util-linux 2.38.1 e2fsck 1.47.0 (5-Feb-2023) ext2fs_open2:...
I spotted a message in dmesg: "Volume was not properly unmounted. Some data may be corrupt. Please run fsck.", and so I ended up running a command:
doas fsck /dev/sda
. This produced some errors, which I promptly ignored:
fsck from util-linux 2.38.1
e2fsck 1.47.0 (5-Feb-2023)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
Superblock has an invalid journal (inode 8).
Clear? yes
*** journal has been deleted ***
fsck.ext2: Inode checksum does not match inode while reading bad blocks inode
This doesn't bode well, but we'll try to go on...
This took a LOT of "y"s, so I interrupted fsck and switched over to doas fsck -y /dev/sda
. After this operation, KDE displayed the files as completely empty. At this point I panicked and made a backup (dd if=/dev/sda of=$HOME/Downloads/tmp-backup
), but I'm afraid that the damage was done already. The only other remaining data I have of this drive is the original UUID of partition /dev/sda1
("E7BF-36AA"), and I have the bulk of the commands I executed in a log file.
Is it still possible to recover my data? if so, how?
Ernest Izdebski
(11 rep)
Feb 7, 2024, 12:36 AM
0
votes
1
answers
1038
views
Kernel-mounted vs FUSE-mounted exfat filesystem
I have read that support for the `exfat` filesystem has been incorporated in the Linux kernel since kernel ver 5.4 was released in late 2019 - early 2020. I'm confused about what this means wrt the `exfat-fuse` package. AFAIK, the `exfat-fuse` package existed prior to kernel ver 5.4, and was the *ad...
I have read that support for the
exfat
filesystem has been incorporated in the Linux kernel since kernel ver 5.4 was released in late 2019 - early 2020. I'm confused about what this means wrt the exfat-fuse
package. AFAIK, the exfat-fuse
package existed prior to kernel ver 5.4, and was the *ad-hoc* method for mounting exfat
partitions.
Does incorporation of support for exfat
filesystems mean that the exfat-fuse
package is no longer required? Conversely, if exfat-fuse
is still required, what was meant/accomplished by incorporating exfat
support in the kernel?
A related question is wrt the documentation for this - specifically man mount
, and its FILESYSTEM-SPECIFIC MOUNT OPTIONS
section. There is no mention of a filesystem-specific manual for exfat
, nor is there a "Mount options for exfat" sub-section. Which leads me to ask, *"Where are these mount options for exfat covered?"* Should users rely upon the "Mount options for fat" sub-section in man mount
, or should they rely upon man mount.exfat-fuse
, or on something else?
Seamus
(3772 rep)
Nov 13, 2023, 03:19 AM
• Last activity: Nov 13, 2023, 06:02 PM
3
votes
1
answers
6109
views
Is exfat-utils missing in debian 12?
$ apt-get install exfat-utils exfat-fuse returns as output Reading package lists... Done Building dependency tree... Done Reading state information... Done Package exfat-utils is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or i...
$ apt-get install exfat-utils exfat-fuse
returns as output
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package exfat-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'exfat-utils' has no installation candidate
Tried to install this package but it seems that is missing, is the exfat support made structural inside the kernel already so isn't necessary refer to other utilities to handle this fs ?
do the command for mounting a drive be the same old
mount -t exfat /dev/sda1 /mountpoint/
?
Thanks
user3450548
(3094 rep)
Oct 27, 2023, 07:25 AM
• Last activity: Oct 27, 2023, 08:02 AM
0
votes
0
answers
2104
views
Unable to mount exfat external hardrive in CentOS 7
I am trying to mount an external hard drive (exFAT partition) on my machine (CentOS7). I read that exfat is not natively handled so I installed `exfat-utils` and `fuse-exfat` rpm packages by doing: ```bash yum install -y http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux....
I am trying to mount an external hard drive (exFAT partition) on my machine (CentOS7).
I read that exfat is not natively handled so I installed
exfat-utils
and fuse-exfat
rpm packages by doing:
yum install -y http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
yum install exfat-utils fuse-exfat
I tried to plug again the hard drive on the USB port of my machine but the hard drive does not show up in the File system.
_edit1_ : no new message appear with dmesg
after external hard drive connection
_edit2_ : the hard drive is not damaged/corrupted, a colleague is able to mount it without issue (Ubuntu-22.04)
Do you have any recommendations ?
Thanks for your help !
pklein
(1 rep)
Apr 11, 2023, 10:12 AM
• Last activity: Apr 13, 2023, 07:05 AM
0
votes
0
answers
771
views
Disable write cache for exFAT partitions
For context, I'm on kernel 6.1, so using post-5.7 in-tree exFAT kernel drivers. Currently, if I plug in an exFAT-formatted flash drive and write to it, it will write to a RAM cache and flush to flash slowly. This is not great because to userspace applications (and therefore the user), it seems like...
For context, I'm on kernel 6.1, so using post-5.7 in-tree exFAT kernel drivers.
Currently, if I plug in an exFAT-formatted flash drive and write to it, it will write to a RAM cache and flush to flash slowly. This is not great because to userspace applications (and therefore the user), it seems like writing has completed, until you try to unmount the drive (or more accurately, the partition) and
umount
(or udisksctl
) hangs. What's worse is if the user is unaware of this behaviour and has the bad habit of not unmounting before unplugging, it just causes silent data corruption.
So I would very much like to disable this caching behaviour. From reading man mount
, there's surprisingly no mention of exFAT at all. Under the "Mount options for fat" section, there is the flush
option. But if I understand correctly, this section is not applicable to exFAT because exFAT is handled by the exfat
driver, which is distinct from the vfat
driver which handles the likes of FAT16 and FAT32.
Indeed, if I try to mount my exFAT partition using the flush
option, it simply errors:
# sda1 is my exFAT partition
$ udisksctl mount -b /dev/sda1 -o flush
Error mounting /dev/sda1: GDBus.Error:org.freedesktop.UDisks2.Error.OptionNotPermitted: Mount option `flush' is not allowed
So is disabling write cache simply not supported by the exfat
drivers currently? If no, are there any workarounds?
cyqsimon
(905 rep)
Mar 3, 2023, 08:35 AM
1
votes
2
answers
3615
views
How do I find the filesystem/partition UUID of an ExFAT partition?
All in the title. My problem is, I have an ExFAT partition on my disk that I want to mount using a UUID, but I can't seem to find any information on it. `fdisk -l` says: ``` [logandark@arch-base ~]$ sudo fdisk -l Disk /dev/nvme0n1: 1.75 TiB, 1920383410176 bytes, 3750748848 sectors Disk model: Aura P...
All in the title. My problem is, I have an ExFAT partition on my disk that I want to mount using a UUID, but I can't seem to find any information on it.
fdisk -l
says:
[logandark@arch-base ~]$ sudo fdisk -l
Disk /dev/nvme0n1: 1.75 TiB, 1920383410176 bytes, 3750748848 sectors
Disk model: Aura Pro X2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 97D5F803-8142-4F64-AF7D-0246B6A26DD8
Device Start End Sectors Size Type
/dev/nvme0n1p1 40 409639 409600 200M EFI System
/dev/nvme0n1p2 409640 879315887 878906248 419.1G Apple APFS
/dev/nvme0n1p3 3331319808 3750748159 419428352 200G Microsoft basic data
/dev/nvme0n1p4 879316992 931745791 52428800 25G Linux filesystem
/dev/nvme0n1p5 931745792 933842943 2097152 1G Microsoft basic data
Partition table entries are not in disk order.
I want to automatically mount /dev/nvme0n1p5
in my /etc/fstab
, but I don't want to use /dev/nvme0n1p5
as the identifier.
So, first attempt to find the UUID of that partition:
[logandark@arch-base ~]$ sudo fdisk -l /dev/nvme0n1p5
Disk /dev/nvme0n1p5: 1 GiB, 1073741824 bytes, 2097152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf4f4f4f4
Here are my attempts to mount using that:
[logandark@arch-base ~]$ sudo nano /etc/fstab
[logandark@arch-base ~]$ sudo mount -a
mount: /mnt/transfer: can't find UUID=0xf4f4f4f4.
[logandark@arch-base ~]$ sudo nano /etc/fstab
[logandark@arch-base ~]$ sudo mount -a
mount: /mnt/transfer: can't find UUID=f4f4-f4f4.
[logandark@arch-base ~]$ sudo nano /etc/fstab
[logandark@arch-base ~]$ sudo mount -a
mount: /mnt/transfer: can't find UUID=4f4f-4f4f.
[logandark@arch-base ~]$ sudo nano /etc/fstab
[logandark@arch-base ~]$ sudo mount -a
mount: /mnt/transfer: can't find UUID=4F4F-4F4F.
[logandark@arch-base ~]$ sudo nano /etc/fstab
[logandark@arch-base ~]$ sudo mount -a
mount: /mnt/transfer: can't find UUID=F4F4-F4F4.
Okay, well that was a bust. Let's try to find the UUID other ways.
[logandark@arch-base ~]$ blkid
/dev/nvme0n1p1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="67E3-17ED" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="6646a281-b597-4238-bdb2-7d66f89bc423"
/dev/nvme0n1p2: UUID="b5b8a23d-92b5-4707-b62f-bdbce5cd59f9" BLOCK_SIZE="4096" TYPE="apfs" PARTLABEL="Customer" PARTUUID="08b0857a-52c8-4480-9271-29dc39cee4a5"
/dev/nvme0n1p3: LABEL="BOOTCAMP" BLOCK_SIZE="512" UUID="01D5F4B01A92AFE0" TYPE="ntfs" PARTLABEL="BOOTCAMP" PARTUUID="234ffad0-1c6a-4001-8cf7-1f08b702c8e0"
/dev/nvme0n1p4: LABEL="Arch" UUID="c82b4a77-2ff5-4545-9882-f917a9e2cf4d" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="73602c6d-07dd-a24e-8875-85c752eb62d4"
No entry for nvme0n1p5? Interesting...
[logandark@arch-base ~]$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 15 Aug 26 22:45 01D5F4B01A92AFE0 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Aug 26 22:45 67E3-17ED -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Aug 26 22:45 b5b8a23d-92b5-4707-b62f-bdbce5cd59f9 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Aug 26 22:45 c82b4a77-2ff5-4545-9882-f917a9e2cf4d -> ../../nvme0n1p4
Still nothing.
[logandark@arch-base ~]$ ls -l /dev/disk/by-partuuid/
total 0
lrwxrwxrwx 1 root root 15 Aug 26 22:45 08b0857a-52c8-4480-9271-29dc39cee4a5 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Aug 26 22:45 234ffad0-1c6a-4001-8cf7-1f08b702c8e0 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Aug 26 22:45 6646a281-b597-4238-bdb2-7d66f89bc423 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Aug 26 22:45 73602c6d-07dd-a24e-8875-85c752eb62d4 -> ../../nvme0n1p4
Apparently it's possible for a partition to have no GPT GUID either. Sigh...
I'm out of ideas. How do I find the UUID of this partition? Maybe if there is none, I can assign one? I've searched on Google and DDG and I can't for the life of me find any way to actually assign the partition a GPT GUID either, so I'm completely stumped. (Mostly SEO clickbait that only contains tune2fs or lsblk...)
Edit: I've tried assigning a random GUID using gdisk, no luck. How come that didn't work? Are ExFAT partitions special or something? Does this have something to do with the fact that I created the ExFAT partition with fdisk and not gdisk?
Dev
(167 rep)
Aug 27, 2020, 08:09 AM
• Last activity: Feb 26, 2023, 11:02 PM
Showing page 1 of 20 total questions