by jiml8 » Mar 19th, '21, 11:30
The OS will commonly kick a drive into read-only mode when there is a serious problem with the filesystem on the drive. This could be software corruption, or it could be a hard drive failure underway.
If the "hard drive" is actually an SSD, then becoming a read-only device is a common failure mode. You'll have to replace it.
With NTFS, if you kill the computer (or it crashes) without proper shutdown, the filesystem remains "open", the pending journal is unwritten, and the overall state of the system is not consistent. When this happens in a Windows system, on next startup Windows fixes things up. In the case, for instance, of a dual-boot, if Linux is the next boot, Linux does not fix it up so the NTFS driver marks it read only to avoid corrupting it.
You will also see this kind of behavior from UFS on BSD, and I believe iOS will do the same thing.
So what you do next depends on your exact problem. If it is a linux filesystem on a hard drive, run fsck on the filesystem first. Then run hardware diagnostics (smartctl) on the drive itself.
If it is NTFS, boot into windows to clean it up.
If it is an SSD, run some diagnostics (start with smartctl) on the SSD and be prepared to replace it.