Archive for November, 2007

Compiling the kernel Once the .config and Makefile (Web hosting ecommerce)

Friday, November 30th, 2007

Compiling the kernel Once the .config and Makefile files are customized, the new kernel can be compiled by running the following commands: 1. make dep In this step, source files (.c) are examined for dependencies on header files. A file called .depend is created in each directory containing source files to hold the resulting list, with a line for each compiled object file (.o). The .depend files are automatically included in subsequent make operations to be sure that changes in header files are compiled into new objects. Since kernel code isn t being developed here, no header file changes are needed. Nevertheless, make dep is an essential first step in the compilation process. 2. make clean The clean operation removes old output files that may exist from previous kernel builds. These include core files, system map files, and others. They must be removed in order to compile a new, clean kernel. 3. make bzImage The bzImage file is our ultimate goal, a bootable kernel image file, compressed using the bzip2 utility.* It is created in this step along with some additional support files needed for boot time. 4. make modules Device drivers and other items that were configured as modules are compiled in this step. 5. make modules_install All of the modules compiled during make modules are installed under /lib/ modules/kernel-version in this step. A directory are created there for each kernel version, including various extraversions. The bzImage and modules portions of the kernel-compilation process will take the most time. Overall, the time required to build a kernel depends on your system s capabilities. After completing this series of make processes, compilation is complete. The new kernel image is now located in /usr/src/linux/arch/i386/boot/bzImage. Installing the new kernel and configuring LILO Now that the new kernel has been compiled, the system can be configured to boot it: 1. The first step is to put a copy of our new bzImage on the root partition so it can be booted by LILO. The copy is named just as it was named during compilation, including the extraversion: # cp -p /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.5-15-pentium * bzip2 is a compression utility similar to the more familiar gzip. bzip2 uses a different compression algorithm that generally produces better compression results. See the bzip2 manpage for more information. Study Guide102 Reconfigure, Build, and Install a Custom Kernel and Modules 317
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Graphic web design - Figure 2-5: The make xconfig processor-selection window CONFIG_M586TSC=y

Friday, November 30th, 2007

Figure 2-5: The make xconfig processor-selection window CONFIG_M586TSC=y # CONFIG_M686 is not set CONFIG_X86_WP_WORKS_OK=y CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y CONFIG_X86_TSC=y CONFIG_MATH_EMULATION=y CONFIG_MTRR=y # CONFIG_SMP is not set The complete .config file will contain approximately 800 lines. You should look through the other kernel options with one of the windowed selectors first to familiarize yourself with what is available before making your selections. Now that .config is created, one small change is made to Makefile to differentiate our new custom kernel from the generic one. Examining /usr/src/linux/Makefile, the first four lines look like this: VERSION = 2 PATCHLEVEL = 2 SUBLEVEL = 5 EXTRAVERSION = -15 You can see that the kernel version is 2.2.5 and that an additional version number is available. In this case, the generic kernel had the extra version suffix of -15, yielding a complete kernel version number 2.2.5-15. This EXTRAVERSION parameter can be used to indicate just about anything. In this example it denotes the 15th build of kernel 2.2.5, but pentium is added to the end for our custom version. Edit Makefile and change EXTRAVERSION as follows: EXTRAVERSION = -15-pentium This change completes the configuration for this example. 316 Kernel (Topic 1.5)
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

Web hosting unlimited bandwidth - Figure 2-4: The make xconfig menu display make

Thursday, November 29th, 2007

Figure 2-4: The make xconfig menu display make oldconfig Syntax make oldconfig Description make oldconfig can create a default .config file. This method sets up a default .config file without interaction from the user. This is convenient if you need a starting point and your distribution did not install a default .config file. This method will also build a new .config file from one customized for a previous kernel release, but this is beyond the scope of Exam 102. NOTE In the absence of user responses, menuconfig and xconfig will create a default .config file, equivalent to the one created by oldconfig. Example To create the .config file for this example, the target processor is set as Pentium. Using make xconfig, the selection looks like the window shown in Figure 2-5. By setting the Processor family parameter to Pentium/K6/TSC and saving the configuration, the following revised configuration lines are written in .config: # Processor type and features # # CONFIG_M386 is not set # CONFIG_M486 is not set # CONFIG_M586 is not set Study Guide102 Reconfigure, Build, and Install a Custom Kernel and Modules 315
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Domain and web hosting - Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [Y/n/?]Y

Thursday, November 29th, 2007

Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL) [Y/n/?]Y Each option is offered in this manner. make menuconfig Syntax make menuconfig Description This configuration method is more intuitive and can be used as an alternative to make config. It creates a text-mode-windowed environment where you may use up/down/left/right and other keys to configure the kernel. The menu depends on the ability of your terminal or terminal window to use curses, a standard library of terminal cursor manipulation instructions. If your terminal does not support curses (though most do), you must select another method. The make menuconfig window is illustrated in Figure 2-3 in an xterm. Figure 2-3: The make menuconfig menu display make xconfig Syntax make xconfig Description If you are running the X Window System, the make xconfig configuration method presents a GUI menu with radio buttons to make the selections. It is the most appealing visually but requires a graphical console or X display. Figure 2-4 shows the top-level make xconfig window. The options presented in each case are the same, as is the outcome. 314 Kernel (Topic 1.5)
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Creating a kernel configuration The first step in (Web site designers)

Wednesday, November 28th, 2007

Creating a kernel configuration The first step in creating a kernel is configuration. There are more than 500 options for the kernel, such as filesystem, SCSI, and networking support. Many of the options list kernel features that can be either compiled directly into the kernel or compiled as modules. During configuration, you indicate for each option whether you want that feature: Compiled into the kernel ( yes response) Compiled as a module (module response) Don t want the feature at all ( no response) Some selections imply a group of other selections. For example, when you indicate that you wish to include SCSI support, additional options become available for specific SCSI drivers and features. The results from all of these choices are stored in the kernel configuration file /usr/src/linux/.config, which is a plain text file that lists the options as shell variables set to one of y, m,or n in accordance with your response for each item. To begin, set the current working directory to the top of the source tree: # cd /usr/src/linux There are several ways to set up .config. Although you can do so, you should not edit the file manually. Instead, you may select from three interactive approaches. An additional option is available to construct a default configuration. Each is started using make. make config Syntax make config Description Running make config is the most rudimentary of the automated kernel-configuration methods and does not depend on any form of display capability on your terminal. In response to make config, the system presents you with a question in your console or window for each kernel option. You respond to the questions with y, m,or n for yes, module,or no, respectively. This method can admittedly get a bit tedious and has the liability that you must answer all the questions before being asked if you wish to save your .config file and exit. However, it is helpful if you do not have sufficient capability to use one of the menu-based methods (described next). A make config session looks like this: # make config rm -f include/asm ( cd include ; ln -sf asm-i386 asm) /bin/sh scripts/Configure arch/i386/config.in # # Using defaults found in arch/i386/defconfig # * * Code maturity level options * Study Guide102 Reconfigure, Build, and Install a Custom Kernel and Modules 313
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Of course, you also (Web site template) need the kernel source

Wednesday, November 28th, 2007

Of course, you also need the kernel source code. Your Linux distribution will come with one or more packages containing everything you need. For example, on a Red Hat system, use the following two RPM packages (listed here without their version numbers): kernel-source This package contains the C language source code for the kernel and modules. kernel-headers This package contains C language header files for the kernel. The header files define structures and constants that are needed for building most C programs, as well as the kernel itself. On most systems, the kernel s source code can be found in /usr/src/linux, which should be a symbolic link to the specific version of the kernel you re using. For example, here is the /usr/src directory for a system with several kernel versions: # ls l /usr/src lrwxrwxrwx 1 root root 12 Feb 16 04:19 linux -> linux-2.3.45 drwxr-xr-x 15 root root 1024 Jan 29 01:13 linux-2.2.14 drwxr-xr-x 17 root root 1024 Feb 16 03:00 linux-2.2.5 drwxr-xr-x 14 root root 1024 Feb 16 04:35 linux-2.3.45 In this example, symbolic link /usr/src/linux points to the directory hierarchy for development kernel 2.3.45. The /usr/src/linux link is important when you work with multiple kernels, as it is assumed that the link will be manually removed before installing new kernel source trees. For the purposes of Exam 102, you need to be concerned only with the kernel source installed by your distribution. On the Exam You will need to know where the kernel source code is stored (e.g., /usr/ src/linux). Explore the kernel source tree to familiarize yourself with its contents. Pay particular attention to .config and the Makefile. Compiling a Custom Kernel This section provides an overview of kernel compilation and installation by way of example. This example uses kernel Version 2.2.5, and our objective is to create a single-processor 2.2.5 kernel for a Pentium system with IDE disks* to replace a generic kernel that came with the distribution. Assume that the development environment including compiler, make, kernel source code, and kernel headers is installed. The root account will be used to create and install the kernel, although any user can compile a kernel given the appropriate filesystem permissions. Before building a customized kernel, you should read /usr/doc/HOWTO/Kernel-HOWTO and /usr/src/linux/README. * A system that boots from a SCSI disk and has the SCSI driver compiled as a module requires the use of an initial RAM disk, which is not covered here. 312 Kernel (Topic 1.5)
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Kernel versions Nearly all software projects, even small (Most popular web site)

Tuesday, November 27th, 2007

Kernel versions Nearly all software projects, even small ones, use a numerical versioning scheme to describe each successive release. Kernel versions are numbered using the following convention: major.minor.patchlevel Major release Increments in the major release indicate major developmental milestones in the kernel. The present release is 2.x.x (don t let the low major release number fool you there have been plenty of developmental milestones in the Linux kernel s history). Minor release The minor release indicates significant changes and additions, which taken together will culminate in a new major release. The Linux kernel minor release numbers fall into one of the following categories: Even-numbered releases Kernels with even-numbered kernel versions (2.0, 2.2, 2.4, and so on) are considered stable. Odd-numbered releases Kernels with odd-numbered minor release versions (2.1, 2.3, and so on) are in development and are primarily used by kernel developers. When goals for the development of a minor release are met and testing shows that the kernel is stable, a new even-numbered minor release is created. This is how development kernels are released as production kernels. Patch level As bugs are found and corrected or as planned features are added, the kernel patch level is incremented (2.2.15, 2.3.38, and so on). Generally speaking, it is safest to run the latest patch level of the kernel to be assured of having the most current bug fixes. In reality, it is more important to track kernel development and upgrade your kernel only if your existing version is found to have a serious problem or if you are already experiencing difficulty. Required tools and software To compile a custom kernel, you need development tools including a C compiler, assembler, linker, and the make utility. If you selected a kernel development option when you installed Linux, you should already have these tools on your system. The C compiler is the program that translates C source code into the binary form used by your system. The standard compiler on most Linux systems is the GNU C Compiler, gcc. The assembler and linker are needed for some portions of the kernel compilation. The compilation process is controlled by make, a utility that executes commands such as gcc as directed by a list of dependency rules. These rules are stored in the Makefile. A brief introduction to make is provided in Part 2: Linux Installation and Package Management (Topic 2.2), Objective 3: Make and Install Programs from Source. Study Guide102 Reconfigure, Build, and Install a Custom Kernel and Modules 311
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

The modules.dep (Web hosting mysql) file must be kept current to

Tuesday, November 27th, 2007

The modules.dep file must be kept current to ensure the correct operation of modprobe. If module dependencies were to change without a corresponding modification to modules.dep, then modprobe may fail, because a dependency could be missed. As a result, modules.dep is created each time the system is booted. On most distributions, the depmod a command is called during rc.sysinit: echo “Finding module dependencies” /sbin/depmod a The depmod a command recreates and overwrites modules.dep each time the system is booted. This procedure is also necessary after any change in module dependencies. (The depmod command is actually a link to the same executable as modprobe. The functionality of the command differs depending on which name is used to call it.) The depmod command is not specifically called out in the LPIC Level 1 Objectives, but it is important to understand how the command works since it generates modules.dep. On the Exam Be sure you know what is in modules.dep, as well as what the file is used for, how it is created, and when it is created. Be prepared to cite the consequences of a missing or obsolete modules.dep file. Objective 2: Reconfigure, Build, and Install a Custom Kernel and Modules Because Linux is an open source operating system, you are free to create a customized Linux kernel that suits your specific needs and hardware. For example, you may wish to create a kernel for your system if your distribution installed a generic kernel that was compiled using the 80386 instruction set. Such a kernel will run on any compatible processor but may not utilize some of the capabilities of newer processors. Running a kernel optimized for your particular CPU can enhance its performance. You can also install new kernels to add features, fix bugs, or experiment with kernels still under development. While the compilation of such kernels isn t much of a leap beyond recompiling your existing version, it s beyond the scope of the LPIC Level 1 exams. Kernel Background If you are new to the idea of building a custom kernel, don t feel intimidated. Linux developers have created a simple and reliable process that you can follow, and everything you need is available in your Linux distribution. 310 Kernel (Topic 1.5)
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Best web design - removemodule This directive allows a specific shell command

Monday, November 26th, 2007

removemodule This directive allows a specific shell command to override the default module-removal command. post-removemodule This directive causes some shell command to be executed after removal of module. The following is an example the /etc/conf.modules file: alias scsi_hostadapter aic7xxx alias eth0 3c59x alias parport_lowlevel parport_pc pre-install pcmcia_core /etc/rc.d/init.d/pcmcia start alias sound opl3sa2 pre-install sound insmod sound dmabuf=1 alias midi opl3 options opl3 io=0×388 options opl3sa2 mss_io=0×530 irq=5 dma=0 dma2=1 mpu_io=0×388 io=0×370 On the Exam Remember that the files conf.modules and modules.conf are the same file, depending on distribution. Also, while it is important for you to understand the configuration lines /etc/conf.modules, detailed module configuration is beyond the scope of the LPIC Level 1 exams. Module Dependency File modprobe can determine module dependencies and install prerequisite modules automatically. To do this, modprobe scans the first column of /lib/modules/ kernel-version/modules.dep to find the module it is to install. Lines in modules.dep are in the following form: module_name.o: dependency1 dependency2 … A typical dependency looks like this: /lib/modules/2.2.5-15smp/fs/msdos.o: /lib/modules/2.2.5-15smp/fs/fat.o Here, the msdos module is dependent upon fat. All of the modules available on the system are listed in the modules.dep file and are referred to with their full path and filenames, including their .o extension. Those that are not dependent on other modules are listed, but without dependencies. Dependencies that are listed are inserted into the kernel by modprobe first, and when all of them are successfully inserted, the subject module itself can be loaded. Study Guide102 Manage Kernel Modules at Runtime 309
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

configuration file (Web hosting solutions) /etc/conf.modules (or in /etc/modules.conf, depending on

Monday, November 26th, 2007

configuration file /etc/conf.modules (or in /etc/modules.conf, depending on your distribution), which controls the behavior of modprobe. The /etc/conf.modules file can contain the following information: Comments Blank lines and lines beginning with # are ignored. keep The keep parameter, when found before any path directives, causes the default paths to be retained and added to any paths specified. depfile=full_path This directive overrides the default location for the modules dependency file, modules.dep (described in the next section). For example: depfile=/lib/modules/2.2.14/modules.dep path=path_directory This directive specifies a directory to search for modules. optionsmodule opt1=val1 opt2=val2 … Options for modules can be specified using the options configuration line in conf.modules or on the modprobe command line. The command line overrides configurations in the file. module is the name of a single module without the .so extension. Options are specified as name=value pairs, where the name is understood by the module and reported using modinfo p. For example: options opl3 io=0×388 alias Aliases can be used to associate a generic name with a specific module. For example: alias scsi_hostadapter aic7xxx alias eth0 3c59x alias parport_lowlevel parport_pc pre-installmodule command This directive causes some shell command to be executed prior to insertion of module. For example, PCMCIA services need to be started prior to installing the pcmcia_core module: pre-install pcmcia_core /etc/rc.d/init.d/pcmcia start installmodule command This directive allows a specific shell command to override the default module-insertion command. post-installmodule This directive causes some shell command to be executed after insertion of module. pre-removemodule This directive causes some shell command to be executed prior to removal of module. 308 Kernel (Topic 1.5)
You want to have a cheap webhost for your apache application, then check apache web hosting services.