LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-25-2007, 03:18 PM   #1
saak.stepi
Member
 
Registered: Dec 2007
Posts: 88

Rep: Reputation: 15
How to install dual-boot Linux-Windows on a RHEL4 (x86_64) desktop


I already have RHEL4 x86_64 on my desktop (Dell powerstation) computer.
I wish to install windows XP as well. What is the best way to do this?
I learned, I need to partition disk first.
What is the best tool linux tool to perform disk partitioning?
What is the next step? I am not a very experienced Linux user and afraied to do something wrong which would damage Linux. What are potential pitfalls ?
Any helpfull advise/tip would be greatly appreciated.

Thank you,
John
 
Old 12-25-2007, 04:24 PM   #2
and_ru
Member
 
Registered: Dec 2007
Posts: 44

Rep: Reputation: 16
Hi!
I've been using Red Hat based distros on dual-boot system until my switching to Slack. I must warn you that I was never using RHEL4, but Fedora and ASPLinux. It seems to me that they are quite the same. Hope I could be useful.

If Linux and Windows are going to be installed on the same hard drive you should install Windows first. Before that you'll want to get some space for future installation of the Linux. Therefore you should repartition your HD before. After that you should install Linux and let the installer write the boot loader into the MBR. This way you'll be able to replace the Windows loader (that is in MBR) with Linux one (I suppose it will be the GrUB). You'll need to configure GrUB to find the Win partition. I think default grub.conf (or menu.lst) file will be able to boot the both systems without need to edit it.

I prefer fdisk utility for partitioning my disks. There's more user-friendly utility cfdisk for the same purposes, but it lacks some features of fdisk.

This must look like this:
Code:
fdisk /dev/hda
You'll have to replace /dev/hda with something yours.

Last edited by and_ru; 12-25-2007 at 05:16 PM. Reason: formatting and added code
 
Old 12-25-2007, 05:14 PM   #3
and_ru
Member
 
Registered: Dec 2007
Posts: 44

Rep: Reputation: 16
NOTES!!!
1) Windows must be installed to the first partition of the first disk. This partition must be bootable (must have a bootable flag in fdisk)
2) It is said that installing the boot-loader to the MBR may be dangerous!!! But I always did it that way many times without a single problem.
3) The information about fdisk and cfdisk is useless if you want keep the contents of your current Linux partitions and just need to resize (shrink) and move them to make the room for WinXP partition. For that purpose another partitioning tools must be used. I've never used them.
 
Old 12-25-2007, 06:26 PM   #4
steve02169
Member
 
Registered: Feb 2007
Location: Quincy, MA USA
Distribution: Fedora Core 6
Posts: 96

Rep: Reputation: 15
With RHEL4 you may be using LVM (Logical Volume Management) which I understand makes resizing partitions easier, but requires different steps. Personally I would consider adding a new hard rdive for Windows.

Try gParted or QtParted if you don't have LVM and don't want to add a new hard drive. It's available as a Live CD or on many other Live CD's.

I believe people say not to install Linux before you install Windows solely because Windows will overwrite the MBR which is probably where grub is installed right now.

I wish I could say definitively, but here's what I *think* you should do.
1. Backup your needed files, there's a real chance you could lose them.
2. Determine if you're using LVM.
3. Resize and add a new partition (NTFS or maybe FAT32).
4. Install Windows.
5. Fix grub.

Wish I could be more help.
 
Old 12-25-2007, 10:30 PM   #5
and_ru
Member
 
Registered: Dec 2007
Posts: 44

Rep: Reputation: 16
Quote:
Originally Posted by steve02169 View Post
Personally I would consider adding a new hard rdive for Windows.
When I've just started with Linux - I've bought a new hd. Now I have the WinXP disk as a IDE-slave and the Linux HD as a IDE-master. The both of the systems have their own boot loaders in the MBR of their HDs. GrUB is used for choosing the OS to boot and for booting Linux (if chosen). WinXP's boot loader (should I call it NTLDR?) is used just for booting WinXP. It is called chainloading when one boot loader tells the system to search for another boot loader just to start another OS.
When I start my machine the GrUB is loaded from the MBR of my master hd. From GrUB's menu I choose the system to boot (Linux or WinXP). If Windows is chosen then GrUB goes to first block of the second hd according to line in GrUB's configuration:

Code:
chainloader (hd1)+1
+1 stands for that first block where chained boot loader is located.

Problem is that WinXP won't boot from not-first hd - it's in its nature.
So, we must apply the mapping to fool it.
Code:
map (hd0) (hd1)   //tells that the first hd is the second hd
map (hd1) (hd0)   //tells that the second hd is the first hd
Thus, your resulting WinXP section of the menu.lst (or grub.conf) will look like this:
Code:
Title WinXP       //
map (hd0) (hd1)   //tells that the first hd is the second hd
map (hd1) (hd0)   //tells that the second hd is the first hd
chainloader (hd1)+1     //chain loading
I think it is the only way for Linux+Win dual-boot system with separate hard disks. And it works fine.

Now I'm using LiLo shipped with Slackware. But my system's structure is the same and it works as well as with GrUB.

Last edited by and_ru; 12-25-2007 at 10:57 PM.
 
Old 12-25-2007, 11:21 PM   #6
kestrel1
LQ Newbie
 
Registered: Jan 2006
Location: UK
Distribution: Ubuntu
Posts: 18

Rep: Reputation: 0
If you install Windows onto your first HDD, then Linux to the second HDD. Let the boot loader (GRUB, lilo) install to the first HDD's MBR, & you should be up & running. Used this method many times, far easier than using a chainloader.
 
Old 12-27-2007, 09:28 AM   #7
and_ru
Member
 
Registered: Dec 2007
Posts: 44

Rep: Reputation: 16
Quote:
Originally Posted by kestrel1 View Post
If you install Windows onto your first HDD, then Linux to the second HDD. Let the boot loader (GRUB, lilo) install to the first HDD's MBR, & you should be up & running. Used this method many times, far easier than using a chainloader.
But then you'll have to restore Windows boot-loader to make the Win-only system again! With chainloading both of the OS remain independent from each other. You have two standalone systems which may work independently! Adding 3 lines into the config file is not too hard, I think. I'm always storing original and custom configs. Replacing one file with other is the easiest way for me.
 
Old 12-28-2007, 08:11 AM   #8
kestrel1
LQ Newbie
 
Registered: Jan 2006
Location: UK
Distribution: Ubuntu
Posts: 18

Rep: Reputation: 0
You don't need to restore the Windows boot loader you just use GRUB to point to the Windows boot path. No need to mess about with configuration files. If you installed Linux first, then installed Windows, that would cause more problems.
Both installs are independent, they just use the same boot loader. Obviously if you are happy to mess about with the files (& I know it isn't a problem) then why not, just thought that this method was easier for a novice.
I used to use various Linux distro's on the same system & the chainloader would probably been the best bet, but I just used to configure Grub or Lilo to point to the correct installation.
Anyway, only my thought's.
 
  


Reply

Tags
chainloading, dual boot, grub config, mapping


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
attempting to install dual boot windows xp linux pc on hp xw8000 with scsi HD gmckone Linux - Newbie 3 12-01-2006 11:29 PM
DISCUSSION: How to Dual boot with XP/2000/NT and install linux/windows whenever You want aashiks LinuxAnswers Discussion 17 01-17-2006 11:59 PM
Re-install Windows on XP/Linux dual-boot system? fannymites Linux - General 4 05-08-2005 06:27 AM
Linux/Windows dual boot with Windows re-install dhowell1129 Linux - Newbie 6 04-25-2004 04:21 AM
On Windows and LInux dual boot - why install Windows first? yanar99 Linux - Newbie 13 12-18-2003 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration