LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need help editing grub (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-editing-grub-229196/)

orionpc84 09-11-2004 12:55 AM

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

Demonbane 09-11-2004 01:11 AM

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.

bigrigdriver 09-11-2004 01:14 AM

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.

Demonbane 09-11-2004 01:20 AM

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

see what /sbin/fdisk -l says

orionpc84 09-11-2004 02:36 PM

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

Demonbane 09-11-2004 11:50 PM

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


All times are GMT -5. The time now is 12:33 PM.