Can't boot into OS after kernel compile and install
Hi,
I've just done a kernel (2.6.20.3) compile and install using the guide at www.kroah.com/lkn/. Now I can't boot into my OS. This is my first attempt at doing this. The guide says that I might have a package called mkinitrd which I understand loads the modules at boot. It also has an install script in it called installkernel. I checked lilo.conf and there is no entry in there to load initrd so I wonder how the modules were being loaded before? Anyway, everything was working alright so I thought things would be ok without it. So, I decided to try: Code:
make moules_install Here's the output from the first command: Code:
make modules_install Code:
make install Quote:
I looked in lilo.conf and the entry was just vmlinuz so I went ahead and rebooted. When I boot the machine, I see the Lilo screen with the boot prompt and flashing curser, I hit Enter and see the message "Loading Linux", then "BIOS data check succesful". Then there's just a black screen and the hard drive light on the case stays lit up. That's as far as it gets. Using Knoppix i've gone in and renamed vmlinuz to vmlinuz.2.6.20 and vmlinuz.old back to vmlinuz. I also renamed system.map to system.map.2.6.20 and system.old back to system.map. I thought dong that might let me boot to the old kernel (2.6.17.13) but it hasn't worked. The day before doing the kernel build I had disabled "Update all the shared library links" and "fc-cache" in /etc/rc.d/rc.M and added lines in /etc/rc.d/rc.local to make them run a few minutes after boot. I forgot to reinstate it but have done so now. Any pointers to how I've messed up and how to put it right will be gratefully received :) |
i too recently compiled my (first) kernel (2.6.20.2), on slackware 11.
one important step i did was to copy the default .config file that was installed into the folder where i extracted the new kernel source code i had just downloaded. then when i used 'make menuconfig' i loaded the .config file that was in that folder (default one that i copied). does the hard drive light _stay_ on? or does it flash every now and then? for me, my first compile didnt work. after selecting my linux option from LILO and displaying the messages you receive as well, it would also sit at a black screen. however, the harddrive light was still flashing. It turns out everything was working fine with my new kernel, except that i hadnt compiled into it support for a certain console video driver. regarding what you did to /etc/rc.d/rc.M, i did the same thing and there seems to be no negative side effect so that shouldnt be a problem. when I screwed up compiling, the many times i did, i used the slackware 11 install disc #1 to boot up. after the cd loads, use mkdir to create a mount point for where your slackware system is installed, then use 'chroot <mntFolder>' to 'use' your previously unreachable slackware system. from here you can now go back to your new kernel source folder and run make menuconfig again to make sure you have all options you should. i imagine this is where your problem is--your missing some support that is required. after tweaking the config, continue as you did initially compiling/installing the kernel and lilo. hope this helps |
You should ALWAYS keep a good kernel to boot in case the compiled one fails. So, there should always be at least 2 boot options in lilo ... a good and a new (testing).
What to do now ? You have to add the old kernel back in to lilo.conf then run '/sbin/lilo'. Maybe use the slack install CD ... |
Quote:
Code:
$ cp /proc/config.gz ~/linux/ Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
I have though, renamed the kernels and tried to use the original one: The new one I named vmlinuz.2.6.20 and the original one (which had been renamed vmlinuz.old), vmlinuz, as it was to start with. The lilo.conf entry is vmlinuz but the OS won't boot. I also renamed the system.map so as to use the original. |
Got it. I used the install disk and booted into my system from there, then did /sbin/lilo and rebooted into the HD. This time the OS booted. I renamed the new vmlinuz to vmlinuz.2.6.20.3 and made an entry for it in lilo.conf. Rebooted again and choose the new kernel, it booted ok this time but I have no display, neither TUI nor GUI. Now I just need to find the error in the kernel config.
So, all that was preventing either kernel from booting was that I hadn't restarted Lilo. Thanks guys! |
Similar, but substantially different result
Hi,
I'm piggybacking on your thread to avoid yet another independent kernel compiling thread. Just last night, I compiled a new 2.4 kernel to try and eek out a little more performance from my PIII system. I'm not precisely sure how different it is from the original kernel I was using; I backed up the original .config file but I couldn't find it after my episode began. Using menuconfig, I spent some time learning all the options, and selected the fewest I felt I needed to operate stably. I compiled, following the suggested method in the Slackbook. There were no errors or issues during the compilation. I followed the suggested method of moving the kernel image into the proper place, per the guide referenced above: Code:
# mv /boot/vmlinuz /boot/vmlinuz.old Upon booting, I received a kernel panic at the point that my harddrive is being mounted with ReiserFS. I compiled that into the kernel, I'm nearly certain (the only cause for uncertainty being the error; I remember deliberating on it and selecting it to be supported within the kernel). I tried using the install disc to reset things, but didn't think about using chroot. I read the LILO FAQ, and found that I could use ALT + SHIFT to choose a kernel at boot, and I chose my original kernel. This loaded fine, except none of my modules loaded. I have been running this kernel and its modules for nearly a year with no issue. I reverted my lilo.conf to its original state, ran /sbin/lilo again. Still no modules. Is this a product of having run Code:
# make modules_install Code:
# modprobe radeon Thanks for your time. Daniel |
Quote:
Muraii, im new at compiling a kernel so im no expert. could you give us the _exact_ error message you recieve when trying to boot your new kernel? i believe you said it, but, again, to reenforce, you have to have support for your root filesystem and boot device built in (*). regarding the System.map ive come to find that it is not required. at least it is not for me.. after compiling my new kernel i deleted all source code and modules of the old kernel. about the 'make modules_install' i dont really know. maybe the modules for your old kernel were overwritten by this command with your new kernel? just a guess. again, it seems you may know already but, when you make any serious changes to your /boot/ folder, make sure to edit /etc/lilo.conf and run lilo again to reinstall it. ill check back later tonight.. hope it helps a little. |
Quote:
|
Quote:
Quote:
Quote:
Thanks. I'll keep looking, too. |
Quote:
Thank you for your response. Daniel |
Some things learned
Hi,
Regarding my part of this thread, I believe I may have run all the compilation steps as root. I still haven't figured out how to let the kernel know where all the modules are. I'd still like to learn what I've done, because I'll need to know what I did if I do it again; but I may, to get my machine more usable, simply move on to the next challenge: installing Slackware 11 and moving to the 2.6 kernel. Also, in case anyone else is similarly flummoxed, I was completely mystified that my .config file disappeared when I renamed it. I thought I'd screwed something up until reading that, yes, that's precisely what happens. Sheesh. Have a great day. |
All times are GMT -5. The time now is 08:11 AM. |