This document describes the kernel configuration that will provide a basic, working kernel if you are trying to build a new kernel for a Linux system and it happen to conform to the following characteristics.
When creating the virtual machine, accept the recommended setting. This is important for setting that affect the type of virtual hardware that is created because the hardware determines which kernel modules are needed. Settings like the size of memory and the size of the disk do not matter.
The kernel configuration described here only applies to the openSUSE 11.1 Linux distribution because many parts of the system initialization are dependent upon which Linux distribution is used (for example, building the initial root file system).
The following table lists the names of the modules that need to be enabled in the kernel for the system described above. Be sure to configure these modules to be built as dynamically loadable modules rather than being built into the kernel (see “Determining the Correct Configuration” below for more information).
This configuration assumes that you are starting with the default configuration produced by the make defconfig command.
Next to each module is the name of the kernel configuration option that needs to be set to enable the module. The module nf_conntrack_netbios_ns lists two configuration options because NF_CONNTRACK_NETBIOS_NS is dependent on NETFILTER_ADVANCED.
This section shows the parts of the configuration dialog that pertains to the configuration options listed in the previous section.
Power management and ACPI options
ACPI (Advanced Configuration and Power Interface) support
Executable file formats / Emulations
Kernel support for MISC binaries (BINFMT_MISC)
Network packet filtering framework (Netfilter)
Advanced netfilter configuration (NETFILTER_ADVANCED)
Core Netfilter Configuration
Netfilter connection tracking support (NF_CONNTRACK)
NetBIOS name service protocol support (NF_CONNTRACK_NETBIOS_NS)
IP: Netfilter Configuration
IP tables support (required for ... (IP_NF_IPTABLES)
IPv6: Netfilter Configuration
IP6 tables support (IP6_NF_IPTABLES)
Packet filtering (IP6_NF_FILTER)
Packet mangling (IP6_NF_MANGLE)
Generic PCI IDE Chipset Support (BLK_DEV_GENERIC)
Intel PIIX/ICH chipsets support (BLK_DEV_PIIX)
SCSI device support
SCSI disk support (BLK_DEV_SD)
Serial ATA (prod) and Parallel ATA
ATA SFF support
Intel ESB, ICH, PIIX3, PIIX4, ... (ATA_PIIX)
Generic ATA support (ATA_GENERIC)
Fusion MPT device support
Fusion MPT ScsiHost drivers for SPI (FUSION_SPI)
Sound card support
Advanced Linux Sound Architecture
Sequencer support (SND_SEQUENCER)
OSS PCM (digital audio) API (SND_PCM_OSS)
USB Human Interface Device (full HID) ... (USB_HID)
Support for Host-side USB (USB)
EHCI HCD (USB 2.0) support (USB_EHCI_HCD)
OHCI HCD support (USB_OHCI_HCD)
UHCI HCD (most Intel and VIA) support (USB_UHCI_HCD)
BIOS Enhanced Disk Drive calls determine ... (EDD)
Ext3 journaling file system support (EXT3_FS)
This section describes how the kernel configuration described above was arrived at.
Start with the default kernel configuration. The following command will produce a default configuration for the current architecture, which, in this case, is the x86 Intel architecture. Change directories to the top of the kernel source tree and execute the following command.
$ make defconfig
If you build a kernel with the default configuration, the build process will print a number of error messages when the initial root file system is created (when the make install command is executed). This occurs because the openSUSE distribution lists several modules in the INITRD_MODULES variable in the file /etc/sysconfig/kernel. This variable identifies module that need to be added to the initial root file system when the kernel is built.
INITRD_MODULES="processor thermal mptspi ata_piix ata_generic piix
ide_pci_generic fan jbd ext3 edd"
In the default configuration, these modules are either not enabled or they are enabled, but they are built into the kernel rather than built as dynamically loadable modules. Unless they are built as dynamically loadable modules, they cannot be put in the initial root file system, which will cause an error.
After changing the configuration to build these modules as dynamically loadable modules, a few more modules show up as missing because they are needed by the modules just added. These new modules must also be built as dynamically loadable modules.
Fixing the configuration options discussed above results in a kernel that boots, but there are still problems with the network. For this, you need to rebuild and reinstall the VMware tools. This is necessary because kernel modules can only be used with the kernel that they were compiled for, and so, the kernel modules that were being used with the original kernel cannot be used with the new kernel.
Select VM->Reinstall VMware Tools from the VMware menu bar. This will mount a file that contains everything you need to rebuild the VMware tools. The following commands show how to unpack the file and rebuild the tools. The vmware-install.pl script will ask several questions, which can all be answered by accepting the default answer (just press return).
$ cd /tmp
$ tar –zxvf “/media/VMware Tools/VMwareTools-8.1.3-203739.tar.gz”
$ cd vmware-tools-distrib
$ sudo ./vmware-install.pl
If you examine the messages that were printed while the system was starting, you will still see errors caused by missing modules. These errors are caused by some of the system startup scripts trying to load kernel modules that are not built as dynamically loadable modules.
The messages printed during system startup are saved in the file /var/log/boot.msg. You can use the following command to print the error messages that were printed when one of the startup scripts failed trying to load a module.
$ grep FATAL /var/log/boot.msg | sort | uniq
Again, these modules must be built as dynamically loadable modules.
Copyright © 2009 by Bruce Blinn