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.
Currently trying to setup IP masquerade, which requires some kernel configuration. Followed the HOWTO document which seems straight forward, UNTIL I recompile the kernel as follows:
make xconfig/config/menuconfig etc..
cp arch/i386/boot/bzImage /boot/<filename>
vi /etc/lilo.conf to include this image as additional
Result - machine does not pick various devices i.e. USB and NIC's.
Question : from I what I can gather, first time in make xconfig this is not a reflection of the current configuration of the working kernel. If this is the case how do I find details of the current config?
firstly, i'm not sure that you do need to reconfigure your kernel for that, the default one *should* be set up for ti already, my redhat 7.1 system was. maybe you'll find it easier using 'firestarter' which sorts ip masq out for you easily.
but your real question... the config of your system *should* be aviable in /boot/config-2.4.7-10 on redhat 7.2 for example, which has kernel 2.4.17-10 on default. It's not that recommended to use an old config for a new kernel as settings do change and such, recompiling the same kernel is fine tho. Your instruction list you've given is totally wrong btw. there's no make bzImage etc...
well, if it crashes before it can load the drives it can't put a log file anywhere... you should have a good enough output from the boot up to diagnose what's wrong. you just gotta work through things and suss what it is. if it does get that far, you might have /boot/messages to look at...
I too have spent a whole week on trying to configure IP masq on RH 7.1, but so far still no luck.
I did exactly as the instruction (HOWTO - IP MASQ - from ip masq resource) and after config kernel (to make additional support and features), for some reason, it kept failing to on mi NICs at start up (seems the same has happened to you).
So you decided to go wih SuSE, eh? And when you followed the instructions, it worked like a beauty?
Compiling a redhat kernel goes a little different than other distro's
You NEED to install the kernel source rpm !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ther are your old .config files
With the command make mrproper the .config file from your current tree is going to be erased
I have done this with redhat 7.2 i guess redhat 7.1 usses linux as the symlink to there kernel tree redhat 7.2 uses linux-2.4 as a symlink
So if you are going to make the symlink in 7.0 or 7.1 you'll need to remove the old one.
Go and download a new kernel say 2.4.18 then copy it to /usr/src
~# cp /home/syl/linux-2.4.18.tar.gz /usr/src
then go to that dir
~# cd /usr/src
Then make a dir called linux-2.4.18
~# mkdir linux-2.4.18
Then make a symlink called linux that directs to the 2.4.18 tree
(if you use 7.1 or 7.0 first remove the linux symlink) ~# rm linux
~# ln -s linux-2.4.18 linux
Then untar the kernel source file
~# tar -xvzf linux-2.4.18.tar.gz
Then cd to the dir linux
~# cd linux
then clean up the place
~# make mrproper
Now you proberly want to use your old kernel settings if so, you can go to the source tree of your current kernel dir with the following command (you'll need to install the kernel source rpm to do this)
~# cd /usr/src/linux-2.4/configs
(linux-2.4) is the symlink redhat 7.2 use for there 2.4 kernel if you are using 7.0 or 7.1 use cd/usr/src/linux-2.2.9/configs or so (look how your tree is named now)
Then you can see that there are some files starting with kernel and ends with .config (you'll need the .config file that suite your configuration ) like athlon cq i686 or something,
Copy that file to the linux tree
Now you can start compiling and installing the kernel with the next commands
~# make menuconfig
select here al the things you'll want or unselect all the things you'll don't want
~# make dep
~# make clean
~# make bzImage (mind the capitol I )
~# make modules
~# make modules_install
~# cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.18
~# mkinitrd /boot/initrd-2.4.18.img 2.4.18
~# cp System.map /boot/System.map-2.4.18
then adjust your /etc/lilo.conf or your /etc/grub.conf file
(use the other kernel entries as an example )
If you have lilo then after adjusting the /etc/lilo.conf file run lilo
Now you can reboot your machine, and if everything has gone well you can use your own compiled kernel
Hope this helped a little
Last edited by Sylhouette; 03-08-2002 at 07:06 PM.
Sylhouette....I needed this answer a week ago!!!!!!
As a matter of fact...in my quest to find such .config files (one that reflects my current system configuration) I simply peered closer at my current kernels src directory (/usr/src/linuz-2.4.2) and and lo-and-behold....there's a config directory.
Looked in there...and such enough....I found xx.config files where xx is "kernel-2.4.2-i386" "-i686" etc....
I looked into the .config file suited for my system (i686), and it sure looks like settings deemed for my system. Although I haven't compiled it yet, your post assures my hunches.
Thanks...it's Friday and I needed this good news badly!
Tell me this:
-You had this in your routine of compiling:
"mkinitrd /boot/initrd-2.4.18.img 2.4.18"
This is the only thing that I haven't done and never seen in anyone's howto or posts.
What exactly is this doing?
-Are these .config files generated during the installation of linux?
-Are these .config files generic...meaning....does it basically turn on virtually every support, or does it actually only turn on what it sees need to be turned on (based on your system)?
From what I saw, I think it's generic....it turned on support for NICs not installed in my system.
And again, thank you....for some reason, it seemed like no one before me had ever had this very same issue (dealing with .config of my current config on RH 7.1).
I think the kernel*.config files are standard config files used with redhat
So if you use it everithing will work
You can comment out a lot of stuff like SCSI support and al other things you do not need
When you turn it of and it wont work anymore then put it back
Thing s you are not sure about you can leave on, compile the kernel save your .config file that you created and when the kernel works begin again with the new (your own .config) it takes a lot of time but you learn a lot about it.
the mkinitrd command i found in a book RHCE study guide
It has something to do with a ram disk
This is what the book said
The mkinitrd command is used to create an initial RAM disk image for you.
This image is reloaded when the kernel first boots. The initial RAM disk (initrd) is usally used to load essential block devicsuch as SCSI disk drives modules that are not part of a stoch RedHat kernel.
So i gues that this is an answer to the standard kernel question.
If it is not in the standard kernel RedHat puts it in the initrd file (i gues)
It sure did work. Compiling from the kernel*.config file found in /usr/src/linux-xx.xx/configs worked without anything failing at boot up.
BE FOR WARNED (as sylhouette mentioned):
-Compile time is increased tremendously.
sylhouette, I will go back and look thru it and turn off thing I know I'm not using...which I figured I was in for (don't like the idea of the grueling time I'll be spending).
TELL ME THIS:
-Have you heard, or tried, using "make oldconfig"?
I ask becuase I've often been told to use this command to generate a .config file of my current system configuration. When I try this, it just goes thru the 100 and so questions of yes and no about my system (half of which I knew nothing about).
Is this the way this is suppose to work? If so, then why have a seperate command sush as "make oldconfig" when it would seem that by just going into xconfig and making the settings there would do the same thing?
The way I imagine this to happen is linux will magically look at my system and figure out what I have and don't have and spit out a .config file for me without having to ask me any questions.
It takes a lot of time i know
But it is worth trying
Now you compile your kernel say 6 times and be happy, next time with kernel 2.6.10 or so you know exactly what you can turn off and save a lot of compiling time.
So you learn a lot about how it works
And sometimes you switch of to much and things will not work anymore but then you get back to your (old) kernel and do it again.
Be careful with the make mrproper command because it deletes your .config
So before compiling it again be sure to copy your .config file to lets say /root
the give make mrproper and then copy it back to /usr/src/linux
But with a Athlon 1,7 Ghz it is done in one hour.
Last edited by Sylhouette; 03-11-2002 at 01:58 PM.