Suggestions for sharing and using data between Ubuntu and Windows 7 dual boot

5

4

Note: TL;DR, scroll to bottom for summary. I recently set up my computer for a dual boot between Ubuntu 9.10 and Windows 7. My current drive setup is as follows.

| A1 |     A2       |
| B1    |  B2  | B3 |

A1: 100 mb, windows 7 "System Reserved" boot partition

A2: 230 gb, data section, this one needs to be shared between the operating systems

B1: 125 gb, windows 7 OS

B2: 123 gb, ubuntu OS

B3: 2gb, linux swap space


Pretty much I want to have my documents, music, pictures, videos, etc accessible from both operating systems. My first attempt involved making the data (a2) partition NTFS, and moving my home folder from ubuntu to the data partition. However, as I read NTFS does not work nice with permission, and it messed up my home folder. My next idea is one of the following: 1) format the data partition to ext2/3/4 and move my home folder from linux there, and get a driver to read ext partitions in windows 7. The problem with that is that most of the ext drivers/software are not compatible with windows 7 or do not integrate with windows explorer (I really don't want to open a separate software window just to access my data, plus it's probably not compatible with other software.) Ext2 IFS looks promising, but I'm not sure how it works with ext4 and windows 7 (not officially supported, when trying in Vista Compatibility Mode, it tells me I need to format the ext drive to use it). My next idea, 2) keep the home folder in ubuntu where it is, but create symlinks for the Documents, Music, etc folders to an NTFS formatted Data (A2) partition, and add those locations to the windows 7 libraries. I'm not totally sure how the permissions would work out, but it should be fine since it's only the documents, music, etc and not the important config files in the rest of /home/user/. Correct me if I'm wrong. Currently, symlinks is my best idea, although i'm not sure how it will work.

Any suggestions, additions to my ideas, links, pointers, whatever would be greatly appreciated. Even if it means I should reformat both my drives and repartition (2 250gb drives if you want to suggest a setup for that), I won't be too opposed if that's the best suggestion (I've gone through the format/install/format/reinstall process 5 times over the past 3 days, once more won't hurt me).


TL;DR, summary:

I have two hard drives. One is partitioned for Ubuntu and Windows 7, the second one I want accessible to both operating systems to store documents, music, pictures, videos, etc. Suggestions on how to set up the data drive.


P.S. bonus if I can get an apache server document root folder working between the two OS's as well (permissions could become very complicated, so don't worry too much about that)

P.P.S. Related question, but data viewing is one way: Partition scheme and size for dual boot Windows 7 and Ubuntu 9.10 with separate partitions for data and /home

wizjany

Posted 2010-04-20T01:33:51.700

Reputation: 571

Answers

6

A1 -> merge it to make A1+B1.
A2 -> NTFS
B2 -> Can bring it down to ~ 40 GB, allocate remaining to A2.
That would be my recommendation.

as I read NTFS does not work nice with permission

I'm not sure what you mean by this ?

1) format the data partition to ext2/3/4 and move my home folder from linux there, and get a driver to read ext partitions in windows 7.

Not recommended, especially since you don't want a read-only file system.

http://www.fs-driver.org/ looks promising, but I'm not sure how it works with ext4 and windows 7 (not officially supported, when trying in vista compatibility mode, it tells me I need to format the ext drive to use it)

ext4 filesystems cannot be read under current drivers, if extents option is enabled ( and I believe most distros using ext4 do have extents enabled by default).

keep the home folder in ubuntu where it is, but create symlinks for the Documents, Music, etc folders to an NTFS formatted Data (A2) partition

This is my current setting as well.

Sathyajith Bhat

Posted 2010-04-20T01:33:51.700

Reputation: 58 436

Ooh very nice. Thanks for this, exactly what i need. I'm going to bring my boot partition next to my windows partition and see how that works. also if you have the symlinks setup working, I'll try that as well. Going to upvote for now and wait if anything else pops up. – wizjany – 2010-04-20T02:57:45.727

Thanks, it worked out great! I moved my windows 7 boot partition to the OS disk and made sure the booting still worked, then created symlinks from my Ubuntu and Windows data folders to the folders on the data drive, and everything is working great. – wizjany – 2010-04-21T01:15:15.033

@wizjany Good to hear! – Sathyajith Bhat – 2010-04-21T11:19:34.483

I'm planning a dual boot too and your way of doing things looks like the best 1. I have queries though: why do we need such a large partition for linux swap space? – vedant – 2013-01-05T08:41:59.677

and I had big problems using the default windows formatted shared NTFS partition. Files/Folders created in Linux were not showing in Windows Explorer. Don't you face a similar problem? or you are using some software to create/manage the NTFS partition – vedant – 2013-01-05T08:53:38.320

@vedant1811 2GB of swap space should be sufficient.With large amounts of RAM, the swap file shouldn't be hitting that much. Haven't run into the other problem you mention. No extra software was used – Sathyajith Bhat – 2013-01-05T19:09:27.003

I left 100GB of "unallocated space" in my HDD and let fedora manage the space on its own (using "üse unallocated space" during fedora installation). I'm still not sure of the break-up of that space. As for my problem, it was probably caused by using fedora while windows was in hibernatinon. BIG MISTAKE! Led to data loss – vedant – 2013-01-07T08:11:30.120

1

From experience, it's a bad idea to mix partitions & drives like you currently have them. If you want separate dual boot OSes, I suggest setting up one OS on each drive. Here's the key - make sure that only the drive that you're installin the OS on is connected during the install. By doing this, it keeps either OS from seeing the other drive and therefore automatically reconfiguring something, like overwriting boot partitions. If you do it this way, each OS will be fully contained on it's own drive, which makes things simple.

The other option (and IMO, the better option) is to install a primary OS (I would choose W7 in this case), and use a VM manager like VirtualBox or VMWare Player to create VMs for all additional OSes (as many as you want).

What are the pros & cons? Dual boot will allow each OS to run natively on the HW (no VM), so if you need the utmost in speed, this may be a better choice. Beyond that, there is no benefit really (IMO). Running VMs allows you to operate multiple OSes at the same time, so for example, using your Apache example, you can run a Linux VM while coding in say Dreamweaver on W7, and test the code on a real Apache server. Or you can just play solitaire on Linux while waiting for something to finish on W7. Or you can read about configuring Arch Linux for x-windows on W7 while working with it in a VM window. It's just a lot more flexible.

The downside of doing the VM is that you'll need a bit more hardware to get good performance. Not much, really, but some.

As far as accessing multiple partitions, with your drive configuration...

With dual-boot, I would create on the W7 disk 3 partitions 100MB (created by installer), then 2 125GB partitions - C: & D:. C: would be OS on NTFS. D: would be data on NTFS. Then from the Linux drive, you can mount the data partition using FUSE & NTFS-3G. If you don't want to use NTFS, format the data partition as FAT32 instead, and mount it in Linux. Just be aware of the file size limits of FAT32 vs NTFS.

With VMs, I would install W7 on disk 1, probably all in 1 NTFS partition (W7 lets you dynamically resize partitions, so it's not critical to do this up front at install), and then use disk 2 for data. I would create 1-4 partitions, formatted as either NTFS or FAT32. Then after creating a VM, I would either mount the data partitions or access them via samba.

Plenty of options, but the one thing that I wouldn't do is leave my disks configured as you have them. Having the W7 sytem partitions spread across 2 drives is, IMO, likely to cause problems down the road.

Joe Internet

Posted 2010-04-20T01:33:51.700

Reputation: 5 145

I don't want to use a VM because then I'd have to boot one OS to get to the other and it's very complicated to move data between host and guest OS. Also i was trying to avoid OS and data on the same drive, since i end up formatting my OS a lot, and would like to keep my data intact. I might move the boot partition though. – wizjany – 2010-04-20T02:54:22.927

Then I suggest getting an external USb drive for data, and keeping 1 OS per drive as I mentioned. If you don't want to do that, I suggest install W7 first on half of drive A, then install Linux in the free space, and let (hope?) Grub auto-configures itself for dual-boot. Use drive B for data - NTFS or FAT32. – Joe Internet – 2010-04-20T03:22:12.687

Grub gives me hell when trying to configure the dual boot ("error isw device for volume broken" on my windows 7 partition) so I'm using Windows 7 bootloader and the EasyBCD NeoGrub thingy, which works amazing. Also I'd prefer not to get more drives, so i'll probably use the second hard drive for data. What I don't like about the one OS per drive is that i will never be able to install enough programs to fill 250 gb, and having the data spread across two drives just makes it more complicated. – wizjany – 2010-04-20T04:22:28.987

Maybe the Grub thing is related to the distro you're installing. I installed dual boot W7 & Suse 11.1 as I mentioned above, and it worked fine. – Joe Internet – 2010-04-20T06:38:01.360

I think it's something with my computer actually. – wizjany – 2010-04-20T22:30:54.453

0

If you have the space I would recommend a separate /home partition for the Linux install, makes a lot of things(reinstalling, switching *nixs or even sharing the home directory to some degree) easier(its much simpler then doing the equivalent in windows -windows guys correct me if I'm wrong- (ex. w/ Ubuntu graphical install just make an extra partition and put /home as mount point and it just works).

Roman A. Taycher

Posted 2010-04-20T01:33:51.700

Reputation: 123

unfortunately that doesn't help getting my data to work with windows, because ubuntu /home partitions don't work on ntfs – wizjany – 2010-04-20T02:50:02.313

Not what I recommended it for, its simply useful for reinstalling Linux, installing a different linux, ect. – Roman A. Taycher – 2010-04-20T07:46:24.780

-1

Have you considered Dropbox?

Brandon Bertelsen

Posted 2010-04-20T01:33:51.700

Reputation: 294