SOLVED Dual Boot Revisited

In September I asked about dual booting Ubuntu with Windows 8:
http://linuxforums.org.uk/index.php?topic=11138.msg87782#msg87782
This was successful and is working well for our friends in France.

I did not realise at the time that data could not be shared between the two systems, but that was not of great importance in that instance.

7Now I have a spare machine with a 2TB drive, Windows 7 pro and Ubuntu 12.04LTS. I would like to set this up to dual boot with a large shared data drive. I have read quite a bit about it but there seems to be conflicting advice. Is it possible and, if so, how?

Thank you.

I would like to set this up to dual boot with a large shared data drive.
It is possible. If both OS and the data drive resides in the same machine then the easiest way to share the content is to format the HDD as FAT32 (if you do not likely to have individual files that are larger than 4GiB) or to NTFS if you do. Ubuntu will happily read and write to both of those formats.

From what I have read I need to install Windows first, then Ubuntu and create a shared partition. Should I create the partitions while I am installing Windows or Linux? How do I ensure that the data partition is accessible by both?

I realise than an alternative is running Windows programs with Wine but I have had mixed success with this.

You don’t need to worry about a seperate partition (although it wouldn’t hurt), as Ubuntu can access the Windows partition happily. Your plan is sound anyway :slight_smile:

Thank you for your help, I will let you know how I get on.

If I were you then I would do it this way (assuming it is all on the same HDD):

  1. Install Windows (and make sure it is working)
  2. Boot to LiveCD and shrink the Windows partition
  3. Create 1 primary partition in the empty space (allowing for the shared partition) and format it to ext4
  4. Create the second (final) primary partition to fill the rest of the HDD, for shared access and format it either to FAT32 or NTFS
  5. Install Ubuntu into the first partition (ext4 formatted) you just created
  6. Reboot and make sure you can boot into each OS
  7. Once happy that all is OK then boot into Windows and map the shared partition and put some files into it
    8 ) Reboot to Ubuntu and mount the shared partition (you can do that from /etc/fstab if you want it to be available at boot)
  8. Test read & write from Ubuntu and Windows

Just yell if you need help with any of the steps above

Thank you SeZo. The HD is 2TB so do you think asigning 50GB to each OS would be reasonable?

I’d go for a bit more than that, as it’s very difficult to amend at a later date (Windows is very hungry for space)

Maybe 100GB?

Just a little ‘yell’ although I cannot guarantee that there will not be much louder ones later. My brain seems to have gone to sleep since I retired five years ago.

I have installed Windows 7 and that is working fine and is registered with Microsoft.

Am I right in thinking that your Item 2 is using the Ubuntu CD?

Thank you.

Am I right in thinking that your Item 2 is using the Ubuntu CD?
Yes, use the Ubuntu CD to boot into alive session and then fire up Gparted to shrink the windows partition. If in doubt then poost the output from (that is lowercase L):
sudo fdisk -l

To see the curent (post windows install) partition layout.
I would go with chemicalfan on partition sizes of 100GB for each OS

Another little ‘Yell’.

I have successfully installed Windows 7 with a separate data partition and created a 100GB ext4 partition. This all works perfectly and I can access the data partition from other machines.

When I come to install Ubuntu have three choices the first being ‘Install Ubuntu alongside Windows 7’. Choosing this option it looks as though Ubuntu will be installed in a partition created in the ‘Data’ partition - bad. Underneath it offers advanced features which takes me to the third option; if I choose dev/sda2 ext4 I get an error messeage: No root file system is defined. Please correct this from the partitioning menu.

This is a bit like trying to describe a spiral staircase without moving your hands.

if I choose dev/sda2 ext4 I get an error messeage: No root file system is defined. Please correct this from the partitioning menu.

When you select dev/sda2 you need to specify the partition type as root or /

Right, done that, now it says there is no swap space partition. Do I need to go back to gparted and reduce the size of ext4 and add a swap file partiition? If so, how big should it be?

Thank you again for your help.

You could do that … or you could create a swap FILE instead of swap PARTITION

see here:
https://help.ubuntu.com/community/SwapFaq

in particular, the section “Four-step Process to Add Swap File”

Ubuntu has installed, but…

When I set up the dual-boot machine in September, but without the shared data drive there was a Ubuntu boot menu came up giving a choice of OS. This is not happening so I am only able to start Windows.

I take it that you have not installed your grub to the MBR on /dev/sda
Common mistake is to install it to /dev/sdaX (X being the partition number)

You can reinstall it from your Ubuntu Live CD.
Once booted into the Live CD session:

sudo mount /dev/sda2 /mnt

then bind the directories that grub needs access to to detect other operating systems:

sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys

Then change root:

sudo chroot /mnt

Now install grub:

grub-install /dev/sda

Check it:

grub-install --recheck /dev/sda

Update grub:

update-grub

Now exit the chrooted system and unmount everything:

exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt

Now shut down and turn your computer back on and you should get the default grub screen.

It’s a good idea to take notice of whether there are replies on a second page. So, now I am delighted to report that both systems are available at startup. I just have the problem of Ubuntu not accessing the network, but this happened in September also so I will repeat that exercise.

I don not remember seeing the request install grub to the MBR. Could you just say when this should be done so anyone coming after can do things in the right order please?

Thank you all again for all your help.

It would have been in the “Advanced” section of the “partitioning” section of the installer … the part of the Ubiquity installer where you “Allocate drive space” … IIRC it’s a drop menu at the bottom.

[EDIT]

http://linuxforums.org.uk/MGalleryItem.php?id=1589

Oh, yes, I remember that, but there was only the one option so there did not seem to be anything to be done.

The networking has cured itself so I am glad that I did not start messing about.

Thank you again.

In the above example it would normally offer 2 options

/dev/sda = The HDD’s master Boot Record
and
/dev/sda1 = the installation partition.

But whatever the reason, if SeZo’s instructions worked GRUB stage 1 didn’t get installed to the MBR … possibly “just one of those things” :wink: