Mounting a hibernated NTFS partition - Ubuntu

During 2017 I made a decision to up-skill myself in the realm of Linux and gradually move away from using Windows as my personal OS of choice. As part of this journey I configured my laptop to duel-boot between Ubuntu and Windows 10, but unfortunately this just saw me booting into Windows 90% of the time because it was convenient.

Close to the end of 2017 I decided it was time to make a more definite move. I was having a terrible time using Windows 10 as for some reason every time the OS decided to perform an update-run, my laptop would basically become a brick. I ended up getting myself an SSD hard drive and installed Ubuntu as my only OS.

So far the journey has been fun and challenging. For the most part my machine feels much more responsive. However this seems to come at a cost of struggling with some things that are really basic stuff on Windows.

As I run into issues, I plan to blog about these as well as solutions that worked for me.

One of the first issues I ran into was reading data from the my original Windows/Ubuntu dual-boot drive. I bought an external hard drive case for the drive to enable me to still access some data stored on this drive and use the 1TB capacity to compensate for the lower capacity SSD.

When plugging the drive into my machine and trying to access to the Windows partition I was met with the error message:

Unable to access Windows

Error mounting /dev/sdb4 at /media/riaan/Windows: Command-line `mount -t  "ntfs" -o
... "/media/riaan/Windows" exited with non-zero exit status 14: Windows is hibernated, refused to mount... 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.

So either I could 1) re-install my original hard drive and shut down Windows properly, 2) attempt to boot my old Windows partition from USB and shut down Windows properly, or 3) mount the partition read-only. As right now I do not need to write data to this drive I opted for option 3.

I was able to do this by manually creating the folder /media/riaan/Windows and then mounting the Windows partition to this folder using the following command:

sudo mount -o ro /dev/sdb4 /media/riaan/Windows