5

I have a computer with both Windows 10 and Ubuntu 17.04 installed on it. I can't log in to Windows, and think it's a problem with the registry. Luckily, there is a way to restore the registry from backup from Ubuntu, but you have to be able to modify files on the Windows partition. Right now, I can't write to the NTFS partition because Windows didn't do a full shutdown.

How can I force windows 10 to do a full shutdown without being able to log in?

user219095
  • 65,551
Dan
  • 173

3 Answers3

7

From Ubuntu ,first you should run ntfsfix on your ntfs partition then use the remove_hiberfile option to mount your partition:

man ntfsfix:

DESCRIPTION

ntfsfix is a utility that fixes some common NTFS problems. 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.

You may run ntfsfix on an NTFS volume if you think it was damaged by Windows or some other way and it cannot be mounted.

man ntfs-3g:

remove_hiberfile

When the NTFS volume is hibernated, a read-write mount is denied and a read-only mount is forced. One needs either to resume Windows and shutdown it properly, or use this option which will remove the Windows hibernation file. Please note, this means that the saved Windows session will be completely lost. Use this option under your own responsibility.

e,g:

sudo ntfsfix /dev/sdaX
sudo mount -t ntfs-3g -o remove_hiberfile /dev/sdaX /mnt/your_mount_point
GAD3R
  • 3,900
2

If you have a Windows Setup medium (any reasonably recent version will do) handy, you could chkdsk the volume from there. Just use ShiftF10 to bring up a Command Prompt.

That way, your Windows won’t have to boot. You might as well restore the registry backup from there while you’re at it.

Alternatively, if you can at least reach the login screen, you can reboot from the power button there. As @Run5k mentioned in his comment, shutting down isn’t shutting down by default. So do select to reboot.

To “really” shut down, hold Shift while selecting to shut down.

You might also want to try simply rebooting first before attempting any repairs.

user219095
  • 65,551
2

If all you want to do is remove the hibernation state (that is what prevents ubunto to do disk stuff, simply do the following.

Boot the computer until you see some sign of Windows 10 then hold the powerbutton for 5 seconds until the computer is turned off.

If pressing the powerbutton turns the computer into standby too quickly, simply press and hold the powerbutton to wake up the computer. After it has woken up, and the button is still pressed, the 5 seconds should then shut down the computer.

Alternatively, if you have the computer running, pull out the power cable.

LPChip
  • 66,193