Setting up a dual-boot Linux and Vista PC

Setting up a dual-boot Linux and Vista PC

Summary: After covering setting up dual-boot XP/Linux and Vista/Linux systems (where Windows was installed first), I decided it was time to take a look at how easy it is to install Vista onto a PC where a Linux distro was already installed. Turns out it's not all that difficult, but it's easier if Windows is installed first.


After covering setting up dual-boot XP/Linux and Vista/Linux systems (where Windows was installed first), I decided it was time to take a look at how easy it is to install Vista onto a PC where a Linux distro was already installed.  Turns out it's not all that difficult, but it's easier if Windows is installed first.

Now, I think it's realistic to say that there's going to be more people who want to install Linux onto a Windows PC than Windows onto a Linux system, but since a number of people contacted me privately by email asking for pointers, I still think that there's an audience for this kind of information (most seem to want to set up Windows on a Linux PC so that they can play games on the system). 

Installing Vista onto a system that already has a Linux distro installed (say, for example, Ubuntu) isn't difficult as such, but it certainly is more complicated than adding a Linux partition to a drive with Windows on it.

What you need

OK, apart from a PC with Linux installed on it, you'll need a Windows Vista disc and a GParted Live CD, or you can use the GNOME Partition Editor system application already installed with the Linux distro.  For clarity and simplicity, I'll use a GParted Live CD I have in at the PC Doc HQ.  You can download the latest GParted Live CD from SourceForge (current version is 0.3.4-8).

You will also need a copy of EasyBCD 1.6 in order to be able to tweak the Vista boot loader (basically it's a GUI front end for the BCEDIT boot loader editor in Vista).  This will need to be installed into Windows Vista.

The process

OK, here's how you set up a Linux/Vista dual-boot system where Linux is installed first:

  1. Boot the Linux PC using the GParted Live CD.  During boot up select the auto-configuration boot option.
  2. Work your way through the keyboard and language settings of GParted and then once the GUI is loaded right-click on the main partition (the partition onto which Linux is currently installed, probably /dev/sda1) and choose Resize/Move.
  3. Next simply use the slider to allocate enough space for Windows Vista (allow at least 8GB).  Once you're happy with the settings, click Resize/Move.
  4. Nothing has changed yet - to commit the changes to the partition click Apply.
  5. Once the changes have been made right-click on the partition that's just been resized and select Manage Flags.  Remove the boot flag by unchecking boot and click Close (this is necessary to allow the installation of Vista because it won't install where there a bootable non-Windows partition on the drive).
  6. Close GParted and shut down the system. 
  7. Remove the GParted Live CD and boot up off a Windows Vista installation CD.
  8. Install Vista normally.  However, remember to install it onto the disk space you just freed up using GParted (it'll show up as unallocated space, more than likely on Disk 0).
  9. Windows Vista will, during installation, overwrite the disk's MBR and this will mean that the GRUB boot loader will be lost.  This means that once the system boots up into Windows you won't be able to find Linux anywhere.  Don't panic!  It's still there!  What you need to do is modify the Vista boot loader to boot up Linux.  On the face of it this might sound complicated, but don't worry, it's not!  Start off by shutting down Windows and booting the system off a Linux Live CD corresponding to the distro you have installed (in my case, Ubuntu).
  10. Once the Live CD is loaded fire up a Terminal window (Applications > Accessories > Terminal).
  11. In the Terminal window type the following (which will set the user to superuser mode and launch GRUB): sudo grub Next find the partition where the GRUB files are located: find /boot/grub/stage1 You will now see a reply such as (hd0,0).  Set this location as root by typing the following: root (hd0,0) Next type the following to reinstall the GRUB boot loader: setup (hd0,0) Finally, exit Terminal by typing: quit Make a note of the location you installed GRUB to ... you'll need it when we come to use EasyBCD in a moment.
  12. OK, now you need to go back into Windows Vista and launch EasyBCD.
  13. Click on Add/Remove Entries followed by the Linux/BSD tab.
  14. From the Type dropdown box choose Grub.  Change the default name from NeoSmart Linux to the name of the Linux distro and from the Drive dropdown box choose the partition onto which you installed GRUB earlier (more than likely it'll be Drive 0, Partition 0).  When you're done click on Add Entry followed by Save.
  15. Restart the PC.
  16. The Windows boot manager will now show you two options - Windows Vista and the Linux distro.

Job done!


Topics: Windows, Hardware, Linux, Microsoft, Open Source

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.


Log in or register to join the discussion
  • Alternative

    If you prefer grub as your main bootloader, in step 11 substitute [i]setup (hd0)[/i] for [i]setup (hd0,0)[/i], then boot into Linux. Then open /boot/grub/menu.lst in your preferred text editor (you need root privileges) and add the following lines to the bottom:

    [i]title=Windows XP (or Vista)
    rootnoverify (hd0,1)
    chainloader +1[/i]

    Where (hd0,1) is the equivalent of /dev/sda2 (or /dev/hda2 on parallel hard drives). If Windows is on /dev/sda3 then make it (hd0,2)... and so forth.

    Both methods work, but I simply like the splash screen that grub provided.
    Michael Kelly
    • Vista is a boring re-hash of OSX.

      Who needs a slothy OS named Vista? No-one! OSX, Linux and XP work fine!
      • Oh Shut Up!

        ...and go back to your Kool Aid!
        • nomorems is quite CLOSE!!!!

          Actually, it's been boadcast all over the web that Vista is trash. They've called it everything from warmed over Win ME to Win 95 + 12 and then some. Some even came up with "statistics" that suggested that at least 50% of the people who bought into the VistaHype that went out and bought computers with Windoze late$t greate$t have ditched the Vista the machines came with and rolled back to XP.

          Geo, it is YOU that need to go back to your Kool Aid. You obviously have no idea what you're raving about. :| Try doing some [b][u]RESEARCH[/u][/b] before you spout off again???? ;)
          • CLOSE!!!!

            Just check ebay, por saps are trying to uload Vista left and right after spend allot of money these poor people are trying to get anything they can back to cut the loss.
          • Refound...

            They should phone the help desk and ask for a refound on MS Windows Vista and and other software that was shiped with the computer, as MS Word/Works or what it's called.
            I tried to get a computer without MS Windows Vista, but the sales person asked why I would like to run MS Windows XP, when MS Windows Vista was so great. I told him I didn't want XP either, and he didn't understod anything...

            He refused to give me a refound, and I refused to buy a computer with MS Windows installed from him :)
          • really?

            Bought Vista and still using Vista, 64bit even, works fine.

            I had a friend by a Vista computer got it home and had problems with their internet dropping off or hanging. Their ISP blamed Vista. i took it to work and had it on the internet for 8 hours straight and no drops, she took it back home and dropped off the internet. i told her to get her modem replaced which they had to refused to do in the past. They finally replaced her Cable modem and she has been fine ever since. Most of the hype against Vista is people don't like change and refuse to learn. Vista is not the problem, it works fine.
          • That's right!

            <Vista is not the problem, it works fine.>
            One satisfied customer is all it takes to put the lie to all the countervailing opinions, no matter how qualified the renderer.
          • Hmm try dsl

            No, it does not support all hardware. I have seen network drivers and dsl modem problems, not the hardware, that microsoft says a ceritfied. Hmm, then I roll back to the older driver in some cases the operating system, and it works again.
            SATA download for my 6 mos old laptop caused a no boot until I completely restored to orginal.
            This is only my hardware exp., now the list of my customers issues include video, sound, chipsets, and other hardware icld modems that won't work. This hardware can be new or 1 to 3 yrs. old and it works in 2000 or XP and some even ME and 98SE. Linux will handle this most of hardware too, so Vista does have a problem it's not ready for the prime debut.
            On that note they are improving it, so as to dual-boots let Linux handle the Internet it's better for that job any way.
      • what's the difference?

        between OSX and Linux. OSX is Linux, Apple copped out of the OS game when they decided to ride on top of Linux. Now OSX is just another Windows 3.11-like GUI on top of an OS.
        • Big difference

          Please read up before posting, will you.

          OSX is based on MACH 3-kernel, and have a POSIX/BSD compatible unix server running on it. It has nothing to do with linux (except that the os's uses clib etc.)

          BSD is Unix, Linux is Unix lookalike. MS Windows whatever is bad designed/implementerd excuse for an OS.

 (first hit on Google)
 (tells you what Unix is)
 (about Darwin, which is OSS version of OSX kernel)
      • It might not be a matter of need, but rather want

        Nobody needs Vista, many just want it but the truth is XP can do anything Vista can do with a small exception in ActiveX 10 which XP could have used if Microsoft had any other real reasons for anyone to upgrade to Vista but either way, some want it but nobody needs it. If one were to use XP until the next version of Windows came out, they wouldn't miss a thing aside from the learning curve and an endless exercise in frustration. Vista will no doubt become a good OS but it needs a lot of work, software, hardware drivers need to be better and available. This is not up to MS but to the manufacturers supporting Windows with their products. I believe Mac's new Leopard OSx will be the best OS for 2007. Linux is nice, has it's place but no matter which distro I've tried, I found it lacking or not complete. I like Xandros Pro 4 but I won't upgrade or buy it again due to their lack of back bone when signing an agreement with MS as did SuSE who was the first. I think Debian will be my next Linux OS as it seems everyone including Xandros and SuSE thought it was good enough to base their distros on. I like Ubuntu and I'll always keep a live cd nearby in case I need to get on line fast and I'm having problems booting up or my hard drive crashes. My next OS will be a Mac Leopard even though I've never used a Mac, it's a good OSx and it goes beyond were Vista left off.
      • Inappropriate response...

        Whatever the merits of Vista (and personally I doubt I will ever use it) THIS is not the place for those kinds of comments. If they have a purpose, it is to influence people against using it.... and as you can tell by the title of the article (as well as the content - if you read it) THAT decision has already been made.

        There are lots of other places for flamewars - give it rest on an informational topic PLEASE!

        Thank you...
    • Thanks for that!

      Thanks for taking the time to post that Michael.
      Adrian Kingsley-Hughes
    • Dual Boot !!$%^&*()(*&^%$

      Oh Wow !! Not yet another techno breakthru from our resident Guru!! Where does ZD get them all from - thought they worked for MS - land of the free laptops - for some !!
      If this frenetic pace continues much longer I will be forced to go back-to-crack - but I already know whats coming - TRIPLE BOOT ya'll - yessir!! TB !!!
      Can't wait Bubba!!
      Later Guys&Gals
      • Jack's not quite so on spot....

        Actually it [b][u]IS[/u][/b] possible to set up a [b]QUAD[/b]...yes that means [b]FOUR[/b]... Quad Boot system providing the computer has large enough hard-drives providing enough space for the necessary Partitions and a CPU that's capable of handling the load. :D

        So Jack, before showing your ignorance again, do some research? :)
        • Multple Boot Options

          I was using one of the multi boot programs to be able to boot different OSs to get to different program for improved functionality. Essentially I was using WinNT 3.51, IBM PCDOS (it could have been DR DOS, too), and a Linux version. At that time I was beginning to play with putting a version of OS/2, but as that was fading out I did not put it on that system. Right now I currently have one computer that is a dual boot for Windows and SuSE Linux. I see this not being as necessary as there seems to be more interest in setting up virtual machines to do similar things. The advantage for multiple boot options is lower resource demands for operating. That is, I can use a lower end machine to access the OS and associated programs, while VM requires higher hardware resources(lots of memory, high end CPU) to function properly .
        • Jack's not quite so on spot....

          Now ya done it the poor mans back on crack! Shame shame!
        • load?

          I assume you are accessing those partitions directly with a virtual machine all at the same time. because if you are saying you can run all 4 OS's in different boot partitions at the same time to create some sort extra load on your processor and memory without using a virtual machine, you also need to do some research and not show ignorance. Otherwise, you can only run one OS at a time which doesn't create any more load on the processor than any other single OS.

          tradiionally you have only been able to setup 3 boot partitions to remains within the limitations of the hard Drive specs for a bootable operating system. There are boot loaders out there that have claimed to be able to do more than 3 boot partitions, but i never played with them. And that was years ago that i did play with dual and triple booting. Now i use virtual machines.
          • Yea

            Vcom and several other loads a lot of os's in on partition, but it isn't fool proof. I tried SC7 it wasn't great, but it will work if you read to warn about NTFS file systems.
            I went back to removeable hard drive bays to dual-boot.
            Still, they need to be secure when out of the PC.
            VM uses too much RAM for me, although it seems pausible.