Could I possibly trick windows in to thinking it's a flash drive? I dual boot, this would be really nice to have.
You could make Windows un-mount a mount point and then hibernate with a simple batch script:
mountvol Path /d shutdown /h /f /t 0
where Path is the full path to the mount point.
Once the script is created, make a shortcut to it in the Start menu (assuming you use it) and set a keyboard shortcut so that you can run it with a couple of key-presses.
@DrMoishe Pippik's answer was almost there, but there was a few things he missed.
To unmount the partition (so you can write to it from another operating system), you must use
/P tag. This tag
Removes the volume mount point from the specified directory, dismounts the volume, and makes the volume not mountable. In @DrMoishe Pippik's answer
Removes the mount point from the specified directory, and is why after using his commands, the partition I wanted to unmount was still locked by Windows.
Second of all, you want
mountvol.exe to run to completion before hibernation is triggered. To do this we use
Lastly, to unmount a partition, you must have Administrator permissions. You can do this, but creating a shortcut of the batch file below, and tick
Advanced > Run as administrator on the
So, this is what the hibernate script should look like:
START /WAIT mountvol.exe <DRIVE LETTER> /P shutdown /h
For hybrid shutdown, you may use:
START /WAIT mountvol.exe <DRIVE LETTER> /P shutdown -hybrid -f -t 00
In Windows 8 you can access this from your Start Menu by placing this shortcut in your
C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs directory, or globally,
To remount the drive after you have come out of hibernation, you will need a
Mount shortcut as well. This will look like:
mountvol <DRIVE LETTER> <VOLUME ID>
To find the volume ID of your partition, type
mountvol into cmd. This shows a list of the partitions in your computer. If you have already unmounted the drive you are wanting to re-mount, it may say
*** NOT MOUNTABLE UNTIL A VOLUME MOUNT POINT IS CREATED *** underneath it (as shown below).