Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Shared Data Partition

  1. #1
    Join Date
    Nov 2008
    Beans
    88

    Shared Data Partition

    I am a long time Ubuntu user but have never run a dual boot box with Windows. Unfortunately I must do so on a new laptop just purchased and it has 4 partitions!!! Kind of wacky.

    Anyway, my question is...

    1) Can I run a dual boot machine on which Win 7 and Ubuntu can share a dedicated partition for data?

    2) If so, can that partition be encrypted as well?

    I may not want to do this because I hate the idea of Windows touching anything that my Linux does but may not have a choice.

    Thanks.

  2. #2
    Join Date
    Mar 2011
    Beans
    85

    Re: Shared Data Partition

    I run a box that has windows XP and 4 flavors of linux on it. I have a shared data partition that I use for src code that I compile under the various OSs. The partition is formatted as NTFS and I am able to mount it from linux, create files, compile, etc.

    The issues arise as to how the partition is mounted at boot time. Ubuntu seems to recognize it and mount it. It always appears under places. It can be a bit more complex with some of the other flavors, but with ubuntu it is easy. I would install win7 first, create and format the shared partition in windows, and then install ubuntu

    There can be some issues with file permissions. I usually log in as root when I am going to compile something. There should be a way to assign group permissions and make both your linux and windows users members of the group. Hopefully someone can post about how to do that.

    If you have never run dual boot, the best bet is to install windows first and then linux. When you install linux, install grub3 to the mbr of the drive ubuntu is on. After the install, boot into ubuntu and update the grub install, this will make sure that your windows is included in the grub options.

    I'm not so sure about encryption, you would need an encryption package that is supported in both windows and linux so you could mount the partition from either side. There are some simpler encryption tools like bcrypt that you could run in linux and also with cygwin in windows. That would let you encrypt and decrypt files and archives. There very well may be some good encryption software with both linux and windows versions, you might look at truecrypt.

    LMHmedchem
    Last edited by LMHmedchem; January 28th, 2012 at 06:14 AM.

  3. #3
    Join Date
    Mar 2008
    Location
    Sussex, UK
    Beans
    1,326
    Distro
    Ubuntu

    Re: Shared Data Partition

    A useful guide here for a shared data in Windows/Ubuntu: http://www.howtogeek.com/howto/35807...ws-and-ubuntu/

  4. #4
    Join Date
    Nov 2008
    Beans
    88

    Exclamation Re: Shared Data Partition

    Thanks for the replies. They were very helpful and after reading them and doing much research I decided on the following.

    This is a 1TB HD with Win 7 installed on a 100GB partition and a remaining 809GB or 811GB depending on what I use to look at it on a second partition.

    I thought I would partition the remaining 811GB for Ubuntu as follows:

    / 20 GB ext4; encrypted
    /HOME 700GB ext4;encrypted
    /Shared Data 75GB NTFS
    Swap 16GB

    I wasn't really sure where to place the data partition to be shared by Win7 and Linux. Does it matter? I also wasn't sure if there was an advantage to placing the swap first or last. Any ideas? Keep in mind that the first 100GB's has Win7 on it and I think there is a hidden recovery partition using 20GB's.

    So I start my install and gparted runs and I run into a confusing snag. Even though Windows shows only 2 partitions, gparted shows that there are 4 partitions!!!
    sda1 100MiB NTFS, sda2 101GiB NTFS, sda3 (extended) 809.65GiB,sda5 809.65GiB NTFS.

    I am VERY confused and I have attached a photo in the hopes someone can help me. I am not sure which partition(s) I should be dealing with when installing Ubuntu? I can not destroy either the Win part or the recovery part.

    https://www.evernote.com/shard/s54/s...b955b169e55dcb

  5. #5
    Join Date
    Nov 2005
    Location
    Washington State
    Beans
    2,324
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Shared Data Partition

    I've got a suggestion, but you'd have to do some homework.

    It's not uncommon for laptops (and PC's I guess) to come loaded up with four partitions. I think the manufacturers do this to discourage people from messing with the partitions.

    Our Acer 5920 came with 4 partitions. First thing I did was make recovery discs. Then I screwed things up trying to dual-boot. Then I ran the recovery discs. Afterward, there was one big ntfs partition instead of four partitions. Installing Ubuntu was easy then.

    I'd suggest going to this forum or a similar one and asking about it. See if you can talk to a few people who've reinstalled to the same or similar Samsungs as yours with the recovery discs and what the partitions looked like afterward.

    After you make recovery discs, I'm pretty sure you can wipe out the recovery part. But don't take my word on that!

  6. #6
    Join Date
    Dec 2010
    Location
    Earth Planet
    Beans
    162
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Shared Data Partition

    I'm changing order of your text to make it easier to answer.
    Quote Originally Posted by ToshibaLaptoplinux View Post
    I wasn't really sure where to place the data partition to be shared by Win7 and Linux. Does it matter?
    No, if you format it as FAT or NTFS (formats which Windows is ware of them) both OSes can detect it.
    Quote Originally Posted by ToshibaLaptoplinux View Post
    I also wasn't sure if there was an advantage to placing the swap first or last. Any ideas? Keep in mind that the first 100GB's has Win7 on it and I think there is a hidden recovery partition using 20GB's.
    Not sure, maybe another person could post about this. BTW, Windows filled both beginning of the hard disk and the end of it. So it should not make a lot of difference wherever else to place the swap partition.
    Quote Originally Posted by ToshibaLaptoplinux View Post
    So I start my install and gparted runs and I run into a confusing snag. Even though Windows shows only 2 partitions, gparted shows that there are 4 partitions!!!
    sda1 100MiB NTFS, sda2 101GiB NTFS, sda3 (extended) 809.65GiB,sda5 809.65GiB NTFS.

    I am VERY confused and I have attached a photo in the hopes someone can help me. I am not sure which partition(s) I should be dealing with when installing Ubuntu? I can not destroy either the Win part or the recovery part.
    The first partition /dev/sda1 is for booting Windows. It's like /boot in Linux.
    Second one /dev/sda2 is what known as C: in Windows (where Windows is installed itself).
    Third one /dev/sda3 is an extended partition to hold more partitions (since only 4 non-logical partitions are allowed).
    Fourth partition /dev/sda5 which is a logical partition placed inside /dev/sda3 is the partition which occupies about 800G and is known as D: in Windows.
    Last partition /dev/sda4 which is about 20G is the recovery partition of Windows 7.
    Quote Originally Posted by ToshibaLaptoplinux View Post
    This is a 1TB HD with Win 7 installed on a 100GB partition and a remaining 809GB or 811GB depending on what I use to look at it on a second partition.

    I thought I would partition the remaining 811GB for Ubuntu as follows:

    / 20 GB ext4; encrypted
    /HOME 700GB ext4;encrypted
    /Shared Data 75GB NTFS
    Swap 16GB
    If you want to encrypt the root partition, you must also create a separate partition for /boot, because /boot must be unencrypted. Otherwise it could not decrypt the rest and boot the system up.

    What you should do:

    1. Boot Windows and resize D: (/dev/sda5) as small as you want (e.g. 75GB). It will be that shared data partition which you want,
    2. Then boot live CD and continue with gparted,
    3. In gparted you will see empty space at end of /dev/sda3 (when you reduce size of /dev/sda5 remaining free space will be available for more new partitions at the end of /dev/sda3),
    4. Create an ext partition for /boot (200 MB is sufficient),
    5. Then create your /, /home, and swap partitions,
    6. For /dev/sda5, just select it and set its mount point (NOTE: do not mark it for formatting, since its D: drive),
    7. You can also set a mount point for /dev/sda2 if you want to access C: drive from Linux (Again do NOT mark it for formatting),
    8. Double check everything before applying and it should go OK
    9. For encrypting home partition, installer has a checkbox but for encrypting root partition it takes some more steps (after completing above partitioning steps and before installing Ubuntu). Someone may post a step-by-step guide for it.

  7. #7
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Shared Data Partition

    Make the recovery disks and also make a Windows repairCD. Only use Windows to shrink your Windows partiton but not to create partitions as it will convert to dynamic which does not work with Linux.


    Make your own Windows repairCD (not vendor recovery):
    http://windows.microsoft.com/en-GB/w...em-repair-disc
    http://forums.techarena.in/guides-tutorials/1114725.htm

    Windows 7 repair USB, Also Vista if service pack installed
    http://www.intowindows.com/how-to-re...tion-dvd-disc/
    http://www.webupd8.org/2010/10/creat...usb-drive.html

    The vendor recovery DVDs are just an image of your drive as purchased. If you have housecleaned a lot of cruft normally included, run many updates with many reboots, and added software you may want a full back up.
    Backup windows before install - post by Mark Phelps
    http://ubuntuforums.org/showthread.php?t=1626990
    http://www.macrium.com/reflectfree.asp
    Another suggestion by srs5694
    http://www.runtime.org/driveimage-xml.htm

    Good advice on how to handle all four primary partitions used. - srs5694
    http://ubuntuforums.org/showthread.php?t=1686440
    Be sure to create recovery DVD(s) first. And a Windows repair CD.
    HP tools partition discussion - similar for other vendor partitions:
    http://h30434.www3.hp.com/t5/Noteboo...on/td-p/228360
    Shrinking a Windows 7 partition is best done in Windows. But do not create new partitions with Windows.
    http://www.howtogeek.com/howto/windo...windows-vista/
    The Hedge show graphically how to delete & create partitions:
    http://ubuntuforums.org/showthread.php?t=1713649
    For info on UEFI boot install & repair - Updated Mar 2015:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  8. #8
    Join Date
    Nov 2008
    Beans
    88

    Talking Re: Shared Data Partition

    Thank you everyone for your help. There are parts of this that may be specific to my system, but maybe other parts will help others that have stupidly pre-partitioned drives by the manufacturer. So, after doing some research and based on the feedback on this thread, I did the following:

    sda1 100.0 MiB ntfs Samsung quick boot partition
    sda2 101.0 GiB ntfs Windows 7 OS (C
    sda3 (Extended)
    sda5 50.0GiB ntfs ([Windows D:];[Linux /Windows_D])
    sda6 190MiB ext4 /boot
    sda7 19.07GiB ext4 /
    sda9 740.37GiB ext4 /Home encrypyted
    16MB Swap



    sda4 20.77GB ntfs Samsung Recovery Partition.


    Didnt have to deal with the grub bootloader. It took care of everything in the install.

    There were a couple of blips and a few outstanding things I'd like to do such as encrypt root but for the moment am satisified...with the install. However there are a couple of problems one of which is MAJOR that I will outline below this post.

  9. #9
    Join Date
    Nov 2008
    Beans
    88

    Re: Shared Data Partition

    So there is one HUGE problem I have encountered which resulted in my losing some pretty critical data.

    sda5 50.0GiB ntfs ([Windows D:];[Linux /Windows_D]) is what I am using to share data between Windows 7 and Ubuntu.

    1) I can see the partition from both OS's
    2) Data that I write to that directory from Windows can be seen and edited in Ubuntu.
    3) If I write data to the ntfs partition from Ubuntu, it seems to move or copy successfully and I can work with the data, however...

    If I reboot, either into Windows or Ubuntu, the data disappears!!! Poof! Up in smoke! Gone. Not happy.

    I noticed it first with some critical data I transferred which is now lost and I have run multiple tests creating, copying, moving various kinds of documents to the partition and the behaviour is reproducible. Upon reboot into either OS the data is GONE.

    What is going on and how do I troubleshoot this?

    Is there any possibility of recovering data that went into that blackhole?

    What information do I need to provide in submitting a bug report? It is pretty clear to me that it is a problem on the Ubuntu side.


  10. #10
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Shared Data Partition

    Quote Originally Posted by ToshibaLaptoplinux View Post
    3) If I write data to the ntfs partition from Ubuntu, it seems to move or copy successfully and I can work with the data, however...

    If I reboot, either into Windows or Ubuntu, the data disappears!!! Poof! Up in smoke! Gone. Not happy.
    Are you writing to your NTFS partitions from Ubuntu while Windows is in hibernation? That is a sure way of losing data when you next start up Windows. Windows remembers the state of the filesystem and journal when it goes into hibernation and will restore it to that state when it is restarted.
    Ubuntu 15.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •