LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-25-2013, 07:13 PM   #1
jms89
Member
 
Registered: Jan 2013
Posts: 37

Rep: Reputation: Disabled
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!
 
Old 05-25-2013, 07:22 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,242

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
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.
 
Old 05-25-2013, 07:27 PM   #3
jms89
Member
 
Registered: Jan 2013
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
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?
 
Old 05-25-2013, 07:34 PM   #4
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
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.
 
Old 05-26-2013, 12:18 AM   #5
mddesai
Member
 
Registered: Mar 2013
Location: Bengaluru, India
Distribution: Redhat, Arch
Posts: 479

Rep: Reputation: 132Reputation: 132
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.

Last edited by mddesai; 05-26-2013 at 12:33 AM.
 
Old 05-26-2013, 03:05 PM   #6
jefro
Guru
 
Registered: Mar 2008
Posts: 11,116

Rep: Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362
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.
 
Old 05-26-2013, 03:28 PM   #7
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64&i386, Raspbian Wheezy, various VMs
Posts: 3,228

Rep: Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759
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.

Last edited by 273; 05-26-2013 at 03:32 PM.
 
Old 05-26-2013, 05:30 PM   #8
jms89
Member
 
Registered: Jan 2013
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mddesai View Post
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 View Post
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?
 
Old 05-26-2013, 09:11 PM   #9
jms89
Member
 
Registered: Jan 2013
Posts: 37

Original Poster
Rep: Reputation: Disabled
Seems like the scripts are working! If I run into additional problems I'll report back.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NTFS hibernated partition: what is it? stf92 General 15 10-12-2011 06:44 AM
Fat32 partition changes not reflecting when Windows is hibernated. dtheorem Linux - General 1 02-15-2009 03:07 PM
windows can see shared directories, but cant access them webb.ryan Linux - Newbie 21 10-24-2007 04:34 AM
Can't acess directories shared by Samba in windows XP vador Linux - Networking 4 10-29-2004 04:06 PM
Modifying files in Linux partition from Windows yrraja Linux - General 6 05-09-2003 05:02 AM


All times are GMT -5. The time now is 09:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration