Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Chapter 9.  Kernel Configuration Recipes

Previous chapters taught the mechanics of reconfiguring the kernel; the payoff comes in this chapter where you can find all the most common kinds of changes people need to make to their kernels, with specific instructions on how to do so.

Disks

The Linux kernel supports a wide range of different disk types. This section shows how to configure the kernel so that it supports most of the more common types of disk controllers.

USB storage

To use a USB storage device (commonly referred to as USB "flash" device, or an external USB disk drive) USB support must be first working properly. Refer to the recipe in the section called “USB” for how to do this.

A USB storage device can be identified by using the lsusb program. If the following command sequence produces the results shown, a USB storage device is present on the system:

$ 
/usr/sbin/lsusb -v | grep Storage

      bInterfaceClass         8 Mass Storage

Enable it as follows.

  1. A USB Storage device is in reality a USB SCSI device that talks over a USB connection. Because of this, the SCSI subsystem must be enabled:

    Device Drivers
        SCSI Device Support
            [*] SCSI Device Support
    

  2. Also in the SCSI system, the "SCSI disk support" must be enabled in order for the device to be mounted properly:

    Device Drivers
    	SCSI Device Support
    		[*] SCSI disk support
    

  3. Enable USB Storage support:

    Device Drivers
    	USB Support
    	[M] USB Mass Storage support
    

A number of specific USB storage devices are listed as separate configuration items, as they do not follow the standard USB specification and require special code. If you have one of these devices, please enable support for them.

IDE Disks

IDE disks are the most common type of PC disks. The device that enables them to work properly is an IDE disk controller. To determine if you have a IDE disk controller on the system, use the lspci command in the following manner: [13]

$ 
/usr/sbin/lspci | grep IDE

00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)

Note that your response will probably not be identical; what is important is that the command shows some an IDE Controller (the first device in the previous example.) If you find only SATA controllers, please see the section called “Serial ATA (SATA)”.

Enable PCI support for the kernel:

Bus options (PCI, PCMCIA, EISA, MCA, ISA)
    [*] PCI Support

Enable the IDE subsystem, and IDE support:

Device Drivers
    [*] ATA/ATAPI/MFM/RLL support
    [*]   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support

In the ATA system, the specific type of IDE controller that you have must be enabled in order for it to work properly. To provide a good backup in case you choose the wrong type, select the "generic" IDE controller:

Device Drivers
    ATA/ATAPI/MFM/RLL support
        [*]     generic/default IDE chipset support

Enable the different PCI IDE controllers:

Device Drivers
    ATA/ATAPI/MFM/RLL support
        [*]     PCI IDE chipset support

This opens up a lengthy submenu of the different IDE controller types. Select the proper one based on the name of the device you found in the lspci step.

Serial ATA (SATA)

SATA is a type of disk controller that is the successor to the IDE disk controller. To determine if you have a SATA disk controller on the system, run the following command:

$ 
/usr/sbin/lspci | grep SATA

00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)

Note that your response will probably not be identical; what is important is that the command shows some SATA devices.

SATA disks use a kernel library called libata that handles most of the SATA-specific functionality. That library uses the SCSI layer to talk to the block layer, so many different kernel options need to be enabled in order for SATA disks to work properly. Enable PCI support for the kernel:

Bus options (PCI, PCMCIA, EISA, MCA, ISA)
	[*] PCI Support

Enable the SCSI subsystem:

Device Drivers
	SCSI Device Support
		[*] SCSI Device Support

Also in the SCSI system, the "SCSI disk support" option must be enabled in order for the device to be mounted properly:

Device Drivers
	SCSI Device Support
		[*] SCSI disk support

The SATA options are under the "SCSI low-level drivers" section:

Device Drivers
	SCSI Device Support
		SCSI low-level drivers
			[*] Serial ATA (SATA) support

In that section, enable the specific SATA controller type that you have. Look at the output of the previously mentioned lspci command for a list of the types of SATA controllers that are present on your system. For example, most motherboards from Intel require the PIIX/ICH SATA driver (as the previous example showed.)

Device Drivers
	SCSI Device Support
		SCSI low-level drivers
			[*] Serial ATA (SATA) support
			[*]   Intel PIIX/ICH SATA support

Burning a CD-ROM

Burning a CD-ROM is very simple on Linux. If your kernel can support reading from a CD-ROM, it can also support burning a CD-ROM. There are two ways to enable CD-ROM support in Linux, one for IDE drives and one for SCSI and SATA drives.

IDE CD-ROM drives

IDE CD-ROM drives are controlled by the same IDE controller as your main IDE disk drives. Make sure the IDE controller is properly supported as described in the section called “IDE Disks”. If it is properly supported, then only one other configuration item need to be selected:

Device Drivers
    [*] ATA/ATAPI/MFM/RLL support
    [*]   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
    [M]     Include IDE/ATAPI CDROM support

SCSI and SATA CD-ROM drives

SATA and SCSI CD-ROM drives are controlled by the same controller as your main disk drives. Make sure the SATA or SCSI controller is properly supported. For SATA disks, see the section called “Serial ATA (SATA)”.

To support SATA or SCSI CD-ROM drives, the SCSI CD-ROM driver must be enabled:

Device Drivers
	SCSI Device Support
		[*] SCSI CDROM support

Once that is enabled, the SATA or SCSI CD-ROM drive should work properly.



[13] Almost all distributions place the lspci program in the /usr/sbin/ directory, but some place it in other locations. To find out where it is located, do:

$ 
which lspci

/usr/sbin/lspci
If you are using a distribution that puts it somewhere else, please use that path for whenever we discuss using lspci


 
 
  Published under the terms of the Creative Commons License Design by Interspire