Sunday, July 24, 2016

Unable to mount Windows (NTFS) filesystem due to hibernation



Explanation: Why Linux can't open hibernated Windows partitions:

You are seeing this error because you hibernated Windows instead of turning it off the normal way (in newer versions of Windows, hibernate might be the default option).
  • Hibernating saves the current state information to the hard disk and then powers down the computer.
  • Shutting down the computer closes all programs and ends all running processes before powering down the computer.
When you turn off Windows by hibernating it, you are essentially pausing the system and saving all of that information (into a big file called hiberfil.sys) This way when you resume from hibernation all of your applications and files will be exactly how you left them. It also sets a flag in hiberfil.sys to let other Operating Systems know that Windows is hibernated.
Making changes to your Windows (ntfs) partition while it is hibernated could be dangerous--it could cause Windows to not resume from hibernation or to crash after resuming. Because of this, the tool (ntfs-3g) that mounts (opens) the partition will not mount it in read-write mode if it sees a hibernation flag. As such, Nautilus, the default file browser, will not be able to automatically open this partition--hence the error message that you see--because it is trying to open it in read-write mode.

Workaround for all versions of Windows:

There are three ways to mount a hibernated Windows partition:
  1. Boot into Windows and power down the system by shutting it down completely. You may then boot back into Ubuntu and the partition will mount in read-write mode automatically when you open it in Nautilus. Note that the "Shut Down" option may not be the one displayed in your start menu by default. You may need to click the button next to it to see further options.
  2. Manually mount the filesystem in read only mode.
    • Check to see if you have a mount point (folder for mounting your partition in) for your Windows partition in the folder /media using this command:
      ls /media
    • If you don't see a folder for your Windows partition, you should create one with the following command:
      sudo mkdir /media/windows
    • Next, mount the partition in read-only mode onto this folder with this command:
      mount -t ntfs-3g -o ro /dev/sda3 /media/windows
      Note that you should change /media/windows if your mountpoint is called something else.
    • Now you will be able to view/open files on your Windows partition using any program in Ubuntu. However you will not be able to write to the partition or modify any files as it is in read only mode.
  3. If you need to mount the partition in read-write mode and are not able to or willing to boot into Windows and shut it down completely there is a third option. However, it is not included here because it completely deletes hiberfil.sys and will cause you to lose all unsaved information in the hibernated Windows programs. The following is a quotation from man ntfs-3g about the option that would be used to do this.
    remove_hiberfile
                  Unlike in case of  read-only  mount,  the  read-write  mount  is
                  denied  if  the  NTFS  volume is hibernated. 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.
    

Solution (only for Windows 8 and 10):

There is a new feature in Windows 8 called Fast Startup. If this feature is enabled (which it is by default), Windows 8 does not actually completely shutdown when you choose shutdown. Instead, it does a "hybrid shutdown". This is something like hibernating; it makes booting Windows 8 back up faster. So, you need to disable this feature to be able to shut it down properly, and be able to mount the Windows partitions. To do this, boot into your Windows 8 and:
Note: disabling Fast Startup will most likely make your Windows 8 take a longer time to boot. There are no "exact" numbers, but let's say that if it took you 10 seconds to boot into Windows 8, it will now take you 50 seconds after disabling this feature.
1. Open Control Panel in the small icons view and click on Power Options.
2. Click on Choose what the power buttons do.
3. Click on Change settings that are currently unavailable.
4. Uncheck Turn on fast startup (recommended).
Click on the numbers above to see screenshots.
Click on Save changes. Now, shutdown Windows 8 and boot back into Ubuntu.
If you still aren't able to mount without getting errors, you may need to turn off hibernation completely. Open an elevated Command Prompt (right click on the shortcut, click on “Run as Administrator”), and input:
powercfg /h off
Thanks to: 
Wiki and http://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation

Wednesday, January 13, 2016

Where’s my disk space going? in Windows machines



Where’s my disk space going?


It's not uncommon to run out of disk space. A free utility can help tell where your disk space is going so you can determine what steps to take.
//
Our disk drive is split into a C and a D drive which both have between 30 and 40GB on each. We only ever save on the D drive, but the C drive is up to about 31.9GB with 540MB left available! Apart from about 5GB of photos, I can’t understand what is taking up all the memory. The memory seems to continually go down and is now getting to a critical level. I have run spyware and adware checks and deleted all critical errors, but still not been able to free up any memory. I can’t even defrag as I need 20% free to run this option.
Disappearing disk space is a common scenario. Somehow, no matter how much we have, disk space never seems enough. As we collect pictures and programs (and programs themselves collect data), more disk space is consumed unless files are deleted. With so much happening on our computers these days, it’s almost impossible to simply and quickly realize exactly what’s taking up space.
Fortunately, there’s a free tool that I frequently recommend that can give us some very helpful data.

TreeSize Free

TreeSize Free is a free tool that will show you what’s taking up all of the space on your machine. (A paid version is available with additional features, but for what we’re doing, the free version will suffice.)
TreeSize Free Download Page
Download TreeSize Free from the JAM Software page and install it.1
On completion of the installation, you’re given the option to run it or run it as Administrator:
Run Treesize after Install
I recommend you run it as Administrator, so that TreeSize is able to access and return as much information about your hard disk usage as possible.

The TreeSize scan

As TreeSize scans your hard drive, it updates its display in real time.
TreeSize Free in Progress
Once the small blue progress bar disappears, the results are complete.

A typical machine

This is the result of running TreeSize on a basic Windows 7 installation:
TreeSize Results
The primary information here is a list of all of the top-level folders on the C: drive and the amount of disk space consumed by their contents. What’s most helpful is that it is sorted by decreasing disk space; the biggest consumers of space are at the top.
Not surprisingly, the “Windows” folder and everything it contains are consuming the most space. Right below that is “[5 files]” that represent the five files that aren’t in any folder at all, but live in the root of the C: drive.

Disk space is not memory

I keep hearing people confuse these terms and it’s important – particularly when asking for help – that the terms you use accurately reflect what it is you’re talking about. To over-simplify a little:
  • Memory is the RAM (for Random Access Memory) where your programs and data reside when they are in use. When you turn your computer off, your memory is erased. To free up memory, you might just run fewer programs at the same time.
  • Disk space is your hard drive where data is stored permanently or until you or a program explicitly erases it. To free up disk space, you delete files.
Another good difference to note is size. My laptop, for example, has eight gigabytes of memory, but 300 gigabytes of disk space. Disk space on a machine is almost always much greater than its memory.

Digging deeper

You can see the contents of the next level of folders down by clicking the small triangle to the left of the folder name. Here’s the Windows folder expanded:
TreeSize expanded on C:\Windows
You can see right away that the “winsxs” folder contains the most data of all the sub folders within C:\Windows. (This is normal, by the way.) You can also see the relative size of each of the other folders within Windows. If you wanted to drill down deeper, you could simply expand the subfolder.
We can look at those “[5 Files]” again simply by clicking on the triangle in front of the item:
TreeSize showing top level files
Now, we can see that pagefile.sys – the system virtual memory and paging file – is taking up three gigabytes on this machine and that hiberfil.sys – the file used to implement hibernation – is taking up two.
In this case, that’s actually a discovery for me because this machine will never use hibernate. Disabling that feature allows me to delete hiberfil.sys and free up two gigabytes.

TreeSize on user files

It’s often very useful to use TreeSize to see what’s stored in your user account’s My Documents or similar folder. In Windows, that means looking at the contents of “C:\Users\.” In my case, that’s C:\Users\LeoN:
TreeSize on user account
I have some of the sub-folders expanded here already and you can see that my Outlook.pst file is the largest file in my Documents folder.

Your machine

Now, as to what’s eating up the disk space on your machine, there’s no way for me to know. However, using a tool like TreeSize, you should be able to relatively quickly see what’s taking up all that space and take appropriate action.

Thanks to Wiki
and 
https://askleo.com/wheres_my_disk_space_going/


Tuesday, January 12, 2016

my-c-drive-in-windows-7-is-nearly-full-but-is-not-real







See if you have shadow copies enabled. Restore points could be eating up the HD space.
Open My Computer and right-click the C: drive. Select Properties.
Go to the Previous Versions tab. Do you see a lot of restore points? If so, they can be removed, or disabled altogether.
Open the Control Panel.
Control Panel > System and Security > System
Click System Protection in the left pane.
Highlight Local Disk (C:)(System) and click Configure...
From here you can press Delete to remove all the restore points and then reduce the Max Usageslider lower to something more reasonable.
There is also the option to Turn off system protection if you really low on disk space.


Thanks to : wiki and 
http://superuser.com/questions/450284/my-c-drive-in-windows-7-is-nearly-full-but-is-not-real