Running Windows 7 and Ubuntu 10.04 without Dual Booting

I just built myself a nice new computer (Core i7, 8 gigs of ram, USB 3.0 ports, etc.), and the first thing I did was create a typical Dual-Boot setup for Windows 7 and Ubuntu 10.04.  I need to use Windows for Microsoft Office, and I prefer it for multimedia applications, but I use Linux for all of my coding projects.  And although I love Ubuntu, I feel that Windows 7 provides a better experience overall (auto-resizing windows by dragging them to the sides of the screen can't be beat).  On my laptop I would usually boot into Ubuntu, but I would have to think about what I wanted to do every time I turned on my computer and make a choice.  Was there a better way?  Only a few hours after setting up my entire system I decided to start over and try virtualization.

When you use virtualization software such as VMware Player (which I ultimately decided on)  you're essentially running one operating system, the "Guest OS" inside of your main operating system, the "Host OS."  The Guest OS is actually running on top of the "Virtual Machine Monitor" which is installed on the Host OS as part of VMWare.



Inevitably this means that the Guest OS is going to run slower than it would if it were running as a standalone operating system.  This IS true, but Virtualization software uses some clever tricks that allow it to access some of the CPU hardware directory.  The Virtual Machine Monitor can access the CPU and Memory directly, but delegates other requests, such as hard disk access, to the Host OS.  A detailed discussion of the workings of VMware can be found in this article.


So I had decided to try VMWare, but I still had to set everything up.  First I had to choose which OS to run as the host OS and which one to run as the Guest OS.  Since Windows is where I wanted to run my more intense multimedia applications it was a no brainer, run Windows as the Host OS.

Now to set everything up all you really have to do is install Windows 7, then install VMWare, but I felt the need to make things more complicated.  I wanted a seperate partition for Windows, Ubuntu, and for my Shared Files.  That way if I ever had to reformat Windows or Ubuntu I can keep the other OS intact and keep all my files (documents, music, videos, etc.) separate from either OS.

This is partitioning scheme I ultimately went with:


I used the Windows 7 installation disk to do all the partitioning since everything is NTFS, but sometimes it's nice to have a gparted live disk just in case.

After partitioning my system and installing Windows 7.  I set up VMware Player using this How-To Geek guide.  I installed Ubuntu to the U:/ drive and allocated the virtual disk the full size of the partition.

The last step was to give both operating systems access to the shared partition I had created.  Windows 7 is easy, the partition should be mounted automatically as a letter-name drive in Computer.  If you want to choose the letter and give it a nice name (perhaps 'Shared'), you can do this easily by right clicking on Computer in the start menu, clicking manage, navigating to Disk Management in the left panel, and then right clicking on the drive you'd like to modify.  In addition you can set your Libraries (My Documents, Music, etc.) to point to your files on the shared drive.

To access the files inside the Ubuntu you have to go through VMware.  You can't mount the drive in Linux like you would traditionally using /etc/fstab, and in fact if you run 'sudo blkid' you'll see that the drive doesn't show up at all.  Not only that but the drives shown by blkid don't even correspond to physical partitions.  So the solution is to fire up VMware Player, and then open up the settings for the Ubuntu Virtual machine.



Enable shared folders and add the path to the folder you'd like to add (if it's grayed out it means your machine is suspended, you must power it down).


Now you can access the files in ubuntu through /mnt/hgfs/cogan (or whatever), which is great, but I wanted my shared files to appear as if they were in my home directory so I could access them more naturally.  So I created my desired directory structure on the shared drive.  Then I replicated that in my home directory on Ubuntu.  Except instead of creating directories for projects, pictures, documents, etc.  I used symlinks to their respective directories in /mnt/hgfs/cogan.  Finally, to let gnome know what you've done, you have to edit the user-dirs.dirs file in .config.  This will give your folders nice pictures when you view them with the GUI.


So that's basically it, two operating systems in one, and no more GRUB bootloader.

Comments

Popular posts from this blog

Terminate Scripted Minicom Session

What Twitter Tells Us

CodinGame: Building an AI to play (and win) at "Penguins"