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.
skyline: what is the purpose of the symlink? i have never made one, and i have never had a problem compiling kernels (other than the normal ones, wrong options, etc. ) is it just something that has always been done so people still do it, or is there a safety/security/other reason?
well, the imp thing is the kernel image. the vmlinuz ...
you can untar your kernel source archive anywhere. you should do it under any dir (i do it under /home/xxx) .
in the end u gonna move the kernel image to /boot.
i have scrapped my system many times, and everytime i would do a format on every partition except for the /home partition. this way, all i have to do is move the kernel images from my kernel compiles from earlier into /boot, and im ready to go. no wasting time untarring, configuring, building. all i have to do is edit my lilo then. i think thats at least 20 mins saved for every kernel compile.
the symlink (symbolic link) points to a file. for instance, if you are under the /usr/src/ directory, and your kernel source tree is under /home/newkernel/linux-2.6.0, then doing a "ln -s /home/newkernel/linx-2.6.0 linux" will make a file called linux under /usr/src. so, you can now go into the /usr/src/linux file and u will actually be traversing the file system under /home/newkernel/linux-2.6.0.
Originally posted by killer_bunny Well i compiled and currently using kernel 2.4.23 without symlink...
But today i had a conversation with my friend and he sead i should make one...
But he didnt say why??
And if i make one dose it need to be named Linux-2.4 for all 2.4.xx kernels?
If you are compiling different versions of the same kernel version (2.4.xxx or 2.6.xxx), its because you want to use something in the newer version (unless you just compile kernels for kicks, heh). for this, you will make changes during configuration. once you make a change for a kernel build, you have to know which one it was for, hence the different names given in grub or lilo. so you should see 2.4.18-bf24, 2.4.22, 2.4.23 in ur bootloader.
i havent tried, but maybe bootloaders are smart enough to give you errors if you dont give different names?
To my knowledge when compiling the kernel, I think (not totally sure) but when compiling, it will look at the /usr/src/linux directory instead of the directory you unzipped/untarred to with the default name.
Ex. I untar linux-2.6.0.tar.gz it will create the directory linux-2.6.0.
Also makes it easier to keep more than one kernel download/source to compile from in that directory, cause you can't have dozens of linux directories in the same folder, so when you download a new one, simply change the symlink of linux to go to the current kernel your compiling, etc.
And RPM's you can store anywhere you want or remove them after installing as they've been installed to their correct locations, etc and into the RPM database. The only reason you will probably want to keep them around is to uninstall, etc.
" symbolic link is just a second name for an object (file or directory).
In this case, /usr/src/linux is a generic name that we all use to point to
our (current) kernel source. Then any program or person looking for kernel
source doesn't need to figure out which directory contains your actual
source, in case you have several versions."
This is what i found about it...
If i am not mistaking in translation the symlink is needed for other programs that needs kernel source so they would know were the source is..
and if im not mistaken, the reason why we create the symlink linux under /usr/src/ and thennnnnnn work from inside /usr/src/linux is because the builds are all relative to "linux".
for instance if you try to compile your own pcmcia package, you will see it requires it to be placed relative to where your "linux" is. of co, you can have it relative to /home/whatever ... but lot of ppl use /usr/src as the start point
Originally posted by trickykid Also makes it easier to keep more than one kernel download/source to compile from in that directory, cause you can't have dozens of linux directories in the same folder, so when you download a new one, simply change the symlink of linux to go to the current kernel your compiling, etc.
i just throw everything in /usr/src. so for ex i have linux-2.4.23, linux-2.6.0, and before 2.6.0, linux-2.4.22 all in /usr/src. then to work on the kernel, i just go into that directory. i don't even have a /usr/src/linux. maybe i'm just lazy, but to me it seems like making a link is just one more thing that can go wrong. my attitude has always been that it works without it, so why bother?