Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
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.
First off, it's bad form to assert the urgency of your problem like that. We are all volunteering time, and what is urgent for you is not urgent for us.
Now, I can tell you right off that you are way off from where you want to be - the file you referenced is simply an archive of other files and does not go in the kernel, nor does the dhcp functionality. Rather than ask for help with a particular step, why don't you explain to us what you are really trying to do, what you've done so far, and what happened (that means copy/paste any relevant output), and we'll tell you how to do that.
Again - you're down a wrong path trying insert a .tar into the kernel. I promise you that that doesn't even make sense. What's the real problem you're trying to fix/functionality you're trying to gain?
I know that we cannot insert a .tar file.
I untarred it and configured it by command ./configure
then i made a "make install".
Now i have the dhcpclient.o file .How to insert that ?
Since i am using a 2.6.18 kernel it is not allowing me to insert using the command insmod and throws an error "unrecognised format"
You're not getting me, friend. I get that you are having trouble making that tar combine with your kernel, and I had inferred that it contained source code for something. I am quite sure it is not a kernel module, both because dhcp services are a userland thing and because the .o extension tells you that it's not meant to be used as kernel code. The square peg will not fit in the round hole.
Now, take a big step back - don't worry about your tar, don't worry about kernel modules, just tell us what you really want to do.
There we go. So, dhcp is a userland service (i.e., not run in the kernel); I recommend you look into a program called dnsmasq. It provides some DNS services in addition to DHCP, and isn't too hard to configure. Install it with `yum install dnsmasq` (you will need to sudo that or be root), and after you do, read `man dnsmasq` and check out /etc/dnsmasq.conf. That should be enough to do what you want to do, but if it's not, Google `CentOS dnsmasq` or something similar, and if you're still not sure, feel free to post back here with whatever info you've got and your current problem. As for me, it's 05:20 local time, so I've gotta go to bed. Good night, and good luck.
One more procedural note - if you've got the time, report your original post and ask the mods to move it to 'Linux - Networking'. There will be more people there who are interested in helping you with this particular problem should you need more assistance.
DHCP is traditionally run as a service (a root-owned daemon process), not as a kernel module. When you ran make against the source tarball, it should have produced an executable binary object file, suitable for execution in user-space. When this is run with the appropriate permissions, commandline options, and an appropriately written configuration file, it will provide DHCP server services on the host. The mechanics of how all of this is done should be documented either in your tarball, or at the website from which you acquired it. There may be a shell script suitable for inclusion into a host startup file system to allow the service to be launched in a traditional way, such as with the service command.
--- rod.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.