Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KC1: Won't boot with new kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Frequently Asked Questions
View previous topic :: View next topic  
Author Message
yokem55
Guru
Guru


Joined: 18 Apr 2002
Posts: 360
Location: Oregon

PostPosted: Fri Nov 22, 2002 6:57 am    Post subject: KC1: Won't boot with new kernel Reply with quote

Navigation: [next KC2: devfs] [Kernel Compilation] [Table of Contents]


KC1: I made a mistake compiling my kernel and now my computer won't boot. What can I do now?

First of all, this isn't too big of a problem, so stay calm about this. You shouldn't have to reinstall Gentool from scratch, and repairing your system usually isn't much of a problem.

The first possible solution to this problem is to simply boot your system with your Gentoo installation boot cd, and then chroot into your existing system so that you can recompile your kernel again. To do this, start by booting your system with your Gentoo boot cdrom. Remember, you may have to change boot device order for your system in your bios. Once the CD has finished booting you will want to bring up the Gentoo install guide by entering the command
Code:
#less /install.txt
Now you most certainly don't have to go through the whole install process again, so don't worry about that. We will simply go through only the segments of the install guide that are required to get the Gentoo on your hard drive up and running. You may want to have networking setup in case you have to download a different version of the kernel. So, to do this, you will have to load your appropriate kernel modules in section 3 and possibly section 4 of the install guide if you have a laptop, and go through the steps in section 5 set configure your network settings. Next, you will want to skip ahead in the install guide to section 7 to mount your Gentoo partitions into the filesystem. Once that is done, you can skip ahead again to the end of section 9, and only follow the instructions for chrooting your system, skipping the instructions on unpacking a stage tarball. Once this is done, you are "inside" your gentoo installation.

The next possible solution to this problem is only possible if you'd previously had a working kernel that you had backed up as "bzImage.old" before installing your new "bzImage" into your /boot directory and if you are using the GRUB bootloader. It is possible to still boot your system with this old kernel by editing the GRUB configuration at boot time to boot your old kernel. As far as I know, Lilo does not support editing its configuration on the fly at boottime.

To do this, start by turning on your system as normal, but when GRUB brings up your boot menu, highlight the Gentoo entry and press the "e" key. Now, using the up and down arrow keys, highlight the line that looks like this:
Code:
kernel /boot/bzImage root=/dev/hda3
and press the "e" key again. Change this line so that instead of pointing to your non-functional "bzImage" kernel, it points to your old, working kernel, possibly named "bzImage.old" or whatever name you gave your old kernel when you backed it up. Now press the "Esc" key and then press the "b" key, and your system should now boot with your old kernel. One thing to note however: the editing of the boot config while within GRUB is not permanent. Unless you rename your backup kernel back to "bzImage" or you edit your menu.lst file manually once your sytem is up and running again, GRUB will continue to try to boot your non-working kernel.

Now, once you have completed either method, and your system is up and running in your Gentoo install, you can go ahead and rebuild your kernel again.


Last edited by yokem55 on Sat Nov 23, 2002 4:51 am; edited 8 times in total
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sat Nov 30, 2002 8:52 pm    Post subject: Reply with quote

Post comments on this FAQ to [FAQF] KC1: Won't boot.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Frequently Asked Questions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum