LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 02-10-2004, 11:24 PM   #1
NYCtech
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
Linux and Windows XP


Hello i am in a computer networking class and i need to use linux alot so i want to install it on my PC that currently has Windows XP. I have 2 hard drives and one is the master drive with the XP on it. I am not sure what is on the other one, i just have data saved on it. How do i install linux on the other hard drive so i can boot either one on startup, thank you.
 
Old 02-10-2004, 11:36 PM   #2
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
You will have to format the other hard drive to install Linux on it. During the installation, you get an option to install a boot loader. Install the bootloader and it will let you boot either OS on startup.
 
Old 02-11-2004, 12:30 AM   #3
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
be sure to put the boot loader in the MBR on the master, as thats probly wre the bios boots by defualt
 
Old 02-11-2004, 03:04 AM   #4
HolyLiaison
LQ Newbie
 
Registered: Feb 2004
Location: Lakeville, MN
Distribution: Fedora Core 1
Posts: 3

Rep: Reputation: 0
You could also get Partition Magic for Windows, and resize the windows partition on your second hard drive so you could have a linux section, and a windows section on it. It's very easy to do. Plus, if you have any valuable data on the second hard drive, you can keep it there, if need be.
 
Old 02-11-2004, 03:18 AM   #5
kLUMSY bOT
Member
 
Registered: Jan 2004
Distribution: Gentoo 1.4
Posts: 36

Rep: Reputation: 15
Quote:
Originally posted by SciYro
be sure to put the boot loader in the MBR on the master, as thats probly wre the bios boots by defualt
noo!!! dont do this! this may overwrite the windows mbr!

i suggest this: (it works on mine!)

ide0 or hda: windows
ide1 or hdb: linux

look at this thread. I have used lilo instead of grub, but a 1337 linuxer will be able to assist you to do the same. basically, windwoes needs to think its the primary master. one of those winblowze things.

Last edited by kLUMSY bOT; 02-11-2004 at 03:19 AM.
 
Old 02-11-2004, 03:56 AM   #6
sirphoenix
Member
 
Registered: Aug 2003
Location: Old Europe
Distribution: Debian Sid/Sarge
Posts: 37

Rep: Reputation: 15
i am using lilo for dual boot on one hard drive.

hda1 = windows xp
hda2-7 = debian

same should work with 2 hds i guess, just configure ur lilo.conf.

i was overwriting my windows boot record and only using lilo to boot windows xp now.

("others" option in lilo.conf)

simply use SUSE 9.2 or something similar (Fedora) they will guide you through the setup and keep ur windows installation (it did for me when i installed suse)
 
Old 02-11-2004, 04:44 AM   #7
kLUMSY bOT
Member
 
Registered: Jan 2004
Distribution: Gentoo 1.4
Posts: 36

Rep: Reputation: 15
no its different. windoors needs to be seen as the primary master.... my lilo works at least (its in the above thread)
 
Old 02-11-2004, 08:14 AM   #8
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Quote:
Originally posted by kLUMSY bOT
noo!!! dont do this! this may overwrite the windows mbr!

i suggest this: (it works on mine!)

ide0 or hda: windows
ide1 or hdb: linux
Not a problem if you have a boot disk: windows 9.x needs a quick fdisk /mbr to bring it back from the a:>
Then you boot up with your linux boot disk and chroot into your HD install and fix your /ect/lilo.conf and run lilo again
and winNT,2000,XP need a quick fixmbr from the a:>
Quote:
basically, windwoes needs to think its the primary master. one of those winblowze things.
Your fix works. There is a newer, more elegant command (yes, one command) to use if Windows is not the first partition--> boot-as=0x80

Does the same thing as table= and map-drive= and map-drive=

Not an issue of Windows is gonna be first on the drive.

Cheers
 
Old 02-11-2004, 02:49 PM   #9
NYCtech
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Original Poster
Rep: Reputation: 0
thanks

ok thanks for all the help but i am fairly new to this so bear with me..What u guys are saying is that i can partition my second HD and add linux one one of the partitions? I will get partition magic to do that if thats the case.And it would be great if someone could give me a webpage that will give me a step by step on how to do this so i can dual boot. Thanks Alot
 
Old 02-11-2004, 05:48 PM   #10
globeTrotter
Member
 
Registered: Feb 2004
Location: Townsville, Queensland, Oz
Distribution: Red Hat 9
Posts: 107

Rep: Reputation: 15
hi

it all sounds like a mountain out of a mole hill to me. answer the following questions before we proceed
1, do you need a windows partition on the slave HD?
2, is XP installed as a FAT or NTFS file system?

ok, heres what i did. first defrag windows, back up all critical files. put a 5mb FAT32 partition on the end of your windows drive. (whetever size is not relevant, as this is just going to be a file area that both windows and linux can access). If XP is already a FAT32 system then this does not have to be done. it's simpler in the long run to put a partition on the windows drive and leave linux on a drive on it's own. not only that but if your going to be tuning the linux system, and it sounds like you are, and something goes wrong and you have to reinstall, you can back up your linux files onto the 5mb partition regularly, then put them back when finished.

i installed red hat 9. this took care of all the boot procedure without any probs. just make sure when asked where to put the linux system you check the second hard drive!!! it will recognise and show you all drives and partitions during install. take note of the label/name of the 5mb partion. this will be mounted later in linux so as to access your windows documents without rebooting. we can take care of mounting in another thread if needed. install first and let us know how you go. a boot loader named GRUB will be installed that will take care of all the boot configurations for now. on boot a screen will appear asking which system you want to boot.

i hope this was of help

if you are a student, and so am i. one of the richest sources of info is with your lecturers and fellow students, theres always at least one linux guru in the class. have fun
regards
GT
 
Old 02-11-2004, 06:53 PM   #11
WindowsH8r
LQ Newbie
 
Registered: Feb 2004
Location: Texas
Distribution: Mandrake 9.2
Posts: 12

Rep: Reputation: 0
exact opposite help please!

I Mandrake 9.2 installed in my larger D drive, and want to install XP for my wife on the C drive which is a bit smaller. How can I install windows XP on the C drive and still get the prompt to choose which OS I want to boot?
 
Old 02-11-2004, 07:32 PM   #12
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 30
This is what I have done, and it is what I recommend you do.

First.

You have two HDD's. I am assuming the following.

1st HDD is the XP Partition.

2nd HDD is going to be the Linux Partition (All data will be wiped!!)

Here is the process to install a dual-boot linux machine without surrendering your MBR to Linux.

Boot your ISO CD. After it has started, before you can run the install (depending on the distro) you have to run cfdisk to format the drives.
Because you are formatting a disk other than /dev/hda, you must specifiy which one to cfdisk.

cfdisk /dev/hdb

Now, create your swap, and system partitions here. Be sure to Write when you are done.

After this, run your install, and specify any options you may need (swap, etc. If you don't know what any of this is, ask!) as well as that your root partition is /dev/hdb*.

After the install, you will be prompted to choose a bootloader, and where to install it. Choose lilo, and choose to install it to the SuperBlock (this is the first sector of your root drive, in your case, /dev/hdb*). After the install is complete, do the following BEFORE YOU REBOOT. (Where * is the # of your boot partition)

1) insert a floppy (#1) in your floppy drive.

2) run the following command: fdformat /dev/fd0

3) dd if=/dev/hdb* bs=512 count=1 of=/dev/fd0

4) cd /

5) dd if=/dev/hdb* bs=512 count=1 of=bootsect.lin

Leave your floppy (#1) in your drive, and reboot. This should boot you into your new OS!!! Now, for the dual boot.

1) insert a DIFFERENT floppy (#2) into your floppy drive.

2) run the following command: fdformat -fat /dev/fd0

3) then: cp /bootsect.lin /dev/fd0

Remove this floppy (#2), and reboot into XP. Now, one final thing. When XP is loaded, and you are on the desktop, do the following:

1) insert floppy #2.

2) right click on my computer, and choose "Properties"

3) click "Advanced"

4) click the "Startup and Recovery" button.

5) Check "Display a list of Operating Systems" and set your timeout.

6) Click "Edit"

7) This is your boot.ini file. It will look something like this:

Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows XP Professional" /fastdetect
8) add the following lines to the END of your boot.ini file:

Code:
C:\BOOTSECT.LIN="Linux"
9) Copy bootsect.lin off of the floppy (#2) to C:\

10) Remove the floppy, and reboot.

You should be able to choose Linux, and it will boot your Linux partition!
Just be careful, as if you change your lilo.conf, you will have to recreate and recopy this file.

Hope this helps.
 
Old 02-11-2004, 09:06 PM   #13
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Finally, I see this method laid out in a reasonable step-by-step manner. I have toyed with doing it that way, but I always resorted to LILO. I may try that myself, if I keep XP on the second drive (which I'd make first, of course).

Here's another way to do it without losing your Win32 MBR:

You can open your case and swap the drives. Make the Windows drive the second drive and your empty one the first drive. Be sure to change the jumpers on them so that they reflect their new status (master-->slave and slave-->master). Install Linux on that one. If you use Redhat, Mandrake, Slack, or Debian for sure, their installers will partition the drive for you and they will install your choice of GRUB or LILO to the mbr of the new first drive (leaving the windows drive untouched). They will usually let you add the Windows drive to the bootloader at that point (when it asks you). When you boot, your linux is self-contained and your Windows is unaltered (meaning that if you remove the Linux drive - or just linux - you can put the Windows drive back in the master spot and carry on as if nothing had happened).

If for some reason, Windows won't boot, or if its not on the list, you can easily add it to the list. If you use LILO (I can help you with this one), fire up your /etc/lilo.conf file in your favorite editor as root. Add a new stanza in the list below your Linux entry, which will start as "image=......":

other=/dev/hdb1 #thats your first partition of your second drive if its on the primary IDE cable as slave
title="WindowsXP" #this will show up in the list. no spaces in the title.
boot-as=0x80 #those are zeros, not o's.That's the BIOS ID for the first IDE drive (Win likes to be first so let it think it is)

Remember to run /sbin/lilo when you finish editing the file (if you have to). Thats important. On GRUB help, I am not gonna be the guy. I haven't succeeded with it yet


This is another way. I use it now (if you want me to post my /etc/lilo.conf , I will)

Last edited by vectordrake; 02-11-2004 at 09:08 PM.
 
  


Reply


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
Solution Dual Boot Windows & Linux [ALL DONE IN WINDOWS] No Linux terminology DSargeant Linux - Newbie 35 02-07-2006 04:29 PM
Solution Dual Boot Windows & Linux [ALL DONE IN WINDOWS] No Linux terminology DSargeant Linux - Newbie 4 11-10-2005 12:37 PM
Vnc only works linux to windows not windows to linux mbdayton Linux - Networking 2 04-16-2005 07:36 PM
Red Hat Linux 9 + Windows Server 2003 + Windows XP + Fedora in same domain wolfy339 Linux - Networking 5 03-02-2005 07:03 AM
Samba - Linux box can see Windows, but WIndows can't see Linux Korff Linux - Networking 1 06-02-2003 11:23 AM

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

All times are GMT -5. The time now is 11:50 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration