LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 09-11-2004, 12:55 AM   #1
orionpc84
LQ Newbie
 
Registered: Sep 2004
Posts: 4

Rep: Reputation: 0
need help editing grub


i have spent 4 days learning how to install gentoo on my computer. i have done well using google and reading the documents gentoo provided, i have completed the installation exactly as it describes, but i have made a mistake in grub.conf and it will not boot into the OS.

i only have 1 IDE hard drive and instead of reading "hda" it reads "hdc" which is ok but now it is confusing when i am making the grub.conf.

i do try to load gentoo from the bootable cd so i can get the command line, but when i try to edit the grub.conf it says no such directory or file. what i had to do in this case is format everything and start again, but this takes me at least 6 or 8 hours. is there something i need to mount, some directory i need to change to in order to edit the grub.conf on gentoo system?

it says kernel panic, can't mount root on hdc3. it tells me to specify a valid "root=" but i did.. i think because it is "hdc" instead of "hda" i am confused because i only have one drive. i also selected "(hd0,0)" for grub, but the partitions are all "hdc" do these match? maybe i'm not making sense but if you could please help me with this, i have already done enough research and tried many times there must be a way to edit the config file for grub from the command line on gentoo... thanks.



oRioN
 
Old 09-11-2004, 01:11 AM   #2
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Boot with the gentoo livecd and do a "/sbin/fdisk -l"
You drive will be hdc if its on secondary master of your ide channel, regardless of whether its the only drive on the system or not, unless you play with kernel parameters.
As for editing grub.conf if you're doing it from the livecd make sure you mount the partition, if you have a separate one for /boot.
(hd0) in grub would be correct if you only have one drive.

Last edited by Demonbane; 09-11-2004 at 01:13 AM.
 
Old 09-11-2004, 01:14 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,746

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
OK. You installed gentoo on hda, but it won't boot. You try to boot from cd, and all the info you see tells you gentoo in on hdc. That's because the OS you have booted is the one on the cd (which is hdc). In order to get to /etc/grub.conf on hda, you need to do the following:
a. boot from cd.
b. edit the fstab which loads from the cd (you'll have to do it from command-line with vi or something similar) and add a mount point for hda. If the mount point doesn't exist, you will have to create it. In simple english, create a directory to be the mount point for hda (mkdir /mnt/gentoo or something like that). Then edit fstab to add a line like '/dev/hda /mnt/gentoo ext2 defaults', then save the file. In vi, that means press <ESC>, then :wq <enter> to save the change. Now you should be able to mount hda and fix /etc/grub.conf.
c. don't worry about the directory and mount point you just created; you created them in the running copy of gentoo from the cd, and not on the installed gentoo on hda. They will disappear when you remove the cd from the drive and reboot.
 
Old 09-11-2004, 01:20 AM   #4
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
AFAIK Gentoo livecd mounts its temporary root on a ram drive, not the cdrom.

see what /sbin/fdisk -l says
 
Old 09-11-2004, 02:36 PM   #5
orionpc84
LQ Newbie
 
Registered: Sep 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you for the reply... I did try what you wrote, but it didn't work. Normally I would research more or ask more details, etc. but it has already been 5 days I've had no OS and I simply can't afford to go any longer with my current projects, etc. On a note for other newbies like myself, maybe Gentoo isn't a good _first_ distro to try.



oRioN
 
Old 09-11-2004, 11:50 PM   #6
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
I acutally meant doing a "/sbin/fdisk -l" and post the results so we can see whats going on in your system.
 
  


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 Editing hoe Linux - General 2 11-07-2004 06:45 PM
Editing Grub onelung02 Suse/Novell 3 10-27-2004 03:45 AM
Editing Grub Permaximus Linux - Newbie 9 09-22-2004 09:14 AM
editing grub pcmatt Linux - General 7 11-21-2002 10:49 PM
Grub: Editing Kryptow Linux - Newbie 4 09-05-2002 01:47 AM


All times are GMT -5. The time now is 02:24 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration