LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-18-2003, 06:26 PM   #1
glock27linux
LQ Newbie
 
Registered: Nov 2002
Posts: 29

Rep: Reputation: 15
Please, restore my faith in GRUB


Hi all,

I've set up many systems with Grub before yet this one for some reason refuses to boot WinXP. This system has two disks. It boots Gentoo and RH9 just fine (off of hda); but choosing WinXP (hdc) just gives me a "chainloader +1" and black screen.

Note: since linuxes are on hda, and WinXP is on hdc (hdc's mbr is written by with NTbootloader), if i tell the BIOS to boot off of ide1 it will boot XP. Telling BIOS to boot off of ide0 results in GRUB loading, where (as mentioned above), Gentoo & RH work but not WinXP.

See any errors below??

contents of grub.conf:
title Gentoo Linux (2.4.20-genkernel-bbj) athlon
root (hd0,1)
kernel /kernel-2.4.20-gentoo-r8 root=/dev/hda1 hde=ide-scsi
initrd /initrd-2.4.20-gentoo-r8
title Red Hat Linux (2.4.20-20.9) athlon
root (hd0,1)
kernel /vmlinuz-2.4.20-20.9 ro root=LABEL=/ hde=ide-scsi
initrd /initrd-2.4.20-20.9.img
title Windoze XP
rootnoverify (hd1,0)
makeactive
chainloader +1

fdisk -l /dev/hda
/dev/hda1 * 1 2422 19454683+ 83 Linux (gentoo partition, reiserfs)
/dev/hda2 2423 2447 200812+ 83 Linux (RH & gentoo /boot)
/dev/hda3 2448 2543 771120 82 Linux swap
/dev/hda4 2544 5005 19776015 f Win95 Ext'd (LBA)
/dev/hda5 2544 2607 514048+ 83 Linux (RH /var)
/dev/hda6 2608 5005 19261903+ 83 Linux (RH /)

fdisk -l /dev/hdc
/dev/hdc1 * 1 3824 30716248+ c Win95 FAT32 (LBA) (WinXP)
/dev/hdc2 3825 9729 47431912+ 83 Linux (/archive)

No other disks. cdrw is /dev/hdd, dvdrom is /dev/hdf (promise raid in non raid mode). Any problems with this setup?
 
Old 11-18-2003, 11:10 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
I actually had a similiar problem, it kinda silly but i'll tell you about it anyway. It turned out to be the nano editor(I think) I was using to edit grub.conf, I was absolutely sure that I got everything right but it just wouldn't work, so I ditched the old grub.conf and wrote a new one using vi and it worked.

Also if xp wasn't on hdc when it was installed you may need to remap the drives so that the drive becomes the first.

If everything else fails, you might want to try doing it the other way around - using ntldr to grub instead.
 
Old 11-19-2003, 01:32 AM   #3
glock27linux
LQ Newbie
 
Registered: Nov 2002
Posts: 29

Original Poster
Rep: Reputation: 15
Hi Demonbane, how do i do the map thing? Can you illustrate with an example that would apply to my situation? i.e. hda and hdc. Thanks. PS - i checked, and there are no stray new lines or anything. I always use VI.
 
Old 11-19-2003, 03:13 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
To remap see also:
http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/
http://www.gnu.org/manual/grub-0.92/html_mono/grub.html
http://www.mcc.ac.uk/grub/grub_toc.html
http://www.tldp.org/HOWTO/Multiboot-with-GRUB.html
 
Old 11-19-2003, 03:17 AM   #5
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
you add:
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader +1

I just read grub documentation again though, i dont think this is gonna work with windows xp, not to mention that this may not be your problem to begin with.
Try roonoverify (hd1) as well, that loads the mbr in your second harddisk, and as I mentioned before consider using ntldr as the main bootloader, personally I've experienced less problems doing it this way.
 
Old 11-19-2003, 03:34 PM   #6
glock27linux
LQ Newbie
 
Registered: Nov 2002
Posts: 29

Original Poster
Rep: Reputation: 15
Hi - thanks for the mapping explanation. Looking at 4.2.6 of the GRUB .92 manual, it suggests that as well. I will try in a couple of hours and let you all know how it goes. Thanks.
 
Old 11-19-2003, 05:15 PM   #7
glock27linux
LQ Newbie
 
Registered: Nov 2002
Posts: 29

Original Poster
Rep: Reputation: 15
Hi everyone - the map command fixed the problem. I wasn't aware that Windows would not want to boot unless it was on drive 0. How silly!
DemonBane and JZL240I-U, thanks for the tips and useful links.

For the record, here's the functional copy:

title Windoze XP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1
 
Old 11-19-2003, 10:28 PM   #8
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Glad to hear you've got it sorted out, its probably not xp itself but the nt os loader that is complaining when it isn't on drive0. But anyway interesting to hear that the map command does work for XP.
 
Old 11-20-2003, 01:11 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Glad you solved it. Is it still the good old boot loader Version 4.01 of NT4.0 btw.? I used that one for SuSE 6.4 but SuSE 8.1 mangled over my MBR with GRUB -- since that worked from the first boot, I didn't change it back either.

Also good that you could make use of the docs. This is a great site for creating new bookmarks so I try to pass them along.

 
  


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
Restore GRUB Nilesh.Shah Linux - Hardware 6 01-09-2010 11:43 AM
Grub Restore roopunix Linux - Networking 5 08-29-2005 05:29 PM
Install another MS OS and restore Grub? luwigie Linux - General 5 08-30-2004 01:30 PM
Restore Grub Help gackt3541 Linux - General 8 06-06-2004 04:17 PM
How can I restore GRUB ? xtrips Linux - Software 5 07-30-2003 03:22 PM

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

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