Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
In the ebook I am referring its said we strongly suggest you compile and run your own kernel (without ver-
sion support) before you run the sample code.*
What does it mean?
Anyway I use this in the terminal to compile
root# gcc -c hello.c
This is the error
fatal error : linux/module.h no such file or directory.
You need to build the module within the context of the Linux kernel. To do so, you should really create a Makefile for hello.c.
With respect to that particular error, linux/module.h is a file found within the Linux kernel source / headers installtion, it does not exist in /usr/include where user-space headers are usually found.
I think you would find the most benefit from reading a document such as this:
I have posted a similar question but not the same in LQ newbie. Sorry for re-posting but i need your help.
With all the due respect, this is not a valid reason for spamming LQ with the same question! This thread now stays open, since it has been posted in the most relevant forum, but please refrain from doing that in the future. Moreover, I will not further merge your threads to avoid adding confusion. Therefore please, follow discussion here. Nuff' said.
@TBOne I gave it a fortnight. I went through basic unix commands, and done shell scripting all this time. So i thought to start it
again. Anyways i ll re-consider your comment. I ll give it more time. Thanks
@TBOne I gave it a fortnight. I went through basic unix commands, and done shell scripting all this time. So i thought to start it again. Anyways i ll re-consider your comment. I ll give it more time. Thanks
Shell scripting and basic Linux commands are still a far cry from kernel programming. And if you think you can learn enough in two weeks to be able to do it, start with learning what you've been told here.
You were pointed to the makefile and documentation. You didn't read them or follow the instructions, and didn't try to look up the error you posted here, which would have clearly told you that you didn't have the Linux source installed.
@TBOne I have the source installed..3.2.13, I am reading an ebook and following the steps. I tried reading HOWTO kernel programming and README in documentation which came along with the kernel. As i mentioned, Basic concepts of unix is one of the subjects in college. I am seeking for the right direction. I need to pay attention to writing Makefiles(I think). I will give it another month. Thanks for the suggestion.