Table Of Content®
Live Linux CDs
N E G U S L I V E L I N U X S E R I E S
Your practical, hands-on guides to getting
real results with free software
Books in the Negus Live Linux Series encourage and challenge
you to advance in the free software world. Boot the live DVD or
CD that comes with each book and watch the Linux system,
applications, and content described in the book come to life
before your eyes.
Start as a novice by trying out examples and finish as a profes-
sional, mastering the many topics covered in the series, from
building PHP/MySQL sites to customizing live CDs and more.
When you are finished, you will know how to use, customize, and
rebuild that free and open source software yourself.
Overseeing the series is Christopher Negus, bestselling author
of the Red Hat Linux Bible series, Linux Toys series, and the
signature book for this series, Live Linux CDs.
N E G U S L I V E L I N U X S E R I E S
®
Live Linux CDs
Building and Customizing
Bootables
Christopher Negus
An Imprint of Pearson Education
Upper Saddle River, NJ ■ Boston ■ Indianapolis ■ San Francisco
New York ■ Toronto ■ Montreal ■ London ■ Munich ■ Paris ■ Madrid
Cape Town ■ Sydney ■ Tokyo ■ Singapore ■ Mexico City
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks.
Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have
been printed with initial capital letters or in all capitals.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of
any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential
damages in connection with or arising out of the use of the information or programs contained herein.
The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales,
which may include electronic versions and/or custom covers and content particular to your business, training goals,
marketing focus, and branding interests. For more information, please contact:
U.S. Corporate and Government Sales
(800) 382-3419
As always, I dedicate this book to my wife, Sheree.
This page intentionally left blank
Contents
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
PART I Beginning with Bootable Live Linuxes . . . . . . . . . . 5
CHAPTER 1 Starting Up with Live Linux CDs . . . . . . . . . . . . . . . . . . . 7
Understanding Live Linux CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Running a Live Linux CD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Overcoming the First Hurdles to Linux . . . . . . . . . . . . . . . . . . . . . . . 9
Using Different Types of Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . 10
Desktop Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Gaming Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Clustering Live CDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Multimedia Player Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Multimedia Production Live CDs . . . . . . . . . . . . . . . . . . . . . . . . 14
Recovery and Security Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . 15
Firewall Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Live CDs for Developing, Testing, and Showcasing
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Specialty Presentation Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . 17
Disaster Center Live CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Selecting Bootable Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Getting the Most from a Live CD . . . . . . . . . . . . . . . . . . . . . . . . 18
vii
vii i Contents
Building a Live Linux CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Choosing a Base Linux System . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Knoppix and Debian-Based Live CDs . . . . . . . . . . . . . . . . . . . . . 24
Fedora-Based Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Gentoo-Based Live CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Trying Other Live CDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Learning about Live CDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Using Boot Loaders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Choosing Compression Techniques and File System Types . . . . . 32
Understanding Hardware Detection. . . . . . . . . . . . . . . . . . . . . . 33
Configuring System Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Choosing Software Packaging . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Selecting a Desktop Environment . . . . . . . . . . . . . . . . . . . . . . . . 35
Burning and Fancying Up Your Live CD . . . . . . . . . . . . . . . . . . . . . 35
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
CHAPTER 2 Playing with Live Linux CDs. . . . . . . . . . . . . . . . . . . . . . 37
Before Booting a Live CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Starting from the DVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Running a Desktop Live CD (Knoppix) . . . . . . . . . . . . . . . . . . . . . . 40
Touring Knoppix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
CD, Floppy, and USB Memory Drives . . . . . . . . . . . . . . . . . . . . . 42
Hard-Disk Partitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
KDE and Knoppix Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Panel Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Desktop Pager and Taskbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
System Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Konqueror File Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
The Shell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Running a Gaming Live CD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Using Gaming Emulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Trying Games in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Running a Multimedia Live CD (MoviX and Dynebolic) . . . . . . . . . 58
Playing Video, Music, and Images with MoviX . . . . . . . . . . . . . . 59
Creating Multimedia Content with Dynebolic . . . . . . . . . . . . . . 62
Contents ix
Running a Security Live CD (BackTrack). . . . . . . . . . . . . . . . . . . . . 66
Getting a Live CD Working Just Right. . . . . . . . . . . . . . . . . . . . . . . 68
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
CHAPTER 3 Customizing a Live CD . . . . . . . . . . . . . . . . . . . . . . . . . 73
Customizing a Live CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Making Desktop Customizations . . . . . . . . . . . . . . . . . . . . . . . . 75
Making Server Customizations . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Keeping Your Customized Files and Settings. . . . . . . . . . . . . . . . . . 91
Setting Up a Persistent Desktop . . . . . . . . . . . . . . . . . . . . . . . . . 91
Keeping Just Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . 94
Booting with Customized Files and Settings . . . . . . . . . . . . . . . . . . 96
Saving and Using Custom Settings on Other Live CDs . . . . . . . . . . 97
Saving Data in Damn Small Linux. . . . . . . . . . . . . . . . . . . . . . . . 98
Saving Data in Dynebolic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Adding Damn Small Linux to a USB Flash Drive. . . . . . . . . . . . . . 101
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
PART II Creating a Custom Bootable Linux. . . . . . . . . . . 105
CHAPTER 4 Understanding How Live Linux CDs Work . . . . . . . . . 107
Understanding the Boot Process . . . . . . . . . . . . . . . . . . . . . . . . . 108
From BIOS to Boot Loader. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Checking and Changing the BIOS. . . . . . . . . . . . . . . . . . . . . . . 110
Starting from BIOS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Proceeding to the Boot Loader . . . . . . . . . . . . . . . . . . . . . . . . . 116
Booting the Live Linux System . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Linux Kernel and Initial RAM Disk . . . . . . . . . . . . . . . . . . . . . . 118
The linuxrc Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Starting init (and the inittab File) . . . . . . . . . . . . . . . . . . . . . . . 122
Understanding the Running Live Linux System . . . . . . . . . . . . . . . 125
Understanding knoppix-autoconfig . . . . . . . . . . . . . . . . . . . . . 125
Watching the Live CD Boot Progress . . . . . . . . . . . . . . . . . . . . 129
Checking the Running Live CD . . . . . . . . . . . . . . . . . . . . . . . . . 130
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132