4

I dual boot Windows 10 alongside Ubuntu. Every so often I get an error that looks like this when I try to access my NTFS (Windows) drive from Ubuntu.

Error mounting /dev/sda5 at /media/mani/0AC217250AC21725:  
Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda5" "/media/mani/0AC217250AC21725"' 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

Now I realise every time I start using Windows 10 it normally has updates, these cause fast boot to be enabled. So I go to the Control Panel and check if fast boot has been enabled if so I disable it and reboot to Windows 10 (to ensure the setting has been enabled), then shutdown Windows 10 and boot Ubuntu see if the error has gone away.

If it hasn't solved it I then go back to Windows and run cmd as Admin and enterpowercfg /h off and then its usually fixed.

But I figure if it keeps happening it seems a lot of reboots are required and its quite a tiresome process.


My idea: First I need a way to disable fast boot every time I shut down Windows 10? Just incase it gets enabled by some update. To do this I would have a script that turns off fast boot every time I shut down? (I'm yet to find a way to turn of fast boot via CMD so this is the current issue)

Then also put in that script run powercfg /h off


If my idea is sound (I'm open to other suggestions) how do you disable fast boot via CMD/PowerShell?

Currently I have to go to the Control Panel -> Power Options -> Choose what the power buttons do -> (Untick) fast boot.

My purpose is to stop Windows 10 enabling Fast Boot option after every update (I want it off!).

4

1 Answer 1

11

Links to other sites aren't that helpful because the content can change. The information you need to include in the batch file is:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power

HiberbootEnabled DWORD

0 = Turn off fast startup
1 = Turn on fast startup

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .