Section 8.1. Disks


8.1. 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.

8.1.1. 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.

8.1.2. 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 whether you have a IDE disk controller on the system, use the lspci command in the following manner:[*]

[*] 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, enter:

 $ 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.

 $ /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 next section "Serial ATA (SATA)." Now perform the following steps.

  1. Enable PCI support for the kernel:

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

  2. Enable the IDE subsystem, and IDE support:

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

  3. 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 

  4. 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.

8.1.3. 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 several different kernel options need to be enabled in order for SATA disks to work properly.

  1. Enable PCI support for the kernel:

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

  2. Enable the SCSI subsystem:

     Device Drivers     SCSI Device Support         [*] SCSI Device Support 

  3. 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 

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

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

  5. 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 

8.1.4. 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.

8.1.4.1. 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 earlier in "IDE Disks." If it is properly supported, only one other configuration item needs 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 

8.1.4.2. 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 earlier section "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.



Linux Kernel in a Nutshell
Linux Kernel in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596100795
EAN: 2147483647
Year: 2004
Pages: 113

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net