Lets start collecting stuff here, and then I will update this post once we have created a "guide".
The definitive dual-booting guide: Windows 7, Linux, Vista and XP step-by-step. The "how to" set up your PC to dual-boot between Windows 7, Linux, XP or Vista! A complete step-by-step guide with screenshots. One of the best things about this article is that it shows how to boot from each system to another system. Such as...
Well, I could give an exhaustive answer to this, but time is short right now, so I'll give some brief information...
-----------------------------------------------
Multi-OS Installation:
1. Have a Partitioning scheme set on paper ahead of time.
I would strongly recommend a partition for /boot, since this may come to service multiple OSs over time and you want to keep this separate from / (root directory) for future use or reference. For all of my linux installs after the primary, I tend to create two partitions/directories, one for / and one for /home.
2. Backup all of your data you wish to retain. This is a no brainer, right?
3. Install Windows first, and put it on the first drive and the first partition, that Windows recognizes. You can look at the hidden files in what becomes C:\ once Windows is installed and look for the boot file that describes how Windows will load. Write down this information, it is important.
4. Come to understand how GRUB sees drives/partitions differs from how fdisk (et al) sees drives/partitions. For example; say you have two drives in your system, a SATA drive (sda) and a EIDE drive (hda). The SATA drive is set as the first bootable device. GRUB sees the SATA drive as hd0 and the EIDE drive as hd1. All subsequent partitions on the drives start with zero (0), like so;
sda1 = (hd0,0)
sda2 = (hd0,1)
hda1 = (hd1,0)
hda2 = (hd1,1)
5. Each physical drive can have only 4 primary partitions, and infinite (I think) logical drives. All of the logical drives *must* be contained within a single primary drive, called an extended partition, which has a size equal to the all of the logical partitions contained within it (give or take a few MB). All logical drives also start numerating at 5, like so;
sda1 (hd0,0) = primary partition - 12GB
sda2 = extended partition - 108GB (
the primary partition which acts as a container for the logical partitions)
. . sda5 (hd0,4) = logical partition - 52GB
. . sda6 (hd0,5) = logical partition - ~56GB
hda1 (hd1,0) = primary partition - 100MB (mount to /boot, and make it a "bootable" partition)
hda2 (hd1,1) = primary partition - 512MB (swap)
hda3 (hd1,2) = primary partition - 16GB (mount to / )
hda4 = extended partition - 195GB (
Note that the size of all of the logical partitions combined must be a subset of the extended partition's size)
. . hda5 (hd1,4) = logical partition - 15GB
. . hda6 (hd1,5) = logical partition - 40GB
. . hda7 (hd1,6) = logical partition - 40GB
. . hda8 (hd1,7) = logical partition - 40GB
. . hda9 (hd1,8) = logical partition - 40GB
. . hda10 (hd1,9) = logical partition - ~20GB
You will not "see" sda2 or hda4 in your drive output in GRUB or if you run something like df (disk free) from the command-line. We can go into the reasons some other time.
Additional Note: Motherboards that do not natively recognize SATA (for example, the nForce2 mobos), load the SATA drivers after the POST, which means that the SATA drives may not be seen the same way by the differing processes (GRUB, Windows, fdisk, Gparted, the MBR, etc.). Through trial and error, you should be able to eventually discern how things are "done". Taking notes during any disk work is important.
6. Install Windows first and put it on the first recognizable drive and partition (hd0,0 or sda1 in our example above). I typically set aside 12GB for the Windows installation (only!) and then use other partitions for application installation, backup/archive, downloads, et al. The MBR (Master Boot Record) will get written on the first sectors of the physical drive. I
*DO NOT* recommend installing GRUB to the MBR. I never like to have the MBR getting overwritten by subsequent linux installations.
This is the reason why I suggest having a partition set aside for your /boot directory, which is where we are going to install GRUB to.
On most modern distros (if using the installation "wizard"), you will have to do a custom install of GRUB, and choose to install to the partition where /boot will be mounted (hd1,0 or hda1 in the example above). You will not be able to easily see the contents of the MBR, but you can easily read the /boot drive from any OS that can mount and read the filesystem (ext3 most likely).
7. The file that controls the GRUB menu (the menu that you are presented with shortly after the POST screen, where you select which OS you wish to boot to) is "/boot/grub/menu.lst". Some distros link the /boot/grub/grub.conf file to the menu.lst file, but all you have to do is alter the menu.lst file and you can be sure that the changes will take affect. Initially, you may spend some time with the menu.lst file tweaking things like the splash screen, drive numbering, titles, etc. You must edit the menu.lst file with a 'proper' editor, one that recognizes characters/spaces/tabs properly. I recommend gedit for beginners.
*Beneficial Tip*:
After installation, when presented with the GRUB menu, you can change how the system boots. Highlight the OS you want to work on, select 'e' (for 'edit') and then make any appropriate changes (like rearranging drive order). When you are finished, select 'ESC' to exit the editing process and then select 'b' (for 'boot') to boot from the new configuration. If the changes you made "work", be sure to make the changes permanent by altering your /boot/grub/menu.lst file.8. Most modern distros will recognize that you have Windows installed (remember, you loaded Windows first, right?), as long as they can recognize the drive. The typical entry during the Linux install process will read;
Code:
title Other
root (hd0,0)
chainloader +1
I normally change this to be;
Code:
title MS Windows XP Pro SP2
root (hd0,0)
chainloader +1
What appears after "title" is meaningless, it is simply text that you will see at the GRUB menu during bootup.
9. If you are installing more than one Linux distribution, you can make life very easy on yourself by doing the following...
a. Have the partitions set aside beforehand, just like above
b. Install GRUB to the /boot directory (which will be the / directory/partition if you didn't set aside a partition for the /boot dir on the new install)
c. After installation, boot to your first linux install, create a directory for the new linux install, mount the drive that contains the /boot directory to it and then copy the entry for the new linux install in its /boot/grub/menu.lst to your first linux install's /boot/grub/menu.lst.
So, if I had the following;
Code:
title Ubuntu 6.10
root (hd1,0)
kernel /boot/vmlinuz root=/dev/hda1 ro
initrd /boot/initrd.img
savedefault
boot
title MS Windows XP Pro SP2
root (hd0,0)
chainloader +1
it might look something like this afterwards;
Code:
title Ubuntu 6.10
root (hd1,0)
kernel /boot/vmlinuz root=/dev/hda1 ro
initrd /boot/initrd.img
savedefault
boot
title Fedora Core 7
root (hd1,7)
kernel /boot/vmlinuz root=/dev/hda9 ro
initrd /boot/initrd.img
savedefault
boot
title MS Windows XP Pro SP2
root (hd0,0)
chainloader +1
By always writing GRUB to the
new install's /boot partition, you can retain the integrity of your 'good' GRUB install without ever losing your previous settings that you worked so hard to get right. As long as you stay updated on your GRUB version, you'll always be good to go. You can even install a new distro over your first linux install and then (don't utilize the 'old' /boot partition yet) once installed, just do like you did above and copy the new install's menu.lst entry over to your 'old' menu.lst, then you can alter your /etc/fstab file to mount the 'old' /boot partition to /boot instead.
==============================
I can write/edit more later...
/skilless