Recompiling the kernel
Hey everyone,
I have to admit, that after much trial and error I am ready to rip my hair out over this problem I'm having. I've been successful in recompiling the Linux kernel in the past, but after weeks of trying I just can't seem to get it to work this time around. I hope that if I describe my process someone out there can maybe point out where I'm going wrong. Frist, I'm su'ing and going in as root to /usr/src/lin*. I issue the 'make xconfig' command to get the gui configuration tool up. I select the options that I'm wanting. All I'm really doing is adding SMB and NTFS support. I am also de-selecting things that I don't need like SMP support for the proc and SCSI (there is no SCSI on my system). I then ctrl+alt+backspace to get out of x. I then su back into root and navigate to the /usr/src/lin* directory. I then issue the following string of commands: make clean; make dep; make bzImage; make modules; make modules_install; After it's done churning there, I then copy the new image by issuing cp /usr/src/linux-2.4.20-8/arch/i386/boot/bzImage /boot/bzImage.072203 I then point grub to that file to boot from. I am successfull in rebooting from the new kernel but a bunch of things start to fail, including my NIC. One thing I certainly can't do without is the NIC! Any ideas? Thanks! -Tim |
Hi Tim,
I would do this. This is a list of troubleshooting steps. Try recompiling and using your kernel after each step until your problem is solved. 1. Just before you do 'make xconfig' type 'make mrproper' then proceed as always. 2. Go to a real console, not in Xwin. to do everything. Instead of using "make xconfig" use "make menuconfig" so that you do this: A. go to real console. B. type "make mrproper" C. type "make menuconfig" and configure your kernel features. D. type "make clean; make dep; make bzImage". Make sure it finishes with no errors. E. make modules; make modules_install From here proceed as you normally do. Note steps D and E are 2 seperate steps. 3. In menuconfig only add 1 feature or item to the kernel. then compile and try it. If it works add 1 more item and try that. Keep doing this till it works like you want or breaks. If you need more help let me know. If 1 of these helps plz reply and tell everyone what worked. Michael |
That copy command should read
cp /usr/src/linux-2.4.20-8/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20-8 I may be wrong but I think that is where the error could be. |
you can see this doc in http://portal.aullox.com/modules.php...ernel+de+Linux
only you have to register. |
Success!
Hey Michael,
Thanks a bunch for the info! I am happy to report that the approach you suggested worked! If you don't mind terribly, I have a couple of quick questions I was hoping you could answer. First, what is the purpose of the 'mrproper' makefile target? That was a new one on me, and I was wondering what it's used for/the rationale behind using it. Also, I was having trouble remembering how to make the 'initrd' file for new kernel I made. Someone once said that it's not necessary, so I decided to forego it. The kernel I am using now is working fine, and I did not make an initrd file for it. Would you happen to know what this file is used for and why it may/may not be needed? Sorry for taking so long to reply. Many thanks! You sir, are a wizard! -Tim |
Hello Tim,
Glad to hear the good news. First, what was it that worked for you? I ask so that other people who have the same problem can read this and see how you fixed it. Second, to answer your questions. 1. make mrproper basicly removes everything (files) created since you untarred and zipped the kernel source so that it is like new. You want to do this so that if some file is causing a problem your kernel won't use it. make clean does this to a point but make mrproper goes much further. 2. initrd. Rather than reinventing the wheel (or documentation in this case), go to your linux source dir.. Should be something like /usr/src/linux/. In there you should have a Documentation directory. Go in to it and read the file called initrd.txt. Also you can go here: http://www.ibiblio.org/pub/Linux/doc...#create_initrd Hope this answers your questions. If you have more just ask. Oh, in your linux source directory there is a README file. Read it. It will give good clear instructions for building and install the kernel. Thanks for the remark. I am FAR from being a wizard but its still nice to be called one. :) Again, be sure to reply with what worked for you so others can benefit. Michael |
|
All times are GMT -5. The time now is 01:57 PM. |