LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-16-2004, 07:59 AM   #1
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Rep: Reputation: 30
Change Default Boot from GRUB


Hello

I've got a question regarding GRUB. I see quite a good review on GRUB here...
http://www.linuxquestions.org/questions/answers/207

If my question has been answered there, I didn't see it. I have several kernal versions, 3, listed in the GRUB menu. There is one which operates in the most stable manner, but it isn't the default, it is the third in the list. Is there a way to change the order of the list or change the default item which will boot?

Thanks.
 
Old 08-16-2004, 08:04 AM   #2
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Hey great forum... As soon as I posted I found this thread http://www.linuxquestions.org/questi...hreadid=218118

in the Similar Threads section.... So I've discovered the file "/boot/grub/grub.conf" and at the top it says "default=0" - Now I think I just need to know what the "0" represents, and how to find the int value for the kernal I wish to use...
 
Old 08-16-2004, 08:09 AM   #3
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Should I just edit the list, by moving things around... Cut the kernal item from the third position and paste it to the first position...Would that make it position "0"...

I think I'll wait for feedback before messing with this. I don't want to damage something...
 
Old 08-20-2004, 08:57 AM   #4
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
- bump -
 
Old 08-20-2004, 09:09 AM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

'0' is the first entry
so u need to start from '0' for the first entry

regards
 
Old 08-20-2004, 09:19 AM   #6
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Thanks for your reply.

So if 0 is the first entry, and I need to start from 0 for the first entry....
Should I change default=0 to default=3 or should I cut the kernel item from third to the first entry where it
will become '0'?
 
Old 08-20-2004, 09:30 AM   #7
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi

u can try out both

also u need to shift all the entries for the respective kernel

regards
gaurav
 
Old 08-20-2004, 10:52 AM   #8
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
masand,

Thank you for taking the time to respond to my question. I really appreciate your willingness to help.

Respectfully, I'm worried when you say "try". Have you ever done it? Could I damage something which would prevent me from booting into Red Hat? That's a huge risk for me.

Thanks again.
 
Old 08-20-2004, 11:05 AM   #9
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
yes i have tried out both in lilo as well as grub

why is this a risk for u ????
also you need to play off with grub if and only if u have a bootup floppy or
the 1st cd of the distro
in case something goes wrong u need that to recover

regards
gaurav
 
Old 08-21-2004, 06:13 PM   #10
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by masand
hi
yes i have tried out both in lilo as well as grub

why is this a risk for u ????
also you need to play off with grub if and only if u have a bootup floppy or
the 1st cd of the distro
in case something goes wrong u need that to recover

regards
gaurav
Hm. Thanks again, but I'd rather not need to "recover". It's not worth it.

Any second/third opinions or direct experiences are welcome.
 
Old 08-21-2004, 06:46 PM   #11
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
Quote:
Originally posted by lel800
Hm. Thanks again, but I'd rather not need to "recover". It's not worth it.

Any second/third opinions or direct experiences are welcome.
hi there
what i was saying is that u should be ready for all consequences
otherwise fidling with grub/lilo always do not land u in right place
i myself have not been so lucky!!!!
so take a wise decision


regards
gaurav
 
Old 08-21-2004, 08:29 PM   #12
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
I can imagine. Thanks again.
 
Old 08-24-2004, 06:14 PM   #14
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Thanks so much for taking the time to reply

Yes I found that first link to have the information I needed.
I registered with the Red Hat website and then I could search for the proper question.

Here is a copy of what I found on the site.

-- Begin Copy ----

Solution:
Use the command grubby --bootloader-probe to find out which bootloader you have installed. Then, assuming it is GRUB, edit the file /etc/grub.conf as follows:


default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz

title Red Hat Enterprise Linux ES (kernel number zero)
<indented> root (hd0,0)
<indented> kernel /vmlinuz-zero ro root=/dev/hard_drive
<indented> initrd /initrd-zero.img

title Red Hat Enterprise Linux ES (kernel number one)
<indented> root (hd0,0)
<indented> kernel /vmlinuz-one ro root=/dev/hard_drive
<indented> initrd /initrd-one.img

title Red Hat Enterprise Linux ES (kernel number two)
<indented> root (hd0,0)
<indented> kernel /vmlinuz-two ro root=/dev/hard_drive
<indented> initrd /initrd-two.img

In this example file, notice the line at the top that reads default=0. The number 0 (zero) indicates which stanza to select by default. A stanza is the indented portion after the line starting with title. GRUB will then use this default stanza to boot, after a number of seconds has passed (specified in the line timeout=10). The 0 (zero) in this case is referring to the first stanza that starts with "title Red Hat Enterprise Linux ES (kernel number zero)". It includes all of the indented lines up to but not including the next "title" line.

For example, if you instead wanted the second stanza, "title Red Hat Enterprise Linux ES (kernel number one)", to be the default, then you would change the default line to:

default=1


Once you have made this change, save the grub.conf file and your done. You do not need to reload GRUB for the changes to take effect. The next time you boot, your changes will take effect, but once the file is saved, the changes are effective.


-- End Copy ----

( Too bad [pre] tags aren't supported...)
 
Old 08-25-2004, 02:32 AM   #15
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi
so has ur problem solved now, it is quite clear from the document above
it has provded an exhustive description of grub.conf

regards
gaurav
 
  


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
change default OS to boot from grub bootloader. trempel Ubuntu 5 05-27-2005 09:20 PM
Grub: Change Default Boot Entry luwigie Linux - General 4 08-22-2004 03:17 PM
How to change default OS in Grub dual boot screen vipin_mittal Red Hat 1 05-29-2004 09:26 AM
How do you change the default Boot-up OS in Grub? buckwheat12 Fedora 3 05-08-2004 04:24 PM
How to change default boot for Grub? nano_electronix Linux - Software 4 09-01-2003 08:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:24 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
Open Source Consulting | Domain Registration