Can't access windows 10 partition after update to 23.10
I used to be able to access a separate ssd for windows, but after updating to Ubuntu 23.10 it gives me the following error :
Unable to access location
Error mounting /dev/sdb1 at /media/abdelrahman/2A907C5D907C3185: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error
Also there is another partition on that ssd that is accessible without issues.
How to solve this issue without formatting the other drive ?
This problem usually occurs due to bad clusters, dirty states or due to a missing helper program.
The basic fix for missing helper program is to install the following:
sudo apt install nfs-common
sudo apt install cifs-utils
Still if you are unable to fix the problem, ntfsfix
might help fix the partition
The ntfs-3g package contains the ntfsfix utility(This usually comes preinstalled). If not,
sudo apt install ntfs-3g
Then try to fix the partition using the following commands
Change the partition based on your system. In your case the 634 GB Volume is /dev/sdb1
as displayed in the screenshot you provided. In order to fix that particular partition, run the following
sudo ntfsfix -b -d /dev/sdb1
-b
tries to fix bad clusters and -d
to fix dirty states.
Hope it helps!
Helpful technical information
ntfs-3g
is not the thing anymore
The FUSE based ntfs-3g
implementation of reading/writing NTFS filesystems in Ubuntu is no more advised and is now obsolete in favor of the current native NTFS kernel driver/module NTFS3.
ntfsfix
is not your first go to tool
It dosn’t fully fix anything, but rather, mainly, removes the safety markers that trigger the safety measures on Ubuntu so that the affected partition will not be mounted or will be mounted in read-only (to protect your data) and therefore allowing you to make changes to that filesystem that might damage your Windows installation and cause data loss on both sides, Ubuntu and Windows, in regards to that filesystem … Quoting from man ntfsfix
(emphasis is NOT mine) it says:
ntfsfix is NOT a Linux version
of chkdsk. It only repairs some fundamental NTFS inconsistencies, resets the NTFS journal
file and schedules an NTFS consistency check for the first boot into Windows.
… which means that neither your newly written data (from Ubuntu) on that filesystem nor the preexisting data (from Windows) is considered safe/fixed yet, but rather pending a filesystem check the next time you boot to Windows … and quoting from man ntfs-3g
(emphasis is mine) it says:
On computers which can be dual-booted into Windows or Linux, Windows has to be fully shut
down before booting into Linux, otherwise the NTFS file systems on internal disks may be
left in an inconsistent state and changes made by Linux may be ignored by Windows.
Why is this happening
In dual boot systems with Windows managing those filesystems, this issue is, in the majority of cases, is caused by Windows hibernation which saves the current running session to disk or Windows fast boot/reboot feature enabled which will do the same i.e. saving current running session to disk which might include unsaved user data or system operations and changing/"fixing" that filesystem in such state from within Ubuntu is not recommended to prevent data loss and/or filesystem corruption … Therefore, the default system response of refusing to mount such filesystem or at most mounting it in read-only mode that you see on Ubuntu is because such unstable filesystem state is detected and it’s not safe enough to be mounted as a read and write filesystem.
What to do then?
Check NTFS filesystems from within Windows and not from within Ubuntu and then make a clean shutdown from Windows and not a hibernation or a reboot with fast reboot feature enabled.