LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-18-2009, 03:52 PM   #1
debianD
Member
 
Registered: Jul 2009
Posts: 37

Rep: Reputation: 16
how to edit grub.conf !


Hi frens,

After my installation of gentoo and while installing grub which was in the final phase ,I made one entry wrong in grub.conf.
My grub.conf is like this:

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.24-r5
root (hd0,0)
kernel /boot/kernel-2.6.24-gentoo-r5 root=/dev/sda3

#the red one is the wrong entry
title Gentoo Linux 2.4.24-r5 (rescue)
root (hd0,0)
kernel /boot/kernel-2.6.24-gentoo-r5 root=/dev/sda3 init=/bin/bb

So when I boot normally gives me Error no:15 file not found.
I corrected it from grub prompt by editing it but I think it boots in rescue mode as my disk image .iso file's path is directly set in my Vmware.
So after successful booting I tried to edit /boot/grub/grub.conf but I found the entire grub subdirectory missing.
I tried to mount
#mount /dev/sda1 /boot
but it says mount failed no such file or directory.

Editing from grub prompt is temporary,how would I edit grub.conf permanently?

I am not putting my question in gentoo forum because I think my problem is more of grub related.

TIA.
Cheers!!
 
Old 07-18-2009, 04:37 PM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 97
Okay, it sounds like you understand how it all works. The only thing you didn't
mention is the difference between the title line and the kernel line. The title
can say anything, it's just a good idea to have it match your kernel version. The
kernel line is the one that must be right.

Since the root parameter is hd(0,0) I take it that sda1 is your root partition,
and the boot partition is hd(0,2). If that's right, you should be able to boot
the system by editing your boot parameters, then update /boot/grub/menu.lst.

You could also boot from a live cd like Knoppix, mount /dev/sda3 and edit the
grub/menu.lst file at the mountpoint.
 
Old 07-18-2009, 04:42 PM   #3
chigurh8
Member
 
Registered: Jul 2009
Distribution: Ubuntu, Gentoo
Posts: 102

Rep: Reputation: 18
I don't mean to imply that you don't know what you're doing, but are you really using the 2.6.24-gentoo-r5 kernel?

Last edited by chigurh8; 07-18-2009 at 04:44 PM.
 
Old 07-18-2009, 04:49 PM   #4
chigurh8
Member
 
Registered: Jul 2009
Distribution: Ubuntu, Gentoo
Posts: 102

Rep: Reputation: 18
Quote:
Originally Posted by carltm View Post
Okay, it sounds like you understand how it all works. The only thing you didn't
mention is the difference between the title line and the kernel line. The title
can say anything, it's just a good idea to have it match your kernel version. The
kernel line is the one that must be right.

Since the root parameter is hd(0,0) I take it that sda1 is your root partition,
and the boot partition is hd(0,2). If that's right, you should be able to boot
the system by editing your boot parameters, then update /boot/grub/menu.lst.
The boot partition can be the first partition ... the third can be your root partition, second swap - in fact, that's the way they have it laid out in the handbook for Gentoo ...
 
Old 07-18-2009, 04:51 PM   #5
chigurh8
Member
 
Registered: Jul 2009
Distribution: Ubuntu, Gentoo
Posts: 102

Rep: Reputation: 18
Right now the Gentoo handbook (in their examples) shows 2.6.24 as the example, but the kernel they are using right now by default is 2.6.29-gentoo-r5 ... It might be what's causing confusion.

Last edited by chigurh8; 07-18-2009 at 04:52 PM.
 
Old 07-18-2009, 04:55 PM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
I am not a gentoo guy but to edit grub.conf open a terminal, become root
and call up a text editor or filemanager

like say I was in ubuntu
I would open terminal
and open Nautilus as root
"sudo nautilus"
enter my password and then do the editing as root
using text editor
"sudo gedit /boot/grub/grub.conf"

EDIT: it is also easy enough to make a new grub folder/grub.conf this way tooo

EDIT again:
I just installed fedora 11 from cd to my ext3 usb
via liveusb-creator
I thought it would put a grub folder/mewnu.lst there
it put a syslinux folder and extlinux.conf(extlinux is for ext2/3)

so, I just made a boot/grub folders and a menu.lst
converting the extlinux.conf into menu.lst

here is extlinux(syslinux.cfg too).conf

Code:
label linux0
  menu label Boot
  kernel vmlinuz0
  append initrd=initrd0.img root=UUID=45674521-df38-44d1-8f8d-ec264870efbe rootfstype=ext3 rw liveimg overlay=UUID=45674521-df38-44d1-8f8d-ec264870efbe quiet  rhgb
and here it is converted

Code:
title Fedora 11 Live
root (hd0,0)
  kernel /syslinux/vmlinuz0 root=UUID=45674521-df38-44d1-8f8d-ec264870efbe rootfstype=ext3 rw liveimg overlay=UUID=45674521-df38-44d1-8f8d-ec264870efbe quiet  rhgb 
  initrd /syslinux/initrd0.img
hope that helps

Last edited by linus72; 07-18-2009 at 05:02 PM.
 
Old 07-18-2009, 04:58 PM   #7
chigurh8
Member
 
Registered: Jul 2009
Distribution: Ubuntu, Gentoo
Posts: 102

Rep: Reputation: 18
I don't mean to quadruple post, but also:
*edit: yeah, the title wouldn't affect it, for some reason I was thinking it said you wrote the 2.4 twice ...
Also, if he installed Gentoo using the handbook and he experienced this problem when rebooting to finish up the installation, he doesn't have x.org or a desktop environment installed yet - otherwise I would think you mean chrooting, I don't know much about vmware though, maybe it's causing me confusion. From the command line you'd be using nano unless you emerged vim or whatever while installing ... It doesn't have vim if you just go by the handbook unless you install it yourself, all the instructions in the handbook use nano.

*edit:Using genkernel, it still makes the default the actual kernel you're using, if you're using the default now with 2008.0 it would be 2.6.29-gentoo-r5 or you rename it ...

Last edited by chigurh8; 07-18-2009 at 06:11 PM.
 
Old 07-18-2009, 05:30 PM   #8
debianD
Member
 
Registered: Jul 2009
Posts: 37

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by chigurh8 View Post
I don't mean to quadruple post, but also:
Say you're using 2.6.29, if you have 2.4.29 as the second title, it would still automatically boot the 2.6 unless you chose to boot to rescue.
Also, if he installed Gentoo using the handbook and he experienced this problem when rebooting to finish up the installation, he doesn't have x.org or a desktop environment installed yet - otherwise I would think you mean chrooting, I don't know much about vmware though, maybe it's causing me confusion. From the command line you'd be using nano unless you emerged vim or whatever while installing ... It doesn't have vim if you just go by the handbook unless you install it yourself, all the instructions in the handbook use nano.
Yes you are right,my kernel is 2.6.29 version. Actually I just copied and pasted the example given in the handbook to this post.
The actual name I have given to my kernel image is kernel-2.6.24(which needs correction if I stick to its actual version).
In that kernel line of grub.conf only kernel image name matters(one what we decide after building a kernel image)...and that can be anything.

Yes no X.org no vim yet,need to install.
I Solved the problem by editing menu.lst

Thx to all.
Cheers!!
 
Old 07-18-2009, 05:35 PM   #9
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Please mark it as solved at your first post, "thread tools"
this will help alot
 
  


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
how to edit grub.conf from grub shell during booting pashaikh Linux - Security 1 06-27-2006 06:01 AM
Edit the Grub.conf reply2vinay Linux - Hardware 1 07-26-2005 10:38 AM
How to edit grub.conf? zeroz52 Linux - Newbie 27 03-02-2005 01:58 PM
[SOLVED] How to edit grub.conf filosophem Red Hat 4 02-07-2004 04:04 AM
Edit grub.conf NoviceW Linux - General 1 11-11-2003 06:51 PM


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