Jump to content
xisto Community
Sign in to follow this  
FirefoxRocks

Linux And Windows Partitions Sharing files back and forth

Recommended Posts

Introduction

 

Ok so many of you that use Linux, you probably have Windows installed also, probably on another partition (an exception is using Wubi).

There is a problem that exists with Linux having read-only access to NTFS partitions. A solution to this is to install NTFS-3G or a similar package/application, but this only solves half of the problem.

 

The other half of the problem is Windows not being able to read an ext2/ext3 partition. If you check your partitions in Disk Management, Windows has absolutely zero support for ext3/ext2/linux-swap partitions, display the message Healthy (Unknown Partition). Again, a utility is available for Windows to have read/write access to ext2/ext3 partitions, called EXT3 IFS. From my experience, there are a few problems in this such as blue screen errors, system crashes and the speed is a bit slower, but not notably slower.

 

My Recommended Solution

 

Instead of having to do this, we can try partitioning the hard disk as shown in the table below. This is an example of using a 160 GB (more accurately, 149 GB) hard drive.

Partition# -- Filesystem -- Capacity -- Free Space

prt1 -- ntfs -- 26.00 GB -- 17.39 GB

prt2 -- fat32 -- 94.95 GB -- 86 GB

prt3 -- linux-swap -- 973 MB -- unknown

prt4 -- ext3 -- 27.06 GB -- unknown

As you can probably guess, the FAT32 partition is used to store documents and settings, music, webpages, pictures, movies and other data.

Before you begin/notes

To use this partitioning system, you must meet either of the following requirements:

- The biggest partition should be the first partition of the disk

- You do not have any extended partitions (see note below)

 

I will not be able to help much if you have an extended partition, but it shouldn't be too hard to figure out. The reason for not having an extended partition is because 4 partitions (Windows, data, swap and Linux) can fit nicely on the disk as primary partitions. But if you have more than 1 Linux distribution installed (such as Ubuntu and SuSE for example), it would be necessary for extended partitions to be developed.

 

Windows should be your hda1 or sda1, or the "first" partition (if you installed Windows first, it should be like this). This is because if it isn't, the drive letter for the Windows installation would not be C:, and although this is not a huge problem, it can cause backwards-compatibility issues. If you have already set up other partitions, use a utility to hide them (Super FDISK, Parted, etc) to try and install Windows onto a partition that is drive C:. Some developers do not use %SystemDrive%, or %ProgramFiles% (see this for more information) when developing their programs/installers, they put in C:\ or C:\Program Files instead. If you are willing to verify the installation path of each program and change it, then you can use whatever drive letter you want.

 

ALWAYS, ALWAYS, ALWAYS make a backup BEFORE working with partition utilities!! There is ALWAYS a risk of data loss!!

 

Partitioning and installation of operating systems

 

If you already have the partitions setup like this, skip to the part below labelled Remapping Documents and Settings.

 

If you have the time to make a complete backup, wipe out your entire disk and start over, it would be a good idea to avoid complications. However, if you do not have the time to do that, resize them.

 

Resizing partitions:

 

Boot into a Linux Live CD and open GParted/GNOME Partition Editor or whatever it is called. This is using the Ubuntu Live CD, yours may vary. Make sure all partitions on the hard disk is unmounted. Resize the Windows (NTFS) partition to a smaller size, minimum should be 12 GB, for the virtual memory and programs. The space beside the Windows partition should be the FAT32 partition. Ensure that your Linux partition is also resized to a smaller size, approximately the size of the Windows partition, but it can be smaller. Personally, I don't even know what I am apt-getting so I need to have some extra space there.

 

Make the FAT32 partition between the Windows and ext3/swap partition (should be a big space). Format it as FAT32 if you haven't, and exit out of the live CD.

 

Installing Windows:

 

Install Windows into the NTFS partition if necessary. It should be the same as installation Windows any time. The only thing you need to follow is when setting up user accounts, you should either set up only 1, or only log onto 1 until you read the Remapping Documents and Settings section. Trust me.

 

Installing Linux:

 

Umm...you should know how to do this. I'm not really an expert in this area, but the Ubuntu installer is easy enough.

 

Remapping Documents and Settings

 

If you installed Windows and set up multiple user accounts, just log onto 1 right now and do not log onto other ones until you have finished this section.

 

As you know, all settings and stuff in Windows is stored in a folder called Documents and Settings. We will move the directory to the FAT32 partition to share documents easier.

*From now on, the shared FAT32 partition will be called the Z:\ drive.

 

Make a folder on the Z: drive called Documents and Settings. Move all that you can move, the only thing you can't would be your accounts. Ensure All Users is moved.

 

Now according to this https://support.microsoft.com/en-us/kb/236621, we need to go into Registry Editor to find all the paths to C:\Documents and Settings\ to change them (remapping them). CTRL+F and type in Documents and Settings. Everytime it says C:\Documents and Settings\, change it to Z:\Documents and Settings\ (of course substitute Z: for whatever drive letter it is). Use caution when editing the registry.

 

Now log onto another account, if you followed the above steps properly, the new profile should be created on the Z: drive. Move the other accounts' profile into Z:\Documents and Settings and delete the old folder on the C: drive.

 

Remapping /home

 

Search Google for some instructions because I almost damaged my Linux partition when do this. ^_^

 

Conclusion

 

By using this method, we can avoid using 3rd party utilities to access files on other non-native partitions.

 

Some issues

 

Here is a list of possibly issues that may result from using a FAT32 partition. This list is non-exhaustive:

 

Permissions are not kept. Anyone booting into Windows can delete, modify, rename or do anything to the files. The Windows permissions aren't kept either.

 

There is no NTFS compression, because this is a FAT32 drive. A 3rd party utility would need to be used for encryption.

 

Anything that requires NTFS will either need to be FAT-compatible, otherwise it will not work. An example of this is Windows Live Messenger Sharing Folders.

 

Hope this helps,

FirefoxRocks/OpenOffice

Share this post


Link to post
Share on other sites

My solution with Desktops have always been to add a second Harddrive. Especially with them being so cheap these days, and have one with windows, and the other with BSD/LINUX/Whatever else you want. Laptops, I started using a USB external HDD to do the same thing. I've just always run into problems with partitioning.

Share this post


Link to post
Share on other sites

Great tutorial! Thanks, its very informative and could be very helpful.

 

ALWAYS, ALWAYS, ALWAYS make a backup BEFORE working with partition utilities!! There is ALWAYS a risk of data loss!!

I've learn this lesson the hard way once before, luck it wasn't much

 

Installing Linux:

 

Umm...you should know how to do this. I'm not really an expert in this area, but the Ubuntu installer is easy enough.

As for this, there is many tutorials that can help you do this, many of them are on this board. There is a great tool at http://www.instalinux.com/ which can generate a custom boot image for you, taking the hard work out of setting it up. You need to know some stuff about your computer, but it helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.