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!
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.
I've downloaded the new kernel from www.kernel.org, but there seems to be a problem in it. When I give the command make modules there's a lot going on, but after a while it seems I'm getting a compile error. This seems rather strange to me. I've never compiled my own kernel before, so I'm a bit of a noob. I'm not sure if I have saved the config file in the correct location (the dir where my kernel is extracted).
Here's what I do:
I've downloaded the file linux-18.104.22.168.tar.bz2, and copied it to /usr/src
There I extracted the tar, and made a symlink /usr/src/linux to /usr/src/linux-22.214.171.124
Then, from the folder /usr/src/linux I issue the command make xconfig, and use the graphical interface to make some adjustments. And I save the .config file in my home folder for future use and in /usr/src/linux. And I close the graphical interface.
After that I issue the command make dep. I get a warning that make dep is unnecessary now.
Then I issue: make clean. After a very short wait I do this: make modules. When I press enter there's lots of stuff going on I get lots of output to the terminal. So I wait, but the last few lines are these:
drivers/char/drm/gamma_drv.c:56:22: drm_proc.h: No such file or directory
drivers/char/drm/gamma_drv.c:57:20: drm_vm.h: No such file or directory
drivers/char/drm/gamma_drv.c:58:22: drm_stub.h: No such file or directory
drivers/char/drm/gamma_drv.c:59:25: drm_scatter.h: No such file or directory
drivers/char/drm/gamma_lists.h:161: warning: `DRM' defined but not used
drivers/char/drm/gamma_lock.h:36: warning: `DRM' defined but not used
drivers/char/drm/gamma_lock.h:69: warning: `DRM' defined but not used
make: *** [drivers/char/drm/gamma_drv.o] Error 1
make: *** [drivers/char/drm] Error 2
make: *** [drivers/char] Error 2
make: *** [drivers] Error 2
And lots of warnings are before these lines....
I hope someone can help me.
Thanks! But I still get the same error while making modules... :S
I don't understand why this happens...
Oh, and by the way, when everything is over, and my new kernel is working, do I have to leave the folder /usr/src/linux, or can I delete that? May be a very dumb question, but...
The error probably comes from a missconfiguration of the drm modules, but it is hard to tell what you need to change. Did you use a template for the configuration, or did you use the defaults? I usually clone my running kernel and use this as a template for 'make xconfig'
zcat /proc/config.gz > .config
The template configuration should not be too far away (no 2.4 kernel ).
You could delete /usr/src/linux (it does not affect your running system), but in case you would like to compile additional drivers, you'll need to start-over again.
I just issued make xconfig, then there came a graphical interface. I editted a whole lot in it (turning off SCSI support etc, all the things I thought I didn't need). After that I saved the .config file in the same folder where I extracted the source (/src/usr/linux).
Originally posted by rael_kid
make: *** [drivers/char/drm/gamma_drv.o] Error 1
Things seem to go wrong when it is compiling drivers/char/drm/gamma_drv.o, which I suppose is a driver for some hardware. Do you have the hardware and do you need to use it? Try to leave it out from the kernel.
Are you sure you have downloaded and unpacked the sources properly?
What I'd do to compile and install the kernel is
but I don't think it makes much difference.
You do not need to extract the sources to /usr/src. You can extract them to your home directory, if you want to. You can delete them after the kernel is working. The only things you need to do as root are "make install" and "make modules_install".
Thanks, what you told me worked, I've stripped some more things using xconfig, and now it has compiled completely... But what's next... The new kernel didn't show up in grub... I've searched my system for grub.conf, but it wasn't there... Some more help please.
It depends! If you compile a kernel yourself, you have the chance to include all required drivers into the kernel. In this case, initrd is not required. However if you did compile e.g. filesystem driver and/or HDD controller driver as modules, they need to be included in your ramdisk (usually by the command mkinitrd). Otherwise your HDD might not be recognised and the root filesystem cannot be mounted.