- Solve Windows Partition Mount Problem In Ubuntu Dual Boot
- Problem: The NTFS partition is in an unsafe state error in Ubuntu
- Quick Fix to mount Windows partition immediately
- Reason: Fast Startup feature of Windows 8 and Windows 10
- Permanent Solution: Disable Fast Startup in Windows 8 and Windows 10
- How to disable fast startup in Windows 8 and 10:
- How to Mount Windows Partitions in Ubuntu
- Mount Windows Using the File Manager
- Mount Windows Partition in Read Only Mode From Terminal
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- Ubuntu Documentation
- Introduction
- Recommended Preparations
- Backup
- Run CHKDSK
- Defragging
- Resize the Windows partition
- Windows XP
- Windows Vista and Windows 7
- Ubuntu CD Installer
- GParted Partition Editor
- Windows Disk Management
- Immediately Reboot Windows After Shrinking Partition
- Problems
- Other resources
Solve Windows Partition Mount Problem In Ubuntu Dual Boot
Last updated November 10, 2019 By Abhishek Prakash 154 Comments
Problem: The NTFS partition is in an unsafe state error in Ubuntu
I dual boot Ubuntu 14.04 with Windows. After upgrading to Windows 8, I often see an error “The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully” when I try to mount the NTFS partitions in Ubuntu. The full text of error is as following:
Error mounting /dev/sda5 at /media/itsfoss/01BC76G7Z2628FB0: Command-line `mount -t “ntfs” -o “uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177” “/dev/sda5” “/media/itsfoss/01BC76G7Z2628FB0″‘ exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount ‘/dev/sda5’: Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the ‘ro’ mount option.
Quick Fix to mount Windows partition immediately
Read the error again. Just the second line which reads: Error mounting /dev/sdXY….
Note the /dev/sdXY thing. XY should be replaced with the error you see in your system. Now open terminal and use the following command:
where XY is the troublesome partition shown in the error. For example sda2 or sdb1 or sda5 (as in picture above). ntfsfix is already installed in Ubuntu systems.
Reason: Fast Startup feature of Windows 8 and Windows 10
Microsoft introduced a new feature in Windows 8 and 10 to reduce the boot time in otherwise slow Windows OS. This feature is called Fast Startup. In normal shut down process, power is removed from all components such as CPU, RAM, CD-Rom and hard disks. But in fast start up, Windows 8 saves some system information such as caching the registry etc to a file during shutdown. Part of the metadata about the state of all mounted partitions at the time of
But in fast start up, Windows 8 saves some system information such as caching the registry etc to a file during shutdown. Part of the metadata about the state of all mounted partitions at the time of turn-off, is among these system information. This reduces the boot time of the Windows 8 but it creates the trouble for Ubuntu.
Since the information about the NTFS partition is stored in Windows 8, this prevents Ubuntu to mount them as mounting them in Linux will alter the metadata of the partitions. This is why it is in protected mode and you cannot mount it (without being root).
Permanent Solution: Disable Fast Startup in Windows 8 and Windows 10
Temporary solution of this problem will be to boot in to Windows and restart it. Restarting is different from shutdown and it should release the partition metadata from the stored system information. But this will only be a temporary solution because when you use Windows 8 or 10 next time, you’ll face the same problem again.
Permanent solution would be to disable the fast startup in Windows 8/10. This will increase your Windows boot time so it is up to you if you prefer it. If you use Windows more frequently and you have probably set Window as default OS in dual boot with Ubuntu, then you should avoid this solution. But if you more of a Linux guy and use Windows occasionally then you can disable fast startup in Windows 10 without thinking twice.
How to disable fast startup in Windows 8 and 10:
If you know how to go around Windows, use the following path to disable fast startup.
Go to Control Panel > Hardware and Sound > Power Options > System Setting > Choose what the power buttons do and uncheck the Turn on fast startup box.
Alternatively, here is the detailed process along with some picture to help you to disable fast startup in Windows. First search for Power Option along with Settings filter in start screen of Windows 8.
Make sure that you have admin rights:
Scroll down a bit in power options to look for Turn on fast startup option and uncheck this box.
That’s all. Next time you try to mount NTFS partition in Ubuntu, you should not see the NTFS partition is in an unsafe state error .
Though the tutorial is meant for Ubuntu, the same tutorial should also help all other Linux distributions such as Linux Mint, elementary OS etc.
Any questions and suggestions? Feel free to hit the comment box.
Like what you read? Please share it with others.
How to Mount Windows Partitions in Ubuntu
If you are running a dual-boot of Ubuntu and Windows, sometimes you might fail to access a Windows partition (formatted with NTFS or FAT32 filesystem type), while using Ubuntu, after hibernating Windows (or when it’s not fully shutdown).
This is because, Linux cannot mount and open hibernated Windows partitions (the full discussion of this is beyond the ambit of this article).
In this article, we will simply show how to mount Windows partition in Ubuntu. We will explain a few useful methods of solving the above issue.
Mount Windows Using the File Manager
The first and safest way is to boot into Windows and fully shutdown the system. Once you have done that, power on the machine and select Ubuntu kernel from the grub menu to boot into Ubuntu.
After a successful logon, open your file manager, and from the left pane, find the partition you wish to mount (under Devices) and click on it. It should be automatically mounted and its contents will show up in the main pane.
Mounted Windows Partition
Mount Windows Partition in Read Only Mode From Terminal
The second method is to manually mount the filesystem in read only mode. Usually, all mounted filesystems are located under the directory /media/$USERNAME/.
Ensure that you have a mount point in that directory for the Windows partition (in this example, $USERNAME=aaronkilik and the Windows partition is mounted to a directory called WIN_PART, a name which corresponds to the device label):
List Mounted Partitions
In case the mount point is missing, create it using the mkdir command as shown (if you get “permission denied” errors, use sudo command to gain root privileges):
To find the device name, list all block devices attached to the system using the lsblk utility.
List Block Devices
Then mount the partition ( /dev/sdb1 in this case) in read-only mode to the above directory as shown.
Now to get mount details (mount point, options etc..) of the device, run the mount command without any options and pipe its output to grep command.
List Windows Partition
After successfully mounting the device, you can access files on your Windows partition using any applications in Ubuntu. But, remember that, because the device is mounted as read-only, you will not be able to write to the partition or modify any files.
Also note that if Windows is in a hibernated state, if you write to or modify files in the Windows partition from Ubuntu, all your changes will be lost after a reboot.
For more information, refer to the Ubuntu community help wiki: Mounting Windows Partitions.
That’s all! In this article, we have shown how to mount Windows partition in Ubuntu. Use the feedback form below to reach us for any questions if you face any unique challenges or for any comments.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Ubuntu Documentation
Introduction
It is possible to have several partitions on a hard drive, each of which can contain an operating system (for dual-boot or multi-boot purposes). In order to make room for an Ubuntu partition, however, a pre-existing Windows partition may need to be shrunk first. This page details the method for resizing Windows partitions.
Recommended Preparations
Before editing the Windows partition, you should backup, clean, run a file system check, and/or defrag the partition.
Backup
It may seem obvious, but you should always back up important data to an external medium (CD, DVD, USB flash drive, or external hard drive) prior to manipulating your hard drive, in case it becomes corrupted. You should also clean up unnecessary files on the hard drive.
Run CHKDSK
CHKDSK is your file system checking tool in Windows and it is used for fixing errors and displaying a status report. If the status report indicates no health problems in your hard disk, then it should be safe to go ahead with your resize operation.
The easiest way to run CHKDSK is to schedule it to run on the next reboot. Just go to ‘My Computer’, right-click on drive C, select the ‘tools’ tab, and click ‘check now’ in the ‘error checking’ section. Make sure you check both squares, one for ‘automatically fix system errors’, and the other one for ‘scan for and attempt the recovery of bad sectors’. Windows can’t check your file system while it’s mounted, but you can set it to do so at the next reboot.
Some people run CHKDSK from a Windows Recovery Console in a Windows Installation CD, and this is sometimes necessary if Windows won’t even boot. You need to make sure you use a CD for your version of Windows because there are different versions of NTFS. If you run CHKDSK from a Windows Recovery Console, be sure to run CHKDSK /R, for a thorough file system check which will take longer, and includes /F (the option for automatically fixing errors).
Defragging
If you are planning to use GParted, you can skip defragging and save yourself some time, because GParted can resize an NTFS partition safely regardless of its state of fragmentation. See How to resize NTFS without data loss? (Feb 24, 2005)- The ntfsresize Frequently Asked Questions, and 2.4.13 resize — Parted Users Manual
If you’re planning on using Windows Disk Management, most people will advise you to defragment, possibly overnight. Very often while you’re defragging, there will be a large green bar in the middle of the Windows partition that seems to be immovable. That’s the Windows ‘page file’, and you can turn that off before defragging if you need to (which often times you don’t). Go into Control Panel and in ‘System’, ‘System Properties’, and then ‘Advanced’ tab, look for the ‘Performance Settings’ button. In the Advanced tab look for ‘virtual memory’ and be sure to take note of your settings on paper before making any changes. Then click the button for ‘no paging file’ and click ‘Apply’. Now you can run defrag without the big green immovable bar in the way. Remember to turn your paging file back on later on or your Windows operating system might be slowed down.
Resize the Windows partition
A Windows partition should be at least 20 GB (recommended 30 GB for Vista/Windows 7), and the Ubuntu partition at least 10 Gb (recommended 20 GB). Obviously, if you have plenty of disk space, you can make the partition for your favored operating system larger.
Windows XP
If using Windows XP (or an older Windows OS), you should use GParted partition manager to shrink the Windows partition and leave free space on the hard drive for the Ubuntu partition.
Windows Vista and Windows 7
There are several ways you can reduce the size of a Windows 7 or Vista partition. It doesn’t really matter which one you choose. Linux programs get the job done faster because you don’t need to defrag first, but using the Windows Disk Management would be the more conservative option.
Two of the free Linux partition editors are on the Ubuntu CD, one being the installer and the other being GParted Partition Editor.
Ubuntu CD Installer
The Ubuntu installer has its own inbuilt partitioner so there’s really no need to partition your disks beforehand if you don’t want to. The Ubuntu CD’s partitioner is based on GParted, but doesn’t round cylinders or move the start of the Windows partition. Windows will run a normal file system check on first boot-up and then it will boot normally.
GParted Partition Editor
If you decide to use GParted, you have to remember to uncheck the ’round to cylinders’ checkbox , otherwise GParted will dutifully move the entire partition to align it with cylinder boundaries. Unfortunately this takes a long time, and when it’s finished, usually results in booting problems. This is because the Windows boot loader depends on block addressing to find parts of itself, so when the partition is moved a little, it gets all mixed up and disjointed. Sometimes it can fix itself automatically but other times it requires repairs from the Windows Installation Disc. If you just remove the check mark you will find that GParted will be able to complete the NTFS resize in a fraction of the time it would have taken otherwise and afterwards Windows will boot just fine.
Some hardware vendors (such as Dell) ship with the maximum of four primary partitions occupied. It is simpler to install Ubuntu on at least one primary partition (using Windows bootloader is required for installing on a logical partition). Using GParted may be preferable in this circumstance to utilize the space occupied by the recovery partition or media direct partition.
Windows Disk Management
The Windows Disk Management tool is also good at shrinking Windows. It’s very fast and easy, if you don’t count the time it takes to defrag first. If you want to use the Windows partition editor to resize Windows, here’s how you can do that:
Administrative Tools —> Disk Management tool -> Shrink Volume
In Windows Vista and Windows 7, this may be located in:
Settings -> Control Panel -> Administrative Tools -> Computer Management -> Storage -> Disk Management -> Shrink Volume
Immediately Reboot Windows After Shrinking Partition
After shrinking the Windows partition, you should reboot once (or twice) into Windows prior to installing Ubuntu. This allows the Windows system to automatically rescan the newly-resized partition and write changes to its own bootloader configuration files.
If you start mucking around with other partitions before Windows has a chance to reset itself, the Windows bootloader will not be able to read the partition table properly and will not boot entirely. If this happens, you may later have to repair the Windows partition bootup files manually using the Windows Recovery Console.
Problems
As with all major changes to a computer, problems may sometimes occur, especially if dealing with Windows Vista or 7.
According to one Windows user:
Unlike Windows XP, Windows Vista and Windows 7 do not allow you to move the MFT (Master File Table) that controls the NTFS file structure within Windows. Inexplicably, Microsoft locates this near the middle (or end) of the partition, somewhat limiting the ability to resize (shrink) the partition completely. Although you will be able to gain some hard drive space from the «Shrink Volume» command, it is likely to be limited.
I knew of no partition software that could move the MFT to a different place on the hard drive safely, but this tutorial suggested that Perfect Disk worked for this purpose. I therefore tried the trial version of Perfect Disk, and it seemed to work for me very nicely. I was able to shrink my Vista partition, using the steps in the tutorial (and Perfect Disk), from 300 Gb to 74 Gb. This was perfect for me.
However, the partitioner in the Ubuntu installer has been used quite successfully by thousands of people for years and there’s really no reason why you can’t just use the Ubuntu installer’s inbuilt partitioning program.
If you find you cannot boot into Windows, this guide on recovering Windows may help.
Other resources
Parts of this page have been adapted from information at Ubuntuguide — Multiple OS Installation.
HowtoResizeWindowsPartitions (последним исправлял пользователь robert-gagne 2012-09-20 02:59:30)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details