Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-19-2004, 05:38 PM
|
#1
|
Member
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105
Rep:
|
My first kernel compile == complete screwup
I was wary of venturing into the obscure and arcana world of kernel compiling, but I really wanted to add SMP support to my good ol' kernel.
So I followed the steps in this thread. Easy enough.
After a reboot, tadaaaaa ! No more X for you, friend. Refusing to panic, I tried reinstalling the NVidia driver. It wouldn't find an older driver, and this refused to install. I then ran xf86config to reinstall the old nv driver. X would start.
However the following problems appeared :
1. My kernel sources seem to have disappeared ! When I try running the Nvidia package with the newer driver, it complains it can't find my kernel sources.
2. I can't use my modem anymore ! kppp tells me my modem has no support for ppp.
3. I can't access my NTFS partition anymore. dmesg shows me that my kernel does not recognize NTFS as a valid partition type or something like that.
What should I do ? Go back to my original kernel ? How do I install a precompiled kernel (there are quite a few on the Slack 9.1 CDs) ?
|
|
|
07-19-2004, 07:01 PM
|
#2
|
Member
Registered: Feb 2004
Location: Toronto
Distribution: Arch
Posts: 146
Rep:
|
It looks like you've forgotten to check some options in your kernel config.
Enable more ppp/ntfs stuff and then try again.
About the NVidia kernel : it looks for a (link to a) directory named :
/usr/src/linux
if it doesn't exist, create it, like this :
ln -s /path/to/linux-2.6.7 /usr/src/linux
by default /usr/src/linux is a symbolic link to the sources of the standard kernel. Since you now have a different kernel, you have to change it. First remove this link :
rm /usr/src/linux
and then create it, like above.
|
|
|
07-19-2004, 08:02 PM
|
#3
|
Member
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519
Rep:
|
Hi Mr.,
I compile kernels since 1998. Last Friday I did a stupidity to use "make mrproper". It's right to use when you install a new kernel source to force the correct architecture but, before you have to save your ".config" file which is on the kernel source directory. So, if you loose it, you start with a fresh configuration and it's very hard to remember all options you have been setting in the long run. As it is your first adventure, you may get the config in your distribution to start again. But, as I said in another post this week-end, before compile the kernel, edit the main Makefile to change the kernel name with a different extra-version, on the 4th line of the file. For example, you can put "-smp2" as it will your second try for smp. Never compile a kernel with the same name as the kernel you are running. This way you always has a safe boot option to go back when things go wrong.
Have fun!
|
|
|
07-19-2004, 11:13 PM
|
#4
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
I'll bet when you moved the kernel and system.map to /boot
you may have moved the whole kernel source directory with it......maybe........
|
|
|
07-20-2004, 07:42 PM
|
#5
|
Member
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105
Original Poster
Rep:
|
Second kernel compile > first kernel compile
Okay, following all of your advice, I tried compiled more recent kernels (2.4.26 and 2.6.7, respectively)... I can tell some of you are gonna laugh.
I took my old .config file into the 2.4.26 directory and started make xconfig. I added SMP support. Yay. Could it be that easy ?
make dep, make clean, make bzImage, make install. DAMN ! For some reason, the kernel was named "vmlinuz" and bore no version, sub-version or extra-version number, even though I had modified it in the makefile. Great...
No problem : I did it all again. Did you know that make install renames your old kernel to vmlinuz.old and then installs the new one ? Well I didn't. And I had manually renamed my very first kernnel to vmlinuz.old. Result : two hand-made yet identical kernels. One reboot later, guess what ? I get a black screen. No system messages. Yay.
I had a plan B : Bootdisk. :P So I booted from the floppy and tried compiling my 2.6.7 kernel instead, using my old .config file. Guess what ? Same results.
So what kernel options might cause such a blank screen ? I made sure to add support for my GeForce card, so I might not think it's a graphics problem. But then...
Just ask if you'd need seeing my .config file. Right now I'm way too fed up to even mount a floppy and copy the file.
*goes take a shower*
|
|
|
07-20-2004, 09:35 PM
|
#6
|
Member
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519
Rep:
|
Ok, SolarBear,
As I compile kernels since the last millennium, sometimes I forget to say all the steps, which are glued in my fingers. Last millennium I tried to use make install and I arrived where you are. That time, our best machines were pentium 100 or the newer pentium 133, 16 or 32MB memory, 540MB disk and 14.4kbps. Those were glory days! Few years before I tried to access an uucp site in US with an ultimate 1200bps modem. I had to get 480k of data and, when I already got 450k, 2 hours late, the connection dropped. I tried again with the same results. So I guessed there was a connection timer which gave me just 2 hours. I spent US$100 in phone bills for nothing. Now, you agree with me Those were glorious days, ahnn?
Well, after I got an unbootable kernel after "make install", I don't know how I learned to not use this infamous command. If you read enough, you will not see anybody saying this.
The correct procedures is:
Code:
make ...config
make bzImage
make modules
make modules_install
cp <your-kernel-source>/arch/i386/boot/bzImage <wherever-you-want-your-kernel-leaves>/vmlinuz-V.P.Sxxx
cp <your-kernel-source>/System.map /boot/System.map-V.P.Sxxx
Here I used the following notation:
...config - xconfig for graphical environment
- menuconfig for text console menu
- config - awful set of questions
- oldconfig you have to use whenever you patch your kernel. It accepts the answers of
your actual config and asks you answers for new modules. It's a fair way to see what is
new in this version.
V.P.Sxxx -
V - kernel version level 2 2
P - patch level 4 6
S - subversion level 26 7
xxxx- my extra version -mysmp -mysmp
The result - vmlinuz-2.4.26-mysmp
- vmlinuz-2.6.7-mysmp
Interesting is the modules will be installed and configured in /lib/modules/V.P.Sxxxx by using the command make modules_install.
The once thing is faulting in slackware, at least till 9.1 is the proper linking of the System.map. Here we can borrow some lines of the RH heritage. In the startup routines, we may force the System.map-x.xx.xx-yyy to be symbolically linked to System.map. I put the following lines in /etc/rc.d/rc.S
Code:
# Adjust symlinks as necessary in /boot to keep system services from
# spewing messages about mismatched System maps and so on. Borrowed from
# Init scripts from RH family in 07/15/2004.
if [ -L /boot/System.map -a -r /boot/System.map-`uname -r` ]; then
ln -s -f System.map-`uname -r` /boot/System.map
fi
if [ ! -e /boot/System.map -a -r /boot/System.map-`uname -r` ]; then
ln -s -f System.map-`uname -r` /boot/System.map
fi
Well, this was about history and compile. For you to install a pre-compiled kernel, all you need is to use installpkg. Remember you have to install kernel and modules, which are separated. Don´t forget, before reboot update your bootloader menu to point to the new kernel and if it is lilo, run it to install the new menu or you will need your diskette again.
About your GE Force, you have to obtain the driver from nvidia, which is not gpl'ed and follow the instructions attached to enable it.
You are becoming an expert in these things. Congratulations!
|
|
|
07-21-2004, 01:09 AM
|
#7
|
Member
Registered: Mar 2004
Location: Finland
Distribution: Gentoo
Posts: 235
Rep:
|
I propably failed about 5 or so first kernel compiles  It´s just the way it goes, every time you get a kernel panic you learn something new.
I recommend taking a kernel config that works (ie, for example the one from the generic slackware kernels) and then edit that and remove unnecessary things.
It´s much easier than starting from scratch
|
|
|
07-21-2004, 02:01 AM
|
#8
|
Member
Registered: Feb 2004
Location: Toronto
Distribution: Arch
Posts: 146
Rep:
|
SolarBear,
the advice osvaldomarques is giving you is excellent. I have only a few things to add :
0) Have you noticed, in his procedure, there is _no_ make install. You do everything in your home directory, not logged as root, until the effective installation, which you do _by hand_ (starting from make modules_install, you have to be root) . Note that, unless your vmlinuz and System.map files are named exactly the same way (which is the case when new version==old version), you'll have to edit your /etc/lilo.conf in order to add a boot entry for your new kernel (this way, you can dual-boot the new and the old one, that's very convenient in case there's a problem). And, as he says, _don't_ forget to run lilo.
1) don't try to use your old 2.4 .config. The advice from vrln, which is, to look for the .config of the slackware 2.6.7 kernel, is much better.
2) in case you have to start from scratch, ie, with no .config, then make xconfig will use a default .config which has some problems about the framebuffer, which you'll have to check. see the sticky posts at the top of this board.
3) there are software prerequisites before you can successfully compile a kernel. See the link below, or Documentation/Changes in your linux src directory.
and this link is very useful, and totally compatible with osvaldomarques's advice :
http://armin.emx.at/kernel_2.6/kernel_2.6_howto.html
|
|
|
07-22-2004, 09:36 PM
|
#9
|
Member
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105
Original Poster
Rep:
|
UPDATE
Thanks a LOT for those clarifications. Seems like it was that "make install" that screwed everything up.
And, just to make sure to put every single chance on my side, I checked nearly everything in gconfig. Now I have a brand-new kernel (is it just me or my system feels snappier ? maybe it's just me) and the only problem left to solve is connecting to the net with ppp (whom I installed in the kernel, of course) but that should be trivial.
Thanks again. You can be sure I'm saving up this thread and locking it up in a safe. 
|
|
|
08-02-2004, 10:12 PM
|
#10
|
LQ Newbie
Registered: Aug 2004
Posts: 4
Rep:
|
Did you get ppp to work? I've compiled my first kernel about 2 days ago and since then I've gone through maybe a dozen consecutive reconfigs and recompiles, to no avail with regard to ppp - still can't get it to work. Personally, I found compiling to be a walk in the park, after 3rd or maybe 4th go at it I had the whole routine memorized. I went by the "kernel/index" standard HOWTO and instead of cloning bzImages, I just cloned consecutive tries at config, and it worked fine 90% of the times (except for a couple of times when I compiled straight into the image that I was compiling on, heh nothing feels better than sticking your fingers into electrical outlets). My setup is almost identical to yours, save for Mandrake instead of Slackware, and 2.8gHz P4 instead of 2.6gHz. I also found it to be a good idea to make a working (albeit with no ppp and cdrom) image of 2.6.7 with SMP just to compile in, since it's definitely faster than what Mandrake provided for the default 2.4 kernel.
PPP really got me though - it was simple enough before: "cat /proc/pci" "setserial" "ln -s -f /dev/ttySN /dev/modem"... But after compiling 2.6.7 it turned out that this method didn't work any more - the /proc/pci storage is disabled in config by default since it is deprecated now. I am still trying to take the hard and right way and get it to work without enabling /proc/pci, but nothing seems to work. I managed to get kppp to give me "Modem is busy" in place of "Unable to contact modem" by linking /dev/modem to /dev/bus/pci/2/2.0 (which is where my PCI modem sits according to lspci) but that's as far as I've managed to get. It's really disheartening, since Linux does run much snappier with a slimmer SMP-aware kernel and full NVIDIA support. Anyone know what I am doing wrong?
|
|
|
All times are GMT -5. The time now is 03:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|