Back to HOWTOs

Dual Booting Ubuntu Linux and Windows Vista

Background

This focuses on dual booting Ubuntu Linux on a computer with Windows Vista already installed. This HOWTO uses the Wubi installer, which should work for Windows XP as well (or, you can refer to my HOWTO on dual booting with Windows XP if you prefer not to use Wubi to dual boot Windows XP).

Prior to dual booting Ubuntu with Windows Vista, I searched around and found a couple of differences between Vista and XP. First, with XP, I used GParted to partition the disk and this worked very well. Unfortunately, it looks like using GParted with Vista is much more difficult and error prone. However, Vista does come with a built-in partitioning program. In most cases, this program should work well. However, for some disks, Vista's partition manager is unable to create a sufficiently sized partition due to the disk's file layout. I hit this problem with my computer where the available shrink space was only a few MB on a 250 GB hard drive. Rather than try a ten-step process to try and get more available shrink space or buying a commercial partitioning program, I opted to use Wubi to dual boot Ubuntu.

First, you should make sure you understand how Wubi works. What it does is create a big file on your Windows file system that is opaque to Windows (actually, you could mount the file in Windows as an ext2-based file system) and serves as your Ubuntu "hard drive". Then, when Wubi installs Ubuntu, it mounts this Windows file as your Ubuntu disk. The size of your Ubuntu hard drive is approximately the size of the file in Windows (e.g., if you want a 15 GB "partition" for Ubuntu, then the opaque file in Windows will be about 15 GB). Ubuntu will automatically have access to your Windows file system under the /host directory.

Some implications of this are that no partitioning of your physical hard drive is necessary. Also, Wubi takes care of setting up your Windows boot loader to allow you to boot into either Windows or Linux and automatically gives your read/write access to your Windows file system (i.e., /host in Ubuntu). Thus, it is easier to setup and safer since there is no real disk partitioning happening. Some potential disadvantages include the fact that the Ubuntu file system is not independent from your Windows file system. Thus, if your Windows partition crashes, your Ubuntu file system is gone too (note, that there is a method to move the Wubi installation to a real disk partition). And, since the Ubuntu file exists in Windows land, it is subject to fragmentation which may affect disk performance in Ubuntu (so periodic defragmentation in Windows is recommended...I've found Smart Defrag to be excellent for this purpose).

The relevant information for this install is:

  • Laptop: Toshiba Satellite M305D-S4829
    Output of lshw, lspci, and lsusb commands
  • Windows Software: Windows Vista SP1
  • Linux Software: Ubuntu Intrepid Ibex 8.10

Note: This guide appears on both TuxMobil and Linux on Laptops.

HOWTO

Install Wubi

There's really not much to this. Just download the latest Wubi installer and follow a few simple steps. If you do not wish to install the latest release version of Ubuntu, the site mentions how to use your own ISO image. Following these steps for Wubi with Ubuntu 8.10 just worked out of the box for me. I didn't have any issues (which is really a testament to both the Wubi and Ubuntu teams as to how much progress has been made since my first Ubuntu install of 5.04). For some of the more advanced configuration, such as installing on a real partition, this guide is useful.

Link to Windows Files as Needed

There are some files that I like to keep synchronized between Windows and Ubuntu. For example, I'm a heavy VIM user so I want one .vimrc file that is consistent no matter which OS I am using. Similarly, if you use Cygwin in Windows, you may want to share your .bashrc file between OS's. Additionally, I regularly back up some of my Windows folders, so I created a ubuntu/data director in one of those folders where I place any Ubuntu data I wish to have backed up.

In Ubuntu, you then create symbolic links to these files and directories using ln. The general form of the command is:

ln -s /host/<Windows path to file> <Ubuntu file name>

Add Repositories

A few repositories you may want to add are Medibuntu (for non-free programs like decrypting DVDs, video codecs, Adobe Reader, Skype, and Real Player)and Google (e.g., for Google Earth and Picasa).

Not Working

  • The laptop seems unable to "shutdown" from Ubuntu and instead will always restart from Ubuntu even if you have chosen to shutdown.