January 22, 2019

Building Your Own Linux Kernel: Tricky kernel options (part 3) - page 2

IO Schedulers, Processors, Power Management

  • October 22, 2009
  • By Akkana Peck

This is a huge area, and there isn't space to cover it adequately here. But if you're starting from a distro kernel, you may have far more networking devices enabled than you'll ever use. ifconfig -a will give you an idea.

figure 2
figure 2

But how do you figure out which options to turn off? It's a bit of a mine field (Fig 2), and not all options give helpful hints like "Say Y unless you know what you are doing" or "Nearly all users can safely say no here."

Some hints: most home users probably don't need tunnels, multicast, ATM or WAN. Any protocol marked EXPERIMENTAL probably isn't something you need, and most of the options listed under the EXPERIMENTAL protocols aren't commonly used.

Appletalk is a possible exception: you might want it if you have any old Macs and talk to them with netatalk. And down near the end, "QoS and/or fair queueing" can be useful if you want to tune your network for best performance.

Device drivers: ATA, SATA/PATA and SCSI

Under Device drivers is a trio of confusing categories:

  [ ] ATA/ATAPI/MFM/RLL support  --->
      SCSI device support  --->
  [*] Serial ATA (prod) and Parallel ATA (experimental) drivers  --

"ATA/ATAPI/MFM/RLL support" is the old driver that was used in the past for IDE drives. It's being replaced by "Serial ATA (prod) and Parallel ATA (experimental) drivers", which also handles the SATA drives found in most newer computers.

If you have only SATA drives, the choice is easy: turn off ATA and use SATA/PATA. But if you have an older IDE disk, or an ATAPI CDROM, you need to choose.

PATA and IDE mean pretty much the same thing. And reading that PATA support is experimental is a bit scary when it's your system hard drive you're talking about! But I'd advise going with the SATA/PATA drivers anyway. Distro kernels have been using them for over a year now. And since they're getting most of the development effort, the old ATA/ATAPI drivers are actually less reliable in some cases.

I don't recommend enabling both ATA/ATAPI and PATA/SATA. Under the ATA/ATAPI driver, your disk will be named /dev/hda, while under SATA/PATA it will be /dev/sda. If you build both drivers into your kernel, it's unpredictable which driver will "win" and you might have trouble booting.

What about SCSI? It's a relatively old disk protocol. You probably don't own any SCSI devices -- but Linux tends to deal with disk-like devices as if they were SCSI. The SATA/PATA driver needs SCSI, and so do the drivers for USB drives and flash card readers. So be sure you enable SCSI generic, disk and CDROM. You don't need specific drivers like RAID, SCSI tape or transports, or low-level drivers unless you have that hardware.

That takes care of the trickiest areas. Beyond that, read the Help and try things out. And the most important tip: always keep a copy of your most recent working kernel!

Akkana Peck is a freelance programmer whose credits include a tour as a Mozilla developer. She's also the author of Beginning GIMP: From Novice to Professional.

Most Popular LinuxPlanet Stories