Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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 tried getting Kernel 2.4.22 source onto Red Hat 9 but I seemed to have wrecked the system completely. The Kernel HOWTO needs a rewrite I think... obviously it's still not idiot proof.
I went and unpacked the source into the /usr/src directory. I then went and make the kernel according to instructions. Went and made a bzImage and copied it to /boot, and then adjusted grub so that it would boot.
Also I had to copy kernel .config files... but with the RedHat kernel, I couldn't find these anywhere. So I just ignored them hoping the new kernel would reconfigure itself.
Also, I noticed that a initrd file needed to be set in GRUB, but I have no idea how to go about making such a file. The HOWTO wanted me to copy a "linuxrc" file into a directory, but a search of the system didn't find me one of these files anywhere.... so I just kept the initrd from the old kernel.
When I tried booting in, the kernal just hung.... it got stuck somwhere around the agp...something-or-other section... but with no error message.
So then I tried booting back into the 2.4.20-22 kernel again, only to have the kernel panic, complete with flashing keyboard lights.
How do you make the initrd file anyway?
Also, when I started xconfig for selecting what goes into the kernel... does it select appropriate modules by default?
I can probably answer a few of your questions. I am no kernel expert, but i have managed the last 10 (or so) attempts successfully.
I don't use grub either. But, when I do a kernel compile I rename the original kernel to something like vmlinux.old (same with System.map) and change the appropriate lines in LILO so that I have an extra boot choice to get to the old kernel just in case. I do this before I even begin. Then, I use make menuconfig because its a little easier to get through all the kernel options IMHO. It includes an option to load a config file, which might be the thing to do since, no: a new kernel will not select appropriate modules by default. You can choose to load your old config which prob works ok, and go through and eliminate everything you know you don't need, and add the things you do. The config file you would copy to boot should be located in the /usr/src/ directory that you compiled the kernel in.
I am not real sure about your other questions. Never had to deal with making initrd in Slackware.
A few commands you might like to know, that will help you find things are $whereis "file" (no quotes), $locate "file" (might have to do updatedb first as root), and: $find.
If you don't know of the exact name, you can use something like $whereis afile* and it will find anything starting with afile. You could use it like: $locate *.jpg and it would find all jpgs on your system. Get the idea?
OK, here's my second attempt... (currently doing the make bzImage rounds)
OK... it appears my kernal configs were screwed up from last time, hence the crash. Some important modules got skipped on config it seems...
Found the config files for Red Hat 9 (hidden away on it's own directory). I had no idea that those config files had anything to do with how the kernal gets configured *slaps head* so I loaded the old configs I found into the xconfig setup. Seems there's a lot of stuff in there. I had to change the processor type to PIII as well, plus I ripped out some of the USB, ISDN, Sound, Ham-Radio modules as I won't need them. BTW, this PC is a server with SCSI HDs only... and the SCSI drivers are treated as modules in the kernal. Hope this works..................
About this initrd file.... in GRUB, I'm wondering if I can skip it alltogether? I'm hoping.........
Since I have 3 SCSI hard disks that need starting on boot up, I wonder how one writed the linuxrc file?
You don't need the initrd... just make sure grub is pointing to your root partition and not /=LABEL.... you could also copy your old kernel config (since you know it works) from /boot to /usr/src/linux-2.4.22/... and use it as a starting point.
First, I started off modularising most of the bits of the kernel... AGP, SCSI etc.
Screwed up another kernel reboot when I forgot to add ext3 support! so I built that in to the kernel.
Then I used mkinitrd command to make the initrd file.
One thing the whole experience tells me, is that you REALLY need to know your hardware when you rebuild kernels. One little mishap in kernel compilation with a missing part or module.... and your system does a kernel panic with lots of crytic errors which take you ages to decrypt.
something that Linux teaches any person who is serious about learning Linux, is that it develops a deep appreciation and understanding for your machine and how it works. And that is one of the millions of reasons why I love Linux,
Glad to hear that you learnt how to compile your kernel!!!
I still remember how that felt when I first understood and learnt how to do it as well. I used to be so afraid of simply hearing "you need to recompile your kernel", hehe, that used to be death to me. But now I just love recompiling my kernel all the time, hehhe.
Yeah, I learnt a lot alright... after recompiling the kernal at least ten times over two days, I can now do 'nohup make bzImage &' in my sleep.
Also learnt which modules do what, and how I can toy with specific details of the system. By leaving out the odd driver somewhere, a Windows CD ends up with short filenames, and a missing file system means the system won't boot at all! And I had no idea that the APM had anything to do which sync-ing the hardware clock.