| |
This is a tutorial on how to create a dual boot with a flavor of Linux and Windows XP(using the NTFS file system) using the GRUB boot loader. For this tutorial I specifically used Redhat Linux 7.2, but from what I understand this will work with Mandrake 8.2 as well. Also, while some of the things discussed in this tutorial may seem obvious to the more advanced members of DevHood, please remember that this tutorial is made so that even if someone has no prior experience with Linux or doing a clean install, they can still set up a dual boot with XP using the GRUB boot loader. If you think that you do not need this tutorial or do not wish to learn more on the topic, please do not continue reading.
I wrote this tutorial because when I first attempted this I thought I knew what I was doing, and quickly found out I had no idea what I was getting myself into. I even started a thread that asked for advice on this topic, which can be found here (if you do a search on DevHood for Dual booting, you’ll find that my thread is not the first one about this topic, nor is it the last). Unfortunately, there are just so many little things that people assume others know. When I finally got enough info to make a dual boot, I decided to write this tutorial to give people like myself a helping hand, by writing a how-to on dual-booting. Also, I noticed that a large amount of people that attempted this using the NTFS file system for their XP partitions experience problems that force them to convert their XP partitions to the less secure FAT32 file system. Using the GRUB boot loader solves this problem.
This tutorial is aimed at the following people:
- People looking to EASILY set up a Linux / XP system.
- People that are interested in the new GRUB boot loader and how to implement it.
- People that are just looking for something to do with their free time.=)
Preparation before the Installation: There are a few things that we need to have before we can start. Obviously, we need a copy of both Windows XP and Linux(either Mandrake 8.2 or Redhat 7.2). The easiest way to obtain a copy of Linux is to download the bootable ISO’s from a site and burn them to a CD-R. The official list of mirror sites to download from for Mandrake 8.2 can be found here and the list of mirror sites for Redhat 7.2 can be found here. I recommend the use of the mirror sites over the actual companies’ site, because the companies’ FTP server tends to be really slow.
In order to burn the ISO’s into a CD, you must have a third-party CD burning program. The native burner which is built into Windows XP DOES NOT have the ability to do this. It will only copy the ISO onto the cd which does you no good(Look at the very bottom of this tutorial for a brief explanation on this).
The final preparation step is to back up all your files(Don't forget your e-mails!! - I lost over a thousand e-mails from my first semester because I forgot to back them up!).
Partitioning, Formatting, and Installing XP: Once, you’ve backed up all of your files that you wish to save(don’t forget your e-mails!), you’re ready to begin. It is good practice to install Windows XP first since it does not have the level of customization that Linux does(XP has the nasty habit of taking the first partition it finds).
Pop in the XP installation CD and restart. When your Computer’s start up screen comes up, enter the BIOS setup by pressing the necessary key(s). Set it up to have your computer boot from your CD drive. When the CD boots up, you’ll be greeted with the standard Windows XP set-up screen.
The next step is to use the fdisk partitioning utility and carve your hard drive into partitions. Fdisk comes with XP. After you ok the installation for the first time it willlet you delete your current hard disk and partition it. How you partition your hard disk is up to you and what your system can handle. I did the following on my 40 GB hard drive:
15GB for XP and applications (NTFS) 1GB for XP Swap/Paging File (NTFS – not necessary for XP) 16.5GB for Data and Files (FAT32) 7.5 GB for Linux (Will be formatted during the Linux install)
I decided to make the Data and Files partition FAT32, because that way both Linux and XP can read and write to it (Linux can read from NTFS, but writing to it is still “experimental” and not suggested). After you partition the hard drive you format the partition XP on using NTFS (make sure that your XP partition is the FIRST partition).
Continue with the XP setup and finish installing. Once you’re done, you can format the other partitions (not necessary for the Linux partition though) by going to Start -> Control Panel -> Administrative Tools -> Computer Management. There are tools in there that you can use to format your partitions and make them recognizable and usable in Windows.
Partitioning, Formatting, and Installing Linux: The Linux install is only slighty more complicated, but is faster ( ~20min). Pop-in the 1st Linux CD and restart again. Your system should still be set to boot from CD, so the Linux installation screen should come up. You want to do just an install. In Redhat 7.2 this brings up the installation GUI for Linux. When it asks you what kind of installation you would like to perform you want to select “custom” or “expert” (custom is the easier of the two, only use expert if you are sure that you know what you are doing!), since you’ll need to tell Linux what partition to install on.
Setup will eventually ask you what program you want to use to partition your hard drive. I chose to use Disk Druid. It’s a pretty easy utility to use and it has a GUI (unlike fdisk which is command line). Linux will recognize your Windows partitions and show them. If Windows decided to format your Linux partition to FAT16 (mine did for some weird reason…) just delete it. Out of the free space left on your hard drive you need to make the following partitions:
50MB for Boot Partition, listed under “\boot” 2x your current amount of RAM for Linux Swap/Paging File(ex: 256MB RAM -> 512MB Paging File, and its REQUIRED for Linux), listed under “\swap” 3GB or more for the Linux OS Partition, listed under “\” which is called “root”
Once this is done, you can continue through the rest of the setup, just make sure that when you reach the point of what Boot loader you want to use, pick GRUB and make sure it installs to the MBR(Master Boot Record). This will cause Linux to boot instead of XP the next time your computer boots from the hard disk.
Once your done picking and choosing what you want installed along with the Linux OS, setup will do the rest for you. Make sure you make a user account for yourself other than “root” when prompted by the Linux setup, because when you are logged into the “root” account you can do anything and everything to the partition Linux resides on, including DELETING THE WHOLE PARTITION by accident.
Post Linux Installation: Ok, so now we have both OSs installed. Once Linux is finished setting up you can remove the CD, and restart. This time go back into the BIOS setup and set the computer to boot from the hard drive again. GRUB will appear and give you a choice between either Linux and DOS or just Linux to boot to. Select Linux with your keyboard. Linux will boot and bring you to a login screen. Login under the “root” account, using the login name “root” and your “root” password. - This is the only way to modify the necessary file to get Windows XP to boot from GRUB.
Once Linux is finished loading, bring up the Command Line Shell (In Redhat 7.2 this is the computer monitor Icon with a shell on it located in the taskbar, if you can’t find it in either Mandrake or Redhat just hover over each icon with your mouse and the name of the program will appear as “Command Shell”, “Command Line”, or something to that effect.). Once the Command Shell appears, you need to navigate to the following directory and file:
/etc/grub.conf
If you’ve never used the command line interface in Linux before(like me), go to the “Sessions” button and click on the “Root Midnight Commander” (the non-“Root” version won’t allow you to edit the file). This will bring up a very basic GUI(similar to the BIOS setup in use) that will allow you to easily navigate your Linux files.
Once you open up the file, either through the command line or through Midnight Commander, go all the way down to the bottom of the file and add the following lines after the rest of the lines in the file:
title Windows XP [TAB]root (hd0,0) [TAB]makeactive [TAB]chainloader +1
PLEASE NOTE that the word TAB inside the brackets indicates where you should indent with a TAB. Make sure that you type the bolded lines in EXACTLY as written above with the spaces and capitalizations all correct. Save it and exit. The next time you restart and the GRUB boot loader comes up, Windows XP should be listed under Linux. Just select it with the keyboard and hit enter. Windows XP should boot up and your system is now dual-booting Windows XP and Linux!! If the Windows XP title does not appear on your GRUB boot loader screen then you know that you did it wrong (real simple test, right? ;-) ). Just go into Linux under your root account, and make sure the added lines look EXACTLY like the bolded lines above. There are NO semi-colons or anything ending the lines.
A few ending notes and Disclaimers:
- If you’re interested in using the Windows boot loader or interested in the boot process itself, I recommend the following tutorial, written by Simon Parsons, which can be found here. I encourage anyone and everyone to check it out. It is a very well written tutorial.
- (The following was taken from Simon Parsons disclaimer of the above linked tutorial. - Thanks Simon.=)
- Working at the boot level with devices is risky- a mistake could leave your system unbootable..
- This information applies to modern x86 systems. Those that run i386-based OSes such as Linux and 32-bit Windows are included.
- Even if you followed my instructions to the letter, I am not liable for any lost data or damaged hardware.
- Altering your bootloader file may violate End-User License Agreements with your software suppliers.
- "Windows", "MS-DOS" and individual "Windows" versions are trademarks of Microsoft. Use here does not constitute a challenge to those copyrights. Use of "Redhat" and "Mandrake" are trademarks of their respective companies and do not constitute challanges to those copyrights.
- If you have any questions on how I did some thing or what I did, please feel free to Message me through DevHood or e-mail me. I will try to answer your questions to the best of my ability.
Very Brief overview of ISO’s: An ISO is an EXACT image of a CD put into a single file. It is NOT a type of archive like a .zip or .ace archive that stores and compresses many files together in one easy file. The are emulators that can be found in the Tool’s section of DevHood which play ISO’s on your computer without having to burn them to disc. For our purposes in this tutorial you MUST burn them to disc since we will be booting from the CD’s. themselves. The reason why you must use some sort of third-party burning software is because there is a certain process that is used to transfer the ISO image onto the CD making it an EXACT copy of the original CD from which the ISO was originally made. The native XP burner only can copy files to a CD, not transfer an ISO. Hope that clears things up a bit.
|
|