<img src="http://parcom.pronetworks.org/PROneT-News/ms_winxp.gif" align="right"> <img src="http://parcom.pronetworks.org/PROneT-News/WindowsVista.jpg" align="right"> <img src="http://parcom.pronetworks.org/PROneT-News/linux.gif" align="right">
Dual-boot Windows Vista and Linux
With the public beta release of Windows Vista, there are likely many users that would want to install Windows Vista along side some sort of Linux distribution. The problem arises with two small features of Windows Vista that do not play well with Linux. The first of which, and the main issue, is the new bootloader that Windows Vista uses. The second, which only causes minor issues, is the new NTFS format that is used by Vista. The main installation procedure here is install Windows Vista, see the <a href="/forum/about77377.html" target="_blank">PROnetworks Installation Guide</a> for details, and then install Linux. This guide will give users the instructions for doing so using the GRUB bootloader do to popularity. LILO, being a significantly less used bootloader, will not be looked at as distributions that have the option for LILO also can use GRUB.
For ease of use, this guide will be split up into three major sections that will cover the main multi-boot scenarios one might encounter.
1. <a href="#dualboot">Dual-Boot Windows Vista and Linux</a>
2. <a href="#tripleboot">Multi-Boot Windows XP, Windows Vista, and Linux</a>
3. <a href="#vista_last">Installation of Linux before Vista</a>
<a id="dualboot"></a><font size="+1"><b><u>Dual-Boot Windows Vista and Linux</u></b></font>
After the installation of Windows Vista, you will want to install Linux. <font color="#FF0000"><b>DO NOT resize the Vista partition during the installation of the Linux distribution!</b></font> Due to the change in NTFS versions, no Linux partitioning program, nor standard Windows partitioning programs, can properly alter the partition that Vista is installed to. Also, be sure to specify that GRUB is the bootloader to be installed if this is an option. After installation is completed and you will boot into the Linux operating system that you installed (because GRUB over-wrote the Vista bootloader in the MBR). From here, open up a terminal window (the method of doing so will vary across distrobutions/window managers). After you are at the terminal, all commands that are going to be needed to modify the boot menu will need to be run as 'root' so you will need to know how to accomplish this on your system (su or sudo). The first thing that we will do is backup the current boot menu, which can easily be done by doing this (remember to run this as root):
- Code: Select all
cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
Next, we need to edit the file "/boot/grub/menu.lst" in the text editor of your choice. You will now want to add an entry for Windows Vista. To do so, you need to add three lines to the file at the end of the file. Example entries follow:
<b>Vista is installed to the first partition of the first IDE hard drive:</b>
- Code: Select all
title "Windows Vista"
root (hd0,0)
chainloader +1
<b>Vista is installed to the first partition of the first SATA/SCSI hard drive:</b>
- Code: Select all
title "Windows Vista"
root (sd0,0)
chainloader +1
If your setup is not the same as either of the examples above, you will need to modify one to match your current setup. The only area that should need modification is the line that starts with "root". The item that will likely need modification is the drive and partition information. For editing the drive that Windows Vista is installed on, you will have to change the first '0' to the number of the drive. If it is the primary or first drive, it will be a '0', the secondary or second drive would be '1', and so on. The same numbering scheme is followed for the partition information, which is the second '0'. First partition on the device is '0', second partition is '1' and so on. If you do not know what drive/partition you should put into the list, you can find this out with a disk or partition management program that may be installed with the system. If you know the device that Vista is installed on, you can also translate that to the GRUB menu. For instance, if Windows Vista is installed to "/dev/hda3" then the "root" entry would be "(hd0,2)" and if the device was "/dev/sdc5" the "root" entry would be "(sd2,4)". A general note here as well, if you have Windows Vista installed to a logical partition within an extended partition, the extended partition counts as a partition. Because of this, what would be thought of as the "second" partition, if it is logical, would actually be the third, as the whole extended partition counts as '1'. If you do not know what the entry should look like, please <b>ask</b> as the only stupid question is the one not asked. It will likely save time and frustration on your part. After you have the file modified, save it and now restart the system to test it out.
<a id="tripleboot"></a><font size="+1"><b><u>Multi-Boot Windows XP, Windows Vista, and Linux</u></b></font>
The "triple-boot" scenario is actually not difficult, although one might suspect otherwise. The installation sequence is specific though for an easy setup. The installation procedure will be, first, install Windows XP as you normally would. After setup has finished and you are done setting things up the way you want them to be, you will want to install Windows Vista. This will alter the bootloader, and will have the Vista bootloader with an entry for Vista and Legacy OSes (XP and earlier). Once you are done with installing and configuring Windows Vista, you need to install the Linux distribution of your choice. During testing, Ubuntu 6.06 was used, and the GRUB boot menu was properly edited during installation to include an entry for Windows. Although the entry was labelled "Windows XP Professional", when this entry was selected during boot, it would bring up the Windows Vista bootloader and you could then boot either Windows Vista or a legacy operating system. There is a chance however that the installation of Linux will not automatically add an entry for Windows Vista/XP. In such a situation, one should follow the <a href="#dualboot">first section</a> about adding an entry for Windows to the GRUB boot menu.
<a id="vista_last"></a><font size="+1"><b><u>Installation of Linux before Windows Vista</u></b></font>
While this situation is not the ideal situation, it is not hard to fix. This should just involve re-installing GRUB. This can be done by using the following directions. First, open up the terminal and run the following command as 'root':
- Code: Select all
grub
This will bring up the GRUB shell, which will allow you to re-install GRUB. From here, you will need to specify the drive and partition that GRUB is going to be installed (or reinstalled) to. We can do that by using the following command:
- Code: Select all
root (hd0,1)
There may be a few changes that need made here depending upon the current setup. First, you need to make sure the drive type is correct. If GRUB is going to be installed to an IDE hard drive, then 'hd', as shown in the example, is going to be used. Otherwise, it will be 'sd', for a SATA or SCSI hard drive. The next item, the '0', is the drive number. Zero (0) specifies that it is the first hard drive in the sequence. If it is the second hard drive, this would be changed to '1' (one) and so on. Keep in mind that numbering starts at '0' so you would take the drive number and decrease it by one for the number used here. The last number, '1' in the example, is the partition where GRUB is to be installed. This partition should be the one that contains the '/boot' directory, and again, numbering of partitions starts at '0', so the above example is installing to the 2nd partition on the physical disk. The last step would be to install GRUB to the MBR, which can be done with the last command:
- Code: Select all
setup (hd0)
Which could also require editing, depending on the setup. The drive type would need changed as described above along with the disk number. Since we are installing to the MBR, you will want to specify the drive that currently contains the boot information that is used by Windows Vista.
From here, we are now done installing GRUB to the MBR and we can exit the GRUB shell by typing:
- Code: Select all
quit
After exiting the shell, we can restart the computer and test out to see if the reinstallation of GRUB was successful. If you do not have any entries for Windows, you will need to follow the instructions above in the section on <a href="#dualboot">dual-booting</a> as this describes the process of adding Windows Vista/XP to the GRUB boot menu.









