LinuxQuestions.org
Review your favorite Linux distribution.
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 03-09-2003, 11:36 PM   #1
mib
Member
 
Registered: Mar 2003
Location: Canada
Distribution: RedHat 8.0 (Psyche)
Posts: 34

Rep: Reputation: 15
Exclamation XP RedHat8 Dual Boot


K guys.... i'm a complete dumbass so bare wit me here. I just installed XP (first) and RedHat8. During RedHat8 installation, I selected "MSDOS" as the default OS (or something like that) instead of "Linux". And now, everytime I start my computer, it loads right into XP without displaying any menu or anything in which I can choose between XP and RedHat8 to boot from. BTW (by the way), my current bootloader is configured as LILO. If I am required to change it to make this work, I will (but you have to tell me how, 'cause remember, I'm a complete dumbass not to mention the fact that I'm completely new to Linux/RedHat). Is there a way to repair this problem without re-installing RedHat8 (it'll take forever considering I chose the "Everything" option under the custom package installation). Can I simply edit my boot.ini file to recognize RedHat8? If so, how. Please reply ASAP, as I'm new to RedHat8 and Linux, I'm gonna have a lot of questions, so bare with me. Thanks in advance.
 
Old 03-10-2003, 04:23 AM   #2
annehoog
Member
 
Registered: Jan 2002
Location: Nederland
Distribution: RH 8 Psyche and Debian Woody
Posts: 373

Rep: Reputation: 30
Sounds like you boot lilo in the /boot directory without putting a link to it in the MBR.
I would do a search here (and/or on google) with keywords lilo /boot and such to find out how you can tell your pc to use lilo for booting or delete lilo and reinstall it in the MBR then it should work directly.

I assume you made a boot floppy to get you in to linux?

Anne
 
Old 03-10-2003, 05:23 AM   #3
yngwin
Member
 
Registered: Dec 2002
Location: China
Distribution: Arch
Posts: 359

Rep: Reputation: 33
I think there's three possibilities:

1. Lilo wasn't installed
2. Lilo is installed in the mbr but has a timeout=0
3. Lilo is installed on a Linux partition, but the mbr starts Windows.

I don't know about RedHat but I imagine that you can boot up with the cd again and use it as a rescue disk, or try an "upgrade" option. Then the only thing you need to do is check your /etc/lilo.conf, edit if needed and install it in the mbr - that's the easiest option for now.
 
Old 03-10-2003, 10:39 AM   #4
mib
Member
 
Registered: Mar 2003
Location: Canada
Distribution: RedHat 8.0 (Psyche)
Posts: 34

Original Poster
Rep: Reputation: 15
I dont think I'm supposed to install LILO in the MBR, and I dont think it is. I believe LILO is installed on a Linux partition, but the MBR starts Windows (as yngwin) suggested. Oh, btw, what is a swap partition ('cause I have one of those to along with a ext3 partition)? Here is my boot.ini file from Windows:

[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect

I tried adding a "bootsect.lnx" file to my C:\ with the following lines:

dd if=/dev/hdx of=/bootsect.lnx bs=512 count=1

I got it off some forum or website (I think it was this one). Anyways, I then added the following line to my boot.ini file:

C:\bootsect.lnx="Linux"

I restarted and nothing happened and I was booted right into Windows. Oh, and btw, I reset the menu timeout option from 30secs to none. Thus, in the boot.ini file I have "timeout=0". Thanks for your inquiries. Anyone know how I can simply modify my boot.ini file or reinstall my MBR or whatever as long as I dont have to reinstall Windows or Linux, partition, or any of that crap. Thanks again.
 
Old 03-11-2003, 03:47 AM   #5
annehoog
Member
 
Registered: Jan 2002
Location: Nederland
Distribution: RH 8 Psyche and Debian Woody
Posts: 373

Rep: Reputation: 30
It is perfectly logical to install lilo in the mbr, but for varying reasons some people prefer not to.
To find out how to modify boot.ini, best do a search here, I remember a couple of threads explaining how to do it.

Anne
 
Old 03-11-2003, 07:48 AM   #6
yngwin
Member
 
Registered: Dec 2002
Location: China
Distribution: Arch
Posts: 359

Rep: Reputation: 33
A swap partition is something like virtual memory (Windows uses a hidden file on the root partition for that). When data don't fit in RAM or sit there idle for some time Linux swaps them to disk, to be retrieved when needed.

I myself also like the idea of not installing lilo or grub to the mbr, especially when dual-booting. Re-installing one or the other OS may mess up the mbr. If you have lilo installed to your linux partition, you need to set the bootable flag for that partition. You'd best reboot with the linux install cd, then go to a console (Alt-F2 should do the trick) and type fdisk /dev/hda and when it asks for a command type a and then the number of the Linux root partition. To make the change type w to write and exit, otherwise q to quit without saving changes.

Also, if you want a choice between the two OSes you should never make timeout=0, because then it just boots the default. But you want the choice, so you need timeout=100 or something like that.
 
Old 03-11-2003, 08:55 AM   #7
mib
Member
 
Registered: Mar 2003
Location: Canada
Distribution: RedHat 8.0 (Psyche)
Posts: 34

Original Poster
Rep: Reputation: 15
Aite, thanks again. But it didn't work. The first time I did that fdisk command with the linux cd in the drive and restarted, I got an error message "invalid partition table" or something. Then I did it again and went to the advanced options for fdisk (by typing "x") and then typed "f" to fix it. And it did. That's how I got back on to XP to write this. Anyways, I saw a command in there, "b", that will write the Linux table or something to the beginning of the disk (or something like that). Can I use that to make this work? If so, how? Thanks again in advance.
 
Old 03-11-2003, 09:12 AM   #8
yngwin
Member
 
Registered: Dec 2002
Location: China
Distribution: Arch
Posts: 359

Rep: Reputation: 33
OK, so now you have a fixed mbr. I would try to start again with the RH install disk and redo the lilo configuration.
 
Old 03-11-2003, 02:42 PM   #9
mib
Member
 
Registered: Mar 2003
Location: Canada
Distribution: RedHat 8.0 (Psyche)
Posts: 34

Original Poster
Rep: Reputation: 15
Aite, i repartitioned and reformatted and all dat crap and installed XP and RH8 again. This time i didn't use LILO and i didnt select the MBR as the boot partition; the boot partition is the same as "/" or the root partition whatever. My Partition table looks like this:

Windows XP on hda1 (10gigs); NTFS
RedHat 8.0 on hda2 (17gigs); ext3
Swap on hda3 (almost 2gigs)

And it fills all 30 gigs (28616mbs to be exact).

Okay, so now I can boot into RH using my boot disk only, otherwise it boots right into XP. And using the boot disk is a pain in the ass; it takes like 10 mins to load. Anyways, how can I use grub to boot XP? I tried entering the following lines in my grub.conf file in the /etc dir:

title windows
map(hd0,0) (hd0,2)
map(hd0,2) (hd0,0)
setup(hd0)
rootnoverify(hd0,2)
chainloader +1

This was at the second half of the grub.conf file. Anyways, I got this off some old posts on this site, and I don't think this is specific to my hardware and partition table. Does anyone know about this "map" and "setup" commands (above)? If someone could give me a detailed definition of what these commands do and what they are used for, that would be extremely helpful in determining if there's something wrong with that grub.conf file. Or better yet, can someone help me fix my problems? Thanks in advance once again.
 
Old 03-12-2003, 03:17 AM   #10
annehoog
Member
 
Registered: Jan 2002
Location: Nederland
Distribution: RH 8 Psyche and Debian Woody
Posts: 373

Rep: Reputation: 30
You will have to make you pc aware of the existence of lilo in the /boot partition.
When booting it first reads the bios which directs it to the mbr. If somewhere around the there isn't anything saying that it should look at /boot and lilo to boot then yes it'll continue booting default in to Windhose.
Search around here to find out how to do this, I think you'll have to edit the window boot.ini file.

anne
 
Old 03-12-2003, 08:20 AM   #11
equack
LQ Newbie
 
Registered: Feb 2003
Location: Woodstock, GA
Distribution: RedHat 8.0
Posts: 17

Rep: Reputation: 0
Your boot loader for multi-boot MUST be in the MBR; that's the first thing that gets read. Right now, XP (NTLDR - boot.ini) is controlling the boot-up because it's in the MBR. you can manually edit boot.ini or load LILO or GRUB into the MBR.

If you choose to edit boot.ini (in XP go to System Properties | Advanced | Startup and Recovery Settings | Edit) you would need to copy the boot command from your floppy as the second option in boot.ini. (I know that's vague, but I'm a lot more knowledgable in XP than Linux. Newbie and not ashamed!)
 
Old 03-12-2003, 09:13 AM   #12
yngwin
Member
 
Registered: Dec 2002
Location: China
Distribution: Arch
Posts: 359

Rep: Reputation: 33
I don't think you need those map options. So now we're going with grub? Let's get down to it.

1. Fire up your Linux, go to the console as root and type grub, this should take you to the grub command that looks like grub > - are we ok?
2. Then type root (hd0,1) which is hda2 in grub-speak, your linux-partition.
3. Then at the next grub command type setup (hd0) which puts grub in the mbr, which is easier, because otherwise we need to fiddle with fdisk. The other option is to do setup (hd0,1) and make hda2 bootable like I said in an earlier post.
4. Finally we finish installing grub by typing quit and all that remains is producing the right grub.conf.
5. Edit /boot/grub/grub.conf to look like this:
Code:
default 0
timeout 30

title=Windows XP
root (hd0,0)
chainloader +1

title=RedHat Linux 8.0
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2
Of course you need to make sure that your kernel is actually called vmlinuz (no idea how RH does that) and is present in the /boot/ directory. Good luck!

Last edited by yngwin; 03-12-2003 at 09:15 AM.
 
Old 03-12-2003, 09:25 AM   #13
annehoog
Member
 
Registered: Jan 2002
Location: Nederland
Distribution: RH 8 Psyche and Debian Woody
Posts: 373

Rep: Reputation: 30
Quote:
Originally posted by yngwin
IOf course you need to make sure that your kernel is actually called vmlinuz (no idea how RH does that) and is present in the /boot/ directory. Good luck!
vmlinuz is a symlink to the real kernel :-)

Anne
 
Old 03-12-2003, 09:34 AM   #14
yngwin
Member
 
Registered: Dec 2002
Location: China
Distribution: Arch
Posts: 359

Rep: Reputation: 33
OK, we're all set then!

Anne: you know about http://forum.nedlinux.nl ?
 
Old 03-12-2003, 09:37 AM   #15
annehoog
Member
 
Registered: Jan 2002
Location: Nederland
Distribution: RH 8 Psyche and Debian Woody
Posts: 373

Rep: Reputation: 30
Quote:
Originally posted by yngwin
OK, we're all set then!

Anne: you know about http://forum.nedlinux.nl ?
Yes I do, wasn't you the one who pointed it out to me before?
Right now I have all my questions posted here and I quit like this community. But it won't hurt to visit around there from time to time as well.
I did show the site to my bf who really sucks at English so I guess he will be spending much more time there than me.

anne
 
  


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
Dual boot with RedHat8 SpazzoidKlown Linux - Newbie 2 05-26-2003 04:50 PM
startx upon boot redhat8.0 bax Linux - Distributions 2 03-17-2003 09:35 PM
dual boot xp redhat8 ... problem mib Linux - Newbie 3 03-10-2003 09:52 PM
I want to boot my redhat8.0 in video mode,how to do it? prad Linux - General 11 12-12-2002 03:38 PM
Win2K and Redhat8 dual boot Flatline Linux - Software 4 12-10-2002 04:50 AM

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

All times are GMT -5. The time now is 02:07 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