[SOLVED] Custom kernel compilation results in black screen when booting
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Custom kernel compilation results in black screen when booting
I decided to try my hand at custom kernel compilation since I noticed the excellent folks behind slackware have made it easy with a menu program. I followed the steps in the slackbook here as well as other guides I found on the internet to fill in the blanks (like what exactly to do with lilo.conf, which the slackbook happens to leave out).
After doing that and trying to boot into Slackware with my new custom kernel, LILO works just fine, showing everything up to the part that goes like
Then, my screen goes blank. The backlight is still on, but nothing is on the screen. I think the actual loading of Slackware is working fine, since my HDD access light blinks normally. Also, when that stops, I am able to do Ctrl-Alt-Delete to reboot the system after logging in. It's as if everything is working fine except nothing is displayed on the screen.
I have a feeling I messed up in the menuconfig part. First, I must ask are the options that are already selected the default for the normal kernel that came with slackware when I installed/updated it? Or are those options recommended after probing my hardware, or just random, or from something else?
What could I have changed wrong?
It might help to know that I am using the framebuffer console, 1024x768x256 (I think the last number is 256. If not it's the lowest one available when suggested during install).
Thanks for any help. I really want to learn how to make a great kernel just for my system, but this keeps getting in my way! Gah!
This is the guide I used the second time I tried, but I still got the same result. To give more detail, I used the 2.6.27.31 kernel source from the K series, not downloading it from kernel.org. Then, I ran "make menuconfig" and changed the options stated in the guide, as well as a couple others maybe (I can't really remember which ones, or even if I did even decided to change them). I ran these commands like stated (with slight modifications to match the version numbers, etc.):
Code:
make bzImage modules # compile the kernel and the modules
make modules_install # installs the modules to /lib/modules/<kernelversion>
cp arch/x86/boot/bzImage /boot/vmlinuz-custom-2.6.27.7 # copy the new kernel file
cp System.map /boot/System.map-custom-2.6.27.7 # copy the System.map (optional)
cp .config /boot/config-custom-2.6.27.7 # backup copy of your kernel config
cd /boot
rm System.map # delete the old link
ln -s System.map-custom-2.6.27.7 System.map # create a new link
Then I modified lilo.conf, ran lilo, and rebooted. Same problem with two tries
Tell me, did you follow this guide more precisely? That is, did you go and download your kernel from kernel.org or did you use the K series like me?
This is the guide I used the second time I tried, but I still got the same result. To give more detail, I used the 2.6.27.31 kernel source from the K series, not downloading it from kernel.org. Then, I ran "make menuconfig" and changed the options stated in the guide, as well as a couple others maybe (I can't really remember which ones, or even if I did even decided to change them). I ran these commands like stated (with slight modifications to match the version numbers, etc.):
Code:
make bzImage modules # compile the kernel and the modules
make modules_install # installs the modules to /lib/modules/<kernelversion>
cp arch/x86/boot/bzImage /boot/vmlinuz-custom-2.6.27.7 # copy the new kernel file
cp System.map /boot/System.map-custom-2.6.27.7 # copy the System.map (optional)
cp .config /boot/config-custom-2.6.27.7 # backup copy of your kernel config
cd /boot
rm System.map # delete the old link
ln -s System.map-custom-2.6.27.7 System.map # create a new link
Then I modified lilo.conf, ran lilo, and rebooted. Same problem with two tries
Tell me, did you follow this guide more precisely? That is, did you go and download your kernel from kernel.org or did you use the K series like me?
I precisely followed Eric's guide as written. I downloaded my kernel from kernel.org.
Ok I found this thread here about this same problem, saying I forgot to include framebuffer support. I'm going to try that and hope it works before following Eric's guide word by word.
Slackware tends to stay a few releases behind with the kernel. Is it ok if I download the latest kernel? Will slackpkg overwrite it even though mine will be newer? I would assume so since it uses upgradepkg, which doesn't really care about version numbers. I read somewhere here that there was a way to make the pkgtools ignore certain packages, but I forgot. I'll have to look that up again (maybe it's in the slackbook?).
Ok I found this thread here about this same problem, saying I forgot to include framebuffer support. I'm going to try that and hope it works before following Eric's guide word by word.
Slackware tends to stay a few releases behind with the kernel. Is it ok if I download the latest kernel? Will slackpkg overwrite it even though mine will be newer? I would assume so since it uses upgradepkg, which doesn't really care about version numbers. I read somewhere here that there was a way to make the pkgtools ignore certain packages, but I forgot. I'll have to look that up again (maybe it's in the slackbook?).
In the conf file of slackpkg the kernel should be blacklisted, i.e. it does not get upgraded. I think installing a new kernel should be done manually, to save some time of experience far from amusing
Yes! I got it! I set vga = normal in lilo.conf AND I made sure framebuffer and VGA text console support was built into the kernel. I also installed nvidiafb and guess what? It detects my screen's resolution perfectly! I was having so much trouble configuring this under Arch Linux, and here it just works!
If your video card is nvidia, you will not be able to compile the proprietary nvidia driver unless you either disable the nvidiafb support in the kernel or unload the module. My advice is remove the nvidiafb from the kernel.
I wasn't planning on using the proprietary nvidia driver anyway; the nv driver suits my needs.
And then if I download a kernel from kernel.org, can I use the very latest on slackware, or will there be incompatibility problems with software, etc.?
I wasn't planning on using the proprietary nvidia driver anyway; the nv driver suits my needs.
And then if I download a kernel from kernel.org, can I use the very latest on slackware, or will there be incompatibility problems with software, etc.?
You should always download the latest stable kernel version. Check file Documentation/changes to make sure that you will be able to compile and use that kernel with the software you have, that is that the versions of the packages you ship are compatible with that kernel. The only software problems you will have with the new kernel concern the kernel drivers you use-they all have to be recompiled against the new kernel. For more details on this issue, do check the excellent guide of Alien: http://alien.slackbook.org/dokuwiki/...%5B%5D=compile
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.