|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Monday, 20 December 1999||Author: Allan Jason Pasco|
|Published to: news_learn_firststep/Firststep News||Page: 1/1 - [Printable]|
The Linux Diaries, Entry 2
Today Jay attempted to compile his kernel, which turned out to be easier than he thought. After successfuly doing this, he had some difficulties upgrading his Red Hat 6.0 system, and finally decided to try out Slackware 7.0.
|Page 1 of 1|
Hey readers. Sorry for the delay of the first entry. I have been very busy studying for finals and configuring my laptop. During the past week I gathered up some material from books, magazine articles and information from the internet on recompiling my kernel. Ok new users, the first step to compiling your own kernel is to have the kernel source code. You can usually find the kernel source code on your Linux CD-ROM. If by any chance the source code is not available to you by CD-ROM, you can download it at ftp.kernel.org. My source code was installed during the installation of Red Hat 6.0 on my laptop. If you installed the source code during the installation,it can be found in /usr/src/linux. The kernel I compiled is version 2.2.5-15. I decided to compile the same kernel before upgrading to a new one.
Newbies, make sure you have all the development tools you need to compile a kernel. Most of the information I read from books and magazines stressed this topic. Since my computer was equipped with all the tools I needed, I was ready to build my own kernel. I logged in as root and changed directory to the source code directory /usr/src/linux. Next I entered "make xconfig" at the command line. To use xconfig, you must be running in X Windows. This gave me a user friendly graphical interface for compiling my own kernel. If you don't want to use xconfig you can type "make menuconfig" to compile the kernel through text-based menus. The GUI consisted of a menu of operating features that you want compiled in the kernel. For each feature you can decide y, m, or n. Choosing y allows the feature to be compiled in the kernel, m allows the feature to be run as a module, and n to discard the feature from the kernel. I decided to spend the whole Saturday compiling from the Code maturity level options to Kernel Hacking. If there was a problem understanding a feature, I would use the help file to aid me through the decision of allowing any hardware features to be compiled in the kernel, made as a module or to disregard it. After a few hours of compiling and reading the help files and guides, I finally finished. Fellow newbies, remember to save and exit before terminating the xconfig window. If you forget, you will have to compile all over again. That would not be fun.
After saving and exiting from the xconfig window, I entered "make dep" followed by "make clean". This insured that all the include files and header files are in place and all the old files from the old kernel are removed. When these two processes were finished, I then entered "make bzImage". This my newbie friends, is kernel compile time. It took some time to compile but I found no errors. After the kernel was compiled, I needed to build and install the modules that I chose. First I changed directories to /lib/modules and renamed the current modules directory which was 2.2.5-15 to 2.2.5-15-old. I did this as a backup in case my kernel did not work. By any chance if anything goes wrong, I would use a boot disk to enter Linux and change my kernel and modules back to the old ones. Next I changed directories to usr/src/linux and typed "make modules" to compile these loadable modules. Then I installed them by entering "make modules_install". Next I copied and renamed the new kernel (bzImage) to a new directory.
After I renamed the kernel, I setup lilo.conf to boot my new kernel at startup. After configuring lilo.conf, it was time to see if the kernel worked. I rebooted and waited. There was an error that showed up. The error came from my sound card feature. I was able to boot Linux up, but was very annoyed by the error, and not having sounds. I then had to recompile. I realized I should have loaded my sound card feature as a module and not in the kernel. This fixed the problem.
After a few days, I was tempted to upgrade my Red Hat 6.0 to 6.1. Remember fellow newbies, only upgrade when you have to. Don't just upgrade a distro because its a new version. I found out the hard way when my computer started crashing continuously. I was frustrated and had to do a reinstall. It is not good to mix old system files with new files.
Since I had to reinstall Linux I decided to give slackware a try. Many new Linux users are afraid to install slackware because of its reputation of being difficult for newbies. I was told by newbies only advanced users should use slackware. Some advanced users told me, that to understand Linux at a great depth, I should use Slackware. So I did. I downloaded a copy of Slackware 7.0 and installed it. Slackware 7.0 had a great installation scheme and made it very easy to install. You can choose to install all, as newbie, from a menu, or as expert. Even though I am not an expert, I did not want to install everything into my laptop. So I tried to install Linux using the expert method. To my surprise the installation was very straight forward and descriptive. I choose all the programs I needed and installed them. The rest of the installation process was very easy.
Newbies may be used to configuring X during the installation. In Slackware, X must be configured after the installation. It was kind of funny when I typed in startx and received an error message about the XF86Config file. I was able to fix the XF86Config file with the Xconfigurator program. After using Xconfigurator I tried starting X again. For some reason I was not running an 800x600 display. I then looked into XF86Config and found there was some data that should not be there. I deleted all the settings I did not need. Then I restarted X and got the correct display.
The next task I have to accomplish is getting my sounds to work. I enjoy Red Hat but I am going to give Slackware a try. When I used Red Hat I never knew about XF86Config. I really enjoy learning more about Linux. So my fellow new comers, give Slack a try. It does not do all the work for you, but you will learn more. Till next time I bid you good luck and have fun.
|Page 1 of 1|