为什么我的NTFS分区挂载为只读?

直到最近,我的Windows分区(C:)和数据分区(E:)都可以以读写方式挂载。现在似乎两者都只能以只读方式挂载。
GParted调整大小(错误)
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda4
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 86207623680 bytes (86208 MB)
Current device size: 86207627264 bytes (86208 MB)
New volume size : 78662066688 bytes (78663 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 62126 MB (72.1%)
Collecting resizing constraints ...
Needed relocations : 1606868 (6582 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
ERROR: Extended record needed (1032 > 1024), not yet supported!
Please try to free less space.

chkdsk 输出:

Checking file system on E:
The type of the file system is NTFS.
Volume label is Data.

A disk check has been scheduled.
Windows will now check the disk.                         
  99482 file records processed.
  495 large file records processed.                     
  0 bad file records processed.                         
  0 EA records processed.                               
  0 reparse records processed.                          
  104412 index entries processed.                       
  0 unindexed files processed.                          
  99482 security descriptors processed.                 
  2466 data files processed.                            

CHKDSK is verifying Usn Journal...
  4479208 USN bytes processed.                                     
Usn Journal verification completed.
Windows has checked the file system and found no problems.

84187132 KB total disk space.
  60479688 KB in 69969 files.
     15520 KB in 2467 indexes.
         0 KB in bad sectors.
    174336 KB in use by the system.
     65536 KB occupied by the log file.
  23517588 KB available on disk.
      4096 bytes in each allocation unit.
  21046783 total allocation units on disk.
   5879397 allocation units available on disk.

Internal Info:
9a 84 01 00 00 1b 01 00 fc 1a 01 00 00 00 00 00  ................
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
42 00 00 00 52 73 5c 77 b0 e7 1d 00 b0 df 1d 00  B...Rs\w........

fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda5 during installation
UUID=8213cc89-2438-41b9-899f-13b4c5b299af /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=45873767-d9ae-4f0c-baab-ffc2726ac24e none            swap    sw              0       0

在GParted、GSmartControl和ntfsfix中检查了驱动器,都顺利完成,没有任何变化。

分区

dev/sda1 NTFS WinRE
dev/sda2 NTFS Windows C:
dev/sda3 扩展
dev/sda4 NTFS Data E:
dev/sda5 EXT4 Ubuntu
dev/sda6 linux-swap

我正在寻找一个解释:

Internal Info:
9a 84 01 00 00 1b 01 00 fc 1a 01 00 00 00 00 00  ................
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
42 00 00 00 52 73 5c 77 b0 e7 1d 00 b0 df 1d 00  B...Rs\w........

Resetting $LogFile ... (this might take a while)
Relocating needed data ...
ERROR: Extended record needed (1032 > 1024), not yet supported!
Please try to free less space.

你能向分区写入数据吗?如果不能,请阅读下面的回答。你是在尝试调整大小,但无法成功,所以假设它是只读的吗?还是你实际上是想要向驱动器写入数据? - Thomas Ward
9个回答

发生在我身上,我所做的只是
sudo ntfsfix /dev/sdxX # where x is HDD and X is drive number, in my case it was /dev/sda1

它将删除Windows创建的任何日志文件。
对我来说有效。

3这感觉很危险。虽然通过在Linux中删除Windows缓存文件可以使磁盘再次可写,但当你重新启动进入Windows时会发生什么呢? - Paul
非常感谢。我有一块第二个硬盘,在Windows中使用过,但在Ubuntu下无法以读/写方式挂载。这个问题已经解决了。 - wraith3690 001
5在运行ntfsfix之后,我不得不卸载并重新挂载。 - deFreitas
1@Paul 我的Windows 10启动正常了,这个问题解决了。 - Klesun
3谢谢,正如德弗雷塔斯所说,amount/mount之后的操作非常有效。不需要重新启动。非常感谢。 - Nik Burns
我使用这种方法来处理那些不包含Windows本身的驱动器,对于Windows本身,我需要关闭快速启动和休眠功能,但对于其他驱动器,我可以轻松使用这种方法,而且效果很好。 - SdSaati
太棒了,效果非常好;谢谢! - fitojb
+1 是个不错的解决方案,如果你关闭Windows然后启动Linux/Ubuntu。 - Peyman Majidi
对我来说有效。 - bsesic
Windows不肯“安全移除硬件”,所以我拔掉了硬盘,然后在Linux中热插拔了它。遇到了同样的问题,使用ntfsfix命令解决了它。 - synkro

执行完全关闭Windows将允许Ubuntu完全挂载驱动器。可以通过在“电源”菜单上按下“关机”按钮时按住SHIFT键来实现这一目标。

5如果Windows分区消失了,这个能做吗?换句话说,如果Windows不再安装,我能做到这个吗? - epotter
1不,这个技巧只有在你安装了Windows系统时才有用,如果你没有安装Windows系统,就没有“关机”按钮可以点击。 - schulwitz
2谢谢,这对我有用......在按照页面上的说明之前,我的Windows 10分区是只读的,但现在不是了。 - waqar
25为了避免每次关闭Windows时都需要按住Shift键(在双启动配置中很容易忘记),您可以完全禁用休眠功能,这也会禁用混合启动,从而解决此问题。在进入Windows后,打开提升的命令提示符("以管理员身份运行"),然后输入powercfg /h off并按Enter键。然后,重新启动进入Ubuntu,NTFS驱动器将可写入。如果您不想完全禁用休眠功能,您可以使用控制面板禁用混合启动(我找不到命令行方法);请参考答案中的链接获取指南。 - Ben Johnson
适用于我的Windows 10+Ubuntu 18.04双系统启动。谢谢! - Negrito
@epotter看看hammad-farooq的答案。 - Klesun
@BenJohnson 做得很好。这应该是独立的答案。 - Ian
schulwitz, @Ben Johnson: 太棒了!我有win10,ubuntu18.04LTS双系统安装在ntfs分区上,而“Windows已休眠”正是问题所在。非常好的答案! - John Doe
完全关闭以前是有效的,但现在不起作用了。也许标志没有被移除。 - bsesic
这在Windows 11中不起作用。 - Jonah
@Jonah Windows 11的关机类似于休眠状态。重新启动是必要的。 - kelalaka

系统可能没有安装用于写入NTFS分区的文件。
在终端中尝试以下命令:
sudo apt-get remove ntfsprogs && sudo apt-get install ntfs-3g

这将在系统上删除ntfsprogs(如果存在),并安装ntfs-3g,这样您就可以正确地写入NTFS分区。
然后重新启动系统,并尝试以写入方式打开NTFS驱动器。现在您应该能够写入NTFS驱动器了。

运行该命令会导致系统提示我删除ntfsprogs,我查了一下,似乎没有关于写入ntfs的内容,所以我将其删除了。这似乎解决了问题,我想我是在寻求在Ubuntu下运行磁盘检查时安装了ntfsprogs,因为有10个坏扇区。谢谢! - Lewis Goddard
1是的。不过,你的问题有点误导,因为附加的数据。附加的数据通常并不能解释为什么你无法写入驱动器 - 相反,我们可以看到你在尝试调整驱动器大小。 - Thomas Ward
1在安装ntfs-3g时移除ntfsprogs解决了只读问题。 - Luis Alvarado

如果在双启动 Windows 10 的情况下发生这种情况,您需要取消 控制面板 --> 电源选项 --> 选择电源按钮所做的事 中的启用快速启动,然后关闭电脑,而不是重新启动。一旦正确完成,您将能够正常访问 NTFS 分区并具有读/写权限。

这是由于 Windows 10 更新将其重置为默认的快速启动模式(一种休眠形式)导致的。

enter image description here


2+1 这解决了我的问题。 - lanenok
3这是更干净的方式,不需要修复,只需禁用一个配置。干得好。 - mancvso
完全就是我的情况,这解决了我的问题!非常感谢你! - kohane15
这很奇怪,我之前做了这个,几个星期都正常运行,但现在突然不工作了。 - Fathy
1这应该是被接受的答案。在Windows 11中仍然有效。 - Jonah
点赞!最佳解决方案。 - undefined

按照以下步骤进行操作:
  1. 打开终端并输入:

    $ blkid
    
  2. 找到分区(如果您只有一个硬盘,则为/dev/sdax,另一个硬盘将为sdbx)。

  3. 当您要修复的分区是/dev/sda5时,请在挂载时卸载它:

    $ sudo umount /dev/sda5
    
  4. 运行以下命令,其中a是硬盘的位置,5是分区的位置:

    $ sudo ntfsfix /dev/sda5
    
这对我有用!

在双(多)启动系统中,当您尝试从Windows操作系统注销时,为了实现快速启动,Windows会通过锁定写访问来保留对驱动器的所有权。因此,在其他操作系统中,Windows特定的分区将被挂载为只读。 使用“禁用快速启动”功能,我们可以停止这个操作。
但是有时候非管理员用户由于组策略限制无法更改“禁用快速启动”功能。
下面的解决方案将适用于所有情况。
登录到Windows,关闭所有已打开的窗口(如果有),然后从运行对话框执行以下操作。
shutdown /f /r /t 0

/f 强制关闭正在运行的应用程序,而不提醒用户。
/r 完全关闭并重新启动计算机。
/t xxx 设置关机前的超时时间为xxx秒。

在普通用户的cmd.exe中无法运行。我需要使用以管理员身份运行的cmd.exe。那么这个答案有什么意义呢? - rofrol

只有在万不得已的情况下才尝试以下解决方案。
我尝试了所有的解决方案,但都没有起作用。这可能是由于Windows磁盘错误(坏扇区)和未正确关闭造成的。
对我来说,唯一有效的解决方案是从NVMe驱动器中删除所有内容。请注意,这将清除存储/NVMe驱动器上的所有数据。
apt-get install nvme-cli

要删除所有内容或格式化驱动器,我使用了一个叫做"nvme-format"的工具。 http://manpages.ubuntu.com/manpages/cosmic/man1/nvme-format.1.html
 nvme format /dev/nvmeXY # where nvmeXY is device name

注意:这将从驱动器中删除所有内容。

1我的电脑电池在使用Windows时耗尽后也发生了同样的问题。重新启动到Windows然后再切换回Linux解决了这个问题。 - krim
没错。这个(重新启动到Windows并正确关机)解决方案是由@schulwitz提供的。 - Kaushal

如果您使用的是固态硬盘 (SSD),

请使用以下命令列出驱动器

ls -1 /dev/nvme*

使用以下方法修复它
sudo ntfsfix /dev/nvme0nXpY # Here usually X is SSD and Y is drive number

我在升级到Ubuntu 22.04后遇到了同样的问题。安装fuse和ntfs-3g解决了这个问题。
sudo apt install fuse ntfs-3g

之后,记得重新启动或重新挂载。