LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-23-2004, 07:52 PM   #1
JSThePatriot
Member
 
Registered: Jul 2004
Location: Tennessee, USA
Posts: 38

Rep: Reputation: 15
GRUB Multi boot system


I tried installing Linux on a second hard drive that I had. Everything was working great till for some reason the installation wasnt recognizing the second cd (which I know is fine). After fighting with that for quite a while and it saying it was successfull and it really wasnt I finally disconnected my windows drive (which I probably should have done from the start) and then installed. Everything seemed to work fine that time and now I have linux and no Windows. Is there a way I can add to GRUB my windows operating system? Because I think it originally tried to load itself on my windows disk. All I know is that I want my windows back, but I want to keep my linux.

Another thing I have noticed about GRUB is that I upgraded my kernel and now it is saying I have 4 different options in the GRUB (I am running a multi-processor machine) so I should only have 2, but there are 4.

Thanks any help or linux tips would be much appreciated.

JS
 
Old 07-23-2004, 10:11 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
How are your drives connected right now?
As for the options in grub, you can edit them in /boot/grub/grub.conf(or menu.lst)
The old kernel is kept there so that if something goes wrong with the new kernel you still have the option of going back.
 
Old 07-23-2004, 11:08 PM   #3
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi JsPatriot,
The reason for you to have 4 options in the grub menu may be you have 2 for the old kernel and 2 for the new. For eache ot the two sets, one of each may have "console text" or "text mode" and the other is the first and default boot which enter graphics mode.
It is easy to set the windows to be booted by grub. If you installed the linux disk as the first, you have to install windows as the second and add one more entry in grub. I think the graphical environment of FC has some utility to add your windows disk, but in reality, all you need is to edit the grub configuration menu, which is named /boot/grub/grub.conf or /boot/grub/menu.lst. You have to add to it
Code:
title = Microsoft Windows (tm)
       map (hd0) (hd1)
       map (hd1) (hd0)
       rootnoverify (hd0,0)
       chainloader +1
 
Old 07-24-2004, 01:33 PM   #4
JSThePatriot
Member
 
Registered: Jul 2004
Location: Tennessee, USA
Posts: 38

Original Poster
Rep: Reputation: 15
Okay my drives are connected through IDE cables. Is that what you mean?

As for the windows boot option, it gives me the following error.

Error 13: Invalid or unsupported executable format

Press any key to continue...

So I dont know whats up. Maybe I messed up my windows installation? I hope not. If I did then I need to write alot of CD's with the information and go from there.

JS
 
Old 07-24-2004, 03:50 PM   #5
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi JsPatriot,
The question Demonbane did to you was, if you have 2 hds, installed XP in one of those and Linux in the other, what is the order of the disks. When you boot, the linux disk appears as primary master or this is the windows disk.
As you are booting linux as we suppose, can you post the results of the commands "fdisk -l" and "df -v", and also the listing of your grub.conf? This files will help us to clarify the problem you have.

Have a nice week end!
 
Old 07-24-2004, 04:31 PM   #6
JSThePatriot
Member
 
Registered: Jul 2004
Location: Tennessee, USA
Posts: 38

Original Poster
Rep: Reputation: 15
Okay when I installed linux (and actually got it to work) I had disconnected my drive windows drive which was primary master. The linux drive is secondary master.

fdisk -l returned the following:
Code:
Disk /dev/hda: 40.0 GB, 40020664320 bytes
16 heads, 63 sectors/track, 77545 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1       77536    39078081    7  HPFS/NTFS
 
Disk /dev/hdc: 20.5 GB, 20525137920 bytes
16 heads, 63 sectors/track, 39770 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1         203      102280+  83  Linux
/dev/hdc2             204       37690    18893448   83  Linux
/dev/hdc3           37691       39770     1048320   82  Linux swap
df -v returned the following:
Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hdc2             18596936   2945972  14706292  17% /
/dev/hdc1                99043     11080     82849  12% /boot
none                    257768         0    257768   0% /dev/shm
The grub.conf before I tried the above (windows add in thingie):
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/hdc2
#          initrd /initrd-version.img
#boot=/dev/hdc
default=2
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.6-1.435.2.3)
	root (hd0,0)
	kernel /vmlinuz-2.6.6-1.435.2.3 ro root=LABEL=/ rhgb quiet
	initrd /initrd-2.6.6-1.435.2.3.img
title Fedora Core (2.6.6-1.435.2.3smp)
	root (hd0,0)
	kernel /vmlinuz-2.6.6-1.435.2.3smp ro root=LABEL=/ rhgb quiet
	initrd /initrd-2.6.6-1.435.2.3smp.img
title Fedora Core (2.6.5-1.358smp)
	root (hd0,0)
	kernel /vmlinuz-2.6.5-1.358smp ro root=LABEL=/ rhgb quiet
	initrd /initrd-2.6.5-1.358smp.img
title Fedora Core-up (2.6.5-1.358)
	root (hd0,0)
	kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
	initrd /initrd-2.6.5-1.358.img
The grub.conf now:
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/hdc2
#          initrd /initrd-version.img
#boot=/dev/hdc
default=2
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title = Microsoft Windows (tm)
       map (hd0) (hd1)
       map (hd1) (hd0)
       rootnoverify (hd0,0)
       chainloader +1
title Fedora Core (2.6.6-1.435.2.3)
	root (hd0,0)
	kernel /vmlinuz-2.6.6-1.435.2.3 ro root=LABEL=/ rhgb quiet
	initrd /initrd-2.6.6-1.435.2.3.img
title Fedora Core (2.6.6-1.435.2.3smp)
	root (hd0,0)
	kernel /vmlinuz-2.6.6-1.435.2.3smp ro root=LABEL=/ rhgb quiet
	initrd /initrd-2.6.6-1.435.2.3smp.img
When I click the windows it gives me an error that is as follows.
Code:
Error 13: Invalid or unsupported executable format.

Press any key to continue...
Thank you everyone for your help and I hope someone can come up with a solution!
JS
 
Old 07-24-2004, 08:36 PM   #7
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
I think that you might try removing the two map lines from your menu file. From what I understand those are meant to trick Windows into thinking it is installed on the first hard disk. It is already installed there so removing those might do something.

Oh also add makeactive below rootnoverify.

http://www.linuxgazette.com/issue64/kohli.html

Last edited by Kroenecker; 07-24-2004 at 08:37 PM.
 
Old 07-24-2004, 09:32 PM   #8
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi JSThePatriot,
As Kroenecker said, you must remove the lines "map (hd0) (hd1)" and "map (hd1) (hd0)". In my prior post I suggested it based on the supposition your windows drive was the second. Also, I guess the lines where you see "(hd0)" or "(hd0,x)" in the Fedora entries should be changed to "(hd1)" and "(hd1,x)" as your linux is on the second disk. I refer to the entries "splashimage" and "root (hd0,0)" in the FC entries.
 
Old 07-24-2004, 09:49 PM   #9
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
If you set the bios to boot from your Linux drive(looks like your are) then you do need the map line
Code:
title Windows
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

Last edited by Demonbane; 07-24-2004 at 09:55 PM.
 
Old 07-29-2004, 05:38 PM   #10
JSThePatriot
Member
 
Registered: Jul 2004
Location: Tennessee, USA
Posts: 38

Original Poster
Rep: Reputation: 15
When I did that all it did was say Booting... then under that it showed everything that you had me put in the .conf file.

JS
 
Old 07-30-2004, 06:28 AM   #11
jwijesundra
Member
 
Registered: Jun 2004
Posts: 52

Rep: Reputation: 15
I have the same problem that patriot has. Using the information from the other posts, I configured my grub.conf however when selecting windows from the menu the lines from the windows section of grub.conf with a message saying that there is an error in them.
I cannot load Windows even by setting the BIOS to load through the hard disk with windows, while loading windows stalls. The only way to load windows is to disconnect the hard disk that has Linux on it. I have tried all the suggestions such as using the makeactive command, unsuccessfully.
 
Old 07-30-2004, 08:04 PM   #12
JSThePatriot
Member
 
Registered: Jul 2004
Location: Tennessee, USA
Posts: 38

Original Poster
Rep: Reputation: 15
Dang you would think that with this many of us having a problem they would have a solution for it.

JS
 
  


Reply



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
Grub - multi OS boot hiteshmaisheri Linux - Software 3 01-15-2006 11:19 AM
How to multi boot by GRUB? jiapei100 Linux From Scratch 3 02-22-2005 09:22 PM
Grub Multi-Boot On Old Laptop JamieKitson Linux - Software 1 11-16-2004 04:07 AM
Need help with boot loader. Multi boot questions. Grub? 1993gt40 Linux - Software 1 10-16-2003 08:28 PM
GRUB, Multi Linux/Multi Disk Boot gtnorton Linux - Software 1 03-16-2003 03:48 AM

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

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