LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shared partition with a windows install - modifying directories while hibernated (https://www.linuxquestions.org/questions/linux-newbie-8/shared-partition-with-a-windows-install-modifying-directories-while-hibernated-4175463443/)

jms89 05-25-2013 07:13 PM

shared partition with a windows install - modifying directories while hibernated
 
Hi, I dual boot windows 7 and linux mint (though I rarely have occasion to boot into windows) and have a partition named 'data' that I use to share files between the two installs. I put all my documents/photos/school stuff etc... on that parition.

I have run into problems with this set-up though. If I hibernate linux, boot into windows and make any modifications to the 'data' partition such as adding new files or directories, or modifying existing ones, and then shut down windows and boot back into linux, linux does not recoginze the changes to the partition - it still "sees" what the partition looked like before, and if I access any directories which were modified while linux was hibernated, disk errors occur and I have to repair the parition with fdisk using windows (because it is an ntfs file system).

I'm guessing this is because linux has not unmounted the data partition while it went down for hibernation, but I'm not entirely sure. How can I fix this such that the parition can be properly shared between both operating systems?

Thanks!

chrism01 05-25-2013 07:22 PM

If you really mean you hibernate Linux as opposed to shutting it down, it might(?) the problem; hibernate tries to maintain the image.
You should always shutdown an OS properly/completely if intending to access disks from another OS.

jms89 05-25-2013 07:27 PM

Quote:

Originally Posted by chrism01 (Post 4958938)
If you really mean you hibernate Linux as opposed to shutting it down, it might(?) the problem; hibernate tries to maintain the image.
You should always shutdown an OS properly/completely if intending to access disks from another OS.

Yes I mean hibernate. The reason for hibernation is because I only use windows for things I can't do with linux (mostly to run certain proprietary software I need for school which is too buggy to be used in Wine). It can be somewhat inconvienent to have to shut down linux completely and have everything I may be working on interrupted.

Are you saying there's no way to safely do what I would like to do? What if I manually unmount the shared parition, hibernate, and the re-mount it?

GlennsPref 05-25-2013 07:34 PM

Hi, while I agree with Chrism01, and you say you rarely boot win7, why not try vbox?

I run an old winxp system there and I can access my shared folders and devices(net/print, etc) and keep linux (my main system) up and running.

Take vbox for a test drive and see.

Madhu Desai 05-26-2013 12:18 AM

If Linux is the main OS you spend most of the time and windows is used only for window’s specific job like office/games etc, then why not make shared partition as ext3 type.

I have same scenario. I use CentOS & Windows 8, where CentOS is my main OS. I have one shared partition called DC of type ext3, which is fully compatible in linux. I have installed 'Ext2Fsd' in windows 8 which allows read/write access to ext3 partition and it will also mount and give drive letter to that partition.

So while i'm in linux downloading a movie in deluge, when I switch to windows, I can still continue to download that torrent file in BitTorrent. Since Ext2Fsd gives partition a drive letter, for all practical purpose it is considered as windows partition.

Take a look at this:
3 Ways to Access Your Linux Partitions From Windows
A Comprehensive Guide to Sharing Your Data Across Multi-Booting Windows, Mac, and Linux PCs

Hopefully it may also solve the problem caused by hibernation.

jefro 05-26-2013 03:05 PM

You would have to have the hibernated OS double check data on wake and I am not sure windows can do that. I have not heard of Linux doing it exactly either. Depending on the filesystem would be the only solution. Open files on the target might spell disaster.

Windows tends to be a hybrid sleep and not a true hibernate that confounds the issue more.

273 05-26-2013 03:28 PM

Could a script be added to etc/pm/sleep.d/ or similar to unmount the shared partition before the system hibernates?
Edit: There's an explanation here http://wiki.debian.org/Hibernation
Instead of the bluetooth and wireless commands given in their example you could issue umount and mount for your data partition.

jms89 05-26-2013 05:30 PM

Quote:

Originally Posted by mddesai (Post 4959023)
If Linux is the main OS you spend most of the time and windows is used only for window’s specific job like office/games etc, then why not make shared partition as ext3 type.

I have same scenario. I use CentOS & Windows 8, where CentOS is my main OS. I have one shared partition called DC of type ext3, which is fully compatible in linux. I have installed 'Ext2Fsd' in windows 8 which allows read/write access to ext3 partition and it will also mount and give drive letter to that partition.

So while i'm in linux downloading a movie in deluge, when I switch to windows, I can still continue to download that torrent file in BitTorrent. Since Ext2Fsd gives partition a drive letter, for all practical purpose it is considered as windows partition.

Take a look at this:
3 Ways to Access Your Linux Partitions From Windows
A Comprehensive Guide to Sharing Your Data Across Multi-Booting Windows, Mac, and Linux PCs

Hopefully it may also solve the problem caused by hibernation.

I don't see why changing the file system to ext3 would solve my issue...

Are you sure the same thing doesn't affect you? Try hibernating linux, booting windows, creating some new folder in the shared parition with a testfile in it, then shut down windows and resume linux and see if it recognizes the new folder. If you haven't done any specific configuration to address this, I don't see how you won't have the same problem.

Quote:

Originally Posted by 273 (Post 4959400)
Could a script be added to etc/pm/sleep.d/ or similar to unmount the shared partition before the system hibernates?
Edit: There's an explanation here http://wiki.debian.org/Hibernation
Instead of the bluetooth and wireless commands given in their example you could issue umount and mount for your data partition.

I think this should work. I'll give it a shot and report back. In the meantime, can anyone see why this shouldn't work?

jms89 05-26-2013 09:11 PM

Seems like the scripts are working! If I run into additional problems I'll report back.


All times are GMT -5. The time now is 04:52 PM.