Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
So I just finished up a fresh install of Linux, and I was going to compile a new kernel with ACPI and I2C sensors in it. I download the full source of the 2.4.22 kernel. Mandrake comes with the 2.4.21-0.13mdk. I unzipped and untared the kernel, which is still in my home directory. I cd'ed into the linux-2.4.22 directory and started with "make mrproper" and it spit out something like
No target for "make mrproper" Stop.
What does this mean? I looked in usr/src and there is no folder labeled linux in there either. I dont get it. What am I doing wrong?
Well, strictly speaking, make mrproper isn't absolutely required to compile your own kernel. You can safely skip that step, in fact I always do. Now if you get that when you try "make menuconfig" or "make xconfig" (if you're in X) you've got a problem.
Quote:
I looked in usr/src and there is no folder labeled linux in there either
Well, if you unpacked the source code in your home directory, you aren't going to find anything in /usr/src. And usually the /usr/src/linux directory is a symlink to whereever you do have the source code. So in your case, if you unpacked the source code in your home directory, and you plan on leaving it there, you could create the link in /usr/src like this:
Well, the good news is that there really is only a couple of explanations: Something went wrong with the kernel source download or something went wrong with the untarring.....So lets take it from the top.
1)What file did you download?
2) How did you unpack it?
3) What happened when you unpacked it?
4) What is the result of ls in the linux-2.4.22 directory?
I downloaded the 2.4.22 full source. I bunzip2 the zipped file, then tar -xvf the tarball. All went well. Ill post the ls of the linux directory momentarily.
Now I cant get rid of that kernel source so I can start over either. It wont let me delete it.
That's probably a permissions issue. If you unpacked it as root, it could be that its owned by root and you have to be su or root to get rid of it. You can always ls -l to find out who owns the files.
Actually, your directory looks to be correct and since Makefile is present, I'm confused as to why you are getting the "No rule" error messages. If it was a permissions issue, you would get a permission denied error, not a No rule error. And just to ask the brutally obvious question, when you enter make mrproper or make xconfig you are in the linux-2.4.22 directory, right? Also, have you been able to compile programs from source before? If you are in the right directory and you have been able to compile, the only thing I can think is that your Makefile is hosed.
Here is a tip: to exatract and untar a .bz2 file, you can do it with one command tar -xjvf filename.bz2. tar -zxvf works on .tar.gz files.
Ok, heres what I have done. I unzipped the first one as root. Now I cant get rid of it, so i was resourceful, and moved it. Downloaded a new kernel source. Bunzip2, then tar -xvf while im still in my home directory. Im running all of this as root this time. So far no problems. I dont know what was wrong the first time, but that kernel source is sitting in my home directory, and I still cant get rid of it.
Also, to answer your questions, I am root, in the linux-2.4.22 directory, but I havent simlinked to usr/src yet. Should I do that now or after compile? Ive laredy started compiling again. Im on make dep now.
Yeah, I wasted 2 days figuring out how to recompile the kernel, after about 10 attempts. I kept on leaving important things out of it like the ext3 file system and SCSI drivers etc... but I digress.
If you are root, you should be able to delete the kernel you stuck in your root directory... you are root, after all. just 'rm -rf /linux-2.4.22' or whatever.
There's no way you should be getting 'Permission Denied'.
Before running the 'make xconfig' or 'make dep', I usualy do 'make clean' 'make mrproper' 'make clean' inside the new kernel directory.... and that usually cleans out the crap.
After that I copy the old .config from the old kernel directory into this new one
Then I do 'make xconfig' and make sure I have all the important stuff in the kernel. If you're missing important things (like support for the ext3 file system, if you are using it), you'll get a Kernel panic when you try and start the new kernel... and you'll have a hell of a time trying to figure out what's not working from the kernel panic.
I'm assuming here than you backed up your old kernel configuration. I had MAJOR problems learning this. The old kernal configuration is in the old kernel directory as a hidden file (called '.config'). It helps if you copy that file into your new kernel directory AFTER you have done make clean, make mr proper, make clean. Then when you start make xconfig, most of the kernel features from your old kernel will be in your new kernel. You might also want to back up the .config file into the /boot directory as well for safekeeping.
When it comes time for 'make bzImage', the kernel howto wants you to do it with a no-hangups option (nohup) so you do 'nohup make bzImage &' and let that crank away for half an hour or so. You should get a log file in the new kernel directory (called 'nohup.out' I think) which details the progress of the make. You can watch it in a new window with the 'tail' command, eventually it will stop.
While it's doing that, let rip with "nohup make modules 1> modout 2> moderr &", and it will process all the bit you wanted as modules in the kernel (as opposed to bits that you wanted built-in to the kernel). Once the bzImage is done, and if there is no errors in the moderr file, then you do your make modules_install.
Keep trying. It took me forever to figure out how to do this, and it's one of the harder things to do in Linux.
ok, everything is compiled, but when i try to point LILO at my new kernel, which is symlinked in /boot, and i run "lilo" in prompt it gives me
Fatal: Kernel /boot/vmlinux is too big
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.