LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Linux expert needed that knows INS & OUTS! (http://www.linuxquestions.org/questions/slackware-14/linux-expert-needed-that-knows-ins-and-outs-26371/)

Milkman00 07-23-2002 08:48 AM

Linux expert needed that knows INS & OUTS!
 
OK folks - here is the deal.

I am relatively a beginner at Linux, and I do know DOS very well, so I am hoping I can pick up on this too. ANYWAY. I am finding myself typing a lot of commands, but I really do not know what they do. I am just kinda typing blindly because it works. BUT when things go crazy (which they sometimes do) - It helps to know what the commands actually mean so the problem can be troubleshot.

For instance - when compiling the kernel, I type

make menuconfig (of course)
make clean
make dep
make modules
make modules_install

Now I think I understand that 'make' is having the OS run something similar to a DOS batch file... What what are all these batches doing (also please correct me if I am wrong!)

Another command that I am having trouble understanding is

depmod -a

I actually currently have a problem where I recompiled the kernel, and got a whole bunch of unresolved symbols, when depmod -a was run. I read somewhere on here, that if that happens to delete /lib/modules/2.4.18 and run make modules_install again. But because I don't understand what is happening, its very hard to troubleshoot.

I appreciate any and all help you folks can give me with this, also, is there a website, or a book out there, that outlines all this basic stuff, in BASIC terms, for the newbie???

PLEASE HELP!!! :)

Thanks so much in advance

acid_kewpie 07-23-2002 09:17 AM

make will use a Makefile in the current directory which contins lots of sections, e.g. modules, clean, bzImage and so forth, depending on what you are compiling.

depmod -a will reload all modules that have been loaded in etc.modules.conf. refresh them so to speak.

most linux books outline basics, any one should do to get you going, such as http://80.4.78.28/redhat_unleashed.tar.bz2 and obviously check all the relevant manpages for each command.

analogies to DOS conventions will only go so far tho, you'll need to accept that make doesn't use a "batch file" it's not like that really...

Aussie 07-23-2002 09:23 AM

Have a browse at The Linux Documentation Project and at http://www.gnu.org/ for info on the make command, look for Automake, Autoconf and GCC.
For compiling slackware kernels you can read about the system I use here.
With your unresolved symbols the problem could be that slackware 8.1 already uses kernel-2.4.18 and therefore already has a /lib/modules/2.4.18 directory populated with all the kernel modules from the slack install that are not going to play nice with the ones that you made, but don't delete them, back them up by renaming the directory to /lib/modules/2.4.18-these-are-the-old-modules (or something shorter like 2.4.18-old) then do make modules_install.

Milkman00 07-23-2002 09:24 AM

I didn't look at the book in the link you posted, but I noticed it says REDHAT unleashed. I am using Slackware... Is there one for Slack?

Milkman00 07-23-2002 09:34 AM

That message about the book was for acid...

Aussie - I like the link you sent me at p-two... I was hoping you could elaborate a little bit for me on the last paragraph you mentioned. I am a newbie, so I don't quite understand what I did as it relates to what you are saying.

Your assitance is much appreciated :)

Thanks!

Milkman00 07-23-2002 09:37 AM

Acid - Can you tell me what the make file is in /usr/src/linux for all of those commands I listed above??? I would like to disect that file, and see what it is doing....

Aussie 07-23-2002 09:46 AM

The last paragraph at p-two or in my post here?

acid_kewpie 07-23-2002 09:51 AM

Makefiles are called "Makefile" always.

98% of the time a linux book is a linux book, specific distribution very seldom come into play.

Milkman00 07-23-2002 09:53 AM

Ok will try it Acid - Thanks! :)

Aussie - this paragraph

With your unresolved symbols the problem could be that slackware 8.1 already uses kernel-2.4.18 and therefore already has a /lib/modules/2.4.18 directory populated with all the kernel modules from the slack install that are not going to play nice with the ones that you made, but don't delete them, back them up by renaming the directory to /lib/modules/2.4.18-these-are-the-old-modules (or something shorter like 2.4.19-old) then do make modules_install.

Thanks!

Aussie 07-23-2002 10:08 AM

You'll have modules in /lib/modules/2.4.18 that were installed when you installed slackware that don't match up with your custom kernel, normally when making a new kernel this is not a problem as most of the time you would be compiling an updated version and modules get installed to /lib/modules/<kernel-version>.

Milkman00 07-23-2002 10:11 AM

Well thats the problem - I haven't installed a new kernel. I am just modifying the one I currently have. I am still using 2.4.18. I am just taking obvious things out that I do not need. When I recompiled, I got the unresolved symbol errors.

ALSO - When you compile a kernel, is it actually building the selected modules in the /lib/modules/2.4.18 directory into the kernel???

Aussie 07-23-2002 10:21 AM

Quote:

When I recompiled, I got the unresolved symbol errors.
Thats the problem, some of the 2.4.18 modules in /lib/modules/2.4.18 are not working with your custom kernel because they were made with the stock kernel. Just because you de-selected some options when you did your kernel config dosn't mean the modules are going to vaporise from /lib/modules/2.4.18, you have to remove them from the equation first by re-naming /lib/modules/2.4.18 to something that is not /lib/modules/2.4.18 before you do "make modules_install".

Milkman00 07-23-2002 10:24 AM

ok, I think I understand. Because I made changes in the kernel, the modules needed didn't match up. SO how is the best way to fix this???

xcp 07-23-2002 10:19 PM

>When you compile a kernel, is it actually building the selected modules in the /lib/modules/2.4.18 directory into the kernel???

The other way around. When you build and install the modules, it builds them in the /usr/src/linux tree and copies them to /lib/modules/<kern#>

When you make a custom kernel, with only the features you want and modules you want, you should edit /etc/rc.d/rc.modules and only load (modprobe) the modules that you use. There are what seems like hundreds of modules loaded by default in the slack installation - you should fix this. Also try deleting /lib/modules/2.4.18 before you make modules_install, who knows, maybe it's not cleaning up for you.

Rashkae 07-27-2002 06:54 PM

If I could add my 2 cents to the unresolved symbols problem... I noticed that he did a make modules and make modules_install, which should have cleaned out the modules directory and copy over all new ones. But did he install the new kernel? I would suspect he's booting the Slack default Kernel, with his new modules.


All times are GMT -5. The time now is 06:16 AM.