Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
I am recompiling the kernel to drop Watchdog support. Yet I did not use the K series option during the install. I reckon this is why I don't have the kernel images and have an empty /usr/src/ ( missing linux and whatever files it places in there )I have not recompiled before and want to know what files need to be present when I go thru the process. I was going to load the files from the /kernel/bare.i directory from the iso disc into my /usr/src/linux( that I would have to create ) directory and run the make bzImage there. Do I need the other two files System.map and the config? Also I was going to copy the contents of boot into another directory for safe keeping, and not run make mrproper so DaOne's method will allow me to use the old kernel should things go wrong. Right now there is the boot image, the System.map and the config along with links pointing to them. Would I just add new links to the System.map, vmlinuz, and config that work point to the new files created during the process; I would still put them in /boot though ( its not clear to me why the links are used in the first place since they sit in the same directory). And since I am doing this without a Makefile is there anything I else I would need to do. I need some way of making a unique kernel name at least. Thanks for any help you can give.
DaOne's post mentions the use of the Makefile. I do not have one in /usr/src/linux/. usr/src/ is actually empty. Is there something I missed in the install or do you know of some way to getting the contents of the linux directory?
thanks
Thanks I was wondering where that came from. If i wanted to use kernel from the distrubtion cd could I get away with not running the make install command. Since what DaOne said here.
>Note: The 'make install' command is the one that most don't use
>but it works fine in slackware as long as you have prepared >lilo.conf and edited Makefile according to the instructions above.
And I guess along with that would I just be able to use the files found in the kernels/bare.i directory on the distribution cd to recompile.
thanks again for the help
Make install is optional, sometimes even easily forgettable. To tell you frankly I never used it myself... ever! I'd rather prepare my lilo.conf by hand
No problem... you did most of the hard work yourself
Ok I took the files System.map.gz, bzImage, and config out of the kernels/bare.i directory and attempted to make menuconfig which resulted in
make: *** No rule to make target menuconfig. Stop
and make config gave
make: Nothing to be done for 'config'
I tried running a script from the kernels directory on the cd call compile_kern.sh, but this seemed to assume I had the K series installed.
Has any one been able to get what they need from the cd for the recompile? I know I can go to kernel.org but I should be able to get the kernels from the cd right? Otherwise I'll just reinstall and select the K series. thanks
That's not the way to do it... I don't know about the CD, I downloaded and burnt my Slack9 ISO. And the kernel source/headers are not in that CD. You'll only get the kernel source from the box-set Slackware 9 if you purchased it.
Therefore in my case, I had to download the full kernel source from kernel.org and used that to recompile my kernel based on my existing .config file.
recompile and keeping old modules, and placement of config
I've been messing around with the recompile and looking around at the different posts and files. If I want to keep the modules setup could I give a name to the EXTRAVERSION= name field which would make another directory /usr/src/linux-2.4.20name. Otherwise I wonder if I might run into problems with the other version of the kernel trying to find the missing modules in the the original /usr/src/linux-2.4.20. I imagine there's also the /lib/modules/ which will have two sets for the different kernels as well.
Also I wanted to know from where is the kernel reading the config or .config file when compiling. Is it the config from /boot? I read somewhere the the config in /boot is not the one the kernel necessarily reads from. Anything to help clear this up would be much appreciated.
The .config should be placed in your kernel source dir. ie. The same place where you ran ./configure.
The reason many put the .config in /boot (under a different but descriptive filename like config-kernelversion) is that you can re-use this config file to recompile a newer kernel. If you've had to select one-by-one your kernel settings from scratch, you'd realize how much time will be saved by re-using a previous version's config.
Let's say you have a config-2.4.20 file from /boot. You can copy this file to /usr/src/linux and rename it as .config. However, only copy this file after you have ran make mrproper. When you run make menuconfig or make xconfig, you will see the default selections is mostly from your older config. You can then choose to apply new settings (marked by (NEW)) or change your previous settings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.