LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install dual-boot Linux-Windows on a RHEL4 (x86_64) desktop (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-dual-boot-linux-windows-on-a-rhel4-x86_64-desktop-609073/)

saak.stepi 12-25-2007 03:18 PM

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

and_ru 12-25-2007 04:24 PM

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.

and_ru 12-25-2007 05:14 PM

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.

steve02169 12-25-2007 06:26 PM

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.

and_ru 12-25-2007 10:30 PM

Quote:

Originally Posted by steve02169 (Post 3001422)
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.

kestrel1 12-25-2007 11:21 PM

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.

and_ru 12-27-2007 09:28 AM

Quote:

Originally Posted by kestrel1 (Post 3001564)
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.

kestrel1 12-28-2007 08:11 AM

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.


All times are GMT -5. The time now is 08:22 PM.