Cover image for Linux Kernel in a Nutshell

Book description

Written by a leading developer and maintainer of the Linux kernel, Linux Kernel in a Nutshell is a comprehensive overview of kernel configuration and building, a critical task for Linux users and administrators.

No distribution can provide a Linux kernel that meets all users' needs. Computers big and small have special requirements that require reconfiguring and rebuilding the kernel. Whether you are trying to get sound, wireless support, and power management working on a laptop or incorporating enterprise features such as logical volume management on a large server, you can benefit from the insights in this book.

Linux Kernel in a Nutshell covers the entire range of kernel tasks, starting with downloading the source and making sure that the kernel is in sync with the versions of the tools you need. In addition to configuration and installation steps, the book offers reference material and discussions of related topics such as control of kernel options at runtime.

A key benefit of the book is a chapter on determining exactly what drivers are needed for your hardware. Also included are recipes that list what you need to do to accomplish a wide range of popular tasks.

Table of Contents

  1. Linux Kernel in a Nutshell
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. A Note Regarding Supplemental Files
    3. Preface
      1. Audience for the book
      2. Organization of the material
      3. Online Version and License
      4. Conventions Used in This Book
      5. Contact Information
      6. Acknowledgments
    4. 1. Introduction
      1. Using this book
    5. 2. Requirements for building and using the kernel
      1. Tools to build the kernel
        1. Compiler
        2. Linker
        3. Make
      2. Tools to use the kernel
        1. util-linux
        2. module-init-tools
        3. Filesystem-specific tools
          1. ext2/ext3/ext4
          2. JFS
          3. ReiserFS
          4. XFS
          5. Quotas
          6. NFS
        4. Other tools
          1. udev
          2. Process tools
          3. PCMCIA tools
    6. 3. Retrieving the kernel source
      1. What tree to use
      2. Where to find the kernel source
      3. What to do with the source
    7. 4. Configuring and Building
      1. Creating a configuration
        1. Configuring from scratch
        2. Default configuration options
      2. Modifying the configuration
        1. Console configuration method
        2. Graphical configuration methods
      3. Building the kernel
      4. Advanced building options
        1. Building faster on multiprocessor machines
        2. Building only a portion of the kernel
        3. Source in one place, output in another
        4. Different architectures
    8. 5. Installing and Booting From a Kernel
      1. Using a Distribution's Installation Scripts
      2. Installing By Hand
      3. Modifying the Bootloader For the New Kernel
        1. GRUB
        2. LILO
    9. 6. Upgrading a kernel
      1. Download the new source
        1. Which patch applies to which release?
        2. Finding the patch
      2. Applying the patch
      3. Reconfigure the kernel
      4. Can't this be automated?
    10. 7. Customizing a Kernel
      1. Using a Distribution Kernel
        1. Where Is the Kernel Configuration?
        2. Finding Which Module Is Needed
          1. Example: determining the network driver
          2. Example: a USB device
          3. Summary of device discovery
          4. Let the kernel tell us what we need
      2. Determining the Correct Module From Scratch
        1. PCI devices
        2. USB devices
        3. Root Filesystem
          1. Filesystem type
          2. Disk controller
        4. Helper Script
    11. 8. Kernel Configuration Recipes
      1. Disks
        1. USB storage
        2. IDE Disks
        3. Serial ATA (SATA)
        4. Burning a CD-ROM
          1. IDE CD-ROM drives
          2. SCSI and SATA CD-ROM drives
      2. Devices
        1. USB
        2. IEEE 1394 (FireWire)
        3. PCI hotplug
        4. PCMCIA / CardBus
        5. Sound (ALSA)
      3. CPU
        1. Processor Types
        2. SMP
        3. Preemption
        4. Suspend
        5. CPU Frequency Scaling
        6. Different Memory Models
        7. ACPI
      4. Networking
        1. Netfilter
        2. Network Drivers
        3. IrDA
        4. Bluetooth
        5. Wireless
      5. Filesystems
        1. RAID
        2. Logical Volume Manager and Device Mapper
        3. Filesharing with Windows
        4. OCFS2
      6. Security
        1. Default Linux Capabilities
        2. SELinux
      7. Kernel debugging
        1. Kernel log timestamps
        2. Magic SysRq keys
        3. Debug Filesystem
        4. General Kernel Debugging
    12. 9. Kernel boot command-line parameter reference
      1. Module-specific options
      2. Console options
        1. console
        2. netconsole
        3. debug
        4. quiet
        5. earlyprintk
        6. loglevel
        7. log_buf_len
        8. initcall_debug
        9. kstack
        10. time
      3. Interrupt options
        1. apic
        2. noapic
        3. lapic
        4. nolapic
        5. noirqbalance
        6. irqfixup
        7. irqpoll
        8. noirqdebug
      4. Memory options
        1. highmem
        2. hugepages
        3. ihash_entries
        4. max_addr
        5. mem
        6. mem
        7. memmap
        8. memmap
        9. noexec
        10. reserve
        11. vmalloc
        12. norandmaps
        13. vdso
      5. Suspend options
        1. resume
        2. noresume
      6. CPU options
        1. cachesize
        2. lpj
        3. nmi_watchdog
        4. no387
        5. nofxsr
        6. no-hlt
        7. mce
        8. nomce
        9. nosep
        10. nosmp
        11. notsc
        12. max_cpus
      7. Scheduler options
        1. isolcpus
        2. migration_cost
        3. migration_debug
        4. migration_factor
      8. Ramdisk options
        1. initrd
        2. load_ramdisk
        3. noinitrd
        4. prompt_ramdisk
        5. ramdisk_blocksize
        6. ramdisk_size
      9. Root disk options
        1. ro
        2. root
        3. rootdelay
        4. rootflags
        5. rootfstype
        6. rw
      10. Init options
        1. init
        2. rdinit
        3. S
      11. kexec options
        1. crashkernel
        2. elfcorehdr
      12. RCU options
        1. rcu.blimit
        2. rcu.qhimark
        3. rcu.qlowmark
        4. rcu.rsinterval
      13. ACPI options
        1. acpi
        2. acpi_sleep
        3. acpi_sci
        4. acpi_irq_balance
        5. acpi_irq_nobalance
        6. acpi_irq_isa
        7. acpi_irq_pci
        8. acpi_os_name
        9. acpi_osi
        10. acpi_serialize
        11. acpi_skip_timer_override
        12. acpi_dbg_layer
        13. acpi_fake_ecdt
        14. acpi_generic_hotkey
        15. acpi_pm_good
        16. ec_intr
        17. memmap
        18. memmap
        19. pnpacpi
        20. processor.max_cstate
        21. processor.nocst
      14. SCSI options
        1. max_luns
        2. max_report_luns
        3. scsi_dev_flags
      15. PCI options
      16. PnP BIOS options
        1. noisapnp
        2. pnpbios
        3. pnp_reserve_irq
        4. pnp_reserve_dma
        5. pnp_reserve_io
        6. pnp_reserve_mem
      17. SELinux options
        1. checkreqprot
        2. enforcing
        3. selinux
        4. selinux_compat_net
      18. Network options
        1. netdev
        2. rhash_entries
        3. shapers
        4. thash_entries
      19. NFS options
        1. lockd.nlm_grace_period
        2. lockd.nlm_tcpport
        3. lockd.nlm_timeout
        4. lockd.nlm_udpport
        5. nfsroot
        6. nfs.callback_tcpport
        7. nfs.idmap_cache_timeout
      20. Hardware specific options
        1. nousb
        2. lp
        3. parport
        4. parport_init_mode
        5. nr_uarts
      21. Timer specific options
        1. enable_timer_pin_1
        2. disable_timer_pin_1
        3. enable_8254_timer
        4. disable_8254_timer
        5. hpet
        6. clocksource
      22. Miscellaneous options
        1. dhash_entries
        2. elevator
        3. hashdist
        4. combined_mode
        5. max_loop
        6. panic
        7. pause_on_oops
        8. profile
    13. 10. Kernel build command line reference
      1. Informational Targets
      2. Cleaning Targets
      3. Configuration Targets
      4. Build Targets
      5. Packaging Targets
      6. Documentation Targets
      7. Architecture-Specific Targets
      8. Analysis Targets
    14. 11. Kernel Configuration Option Reference
      1. EXPERIMENTAL
      2. LOCALVERSION
      3. AUDIT
      4. IKCONFIG
      5. EMBEDDED
      6. MODULES
      7. IOSCHED_NOOP
      8. IOSCHED_AS
      9. IOSCHED_DEADLINE
      10. IOSCHED_CFQ
      11. SMP
      12. M386
      13. X86_GENERIC
      14. NR_CPUS
      15. SCHED_SMT
      16. PREEMPT_NONE
      17. PREEMPT_VOLUNTARY
      18. PREEMPT
      19. PREEMPT_BKL
      20. NOHIGHMEM
      21. HIGHMEM4G
      22. HIGHMEM64G
      23. FLATMEM_MANUAL
      24. DISCONTIGMEM_MANUAL
      25. SPARSEMEM_MANUAL
      26. SECCOMP
      27. KEXEC
      28. HOTPLUG_CPU
      29. PM
      30. SOFTWARE_SUSPEND
      31. ACPI
      32. CPU_FREQ
      33. CPU_FREQ_DEFAULT_GOV_PERFORMANCE
      34. CPU_FREQ_DEFAULT_GOV_USERSPACE
      35. CPU_FREQ_GOV_PERFORMANCE
      36. CPU_FREQ_GOV_POWERSAVE
      37. CPU_FREQ_GOV_USERSPACE
      38. CPU_FREQ_GOV_ONDEMAND
      39. CPU_FREQ_GOV_CONSERVATIVE
      40. PCI
      41. PCCARD
      42. PCMCIA
      43. CARDBUS
      44. HOTPLUG_PCI
      45. NET
      46. UNIX
      47. INET
      48. IP_ADVANCED_ROUTER
      49. NETFILTER
      50. NET_SCHED
      51. IRDA
      52. IRLAN
      53. IRNET
      54. IRCOMM
      55. IRDA_ULTRA
      56. BT
      57. IEEE80211
      58. MTD
      59. PARPORT
      60. PNP
      61. ISAPNP
      62. PNPBIOS
      63. IDE
      64. BLK_DEV_IDE
      65. BLK_DEV_IDEDISK
      66. BLK_DEV_IDECD
      67. BLK_DEV_IDEFLOPPY
      68. SCSI
      69. BLK_DEV_SD
      70. CHR_DEV_ST
      71. BLK_DEV_SR
      72. CHR_DEV_SG
      73. CHR_DEV_SCH
      74. SCSI_MULTI_LUN
      75. SCSI_SATA
      76. MD
      77. BLK_DEV_MD
      78. BLK_DEV_DM
      79. IEEE1394
      80. I2O
      81. NETDEVICES
      82. NET_ETHERNET
      83. NET_RADIO
      84. PPP
      85. PPPOE
      86. ISDN
      87. PHONE
      88. INPUT
      89. VT
      90. VT_CONSOLE
      91. SERIAL_8250
      92. AGP
      93. DRM
      94. I2C
      95. SPI
      96. HWMON
      97. VIDEO_DEV
      98. DVB
      99. FB
      100. VGA_CONSOLE
      101. LOGO
      102. SOUND
      103. SND
      104. SND_USB_AUDIO
      105. USB
      106. USB_EHCI_HCD
      107. USB_OHCI_HCD
      108. USB_UHCI_HCD
      109. USB_STORAGE
      110. USB_SERIAL
      111. USB_GADGET
      112. MMC
      113. INFINIBAND
      114. EDAC
      115. EXT2_FS
      116. EXT3_FS
      117. REISERFS_FS
      118. JFS_FS
      119. XFS_FS
      120. OCFS2_FS
      121. INOTIFY
      122. QUOTA
      123. AUTOFS_FS
      124. FUSE_FS
      125. SMB_FS
      126. CIFS
      127. PROFILING
      128. OPROFILE
      129. KPROBES
      130. PRINTK_TIME
      131. MAGIC_SYSRQ
      132. DEBUG_KERNEL
      133. DEBUG_FS
      134. SECURITY
      135. SECURITY_SELINUX
    15. A. Helpful Utilities
      1. patch and diff
        1. New Kernel Versions
      2. Managing Your Patches With quilt
      3. git
      4. ketchup
    16. 12. Bibliography
      1. Books
        1. General Linux Books
        2. Linux Kernel Books
      2. Tool locations
    17. Index
    18. About the Author
    19. SPECIAL OFFER: Upgrade this ebook with O’Reilly