LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-25-2008, 02:02 AM   #1
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 472

Rep: Reputation: 30
GRUB help needed


Hello,
I have XP on first bootable disk and CentOS on 2nd disk. I use GRUB to dualboot them. By default, CentOS is the default OS. I am trying to change GRUB so that XP boots first. However, I am not able to do it.

Here's the section of /etc/grub.conf
Code:
default=0
timeout=3
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS 
        root (hd1,0)
        kernel /boot/vmlinuz-2.6.18-53.1.21.el5 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.18-53.1.21.el5.img
title Windows XP
        rootnoverify (hd0,0)
        chainloader +1
I tried to change 'default' to 1, but that does not seem to change the boot choices. Also, after changing default I did 'grub-install /dev/sda', but to no avail.
Can someone help?

Last edited by concoran; 05-25-2008 at 04:14 AM.
 
Old 05-25-2008, 02:08 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
Originally Posted by concoran View Post
I tried to change 'default' to 1, but that does not seem to change the boot choices.
This should have worked - the text should change and XP should default.
What actually happened ???.

Re-running grub-install isn't necessary.
 
Old 05-25-2008, 02:37 AM   #3
Biglinuxnewb
Member
 
Registered: Jul 2003
Distribution: Gentoo, FreeBSD, OpenBSD, Debian, Knoppix, Digital Unix
Posts: 33

Rep: Reputation: 15
Grub should by default pick XP as the first choice and default to that after the timeout expires. If by defaulting to windows you mean the windows bootloader then this not what this will do. Grub will always be the bootloader for that device, meaning the grub bootloader is always loaded from your default drive's MBR. If you wish to use the NT bootloader by default instead of grub, then if your windows drive still contains the original MBR (it's not overwritten) then you can change your bios so that that drive is the default drive from which to boot. Keep in mind windows' installer is very stupid about where it installs its MBR (it usually picks the first drive it sees, not the drive you actually install the OS to).

Last edited by Biglinuxnewb; 05-25-2008 at 02:39 AM.
 
Old 05-25-2008, 03:20 AM   #4
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 472

Original Poster
Rep: Reputation: 30
I have used GRUB before to dual boot XP/linuxes. In the past, I could just change 'default' value and it would work just fine. I have also used NT loader to boot any of linuxes before to dualboot.
But this is the first time I am using it in CentOS and I am seeing this problem.
In this installation too, I have dabbled between GRUB and NT loader, but each time I just can't seem to be able to boot windows by default.
 
Old 05-25-2008, 03:41 AM   #5
Honeysuckle
Member
 
Registered: Dec 2007
Location: Australia
Distribution: Puppy, debian
Posts: 118

Rep: Reputation: 15
Quote:
Originally Posted by concoran View Post
Can someone help?
Probably not..... but perhaps giving this map command might be worth a try?
http://www.gnu.org/software/grub/manual/grub.html#map
 
Old 05-25-2008, 08:22 PM   #6
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 472

Original Poster
Rep: Reputation: 30
I am now partially able to resolve the situation. Until now, I HAD to use GRUB to be able to boot into CentOS. Now I have installed GRUB into /dev/sdb, copied the sector to c:\, and can use NT loader to actually boot into Linux.

However, i have observed this weird behaviour. GRUB doesn't seem to care for what is in /etc/grub.conf file. For instance, if I change 'CentOS' line to 'Timbuktoo', I still see CentOS in GRUB. If there is another entry (new kernel), I still don't see it in the GRUB menu. And this happens not only after changing grub.conf, but also after re-installing Grub.

Does anyone have experience of GRUB not respecting /etc/grub.conf file? One of the changes that happened to my machine recently is that I shrank the linux partition. But not sure if it has anything to do with grub.
 
Old 05-25-2008, 08:49 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Ooops - should have noticed that earlier.
You should be updating /boot/grub/menu.lst
 
Old 05-26-2008, 07:26 PM   #8
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 472

Original Poster
Rep: Reputation: 30
My bad. I too failed to realize that I should be modifying menu.lst and not /etc/grub.conf.
Now it's working.
Thank you very much for all the replies.

Just curious: if we have menu.lst, why is /etc/grub.conf needed?
 
  


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
Grub Error, Help Needed. Romeyo Linux - General 2 11-20-2007 11:23 AM
Grub Configuration.. a little help needed phsythax Linux - Software 3 11-07-2005 04:54 PM
GRUB help needed Aphex_Twin2 Linux - General 1 05-03-2005 04:00 PM
GRUB clarification needed CyberLord_7 Fedora 2 02-16-2005 02:37 PM
is lilo or grub needed? roofy Linux - Software 4 05-06-2003 09:23 AM


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