Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
42 views
Cannot shrink *unmounted* External drive ntfs partition
I'm relatively new to linux mint(4-5 months in [loving it!]) and I have a 2TB USB 3.0 HDD connected (WD Drive in the photo)[![gparted says no room to shrink partition][1]][1] I'm trying to shrink the main NTFS Partition on said drive, and it says max and min size are the same, therefore i cant chang...
I'm relatively new to linux mint(4-5 months in [loving it!]) and I have a 2TB USB 3.0 HDD connected (WD Drive in the photo)gparted says no room to shrink partition I'm trying to shrink the main NTFS Partition on said drive, and it says max and min size are the same, therefore i cant change it if you need more info drop a comment
super turkey (11 rep)
Jul 24, 2025, 10:43 PM • Last activity: Jul 27, 2025, 06:47 PM
20 votes
4 answers
27628 views
How to auto mount / permanently mount external devices on NixOS
I have a USB stick and an NTFS hard drive partition that I'd want to use in NixOS. On some other distribution, I'd mount it using `ntfs-3g` in `/mnt`. But on NixOS, the directory doesn't exist; I suppose NixOS has some other canonical way and/or place of doing that. In NixOS, how should one set up a...
I have a USB stick and an NTFS hard drive partition that I'd want to use in NixOS. On some other distribution, I'd mount it using ntfs-3g in /mnt. But on NixOS, the directory doesn't exist; I suppose NixOS has some other canonical way and/or place of doing that. In NixOS, how should one set up automounting of external partitions, preferably using configuration.nix?
stefkin (338 rep)
Jun 30, 2015, 06:50 PM • Last activity: Jul 7, 2025, 01:56 PM
0 votes
0 answers
60 views
Partition has vanished
The error I see is: > Unable to access location > > Error mounting /dev/sbd3 at /media/user/PDrive: wrong fs type, bad > option, bad superblock on dev/sb3, missing codepage or helper > program, or other error I think whatever went wrong began when Linux (Gnome Ubuntu) crashed again (as it does all t...
The error I see is: > Unable to access location > > Error mounting /dev/sbd3 at /media/user/PDrive: wrong fs type, bad > option, bad superblock on dev/sb3, missing codepage or helper > program, or other error I think whatever went wrong began when Linux (Gnome Ubuntu) crashed again (as it does all the time). Because the system was then entirely unresponsive in the GUI, it was shut down from the power switch. Clearly a bad idea. On restart one of the partitions has vanished. The PC has 5 data partitions. The boot drive (an ssd) plus 4 more of 2 to 3 TB each (total 10TB of hdd). All 5 are NTFS - because all 5 were originally formatted for Windows. Please help by answering my questions: Q1: What is the best and safest way to shut down a Linux PC if the GUI crashes? Q2: Which O/S is least likely to suffer these accidents of vanishing partitions?, and is written to allow recovery from such disasters. Q3: What can I do, if anything, to recover my partition?, and further analyze the issue? Q4: What tutorials or books can be recommended from the P.O.V. of building a reliable workstation which resists crashes. Q5: What kind of Linux, or other O/S is safest against this kind of (assume software) fault?
user1040323 (101 rep)
Jun 26, 2025, 01:38 PM
7 votes
1 answers
6413 views
iconv module (to use with rsync) to avoid windows-illegal filenames in local NTFS partition
I would like to locally attach an NTFS volume to my unix (Ubuntu) machine, and copy (replicate) some unix directories to it, using rsync, in a way that the result is readable under Windows. I do not care about ownership and permissions. It would be nice if modification dates would be preserved. I on...
I would like to locally attach an NTFS volume to my unix (Ubuntu) machine, and copy (replicate) some unix directories to it, using rsync, in a way that the result is readable under Windows. I do not care about ownership and permissions. It would be nice if modification dates would be preserved. I only need directories and files (symbolic links would be nice, too; but not a problem if they cannot be copied). Two obvious problems are: case (in)sensitivity, and characters that are illegal in Windows filenames. For example, in Linux I can have two files "a" and "A"; I can copy them to the NTFS volume, but in Windows I will be able to access (at most?) one of them. But I am happy to ignore that problem. What I am interested about are illegal characters in Windows filenames, which are ,:,",/,\\,|,?, and * (well, actually also ascii 0-31, but I do not care about that. There might also be problems with files ending in a "."?). I would like rsync to automatically "rename", e.g., a file called "a:" to, say a(COLON), to end up with a legal name (and, ideally, translate a(COLON) back to a:) **Is this possible to have rsync automatically rename files to avoid characters forbidden in Windows?** - As far as I understand rsync can use **iconv** to do such tasks; is there a standard iconv module for windows-filenames? (I briefly looked into programming an own gconv module, but lacking C knowlege this seems too complicated). - I have been told that **rdiff-backup** can do some conversions like that, but the homepage just mentions something being done "automatically", and I am not sure whether a locally mounted NTFS vomlume would trigger a renaming in a reliable way? - I am aware that there is **fuse-posixovl**, but this seems an overkill for my purpose, and also it doesn't seem to be well documented (which characters will be translated in which way? Will all filenames be truncated to 8.3 or whatever? Can I avoid the additional files carrying owner/permission information, which I will not need, etc etc.) - I am aware that I could avoid all these problems by using, e.g., a **tar** file; but this is not what I want. (In particular, I would like in Windows to further replicate from the NTFS volume to another backup partition, copying only the changed files) - I am aware of the "**windows_names**" option when mounting NTFS; but this will prevent creating offending files, not rename them. **Update:** As it seems my question was not quite clear, let me give a more explicit example: For example, WINDOWS-1251 is of no use for me. iconv -f utf-8 -t WINDOWS-1251//TRANSLIT transforms 123 abc ABC äö &::*"\\|?][^/]*' # find stuff containing dot as last character (supposedly bad for windows) find $MYDIR -regex '.*\.' # find stuff that is identical case insensitive find $MYDIR -print0 | sort -z | uniq -diz | tr '\0' '\n' (the last line is from https://unix.stackexchange.com/questions/22870/case-insensitive-search-of-duplicate-file-names/ )
Jakob (171 rep)
Feb 7, 2017, 02:53 PM • Last activity: Jun 24, 2025, 07:10 AM
0 votes
1 answers
73 views
Can you explain why mount -o ro,noload sometimes modifies the filesystem?
This reddit post explains that using `mount -o ro` over NTFS changes the atime of files. They say something like that the kernel is not obliged to honour the ro flag, and to achieve reliable readonly one must mount the device as readonly block device. I'm very confused by this seemingly buggy implem...
This reddit post explains that using mount -o ro over NTFS changes the atime of files. They say something like that the kernel is not obliged to honour the ro flag, and to achieve reliable readonly one must mount the device as readonly block device. I'm very confused by this seemingly buggy implementation! For various filesystems: which method is reliable, in which cases, and why does the standard mount -o ro,noload not always work reliably! And by the way why does mount have the weird syntax mount -o ro rather than a more natural syntax like mount --ro? - "mount -o ro" does not write-protect last access dates on NTFS.
user324831 (113 rep)
Jun 23, 2025, 01:35 PM • Last activity: Jun 23, 2025, 03:46 PM
-2 votes
1 answers
91 views
Any way to grab emails off an old NTFS disk?
This might question might not have a 'legal' answer but I'll ask it anyway. My dad is 15 year dead but I still have the disk out of his old Windows computer. It seems my sister want's me to try to dig up his old emails for a book she's writing. I have the disk mounted on my Linux machine with no tro...
This might question might not have a 'legal' answer but I'll ask it anyway. My dad is 15 year dead but I still have the disk out of his old Windows computer. It seems my sister want's me to try to dig up his old emails for a book she's writing. I have the disk mounted on my Linux machine with no trouble, but will it be possible to grab his emails? I suppose the disk had a PW but that's long gone tho I have a guess. Or is this the sort of thing only the CIA can do?
Ray Andrews (2615 rep)
Jun 22, 2025, 05:00 PM • Last activity: Jun 23, 2025, 05:13 AM
2 votes
2 answers
6045 views
ls: reading directory '.': Input/output error
xubuntu, NTFS. When I trying to open directory with files: username@username-hp:/media/username/dir1/dir2/music$ la ls: reading directory '.': Input/output error Also if I open the directory with the thunar, there is empty inside, but if I open the directory by console it works: username@username-hp...
xubuntu, NTFS. When I trying to open directory with files: username@username-hp:/media/username/dir1/dir2/music$ la ls: reading directory '.': Input/output error Also if I open the directory with the thunar, there is empty inside, but if I open the directory by console it works: username@username-hp:/media/username/dir1/dir2/music$ cd KORN username@username-hp:/media/username/dir1/dir2/music/KORN$ ls -alhis total 92K 12484 4,0K drwxrwxrwx 1 username username 4,0K jan 29 2013 . 7386 88K drwxrwxrwx 1 username username 88K jan 7 17:53 .. 12485 0 drwxrwxrwx 1 username username 0 jan 29 2013 1994 - Korn I have access almost to all files in the directory. For example torrent and media player programs have a troubles of several files in the 'music' directory and I can't access to these files from console: username@username-hp:/media/username/dir1/dir2/music$ cd InternalDirectory bash: cd: InternalDirectory: No such file or directory Aaaaa, help!
MEAT ROLL (21 rep)
May 21, 2018, 07:25 PM • Last activity: Jun 9, 2025, 05:04 PM
7 votes
1 answers
428 views
Recovering data from incomplete ddrescue iso
I've got a 2.5 inch 5200RPM 320G HDD to recover data from. As I've been told, a child has stepped on the laptop and broke it. They gave me the laptop and motherboard seems to be completely fine. There's no any signs of being stepped on. The HDD also seems fine at the first glance. I connected it ove...
I've got a 2.5 inch 5200RPM 320G HDD to recover data from. As I've been told, a child has stepped on the laptop and broke it. They gave me the laptop and motherboard seems to be completely fine. There's no any signs of being stepped on. The HDD also seems fine at the first glance. I connected it over a satausb cable and started a ddrescue (without specifying mapfile). It took 13 days to complete the first stage and go to trimming. At that point, ddrescue told that 99.39% of disk was rescued, but unfortunately, the disk moved and the fragile connection broke, leaving me with I/O errors and this message:
ipos:    8623 MB, non-trimmed:  837763 kB,   current rate:       0 B/s                                                                                                                                         
     opos:    8623 MB, non-scraped:    1095 MB,   average rate:    280 kB/s                                                                                                                                         
non-tried:        0 B,  bad-sector:    2449 kB,     error rate:   13824 B/s                                                                                                                                         
  rescued:  318137 MB,   bad areas:       4784,       run time: 13d  3h 34m                                                                                                                                         
pct rescued:   99.39%, read errors:     45_212, remaining time: 19d 16h 16m                                                                                                                                         
                               time since last successful read:          6s                                                                                                                                         
Trimming failed blocks... (forwards)                                                                                                                                                                                
ddrescue: /dev/sda: Unaligned read error. Is sector size correct?
For now, I've started the ddrescue again on the same outfile, but as far as I know, it will take another 13 days to scan it through. I'm aware that it's a bad idea to connect it over such cable and without mapfile, but I thought that the process will be faster. Anyways, I have a backup outfile for any experiments and I think that 99.39% is pretty much enough, so I'd like to try to mount the file and take a look at the data inside. Unfortunately, I cannot:
[root@foxserver ~]# mount -o loop sda.iso /mnt/iso
mount: /mnt/iso: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
What I tried so far: 1. ntfsfix. It couldn't recover and told me to use chkdsk. 2. fsck. But I couldn't even run it, it just always prints the help message no matter what options I pass. I've got another 2.5 inch 320GB HDD and I could try to write this image to that disk, boot into windows installation and try to chkdsk, but I don't really want to, because I'd like to use free, libre and open source software to do my job.
Leca (117 rep)
May 25, 2025, 09:22 AM • Last activity: Jun 8, 2025, 01:25 PM
1 votes
1 answers
3010 views
cannot delete files / folders in mounted drives
I have dual booted Windows 10 with Ubuntu on it Ubuntu is on a second hdd partition table: /root /dev/sdb2 30gb /home /dev/sdb3 300gb /swap /dev/sdb4 8gb ntfs drive /dev/sdb5 remaining but I am not able to delete files on the NTFS volume with default account, can delete with root permissions. n...
I have dual booted Windows 10 with Ubuntu on it Ubuntu is on a second hdd partition table: /root /dev/sdb2 30gb /home /dev/sdb3 300gb /swap /dev/sdb4 8gb ntfs drive /dev/sdb5 remaining but I am not able to delete files on the NTFS volume with default account, can delete with root permissions. nor can I delete files on the Windows partitions. I have these permissions (ls -l) => -rwxrwxrwx drwxrwxrwx What should I do?
adi_rocks (11 rep)
Jun 8, 2018, 05:51 AM • Last activity: May 15, 2025, 01:06 AM
3 votes
2 answers
6634 views
Can't delete a file at an NTFS partition in Linux
Can't delete a file at an NTFS partition, even tried this in LiveCD, but at the same partition delete other files not a problem. The file couldn't be deleted is a Windows system file, maybe with special NTFS permissions. So how can I do in the right behavior? From CLI: sudo rm '/media/.../AppStudio....
Can't delete a file at an NTFS partition, even tried this in LiveCD, but at the same partition delete other files not a problem. The file couldn't be deleted is a Windows system file, maybe with special NTFS permissions. So how can I do in the right behavior? From CLI: sudo rm '/media/.../AppStudio.Uwp.xr.xml' rm: cannot remove '/media/.../AppStudio.Uwp.xr.xml': No such file or directory From GUI: Error removing file /media/.../AppStudio.Uwp.xr.xml: Permission denied
rospa (51 rep)
Nov 6, 2019, 01:55 PM • Last activity: May 7, 2025, 12:47 PM
2 votes
1 answers
2855 views
ntfs issue with rsync: read errors mapping permission denied (13)
I have an issue when I want to rsync folders from my external backup hard disk to my NAS. I get this error : > read errors mapping permission denied (13) I have root rights; if I want to change the user's right via chmod, nothing changes. With Windows, the owner is changed but the copy doesn't work....
I have an issue when I want to rsync folders from my external backup hard disk to my NAS. I get this error : > read errors mapping permission denied (13) I have root rights; if I want to change the user's right via chmod, nothing changes. With Windows, the owner is changed but the copy doesn't work. S.M.A.R.T tests is OK. The ntfsfix tests provide no error. I tried to made an chdisk from windows with no results. Do you have any idea for repair or a tricks to recover my files ?
user3588719 (21 rep)
Sep 8, 2015, 02:05 PM • Last activity: May 6, 2025, 05:01 PM
0 votes
1 answers
75 views
How to automatically add a mount option for ntfs partitions connected externally (over USB)
I have an HDD used for archival purposes. I had to format it with NTFS to keep it accessible from Windows. I need TRIM support (because the HDD is SMR...) and NTFS can't trim without the discard option for some reason. Can I automatically add the discard option whenever an ntfs partition is mounted?
I have an HDD used for archival purposes. I had to format it with NTFS to keep it accessible from Windows. I need TRIM support (because the HDD is SMR...) and NTFS can't trim without the discard option for some reason. Can I automatically add the discard option whenever an ntfs partition is mounted?
td211 (477 rep)
May 2, 2025, 05:53 AM • Last activity: May 2, 2025, 08:07 AM
9 votes
1 answers
59077 views
fstab mount options for umask, fmask, dmask for ntfs with noexec
I have a ntfs partition and when I mount it with default options in fstab I get for files and directories: rwxrwxrwx = 0777 Obviously ntfs does not support "noexec" option and I do not want 'x' flag to the files and directories. So I'd like to ask what values shall I set to fmask, dmask and umask? W...
I have a ntfs partition and when I mount it with default options in fstab I get for files and directories: rwxrwxrwx = 0777 Obviously ntfs does not support "noexec" option and I do not want 'x' flag to the files and directories. So I'd like to ask what values shall I set to fmask, dmask and umask? When I set umask=0666 /dev/sda3 /ntfsPartition ntfs-3g defaults,noatime,umask=0666,locale=en_US.utf8,errors=ro 0 0 I get d--x--x--x for the mount directory of the partition. I can go the directory: cd /ntfsPartition but I cannot read the content: ls /ntfsPartition ls: cannot open directory '.': Permission denied Thanks in advance!
user252842
Oct 8, 2017, 09:22 PM • Last activity: May 1, 2025, 06:54 AM
3 votes
2 answers
2643 views
rsync vs mtime and ctime
I've been using `rsync` for Android to backup my phone to a remote NTFS filesystem on a Linux system for a while. Recently, the HDD containing the NTFS filesystem has started to fail (or throw "I/O Errors") so I took the opportunity to copy all the files onto a new HDD and new NTFS filesystem. In th...
I've been using rsync for Android to backup my phone to a remote NTFS filesystem on a Linux system for a while. Recently, the HDD containing the NTFS filesystem has started to fail (or throw "I/O Errors") so I took the opportunity to copy all the files onto a new HDD and new NTFS filesystem. In this instance I used the "FastCopy v2.11" tool for Windows. My problem is that when I do an rsync "dry run" I can see that it wants to recopy files which already exist on the remote rsync folder. For example, when I run with "-iv" I get this kind of output: ls -l to check the modified time). Given that I recently copied the remote rsync files from an old NTFS filesystem, the remote file's ctime is different (using ls -lc). Does rsync look at the remote ctime, and if so is there any way I can use rsync, or ntfs-3g to get around this problem?
wombat (31 rep)
Nov 10, 2013, 11:18 PM • Last activity: Apr 30, 2025, 12:08 AM
10 votes
8 answers
9977 views
How to recover “deleted” files in Linux on an NTFS filesystem (files originally from macOS)
My girlfriend has a external hard disk with 10 years+ of photos, documents and more. A lot of these files originate from her old iPhone 5 and her MacBook. The hard disk itself is NTFS Format. Since the disk is so old, it turns into a hazard of data loss (what an irony). As we tried to upload all the...
My girlfriend has a external hard disk with 10 years+ of photos, documents and more. A lot of these files originate from her old iPhone 5 and her MacBook. The hard disk itself is NTFS Format. Since the disk is so old, it turns into a hazard of data loss (what an irony). As we tried to upload all the files into OneDrive to store them safely, we got 1,000s of errors because of invalid file names. I realized that many files started with ._, e.g. ./pic/92 win new/iphone/._IMG_1604.JPG. I don't understand macOS and why files should be named like that, but for sure you can never get them into OneDrive like that. So I decided to hook it to my Raspberry Pi and rename all files with the wrong characters from the command line. After listing the nearly 10,000 files, I ran the following over the whole hard disk. find . -name "._*" | sed -e "p;s/\._//" | xargs -d '\n' -n2 mv Furthermore, I removed some leading whitespace in filenames with zmv. I tried the command in a test environment first and it looked fine. But I didn't check the file size. After my girlfriend connected the hard disk back onto her Mac, all renamed files show a file size of 4KB (empty)! **I screwed it up** and I don't know how. I assume the data is still there, but I somehow screwed the filesystem. Does anybody understand what I did wrong? More importantly, do you see a chance to recover the files? I would appreciate any advice.
LukasH (109 rep)
Mar 6, 2021, 05:15 PM • Last activity: Apr 26, 2025, 09:30 PM
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
1 answers
4868 views
Unsuccessfully resized NTFS partition using Gparted, now it has enlarged partition size but filesystem is not resized/grown
I tried to unmount the NTFS partition, it failed, so I umount -l /dev/sda5 and then tried resizing partition of ~200GB to 309.99GB. It resized in an instant, I was instructed to restart system by Gparted. It seems now the partition size was resized to 309.99GB, but the filesystem shows ~200GB with 1...
I tried to unmount the NTFS partition, it failed, so I umount -l /dev/sda5 and then tried resizing partition of ~200GB to 309.99GB. It resized in an instant, I was instructed to restart system by Gparted. It seems now the partition size was resized to 309.99GB, but the filesystem shows ~200GB with 108GB unallocated. I still can mount and access all files. [These are my partitions](https://i.sstatic.net/gkJUf.png) I Check Partition on gparted, this is the error I get, GParted 0.25.0 --enable-libparted-dmraid --enable-online-resize Libparted 3.2 Check and repair file system (ntfs) on /dev/sda5 00:00:01 ( ERROR ) calibrate /dev/sda5 00:00:00 ( SUCCESS ) path: /dev/sda5 (partition) start: 1128448 end: 651218943 size: 650090496 (309.99 GiB) check file system on /dev/sda5 for errors and (if possible) fix them 00:00:01 ( ERROR ) ntfsresize -i -f -v /dev/sda5 00:00:01 ( ERROR ) ntfsresize v2015.3.14AR.1 (libntfs-3g) Device name : /dev/sda5 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 214748361216 bytes (214749 MB) Current device size: 332846333952 bytes (332847 MB) Checking for bad sectors ... Checking filesystem consistency ... Inode is corrupt (523): Input/output error Inode is corrupt (1179): Input/output error Inode is corrupt (1624): Input/output error Inode is corrupt (1986): Input/output error Inode is corrupt (2441): Input/output error Inode is corrupt (2454): Input/output error Inode is corrupt (3067): Input/output error Inode is corrupt (3178): Input/output error Inode is corrupt (3667): Input/output error Inode is corrupt (3776): Input/output error Inode is corrupt (6049): Input/output error Inode is corrupt (6751): Input/output error Inode is corrupt (7178): Input/output error Inode is corrupt (7513): Input/output error Inode is corrupt (8199): Input/output error Inode is corrupt (8240): Input/output error Inode is corrupt (8249): Input/output error Inode is corrupt (8259): Input/output error Inode is corrupt (8748): Input/output error Inode is corrupt (8996): Input/output error Inode is corrupt (10241): Input/output error Inode is corrupt (11164): Input/output error Inode is corrupt (11392): Input/output error 100.00 percent completed Accounting clusters ... Cluster accounting failed at 9213941 (0x8c97f5): extra cluster in $Bitmap Cluster accounting failed at 12913555 (0xc50b93): extra cluster in $Bitmap Cluster accounting failed at 12913556 (0xc50b94): extra cluster in $Bitmap Cluster accounting failed at 12997529 (0xc65399): extra cluster in $Bitmap Cluster accounting failed at 14930776 (0xe3d358): extra cluster in $Bitmap Cluster accounting failed at 18002283 (0x112b16b): extra cluster in $Bitmap Cluster accounting failed at 18006376 (0x112c168): extra cluster in $Bitmap Cluster accounting failed at 18057343 (0x113887f): extra cluster in $Bitmap Cluster accounting failed at 18057344 (0x1138880): extra cluster in $Bitmap Cluster accounting failed at 20102360 (0x132bcd8): extra cluster in $Bitmap Cluster accounting failed at 20336434 (0x1364f32): extra cluster in $Bitmap Cluster accounting failed at 20342801 (0x1366811): extra cluster in $Bitmap Cluster accounting failed at 20363408 (0x136b890): extra cluster in $Bitmap Cluster accounting failed at 22761869 (0x15b518d): extra cluster in $Bitmap Cluster accounting failed at 23186158 (0x161caee): extra cluster in $Bitmap Cluster accounting failed at 23190248 (0x161dae8): extra cluster in $Bitmap Cluster accounting failed at 23229588 (0x1627494): extra cluster in $Bitmap Cluster accounting failed at 23286726 (0x16353c6): extra cluster in $Bitmap Cluster accounting failed at 25225024 (0x180e740): extra cluster in $Bitmap Cluster accounting failed at 25229120 (0x180f740): extra cluster in $Bitmap Cluster accounting failed at 25331016 (0x1828548): extra cluster in $Bitmap Cluster accounting failed at 25331017 (0x1828549): extra cluster in $Bitmap Cluster accounting failed at 26032472 (0x18d3958): extra cluster in $Bitmap Cluster accounting failed at 26032473 (0x18d3959): extra cluster in $Bitmap Cluster accounting failed at 26032474 (0x18d395a): extra cluster in $Bitmap Cluster accounting failed at 26032475 (0x18d395b): extra cluster in $Bitmap Cluster accounting failed at 26032476 (0x18d395c): extra cluster in $Bitmap Cluster accounting failed at 26872264 (0x19a09c8): extra cluster in $Bitmap Cluster accounting failed at 31681239 (0x1e36ad7): extra cluster in $Bitmap Cluster accounting failed at 31869833 (0x1e64b89): extra cluster in $Bitmap Cluster accounting failed at 31869834 (0x1e64b8a): extra cluster in $Bitmap Cluster accounting failed at 31890301 (0x1e69b7d): extra cluster in $Bitmap Cluster accounting failed at 33387641 (0x1fd7479): extra cluster in $Bitmap Cluster accounting failed at 33387642 (0x1fd747a): extra cluster in $Bitmap Cluster accounting failed at 33387643 (0x1fd747b): extra cluster in $Bitmap Cluster accounting failed at 33387644 (0x1fd747c): extra cluster in $Bitmap Cluster accounting failed at 34055504 (0x207a550): extra cluster in $Bitmap Cluster accounting failed at 34059600 (0x207b550): extra cluster in $Bitmap Cluster accounting failed at 34171512 (0x2096a78): extra cluster in $Bitmap Cluster accounting failed at 35942016 (0x2246e80): extra cluster in $Bitmap Cluster accounting failed at 35946112 (0x2247e80): extra cluster in $Bitmap Cluster accounting failed at 36806769 (0x231a071): extra cluster in $Bitmap Cluster accounting failed at 37213527 (0x237d557): extra cluster in $Bitmap Cluster accounting failed at 37217624 (0x237e558): extra cluster in $Bitmap Cluster accounting failed at 37245163 (0x23850eb): extra cluster in $Bitmap Cluster accounting failed at 38389268 (0x249c614): extra cluster in $Bitmap Cluster accounting failed at 39450765 (0x259f88d): extra cluster in $Bitmap Cluster accounting failed at 39454856 (0x25a0888): extra cluster in $Bitmap Cluster accounting failed at 39497605 (0x25aaf85): extra cluster in $Bitmap Cluster accounting failed at 39497606 (0x25aaf86): extra cluster in $Bitmap Cluster accounting failed at 41476236 (0x278e08c): extra cluster in $Bitmap Cluster accounting failed at 41480688 (0x278f1f0): extra cluster in $Bitmap Cluster accounting failed at 41622533 (0x27b1c05): extra cluster in $Bitmap Cluster accounting failed at 41626624 (0x27b2c00): extra cluster in $Bitmap Cluster accounting failed at 41653232 (0x27b93f0): extra cluster in $Bitmap Cluster accounting failed at 42148141 (0x283212d): extra cluster in $Bitmap Cluster accounting failed at 43912656 (0x29e0dd0): extra cluster in $Bitmap Cluster accounting failed at 47597952 (0x2d64980): extra cluster in $Bitmap Cluster accounting failed at 47602048 (0x2d65980): extra cluster in $Bitmap Cluster accounting failed at 47610240 (0x2d67980): extra cluster in $Bitmap Cluster accounting failed at 47774080 (0x2d8f980): extra cluster in $Bitmap Cluster accounting failed at 47778176 (0x2d90980): extra cluster in $Bitmap Cluster accounting failed at 47786368 (0x2d92980): extra cluster in $Bitmap Cluster accounting failed at 47839879 (0x2d9fa87): extra cluster in $Bitmap Cluster accounting failed at 47843976 (0x2da0a88): extra cluster in $Bitmap Cluster accounting failed at 47852168 (0x2da2a88): extra cluster in $Bitmap Cluster accounting failed at 47884936 (0x2daaa88): extra cluster in $Bitmap Cluster accounting failed at 47889032 (0x2daba88): extra cluster in $Bitmap Cluster accounting failed at 47897224 (0x2dada88): extra cluster in $Bitmap Cluster accounting failed at 48389360 (0x2e25cf0): extra cluster in $Bitmap Cluster accounting failed at 48389361 (0x2e25cf1): extra cluster in $Bitmap Cluster accounting failed at 48389362 (0x2e25cf2): extra cluster in $Bitmap Cluster accounting failed at 48389363 (0x2e25cf3): extra cluster in $Bitmap Cluster accounting failed at 48389364 (0x2e25cf4): extra cluster in $Bitmap Cluster accounting failed at 48389365 (0x2e25cf5): extra cluster in $Bitmap Cluster accounting failed at 48389366 (0x2e25cf6): extra cluster in $Bitmap Cluster accounting failed at 48389367 (0x2e25cf7): extra cluster in $Bitmap Cluster accounting failed at 48389368 (0x2e25cf8): extra cluster in $Bitmap Cluster accounting failed at 48389369 (0x2e25cf9): extra cluster in $Bitmap Cluster accounting failed at 48389370 (0x2e25cfa): extra cluster in $Bitmap Cluster accounting failed at 48415965 (0x2e2c4dd): extra cluster in $Bitmap Cluster accounting failed at 49827041 (0x2f84ce1): extra cluster in $Bitmap Cluster accounting failed at 49827042 (0x2f84ce2): extra cluster in $Bitmap Cluster accounting failed at 49827043 (0x2f84ce3): extra cluster in $Bitmap Cluster accounting failed at 49827044 (0x2f84ce4): extra cluster in $Bitmap Cluster accounting failed at 49827045 (0x2f84ce5): extra cluster in $Bitmap Cluster accounting failed at 49827046 (0x2f84ce6): extra cluster in $Bitmap Cluster accounting failed at 49827047 (0x2f84ce7): extra cluster in $Bitmap Cluster accounting failed at 50553627 (0x303631b): extra cluster in $Bitmap Cluster accounting failed at 50764942 (0x3069c8e): extra cluster in $Bitmap Cluster accounting failed at 50811033 (0x3075099): extra cluster in $Bitmap Cluster accounting failed at 50832504 (0x307a478): extra cluster in $Bitmap Cluster accounting failed at 50836600 (0x307b478): extra cluster in $Bitmap Filesystem check failed! Totally 93 cluster accounting mismatches. ERROR: NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE! The usage of the /f parameter is very IMPORTANT! No modification was and will be made to NTFS by this software until it gets repaired. ======================================== If I backup all files on that disk and delete to create new partition, will it go corrupt? PS. I don't have access to Windows
user1930693 (1 rep)
Mar 7, 2017, 08:36 AM • Last activity: Apr 20, 2025, 01:07 AM
1 votes
1 answers
81 views
In a yocto distribution the ntfs file system of a USB key is mounted read-only?
To enable the mount of USB key formatted with file system `ntfs` I have created the following configuration fragment file: ``` CONFIG_NTFS_FS=m # CONFIG_NTFS_DEBUG is not set CONFIG_NTFS_RW=y ``` This file sets the parameters `CONFIG_NTFS_FS` and `CONFIG_NTFS_RW` used by the kernel build. To compile...
To enable the mount of USB key formatted with file system ntfs I have created the following configuration fragment file:
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
CONFIG_NTFS_RW=y
This file sets the parameters CONFIG_NTFS_FS and CONFIG_NTFS_RW used by the kernel build. To compile the kernel I have used the command:
bitbake -C compile virtual/kernel
With this modification of the kernel config my distribution is able to execute the mount of an ntfs USB by the command:
> mount /dev/sda /media/sda
where /dev/sda is the device associated with the USB key, and /media/sda is the mount point. The file system is mounted but read-only. This is showed by the following command:
# mount | grep media
/dev/sda on /media/sda type ntfs (ro,relatime,uid=0,gid=0,fmask=0177,dmask=077,nls=iso8859-1,errors=continue,mft_zone_multiplier=1)
In the fragment file I have set CONFIG_NTFS_RW=y, so why the ntfs file system of a USB key is mounted read-only? ___ **EDIT** If I execute the command dmesg I obtain the following message:
> dmesg
...
(device sda): load_system_files(): Volume is dirty.  Mounting read-only.  Run chkdsk and mount in Windows.
I have followed the info written in the previous message: - I have inserted the USB on a Windows system - The Windows system has executed a scanfix of the USB After that I have execute correctly the mount R/W of the USB on my Linux system:
> mount -t ntfs /dev/sda /media/sda
> mount | grep media
/dev/sda on /media/sda type ntfs (rw,relatime,uid=0,gid=0,fmask=0177,dmask=077,nls=iso8859-1,errors=continue,mft_zone_multiplier=1)
At this point if I try to write on the USB I get the following error:
> touch /media/sda/write_ntfs.txt
touch: cannot touch '/media/sda/write_ntfs.txt': Permission denied
The same if I try to change the permission of a file present on the USB:
> chmod 777 /media/sda/filename.csv
chmod: changing permissions of '/media/sda/filename.csv': Operation not supported
So, despite the output of the command mount, seems that the mount of the USB is yet read-only!
User051209 (498 rep)
Mar 24, 2025, 05:50 PM • Last activity: Apr 16, 2025, 12:46 PM
1 votes
2 answers
4095 views
How to mount an NTFS partition writable for a non-root user?
I am using Debian 8.8 and am using ntfs-3g to mount an NTFS partition in `/etc/fstab`. Here is my entry: /dev/sdc1 /mnt/data_backup ntfs-3g rw,uid=1000,gid=1000,dmask=0002,fmask=0003 0 0 It is fine for my account `userA` to read and write the partition. However, my workstation is open to another `us...
I am using Debian 8.8 and am using ntfs-3g to mount an NTFS partition in /etc/fstab. Here is my entry: /dev/sdc1 /mnt/data_backup ntfs-3g rw,uid=1000,gid=1000,dmask=0002,fmask=0003 0 0 It is fine for my account userA to read and write the partition. However, my workstation is open to another userB which is not in the root group. Is there any way to make the partition writable for the non-root userB? And the best result will be that userB can only append but cannot remove the files in the partition. An FTP solution is also acceptable. Thanks!
purplezzh (33 rep)
Jul 10, 2017, 03:09 AM • Last activity: Apr 14, 2025, 05:05 PM
0 votes
0 answers
126 views
How to mount NTFS3 drives/partitions which I have full access to?
I have two operating systems on my computer: one Arch Linux and one Windows. I use NTFS3 and Kernel 6.10. ``` Operating System: Arch Linux KDE Plasma Version: 6.1.4 KDE Frameworks Version: 6.5.0 Qt Version: 6.7.2 Kernel Version: 6.10.7-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 8 ×...
I have two operating systems on my computer: one Arch Linux and one Windows. I use NTFS3 and Kernel 6.10.
Operating System: Arch Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: LENOVO
Product Name: 20WKA000CD
System Version: ThinkPad X13 Gen 2i
I want to mount my Windows C: and D: partitions on my Linux OS, and I want them to be visible every time I start my computer. I edited my fstab as follows:
/dev/nvme0n1p3          /home/firestar/C        ntfs3   uid=1000,gid=1000,umask=0000             0 0
/dev/nvme0n1p5          /home/firestar/D        ntfs3   uid=1000,gid=1000,umask=0000             0 0
but there are still some directories like C:/User/Firestar/xxxx is still non-writable:
(base) [firestar@Archlinux Firestar]$ ls -l
total 12648
drwxr-xr-x 1 firestar firestar        0 May  1 03:53  AppData
lrwxrwxrwx 1 firestar firestar       33 May  1 03:53 'Application Data' -> ./../../Users/Firestar/AppData/Roaming
dr-xr-xr-x 1 firestar firestar        0 May  1 11:53  Contacts
lrwxrwxrwx 1 firestar firestar       61 May  1 03:53  Cookies -> ./../../Users/Firestar/AppData/Local/Microsoft/Windows/INetCookies
dr-xr-xr-x 1 firestar firestar   212992 Sep  2 22:21  Desktop
dr-xr-xr-x 1 firestar firestar     8192 Sep  2 22:05  Documents
dr-xr-xr-x 1 firestar firestar    20480 Sep  2 22:19  Downloads
dr-xr-xr-x 1 firestar firestar        0 May  1 11:53  Favorites
-rwxr-xr-x 1 firestar firestar   354240 Jul  6 16:33  hsi_spectrum_20141020_155000.fits
-rwxr-xr-x 1 firestar firestar    48960 Jul  6 16:33  hsi_srm_20141020_155000.fits
drwxr-xr-x 1 firestar firestar        0 Jul  5 22:47  IDLWorkspace
drwxr-xr-x 1 firestar firestar     4096 Sep  4 10:43  IntelGraphicsProfiles
drwxr-xr-x 1 firestar firestar        0 Jul  6 12:13  JHelioviewer-SWHV
dr-xr-xr-x 1 firestar firestar        0 May  1 11:53  Links
lrwxrwxrwx 1 firestar firestar       31 May  1 03:53 'Local Settings' -> ./../../Users/Firestar/AppData/Local
dr-xr-xr-x 1 firestar firestar        0 May  1 11:53  Music
lrwxrwxrwx 1 firestar firestar       27 May  1 03:53 'My Documents' -> ./../../Users/Firestar/Documents
lrwxrwxrwx 1 firestar firestar       69 May  1 03:53  NetHood -> './../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Network Shortcuts'
-rwxr-xr-x 1 firestar firestar 10223616 Sep  4 10:43  NTUSER.DAT
-rwxr-xr-x 1 firestar firestar    65536 May  1 14:36  NTUSER.DAT{a2332f18-cdbf-11ec-8680-002248483d79}.TM.blf
-rwxr-xr-x 1 firestar firestar   524288 May  1 03:53  NTUSER.DAT{a2332f18-cdbf-11ec-8680-002248483d79}.TMContainer00000000000000000001.regtrans-ms
-rwxr-xr-x 1 firestar firestar   524288 May  1 03:53  NTUSER.DAT{a2332f18-cdbf-11ec-8680-002248483d79}.TMContainer00000000000000000002.regtrans-ms
-rwxr-xr-x 1 firestar firestar        0 May  1 03:53  ntuser.dat.LOG1
-rwxr-xr-x 1 firestar firestar   950272 May  1 03:53  ntuser.dat.LOG2
-rwxr-xr-x 1 firestar firestar       20 May  1 03:53  ntuser.ini
dr-xr-xr-x 1 firestar firestar     4096 Sep  4 10:43  OneDrive
drwxr-xr-x 1 firestar firestar        0 Jul  5 22:47  Perforce
dr-xr-xr-x 1 firestar firestar     4096 Sep  2 22:21  Pictures
lrwxrwxrwx 1 firestar firestar       69 May  1 03:53  PrintHood -> './../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Printer Shortcuts'
lrwxrwxrwx 1 firestar firestar       58 May  1 03:53  Recent -> ./../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Recent
dr-xr-xr-x 1 firestar firestar        0 May  1 11:53 'Saved Games'
dr-xr-xr-x 1 firestar firestar     4096 May  1 12:09  Searches
lrwxrwxrwx 1 firestar firestar       58 May  1 03:53  SendTo -> ./../../Users/Firestar/AppData/Roaming/Microsoft/Windows/SendTo
lrwxrwxrwx 1 firestar firestar       61 May  1 03:53  Templates -> ./../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Templates
dr-xr-xr-x 1 firestar firestar        0 Jun 13 22:11  Videos
lrwxrwxrwx 1 firestar firestar       62 May  1 03:53  「开始」菜单 -> './../../Users/Firestar/AppData/Roaming/Microsoft/Windows/Start Menu'
(base) [firestar@Archlinux Firestar]$
Also, I have a NTFS USB drive, and it is not in the fstab, it has also 2 directories which are non-writable and I don't know why:
drwxr-xr-x 1 firestar firestar   4096 May  1 11:55 '$RECYCLE.BIN'
drwxr-xr-x 1 firestar firestar   4096 Apr 21 23:57  Astronomy
drwxr-xr-x 1 firestar firestar  49152 Jun 23 14:48  Books
drwxr-xr-x 1 firestar firestar   4096 May  1 10:38  Documents
dr-xr-xr-x 1 firestar firestar   4096 Jul 12  2023  Games
drwxr-xr-x 1 firestar firestar   4096 Dec  8  2022  Hannah
drwxr-xr-x 1 firestar firestar   8192 Jan 19  2021  HF
drwxr-xr-x 1 firestar firestar   4096 Feb  3  2024  Installers
drwxr-xr-x 1 firestar firestar   8192 Aug 26  2023  PKU
drwxr-xr-x 1 firestar firestar   4096 Jan 31  2024 'PKU Courses'
drwxr-xr-x 1 firestar firestar   4096 Jun 18  2020  SS
drwxr-xr-x 1 firestar firestar   4096 Feb 20  2024 'System Volume Information'
drwxr-xr-x 1 firestar firestar      0 Jan 16  2022  Treasures
drwxr-xr-x 1 firestar firestar   4096 Jul 14  2022  Wallpapers
dr-xr-xr-x 1 firestar firestar  20480 Feb  3  2024  小提琴谱
drwxr-xr-x 1 firestar firestar   4096 May  1 00:54  照片
drwxr-xr-x 1 firestar firestar  16384 Dec 21  2023  电影和视频
drwxr-xr-x 1 firestar firestar 655360 Oct 22  2022  音乐
How to mount NTFS3 drives/partitions which I have full access to? Like, how to write my fstab or default mount options? I have no fast-boot nor bitlocker.
Firestar-Reimu (181 rep)
Sep 5, 2024, 02:31 PM • Last activity: Mar 25, 2025, 04:15 PM
Showing page 1 of 20 total questions