Linux Laptop-HOWTO

Werner Heuser <wehe@snafu.de> v2.0, 2 October 1999

Laptops are different from desktops/towers. They use certain hardware such as PCMCIA cards, infrared ports, batteries, docking stations. Often their hardware is more limited (e.g. disk space, CPU speed), though the performance gap is becoming smaller. In many instances, laptops can become a desktop replacement. Hardware support for Linux (and other operating systems) on laptops is sometimes more limited (e.g. graphic chips, internal modems). Laptops often use specialized hardware, hence finding a driver can be more difficult. Laptops are often used in changing environments, so there is a need for multiple configurations and additional security strategies. Though there are laptop related HOWTOs available already, this HOWTO contains a concise survey of laptop related documents. Also, laptop related Linux features, such as installation methods for laptops (via PCMCIA, without CD drive, etc.), laptop hardware features and configurations for different (network) environments are described. Besides there are some notes on PDAs, Handheld PCs and other mobile computer devices (digital cameras, cellular phones, calculators). And though some caveats Linux is a better choice for laptops, than most other operating systems. Because it supports numerous installation methods, works in many heterogenoues environments and needs smaller resources.

Contents

1 Preface 7 1.1 About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2 Sponsoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3 About the Document (Mirrors, Translations) . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4 Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Copyright, Disclaimer and Trademarks 9

3 Which Laptop to Buy? 9 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Portables, Laptops/Notebooks, Sub/Mini-Notebooks, Palmtops, PDAs/HPCs . . . . . . . . . 10

3.2.1 Portables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.2 Laptops/Notebooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.3 Sub-Notebooks/Mini-Notebooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.4 Palmtops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.5 Personal Digital Assistants (PDAs)/Handheld PCs (HPCs) . . . . . . . . . . . . . . . 10 3.2.6 Wearables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.3 Linux Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.4 Main Hardware Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.4.1 Weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.4.2 Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.4.3 Batteries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.4.4 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.4.5 Keyboard Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.4.6 Price . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.4.7 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.5 Sources of More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.6 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.6.1 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.6.2 Check Methods in General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.7 Writing a Device Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.8 Buying a Second Hand Laptop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.9 No Hardware Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 Laptop Distribution 15 4.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2 Recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5 Installation 16 5.1 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.2 Prerequisites - Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.3 Linux Tools to Repartition a Hard Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.3.1 GNU parted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.3.2 ext2resize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.3.3 fixdisktable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.3.4 Caveats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.3.5 Multi Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.4 Installation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.5 From a Boot Floppy plus CD-ROM - The Usual Way . . . . . . . . . . . . . . . . . . . . . . 18 5.6 From a DOS or Windows Partition at the Same Machine . . . . . . . . . . . . . . . . . . . . 18 5.7 From a Second Machine With a Micro Linux On a Floppy . . . . . . . . . . . . . . . . . . . . 19

5.7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.7.2 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.7.3 Source Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.7.4 Destination Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.7.5 Configuration of the Source Machine after the Transfer . . . . . . . . . . . . . . . . . 20 5.7.6 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.8 From a Second Machine With a 2.5" Hard Disk Adapter . . . . . . . . . . . . . . . . . . . . . 21 5.9 From a PCMCIA Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.10 From a Parallel Port Device (ZIP Drive, CD Drive) . . . . . . . . . . . . . . . . . . . . . . . . 21 5.11 Network Install via PLIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.12 Installing Linux on Small Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

6 Hardware In Detail 22

6.1 PCMCIA Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.2 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1.3 PCMCIA Configuration - Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

6.2 Infrared Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.2.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.2.2 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.2.3 IrDA Configuration - Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6.3 Graphic Chip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.3.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.3.2 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.3.3 Survey X-Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.3.4 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.3.5 External Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.3.6 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6.4 Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.4.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.4.2 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.4.3 Survey Sound Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6.5 Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6.5.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6.5.2 External (Second) Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

6.6 Pointing Devices - Mice and Their Relatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.6.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.6.2 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.6.3 Mice Species . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.6.4 PS/2 Mice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.6.5 Touchpad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.6.6 Touchscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.6.7 COMPAQ Concerto Pen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.6.8 External Mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.7 Advanced Power Managment - APM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.7.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.7.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.7.3 Caveats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 6.7.4 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.8 ACPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.9 Batteries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.10 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.11 Plug-and-Play Devices (PnP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.12 Docking Station / Port Replicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6.12.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.12.2 Other Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.12.3 Connection Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6.13 Network Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 6.13.1 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 6.13.2 Connection Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

6.14 Modem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 6.14.1 Modem Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 6.14.2 Caveats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

6.15 SCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.15.1 Hardware Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.15.2 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.15.3 Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

6.16 Universal Serial Bus - USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.17 Floppy Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.17.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.18 CD Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.19 DVD Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.20 Harddisk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.20.1 Linux Compatibility Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.20.2 Miscellaneaous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.21 Video Port / ZV Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

7 Palmtops, Personal Digital Assistansts - PDAs, Handheld PCs - HPCs 41

8 Cellular Phones, Pagers, Calculators, Digital Cameras, Wearable Computing 42

9 Accessories 43

9.1 PCMCIA Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 9.1.1 Card Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 9.2 SmartCards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 9.3 Memory Technology Devices - RAM and Flash Cards . . . . . . . . . . . . . . . . . . . . . . 43 9.4 Printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 9.5 Power and Phone Plugs, Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 9.6 Bags and Suitcases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

10 Different Environments - On the Road 45 10.1 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 10.2 Configuration Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

10.2.1 NetEnv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 10.2.2 divine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 10.2.3 Mobile IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 10.2.4 DHCP/BootP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 10.2.5 PPPD Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 10.2.6 /etc/init.d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 10.2.7 PCMCIA - Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 10.2.8 Bootloaders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 10.2.9 X-Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 10.2.10E-Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 10.2.11More Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

10.3 Data Transport Between Different Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 10.3.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 10.3.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

10.4 Security in Different Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 10.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 10.4.2 Means of Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

10.5 Dealing with Down Times (Cron Jobs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 10.6 Noise Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

11 Other Resources 56

12 Repairing the Hardware 57

13 Solutions with Laptops 57 13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 13.2 Mobile Network Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 13.3 Mobile Router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 13.4 Hacking and Cracking Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 13.5 Lectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 13.6 Mobile Data Collecting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

13.6.1 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 13.6.2 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 13.6.3 Specific Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

13.7 Mobile Office . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 13.8 Connection to Digital Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 13.9 Connection to QuickCam (Video) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 13.10Connection to Television Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 13.11Connection to Cellular Phone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 13.12Connection to Global Positioning System (GPS) . . . . . . . . . . . . . . . . . . . . . . . . . 60 13.13Connection via Amateur Radio (HAM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 13.14Satellite Watching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 13.15Aviation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 13.16Blind or Visually Impaired Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

14 Other Operating Systems 61

14.1 DOS/Windows9x/NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 14.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 14.1.2 DOS Tools to Repartition a Hard Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 14.1.3 Partition Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

14.2 BSD Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 14.3 OS/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 14.4 NOVELL Netware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

15 ToDo 63

16 Revision History 63

17 Credits 63

18 Appendix A - Survey about Micro Linuxes 65

19 Appendix B - Dealing with Limited Resources or Tuning the System 66 19.1 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 19.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 19.3 Small Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

19.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 19.3.2 Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

19.4 Harddisk Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 19.5 Small Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

19.5.1 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 19.5.2 Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

19.6 Low CPU Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 19.7 Power Saving Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 19.8 Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

19.8.1 Related HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 19.9 Tiny Applications and Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 19.10Hardware Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

20 Appendix C - NeoMagic Chip NM20xx 71 20.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 20.2 Textmode 100x37 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

20.2.1 Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 20.2.2 More Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 20.2.3 Road Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

21 Appendix D - Annotated Bibliography 73

22 Appendix E - Resources for Specific Laptops 74 22.1 IBM ThinkPad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 22.2 Toshiba Laptops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 22.3 COMPAQ Concerto Aero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 22.4 DELL Laptops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

1 Preface

Life is the first gift, love is the second, and understanding is the third. – Marge Piercy <http://www.

capecod.net/~tmpiercy/>

1.1 About the Author

People like either laptops or desktops. I like to work with laptops rather than with desktops. I like Linux

too. My first HOWTO was the Linux/IR-HOWTO <http://www.snafu.de/~wehe/index_li.html> about

infrared support for Linux. My second is this one and my third the Ecology-HOWTO, about some ways to use Linux in an ecology aware manner. Also I have written some pages about Linux with certain laptops: Olivetti Echos 133 DM (German) <http: //www.snafu.de/~wehe/echos133.html> (together with Kurt Saetzler), HP OmniBook 800CT <http:

//www.snafu.de/~wehe/hp800e.html>, HP OmniBook 3100 <http://www.snafu.de/~wehe/hp3100e.

html> (together with Friedhelm Kueck) COMPAQ Armada 1592 DT <http://www.snafu.de/~wehe/

armada1592dte.html> and COMMODORE C286LT <http://www.snafu.de/~wehe/c286lte.html>.

During the work with the Laptop-HOWTO I have collected some surveys about laptop related hard-

ware: graphic chips <http://www.snafu.de/~wehe/graphic_linux.html>, unofficially supported PCM-
CIA cards <http://www.snafu.de/~wehe/pcmcia_linux.html>, internal modems <http://www.snafu.
de/~wehe/modem_linux.html> and infrared chips <http://www.snafu.de/~wehe/ir_misc.html>.

But I don’t claim to be a laptop guru, I just had the opportunity to install Linux on some laptops and I simply want to share the information I collected.

Since I don’t own a non-Intel based machine, this HOWTO might not contain all the details for non-Intel systems or may contain inaccuracies. Sorry.

1.2 Sponsoring

This HOWTO is free of charge and free in the sense of the General Public Licence - GPL. Though it requires much work and could gain more quality if I would have some more hardware. So if you have a spare laptop, even an old one or one which requires repair, please let me know. Especially I need one with infrared port, USB port, DVD drive, WinModem and a non Intel machine. The according chapters need a major rewrite. For the curious, this HOWTO is written on a HP OmniBook 800CT 5/100 <http:

//www.snafu.de/~wehe/hp800e.html>.

Or sponsor a banner ad at my WWW pages LiLAC - Linux with Laptop Computers <http://www.snafu.

de/~wehe/index_li.html>.

You can hire me for readings or workshops on Linux with Laptops, Repairing of Laptops and other Linux topics, too.

1.3 About the Document (Mirrors, Translations)

Many times I have mentioned MetaLab formerly known as SunSite. This site carries a heavy load, so do

yourself a favor, use one of the MetaLab mirrors <http://metalab.unc.edu/pub/Linux/MIRRORS.html> .

For Debian/GNU Linux the mirror URLs are organized in this scheme http://www.<country code, e.g.

uk>.debian.org .

This text is included in the LINUX DOCUMENTATION PROJECT - LDP <http://metalab.unc.edu/

LDP> .

Richard Worwood mirrors this HOWTO at http://www.felch01.demon.co.uk/laptop-howto.html <http://

www.felch01.demon.co.uk/laptop-howto.html> .

Lionel, "trollhunter" Bouchpan-Lerust-Juery, <trollhunter@linuxfr.org> provides a translation into French. You can download or browse it at http://infonomade.linuxfr.org/portables/ressourcesfr.html#howto <http:

//infonomade.linuxfr.org/portables/ressourcesfr.html\#howto> . And he mirrors the English ver-

sion at http://infonomade.linuxfr.org/portables/ressourcesen.html#howto <http://infonomade.linuxfr.

org/portables/ressourcesen.html\#howto>

He has also written a HOWTO about portables and wearables, please look at his pages http://infonomade.linuxfr.org/index.html <http://infonomade.linuxfr.org/index.html> (French version) http://infonomade.linuxfr.org/indexen.html <http://infonomade.linuxfr.org/indexen.html> (English version).

A translation into Japanese is under construction.

Nearly all of the programms I mention are available as Debian/GNU Linux <http://www.debian.org> packages, or as RPM packages, look up your favorite RPM server, for instance RUFUS <http://rufus.w3.

org/linux/RPM/ByName.html> .

The latest version of this document is available in HTML format at LiLAC - Linux with Laptop Computers

<http://www.snafu.de/~wehe/index_li.html> .

1.4 Contact

This document isn’t ready yet. If you like to write a chapter or even a smaller part by yourself, please feel free to contact me. Also your suggestions and recommendations and critics are welcome. But please don’t expect me to solve your laptop related problems if the solution is already documented. Please read all according manual pages, HOWTOs and WWW sites first, than you may consider to contact me or the other resources mentioned below.

Since I want to write much more stuff about mobile computing and Linux I’m thinking about turning this HOWTO into a book.

Werner Heuser <wehe@snafu.de>

2 Copyright, Disclaimer and Trademarks

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1999 by Werner Heuser. This document may be distributed under the terms set forth in the

LDP license <http://metalab.unc.edu/LDP/COPYRIGHT.html> .

This is free documentation. It is distributed in the hope that it will be useful, but without any warranty. The information in this document is correct to the best of my knowledge, but there’s a always a chance I’ve made some mistakes, so don’t follow everything too blindly, especially if it seems wrong. Nothing here should have a detrimental effect on your computer, but just in case I take no responsibility for any damages incurred from the use of the information contained herein.

Some laptop manufacturers don’t like to see a broken laptop with an operating system other than the one shipped with it, and may reload MS-Windows if you complain of a hardware problem. They may even declare the warranty void. Though IMHO this isn’t legal or at least not fair. Always have a backup of both the original configuration and your Linux installation if you have to get your laptop repaired.

Though I hope trademarks will be superfluous sometimes (you may see what I mean at Open Source Definition <http://www.opensource.org/osd.html>) : If certain words are trademarks, the context should make it clear to whom they belong. For example "MS Windows NT" implies that "Windows NT" belongs to Microsoft (MS). Mac is a trademark by Apple Computer. All trademarks belong to their respective owners.

3 Which Laptop to Buy?

3.1 Introduction

Portable computers may be divided into different categories. This is a subjective decision, but I try to do so. My groupings roughly follow the generally accepted marketing categories. The criteria could be:

1. Weight: Often expressed in terms like Portables, Laptops/Notebooks, Sub/Mini-Notebooks, Palmtops/PDAs. There is no standard method to define the weight of a laptop, therefore the data provided by the manufacturers (and which are given below) have to be considered as approximations. The question is how the power supply (wether external or internal) or swappable parts like CD and floppy drive, are included in the weight.

2. Supported Operations Systems: proprietary versus open 3. Price: NoName versus Brand

4. Hardware Features: display size, harddisk size, CPU speed, battery type, etc.

5. Linux Support: graphic chip, sound card, infrared controller (IrDA), internal modem, etc.

3.2 Portables,  Laptops/Notebooks,  Sub/Mini-Notebooks,  Palmtops,

PDAs/HPCs

3.2.1 Portables

Weight greater than 4.0 kg (9 lbs). Features like a PC, but in a smaller box and with LCD display. Examples: lunchbox or ruggedized laptops (e.g., http://www.bsicomputer.com/ <http://www.bsicomputer.com/>)

3.2.2 Laptops/Notebooks

Weight between 1.7 and 4.0 kg (4 to 9 lbs). Features custom hardware and usually a special CPU. Examples: HP OmniBook 3100, COMPAQ Armada 1592DT. The terms laptop and notebook seem equivalent to me.

3.2.3 Sub-Notebooks/Mini-Notebooks

Weight between 1.3 and 1.7 kg (3 to 4 lbs). Features: external floppy drive, external CD drive. Examples: HP OmniBook 800CT, Toshiba Libretto 100, COMPAQ Aero, SONY VAIO 505.

3.2.4 Palmtops

Weight between 0.7 and 1.3 kg (1.5 to 3 lbs). Features: proprietary commercial operating systems. Examples: HP200LX.

3.2.5 Personal Digital Assistants (PDAs)/Handheld PCs (HPCs)

Weight below 0.7 kg (1.5 lbs). Features: proprietary commercial operating systems and often non-Intel CPU with commercial operating systems like PalmOS, EPOC32, GEOS, Windows CE. Examples: Newton Message Pad, Palm III (former Pilot), Psion Series 3 and 5, CASIO Z-7000.

3.2.6 Wearables

Watches, calculators, digital cameras, cellular phones and other wearables.

3.3 Linux Features

Due to a lack of support by some hardware manufacturers, not every feature of a laptop is always supported or fully operational. The main devices which may cause trouble are: graphic chip, IrDA port, sound card, PCMCIA controller , PnP devices and internal modem. Please try to get as much information about these topics before buying a laptop. But often it isn’t quite easy to get the necessary information. Sometimes even the specifications or the hotline of the manufacturer aren’t able to provide the information. Therefore I have included a Linux Compatibility Check chapter in the Hardware In Detail sections below.

Depending on your needs, you might investigate one of the vendors that provide laptops pre-loaded with Linux. By purchasing a pre-loaded Linux laptop, much of the guesswork and time spent downloading additional packages could be avoided. See Kenneth E. Harker’s page for a list of vendors http://www.cs.utexas.edu/users/kharker/linux-laptop/ <http://www.cs.utexas.edu/users/kharker/

linux-laptop/>.

3.4 Main Hardware Features

Besides its Linux features, there often are some main features which have to be considered when buying a laptop. For Linux features please see the Hardware In Detail section below.

3.4.1 Weight

Don’t underestimate the weight of a laptop. This weight is mainly influenced by:

1. screen size

2. battery type

3. internal components, such as CD drive, floppy drive

4. power supply

5. material used for the case, usually they are either from plastics or from magnesium.

3.4.2 Display

Laptops come with one of two types of displays: active matrix (TFT) and passive matrix (DSTN). Active matrix displays have better color and contrast, but usually cost more and use more power. Also consider the screen size. Laptops may be purchased with screens up to 15". A bigger screen weighs more, costs more, and is harder to carry, but is good for a portable desktop replacement.

3.4.3 Batteries

The available battery types are Lithium Ion (LiIon), Nickel Metal Hybrid ( NiMh) and Nickel Cadmium (NiCd).

LiIon batteries are the most expensive ones but a lot lighter than NiCd for the same energy content, and have minimal – but present – memory effects. NiMH is better than NiCd, but still rather heavy and does suffer some (although less than NiCd) memory effects.

Unfortenately most laptops come with a proprietary battery size. So they are not interchangeable between different models.

3.4.4 CPU

Supported CPU Families For details about systems which are supported by the Linux Kernel, see the Linux FAQ http://www.cl.cam.ac.uk/users/iwj10/linux-faq/ <http://www.cl.cam.ac.uk/users/iwj10/

linux-faq/> .

1. i286: Linux doesn’t support this CPU family yet. But there are some efforts at ELKS http://www.linux.org.uk/ELKS-Home/index.html <http://www.linux.org.uk/ELKS-Home/

     index.html> or http://www.elks.ecs.soton.ac.uk/ <http://www.elks.ecs.soton.ac.uk/>. If you

like, you may use Minix http://www.cs.vu.nl/˜ ast/minix.html <http://www.cs.vu.nl/~ast/minix. html> one of the predecessors of Linux. Minix supports 8088 to 286 with as little as 640K memory.

2. i386: This covers PCs based on Intel-compatible processors, including Intel’s 386, 486, Pentium, Pentium Pro and Pentium II, and compatible processors by AMD, Cyrix and others. Most of the currently available laptops use Intel compatible CPUs and have quite good Linux support.

3. m68k: This covers Amigas and Ataris having a Motorola 680x0 processor for x>=2; with MMU. AFAIK there is no laptop with such a CPU. But I’m not sure weither the early Mac laptops are falling into this category. Early PowerBooks did indeed have m68k chips in them. I think the DuoBook was what they were called. Not sure if they are Linux capable or not. See http://www.linuxppc.org/hardware/

     <http://www.linuxppc.org/hardware/> for a current list of supported machines.

4. PowerPC (PPC): Although some driver support present in Intel based Linux is still missing for Linux PPC, it is a fully usable system for Macintosh PowerBooks. See http://www.linuxppc.org/hardware/

     <http://www.linuxppc.org/hardware/> for a current list of supported machines.

5. Alpha, Sparc, Sparc64, Arm and Hurd-i386 architectures: These are currently under construction. AFAIK there are only the Tadpole SPARC and ALPHA laptops, and some other ALPHA laptops available. For a current survey look at Kenneth E. Harker’s Linux on Laptops without x86 Family Processors at http://www.cs.utexas.edu/users/kharker/linux-laptop/non-intel.html <http://www.cs.

     utexas.edu/users/kharker/linux-laptop/non-intel.html> .

Miscellaneous At higher speed, a CPU consumes more power and generates more heat. Therefore, in many laptops a special low-power CMOS CPU is used. Usually, this special CPU doesn’t use as much power as a similar processor used in a desktop. These special CPUs are also more expensive. As a side effect you may find that laptops with a desktop CPU often have a fan which seems quite loud.

3.4.5 Keyboard Quality

Though you might use your desktop computer to do longer writings, a good keyboard can save you some headaches and finger-aches. Look especially for the location of special keys like: <ESC>, <TAB>, <Pos1>, <End>, <PageDown>, <PageUp> and the cursor keys.

3.4.6 Price

Laptops are quite expensive if you compare them with desktops. So you may decide between a brand or no-name product. Though I would like to encourage you to take a no-name product, there are some caveats. I have experienced that laptops break often, so you are better off, when you have an after sales warranty, which is usually only offered with brand products. Or you may decide to take a second hand machine. When I tried this, I discovered that the laptop market is changing quite often. A new generation is released approximately every three months (compared by CPU speed, harddisk capacity, screen size etc.). So laptops become old very quick. But this scheme often isn’t followed by the prices for second hand laptops. They seem too expensive to me. Anyway if you plan on purchasing a second hand machine, review my recommendations on checking the machine. For German readers there is an online market place at http://www.hardware.de <http://www.hardware.de>, which offers a good survey about current prices for second hand machines.

3.4.7 Power Supply

If you travel abroad pay attention to the voltage levels which are supported by the power supply. Also the power supply is often one of the heavier parts of a laptop.

3.5 Sources of More Information

Specifications, manuals and manufacturer support often are not helpful. Therefore you should retrieve information from other sources too:

1. Highly recommended is the survey by Kenneth E. Harker http://www.cs.utexas.edu/users/kharker/linux-

  laptop/ <http://www.cs.utexas.edu/users/kharker/linux-laptop/> .

2. ftp://tsx-11.mit.edu/pub/linux/packages/laptops/ <ftp://tsx-11.mit.edu/pub/linux/packages/

  laptops/> .

3. Hardware-HOWTO

4. open hardware - The Open Hardware Certification Program http://www.debian.org/OpenHardware/

  <http://www.debian.org/OpenHardware/>

5. HARDWARE.doa.org - dedicated to the hardware aspects of (Linux) computing

  http://hardware.doa.org/ <http://hardware.doa.org/>

6. How to Build a PC FAQ - excellent hardware overview by Billy Newsom

  http://www.motherboards.org/build.html <http://www.motherboards.org/build.html>

7. Last but not least the WWW itself.

3.6 Linux Compatibility Check

3.6.1 Related HOWTOs

1. Hardware-HOWTO

2. Kernel-HOWTO

3. PCMCIA-HOWTO

4. PCI-HOWTO

5. Plug-and-Play-mini-HOWTO

3.6.2 Check Methods in General

If you can’t find the necessary information through the above mentioned sources, you are on your own. Luckily, Linux provides many means to help. For details see the Hardware on Detail section below. In general you may use:

1. First of all the kernel itself. Look up what kind of hardware is detected by the kernel. You get this information during boot time or usually by dmesg or by looking into /var/log/messages.

2. If your kernel supports the /proc file system you may get detailed information about PCI devices by cat /proc/pci Please read the kernel documentation pci.txt. You may get further information about unknown PCI devices at the database from Craig Hart at http://members.hyperlink.net.au/˜ chart

     <http://members.hyperlink.net.au/~chart>. From 2.1.82 kernels on you may use the lspci com-

mand from the pci-utils package.

3. To retrieve information about Plug-and-Play (PNP) devices use isapnp-tools .

4. Use scsi_info by David Hinds for SCSI devices or scsiinfo.

If you don’t want to install a complete Linux you may retrieve this information by using a micro Linux ( see appendix A). The package muLinux provides even a small systest program and TomsRtBt comes with

memtest. To use memtest you have to copy it on a floppy dd if=/usr/lib/memtest of=/dev/fd0 and to

reboot from this floppy.

If your laptop came with Windows, you may determine a lot of hardware settings from the installation. Boot into DOS or Windows to get the information you need.

Using Windows9x/NT to get hardware settings, basically boot Windows, then Start -> Settings -> Control Panel -> System -> Device Manager and write down everything, or make a hardcopy from the display using the <PRINT> key, plus keep a log of settings, hardware, memory, etc.

Using MS-DOS and Windows3.1x you can use the command msd, which is an akronym for MicroSoft Diagnostics. Or you might try one of the numerous DOS shareware utilities: CHECK-IT, DR.HARD and others.

3.7 Writing a Device Driver

If you encounter a device which is not yet supported by Linux, don’t forget it’s also possible to write a driver by yourself. You may look at the book from Allesandro Rubini, Andy Oram: Linux Device Drivers.

3.8 Buying a Second Hand Laptop

Some recommendations to check an used laptop, before buying it:

1. Review the surface of the case for visible damages.

2. Check the display for pixel faults. Maybe it’s useful to take a magnifying glass therefore.

3. Do an IO stress-test, .e.g. with the tool bonnie.

4. You may use memtest and crashme to achieve a memory test.

5. Do a CPU stress test, e.g. with the tool Byte or by compiling a kernel.

6. Check the floppy drive by formatting a floppy.

7. Check the CD drive by reading a CD.

8. To check the battery seems difficult, because it needs some time: one charge and one work cycle.

9. To check the surface of the harddisk you may take e2fsck. There is also a Linux tool dosfsck or the other fsck tools.

10. To test the entire disk (non-destructively), time it for performance, and determine its size, as root do:

     time dd if=/dev/hda of=/dev/null bs=1024k .

11. Check wether the machine seems stolen. I have provided a survey of databases for stolen laptops

     <http://www.snafu.de/~wehe/stolen_laptops.html>.

AFAIK there is no Linux tool like the DOS tools CHECK-IT, DR. HARD, SYSDIAG and others. These tools include many of the tests in one integrated suite. One of the best IMHO is the tool PC Diagnostics 95 made by Craig Hart http://members.hyperlink.net.au/˜ chart <http://members.hyperlink.net.au/~chart> . Despite the 95 in its name it’s plain DOS, tiny (76KB programm and 199KB data) reliable and free. Unfortenately it contains no check for the IrDA port.

Please note this quotation from the disclaimer: "This program is written with the target audience being a trained, experienced technician. It is NOT designed to be used by those ignorant of computer servicing. Displays are not pretty but functional. Information is not explained since we are not trying to educate. This software should be considered to be just like any other tool in a tech’s toolbox. It is to be applied with care, in the right situation, in order to find answers to specific problems. If you are an end user who is less than confident of dealing with computer hardware, this is probably not a program for you."

3.9 No Hardware Recommendations

It’s difficult to give any recommendations for a certain laptop model in general. Your personal needs have to be taken into account. Also the market is changing very quickly. I guess every three months a new generation of laptops (according to harddisk space, CPU speed, display size, etc.) comes into the market. So I don’t give any model or brand specific recommendations.

4 Laptop Distribution

4.1 Requirements

From the Battery-HOWTO I got this recommendation (modified by WH):

A Message to Linux Distributors

If you happen to be a Linux distributor, thank you for reading all this. Laptops are becoming more and more popular, but still most Linux distributions are not very well prepared for portable computing. Please make this section of this document obsolete, and make a few changes in your distribution.

The installation routine should include a configuration, optimized for laptops. The minimal install is often not lean enough. There are a lot of things that a laptop user does not need on the road. Just a few examples. There is no need for three different versions of vi (as found in Suse Linux). Most portable systems do not need printing support (they will never be connected to a printer, printing is usually done with the desktop system at home). Quite a few laptops do not need any network support at all.

Don’t forget to describe laptop-specific installation problems, e. g. how to install your distribution without a cd-rom drive or how to setup the plip network driver.

Add better power management and seamless PCMCIA support to your distribution. Add a recompiled kernel and an alternative set of PCMCIA drivers with apm support that the user can install on demand. Include a precompiled apmd package with your distribution.

Add support for dynamically switching network configurations. Most Linux laptops travel between locations with different network settings (e. g. the network at home, the network at the office and the network at the university) and have to change the network ID very often. Changing a Linux system’s network ID is a pain with most distributions.

Add a convenient PPP dialer with an address book, that does not try to start multiple copies of the PPP daemon if you click on the button twice (e.g., the RedHat usernet tool). It would be nice to have the PPP dialer also display the connection speed and some statistics. One nice command line dialer that autodetects modems and PPP services is wvdial from Worldvisions http://www.worldvisions.ca/wvdial/

<http://www.worldvisions.ca/wvdial/>.

4.2 Recommendation

The Debian/GNU Linux <http://www.debian.org> has most of the desired features for a laptop installation. The distribution has a quite flexible installation tool. The installation process is well documented, especially concerning the methods which are useful at laptops. All the binaries are tiny, because they are stripped. A mailing list debian-laptop including a searchable archiv is provided. And Debian/GNU Linux is free.

At the end of August 1999 the Debian Laptop Distribution - Proposal <http://www.snafu.de/~wehe/ debian_linux.html> was issued. And some more laptop related packages and a Debian meta-package dedicated to laptops are on the way.

Note: I know other Linux distributions work well with laptops, too. I even tried some of them, see my pages about certain laptops mentioned above.

5 Installation

5.1 Related HOWTOs

1. CDROM-HOWTO

2. Config-HOWTO

3. Diskless-mini-HOWTO

4. Installation-HOWTO

5. Pre-Installation-Checklist-mini-HOWTO

6. Update-mini-HOWTO

7. Hard-Disk-Upgrade-mini-HOWTO

8. Installation and getting started by Matt Welsh and others available at the LINUX DOCUMENTATION PROJECT http://metalab.unc.edu/LDP <http://metalab.unc.edu/LDP>

9. Installing Debian Linux 2.1 For x86 by Bruce Perens, Sven Rudolph, Igor Grobman, James Treacy, Adam P. Harris ftp://ftp.debian.org/debian/dists/slink/main/disks-i386/current/install.html <ftp://

     ftp.debian.org/debian/dists/slink/main/disks-i386/current/install.html>

10. Install-From-Zip-mini-HOWTO

 11. ZIP-Drive-mini-HOWTO <http://www.torque.net/~campbell>

5.2 Prerequisites - Partitioning

Partitioning can be done in a very sophisticated way. Currently I have only some first thoughts. I assume that with laptops there are still some reasons (e.g. updating the firmware of PCMCIA cards and BIOS) to share Linux and Windows9x/NT. Depending on your needs and the features of your laptop you could create the following partitions:

• BIOS, some current BIOSes use a separate partition

• suspend to disk, some laptops support this feature

• swap space Linux

• swap space Windows9x/NT

• Linux base

• Linux /home or data

• common data between Linux and Windows9x/NT

Note this chapter isn’t ready yet. Please read the according HOWTOs first.

5.3 Linux Tools to Repartition a Hard Disk

5.3.1 GNU parted

GNU parted <http://www.alphalink.com.au/~clausen/parted/> allows you to create, destroy, resize and

copy partitions. It currently supports ext2 and fat (fat16 and fat32) filesystems, and MS-DOS disklabels. This program can destroy data, and is not yet safe for general use. parted is currently in its early developement stage.

5.3.2 ext2resize

ext2resize <http://www.dsv.nl/~buytenh/ext2resize/> is a program capable of resizing (shrinking and growing) ext2 filesystems. Checks whether the new size the user gave is feasible (i.e. whether the fs isn’t too occupied to shrink it), connected to the parted project.

5.3.3 fixdisktable

Something was recently published on the <linux-kernel@vger.rutgers.edu> mailing list about a partition recovery program. I have not used this, nor examined it, nor read much about it (except for the HTML page.) It may be useful to some of you if you have problems with FIPS, Ranish Partition Manager/Utility or Partition Magic destroying your partition information. You can find information on this partition-fixer named "fixdisktable" at http://bmrc.berkeley.edu/people/chaffee/fat32.html <http:

//bmrc.berkeley.edu/people/chaffee/fat32.html>. It is quite a ways down in that page. Or look for

it via ftp in ftp://bmrc.berkeley.edu/pub/linux/rescue/ <ftp://bmrc.berkeley.edu/pub/linux/rescue/> and locate the latest "fixdisktable" in that ftp directory. (Source and binary dist should be available.)

5.3.4 Caveats

Before repartitioning your harddisk take care about the disk layout. Especially look for hidden disk space or certain partitions used for suspend to disk or hibernation mode. Some laptops come with a partition which contains some BIOS programs (e.g. COMPAQ Armada 1592DT). Search the manual carefully for tools like PHDISK.EXE, Suspend to Disk, Diagnostic TOOLS.

Please see chapter 14.1.2 (DOS Tools to Repartition a Hard Disk), too.

By Nathan Myers from LL - LinuxLaptops <http://www.linuxlaptops.com>: "I partitioned a 10G Thinkpad drive last week and then none of fdisk, cfdisk, or sfdisk would read the partition table any more.

It turns out I had created a partition that started on cylinder 1024, and there’s a bug common to all three programs that makes them fail in that case. (I didn’t try Disk Druid.) So, maybe you should add some advice about not starting partitions on that cylinder."

5.3.5 Multi Boot

Please see the Different Environments chapter, for information about booting different operating systems from the same harddisk.

5.4 Installation Methods

From the Battery-HOWTO:"Installing and using Linux on a laptop is usually no problem at all, so go ahead and give it a try. Unlike some other operating systems, Linux still supports and runs well on even very old hardware, so you might give your outdated portable a new purpose in life by installing Linux on it."

One of the great benefits of Linux are its numerous and flexible installation features, which I don’t want to describe in detail. Instead I try to focus on laptop specific methods, which are necessary only in certain circumstances.

Most current distributions support installation methods which are useful for laptops, including installation from CD-ROM, via PCMCIA and NFS (or maybe SMB). Please see the documents which are provided with these distributions for further details or take a look at the above mentioned manuals and HOWTOs.

5.5 From a Boot Floppy plus CD-ROM - The Usual Way

With modern laptops, the usual Linux installation (one Boot Floppy, one Support Floppy, one Packages CD-ROM) should be no problem, if there is are floppy drive and a CD-ROM drive available. Though with certain laptops you might get trouble if you can not simultaneously use the floppy drive and CD-ROM drive , or if the floppy drive is only available as a PCMCIA device, as with the Toshiba Libretto 100. Some laptops support also booting and therefore installation completely from a CD drive, as reported for the SONY VAIO in the VAIO-HOWTO. Note: Check the BIOS for the CD boot option and make sure your Linux distribution comes on a bootable CD.

Certain laptops will only boot zImage kernels. bzImage kernels won’t work. This is a known problem with the IBM Thinkpad 600 and Toshiba Tecra series, for instance. Some distributions provide certain boot floppies for these machines or for machines with limited memory resources, Debian/GNU Linux http://www.debian.org

<http://www.debian.org> for instance.

5.6 From a DOS or Windows Partition at the Same Machine

This is a short description of how to install from a CD-ROM under DOS without using boot or supplemental floppy diskettes. This is especially useful for notebooks with swappable floppy and CD-ROM components (if both are mutually exclusive) or if they are only available as PCMCIA devices. I have taken this method from "Installing Debian GNU/Linux 2.1 For Intel x86 - Chapter 5 Methods for Installing Debian"

http://www.debian.org <http://www.debian.org> :

1. Get the following files from your nearest Debian FTP mirror and put them into a directory on

     your DOS partition: resc1440.bin drv1440.bin base2_1.tgz root.bin linux install.bat and
     loadlin.exe.

2. Boot into DOS (not Windows) without any drivers being loaded. To do this, you have to press <F8> at exactly the right moment.

3. Execute install.bat from that directory in DOS.

4. Reboot the system and install the rest of the distribution, you may now use all the advanced features such as PCMCIA, PPP and others.

This should work for other distributions with similar changes. For RedHat see How to Install from CD-

ROM without Boot and Supplemental Disks <http://www.cs.utexas.edu/users/kharker/linux-laptop/
install_advice.html> .

Some new laptops may be able to boot a Linux distribution on a bootable CD-ROM (e.g., RedHat). This would allow installation without a floppy disk drive.

5.7 From a Second Machine With a Micro Linux On a Floppy

5.7.1 Introduction

Because of their small or non-existent footprint, micro-Linuxes are especially suited to run on laptops, particularly if you use a company-provided laptop running Windows9x/NT. Or for installation purposes using another non Linux machine. There are several micro Linux distributions out there that boot from one or two floppies and run off a ramdisk. See appendix A for a listing of distributions.

I tried the following with muLinux http://mulinux.firenze.linux.it/ <http://mulinux.firenze.linux.it/> to clone my HP OmniBook 800 to a COMPAQ Armada 1592DT. Thanks to Michele Andreoli, maintainer of muLinux for his support. Since muLinux doesn’t support PCMCIA yet, you may use TomsRtBt instead. In turn TomsRtBt doesn’t support PPP but provides slip. I have described how to copy an already existing partition, but it might be also possible to achieve a customized installation. Note: Usually you would try to achieve an installation via NFS, which is supported by many distributions. Or if your sources are not at a Linux machine you might try SMB, which is also supported by muLinux .

5.7.2 Prerequisites

You need two machines equipped with Linux. With the laptop (client/destination) on which you want to install Linux use the muLinux floppy. The other machine (server/source) may be a usual Linux box or also using muLinux. Though its low transfer rate I use a serial null modem cable because its cheap. You may apply the according method using a PCMCIA network card and a crossover network cable or a HUB, or a parallel "null modem" cable and PLIP. As the basic protocol I used PPP, but you may also use SLIP. For the data-transfer I used nc (BTW this is an abbrevation for netcat), you may use ftp, tftp, rsh, ssh, dd,

rcp, kermit, NFS, SMB and others.

Basic requirements are:

1. A good knowledge about using Linux. You have to know exactly what you are doing, if not you might end destroying former installations.

2. A nullmodem serial cable.

5.7.3 Source Machine

At your source machine issue the following commands (attention: IP address, port number, partition and tty are just examples!):

1. Edit /etc/ppp/options, it should contain only:

  /dev/ttyS0
  115200
  passive

2. With muLinux versions 3.x you may even use the convenient command setup -f ppp .

3. Start PPP: pppd .

4. Configure the PPP network device: ifconfig ppp0 192.168.0.1 .

5. Add the default route: route add default gw 192.168.0.1 .

6. Check the network connection: ping 192.168.0.2, though the destination machine isn’t up yet.

7. Start the transfer from another console, remember <LEFT-ALT><Fx>: cat /dev/hda2 | gzip -c |

  nc -l -p 5555 .

8. After the transfer (there are no more harddisk writings) stop the ping: killall ping .

5.7.4 Destination Machine At the destination machine issue:

1. Edit /etc/ppp/options, it should contain only:

  /dev/ttyS0
  115200
  passive

2. With muLinux versions 3.x you may even use the convenient command setup -f ppp .

3. Start PPP: pppd .

4. Configure the PPP network device: ifconfig ppp0 192.168.0.2 .

5. Add the default route: route add default gw 192.168.0.2 .

6. Check the network connection, by pinging to the source machine: ping 192.168.0.1 .

7. Change to another console and get the data from the server: nc 192.168.0.1 5555 | gzip -dc

  >/dev/hda4 .

8. 400 MB may take app. 6 hours, but YMMV.

9. Stop the transfer, when it is finished with: <CTL><C> .

10. After the transfer is completed, stop the ping: killall ping .

5.7.5 Configuration of the Source Machine after the Transfer

1. Edit /etc/fstab .
2. Edit /etc/lilo.conf and /etc/lilo.msg and start lilo .

3. Set the new root device to the kernel: rdev image root_device .

5.7.6 Miscellaneous

1. bzip2 didn’t work, probably because I wasn’t able to make it read from stdin .

2. Since rshd, sshd, ftpd daemons are not available with muLinux you have to build your own daemon with nc, as described above.

3. I had to set up both PPP sides very quick or the connection broke, I don’t know why.

4. Speed optimization has to be done, asyncmap 0 or local?

5. I checked this only with a destination partition greater than the source partition. Please check dd instead of cat therefore.

6. Don’t mount the destination partition.

5.8 From a Second Machine With a 2.5" Hard Disk Adapter

From Adam Sulmicki adam@cfar.unc.edu I got this hint: Most but not all harddisks in laptops are removable, but this might be not an easy task. You could just buy one of those cheap 2.5" IDE converters/adapters which allow you to connect this harddisk temporarily to a PC with IDE subsystem, and install Linux as usual using that PC. You may do so using the harddisk as the first IDE drive or besides as the second IDE drive. But than you need to be sure that lilo writes to the right partition. Also you have to make sure that you use the same translation style as your laptop is going to use (i.e. LBA vs. LARGE vs. CHS ). You find additional information in the Hard-Disk-Upgrade-mini-HOWTO. You might copy an existing partition, but it is also possible to achieve a customized installation.

5.9 From a PCMCIA Device

Since I don’t have a laptop which comes with a PCMCIA floppy drive (for instance Toshiba Libretto 100), I couldn’t check this method. Please see the chapter Booting from a PCMCIA Device in the PCMCIA-HOWTO. Also I couldn’t check whether booting from a PCMCIA harddisk is possible.

Anyway, when you are able to boot from a floppy and the laptop provides a PCMCIA slot, it should be possible to use different PCMCIA cards to connect to another machine, to an external SCSI device, different external CD and ZIP drives and others. Usually these methods are described in the documentation which is provided with the distribution.

5.10 From a Parallel Port Device (ZIP Drive, CD Drive)

I couldn’t check this method by myself, because I don’t have such a device. Please check the according Install-From-Zip-mini-HOWTO and CD-HOWTO. Also I don’t know how much these installation methods are supported by the Linux distributions or the micro Linuxes. I suppose you have to fiddle around a bit to get this working.

5.11 Network Install via PLIP

I got this courtesy by Nathan Myers <ncm@cantrip.org>: "Many distributions support installing via a network, using FTP, HTTP, or NFS. It is increasingly common for laptops to have only a single PCMCIA slot, already occupied by the boot floppy drive. Usually the boot floppy image has drivers for neither the floppy drive itself, nor the PCMCIA subsystem. Thus, the only network interface available may be the parallel port.

Installation via the parallel port using the PLIP protocol has been demonstrated on, at least, Red Hat. All you need is a Laplink parallel cable, cheap at any computer store. See the PLIP-mini-HOWTO for details on setting up the connection. Note that (uniquely) the RedHat installation requires that the other end of the PLIP connection be configured to use ARP (apparently because RedHat uses the DOS driver in their installer). On the host, either export your CD file system on NFS, or mount it where the ftp or web daemon can find it, as needed for the installation."

5.12 Installing Linux on Small Machines

If you have less than 8MB memory and want to install via NFS you may get the message "fork: out of memory". To handle this problem, use fdisk to make a swap partition (fdisk should be on the install floppy or take one of the mini Linuxes described above). Then try to boot from the install floppy again. Before configuring the NFS connection change to another console (for instance by pressing <ALT><2>) and issue swapon /dev/xxx (xxx = swap partition ). Thanks to Thomas Schmaltz.

6 Hardware In Detail

6.1 PCMCIA Controller

6.1.1 Linux Compatibility Check

With the probe command, which is included in the PCMCIA-CS package by David Hinds you can get the type of the PCMCIA controller. Often this shows also up with cat /proc/pci .

6.1.2 Related HOWTOs

1. PCMCIA-HOWTO

6.1.3 PCMCIA Configuration - Survey

In the mailing lists where I’m a member, the question "How can I set up PCMCIA support, after the Linux installation?" comes up sometimes. Therefore I try to give a short survey. But the authoritative source for the latest information about the PCMCIA Card Services for Linux, including documentation, files, and generic PCMCIA information is the Linux PCMCIA Information Page <http://hyper.stanford.edu/HyperNews/ get/pcmcia/home.html> . For problems with PCMCIA and APM see the APM chapter.

Software

1. Read the PCMCIA HOWTO, usually included in the PCMCIA-CS package.

2. Install the newest available PCMCIA-CS package, if you take a rpm or deb package it is quite easy.

3. If necessary, install a new kernel. Note: With 2.2.x kernels PCMCIA kernel support seems no longer necessary. I had no time to look this up yet. Please read the according documents.

4. Make sure your kernel has module support and PCMCIA support enabled (and often APM support)

5. Make sure your kernel also includes support for the cards you want to use, e.g. network support for a NIC card, serial support for a modem card, SCSI support for a SCSI card and so on.

6. If you have a custom made kernel, don’t forget to compile the PCMCIA-CS source against your kernel.

PCMCIA Controller

1. Use the probe command to get information whether your PCMCIA controller is detected or not.

2. Edit the file /etc/sysconfig/pcmcia. It should include PCMCIA=y and the type of your PCMCIA controller, e.g. PCIC=i82365.

3. Start the PCMCIA services typically via /etc/init.d/pcmcia start. If you get two high beeps, everything should be fine.

4. If something doesn’t work, check the messages in /var/log/messages .

PCMCIA Card

1. Check your card with cardctl ident .

2. If your card is not in /etc/pcmcia/config, edit the file /etc/pcmcia/config.opts accordingly. Take an entry in the first file as a model. You may try every driver, just in case it might work, for instance the pcnet_cs supports many NE2000 compatible PCMCIA network cards.

3. A list of supported cards is included in the PCMCIA-CS package. The current list you may find at http://hyper.stanford.edu/˜ dhinds/pcmcia/ftp/SUPPORTED.CARDS <http://hyper.stanford. edu/~dhinds/pcmcia/ftp/SUPPORTED.CARDS>. Since there are not all cards mentioned I have set up a page PCMCIA Cards "Unofficially" Supported by Linux <http://www.snafu.de/~wehe/index_

     li.html> .

4. If you use X, you can use cardinfo to insert, suspend, or restart a PCMCIA card via a nice graphical interface.

6.2 Infrared Port

6.2.1 Linux Compatibility Check

To get the IrDA port of your laptop working with Linux/IrDA you may use StandardInfraRed (SIR) or FastInfraRed (FIR).

SIR Up to 115.200bps, the infrared port emulates a serial port like the 16550A UART. This will be detected by the kernel serial driver at boot time, or when you load the serial module. If infrared support is enabled in the BIOS, for most laptops you will get a kernel message like:

Serial driver version 4.25 with no serial options enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A     #first serial port /dev/ttyS0
ttyS01 at 0x3000 (irq = 10) is a 16550A    #e.g. infrared port
ttyS02 at 0x0300 (irq = 3) is a 16550A     #e.g. PCMCIA modem port

FIR If you want to use up to 4Mbps, your machine has to be equipped with a certain FIR chip. You need a certain Linux/IrDA driver to support this chip. Therefore you need exact information about the FIR chip. You may get this information in one of the following ways:

1. Read the specification of the machine, though it is very rare that you will find enough and reliable information there.

2. Try to find out wether the FIR chip is a PCI device. Do a cat /proc/pci . The according files for 2.2.x kernels are in /proc/bus/pci . Though often the PCI information is incomplete. You may find the latest information about PCI devices and vendor numbers in the kernel documentation usually in /usr/src/linux/Documentation or at the page of Craig Hart http://members.hyperlink.net.au/˜ chart

<http://members.hyperlink.net.au/~chart> . From kernel 2.1.82 on, you may use lspci from the

pci-utils package, too.

3. Use the DOS tool CTPCI330.EXE provided in ZIP format by the German computer magazine CT http://www.heise.de/ct/ftp/pci.shtml <http://www.heise.de/ct/ftp/pci.shtml> . The information provided by this program is sometimes better than that provided by the Linux tools.

4. Try to get information about Plug-and-Play (PnP) devices. Though I didn’t use them for this purpose yet, the isapnp tools, could be useful.

5. If you have installed the Linux/IrDA software load the FIR modules and watch the output of dmesg, whether FIR is detected or not.

6. Another way how to figure it out explained by Thomas Davis (modified by WH): "Dig through the FTP site of the vendor, find the Windows9x FIR drivers, and they have (for a SMC chip):

-rw-rw-r--   1 ratbert  ratbert       743 Apr  3  1997 smcirlap.inf
-rw-rw-r--   1 ratbert  ratbert     17021 Mar 24  1997 smcirlap.vxd
-rw-rw-r--   1 ratbert  ratbert      1903 Jul 18  1997 smcser.inf
-rw-rw-r--   1 ratbert  ratbert     31350 Jun  7  1997 smcser.vxd

If in doubt, always look for the .inf/.vxd drivers for Windows95. Windows95 doesn’t ship with _ANY_ FIR drivers. (they are all third party, mostly from Counterpoint, who was assimilated by ESI)."

7. Also Thomas Davis found a package of small DOS utilities made by SMC . Look at http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip <http://www.smsc.com/ftppub/chips/

appnote/ir_utils.zip> . The package contains FINDCHIP.EXE. And includes a FIRSETUP.EXE

utility that is supposed to be able to set all values except the chip address. Furthermore it contains BIOSDUMP.EXE, which produces this output: Example 1 (from a COMPAQ Armada 1592DT)

     In current devNode:
           Size      = 78
           Handle    = 14
           ID        = 0x1105D041 = 'PNP0511' -- Generic IrDA SIR
           Types:  Base = 0x07, Sub = 0x00,  Interface = 0x02
                Comm. Device, RS-232, 16550-compatible
           Attribute = 0x80
                CAN be disabled
                CAN be configured
                BOTH Static & Dynamic configuration
      Allocated Resource Descriptor Block TAG's:
           TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                   Min=0x03E8, Max=0x03E8
                                   Align=0x00, Range=0x08
           TAG=0x22, Length=2 IRQ Tag, Mask=0x0010
           TAG=0x79, Length=1 END Tag, Data=0x2F

Result 1:

Irq Tag, Mask (bit mapped - ) = 0x0010 = 0000 0000 0000 0001 0000 so, it’s IRQ 4. (start at

0, count up ..), so this is a SIR only device, at IRQ=4, IO=x03e8. Example 2 (from an unknown machine)

     In current devNode:
          Size      = 529
          Handle    = 14
          ID        = 0x10F0A34D = 'SMCF010' -- SMC IrCC
          Types:  Base = 0x07, Sub = 0x00,  Interface = 0x02
               Comm. Device, RS-232, 16550-compatible
          Attribute = 0x80
               CAN be disabled
               CAN be configured
               BOTH Static & Dynamic configuration
     Allocated Resource Descriptor Block TAG's:
          TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                  Min=0x02F8, Max=0x02F8
                                  Align=0x00, Range=0x08
          TAG=0x22, Length=2 IRQ Tag, Mask=0x0008
          TAG=0x47, Length=7 I/O Tag, 16-bit Decode
                                  Min=0x02E8, Max=0x02E8
                                  Align=0x00, Range=0x08
          TAG=0x2A, Length=2 DMA Tag, Mask=0x02, Info=0x08
          TAG=0x79, Length=1 END Tag, Data=0x00

Result 2:

a) it’s a SMC IrCC chip

b) one portion is at 0x02f8, has an io-extent of 8 bytes; irq = 3

c) another portion is at 0x02e8, io-extent of 8 bytes; dma = 1 (0x02 =0000 0010) Thomas Davis has placed some device information at http://www.jps.net/tadavis/irda/devids.txt

<http://www.jps.net/tadavis/irda/devids.txt> .

WARNING: The package is not intended for the end user, and some of the utilities could be harmful. The only documentation in the package is in M$ Word format. Linux users may read this with catdoc, available at http://www.fe.msk.ru/˜ vitus/catdoc/ <http://www.fe.msk.ru/~vitus/catdoc/> .

8. Use the Device Manager of Windows9x/NT.

9. You may also use the hardware surveys mentioned below.

10. And as a last ressort, you may even open the laptop and look at the writings at the chipsets themselfs.

Hardware Survey I have made a hardware survey at http:/www.snafu.de/˜ wehe/ir_misc.html <http: //www.snafu.de/~wehe/ir_misc.html>. This list also contains information about infrared capable devices which are not mentioned here (mice, printers, remote control, transceivers, etc.).

To make this list more valuable, it is necessary to collect more information about the infrared devices in different hardware. You can help by sending me a short e-mail containing the exact name of the hardware you have and which type of infrared controller is used.

Please let me know also how well Linux/IrDA worked (at which tty, port and interrupt it works and the corresponding infrared device, e.g. printer, cellular phone).

Also you can help by contributing detailed technological information about some infrared devices, which is necessary for the development of drivers for Linux.

6.2.2 Related HOWTOs

1. Linux/IR-HOWTO

6.2.3 IrDA Configuration - Survey

IrDA The Linux infrared support is still experimental, but rapidly improving. I try to describe the installation in a short survey. Please read my Linux/IR-HOWTO http://www.snafu.de/˜ wehe/index_li.html

<http://www.snafu.de/~wehe/index_li.html> for detailed information.

Kernel

1. Get a 2.2.x kernel.

2. Compile it with all IrDA options enabled.

3. Also enable experimental, sysctl, serial and network support.

Software

1. Get the Linux/IrDA software irda-utils at The Linux IrDA Project <http://www.cs.uit.no/

     linux-irda/> .

2. Untar the package.

  3. Do a make depend; make all; make install

Hardware

1. Enable the IrDA support in the BIOS.

2. Check for SIR or FIR support, as described above.

3. Start the Linux/IrDA service with irmanager -d 1 .

4. Watch the kernel output with dmesg .

Linux Remote Control - LiRC Linux Remote Control http://fsinfo.cs.uni-sb.de/˜ columbus/lirc/

<http://fsinfo.cs.uni-sb.de/~columbus/lirc/> is maintained by Christoph Bartelmus. "Lirc is a pack-

age that supports receiving and sending IR signals of the most common IR remote controls. It contains a device driver for hardware connected to the serial port, a daemon that decodes and sends IR signals using this device driver, a mouse daemon that translates IR signals to mouse movements and a couple of user programs that allow to control your computer with a remote control." I don’t have valid information about how much infrared remote control is working with laptop infrared devices.

6.3 Graphic Chip

6.3.1 Linux Compatibility Check

Video Mode The tool SuperProbe is part of XFree86 and is able to check many graphic chips. Please read the documentation carefully, because it might crash your hardware. From man SuperProbe:

"SuperProbe is a a program that will attempt to determine the type of video hardware installed in an EISA/ISA/VLB-bus system by checking for known registers in various combinations at various locations (MicroChannel and PCI machines may not be fully supported; many work with the use of the -no_bios option). This is an error-prone process, especially on Unix (which usually has a lot more esoteric hardware installed than MS-DOS system do), so SuperProbe may likely need help from the user.

...

At this time, SuperProbe can identify MDA, Hercules, CGA, MCGA, EGA, VGA, and an entire horde of SVGA chipsets (see the -info option, below). It can also identify several HiColor/True-color RAMDACs in use on SVGA boards, and the amount of video memory installed (for many chipsets). It can identify 8514/A and some derivatives, but not XGA, or PGC (although the author intends to add those capabilities). Nor can it identify other esoteric video hardware (like Targa, TIGA, or Microfield boards).":

For testing reasons start the X server with X 2> <error.msg>. And try to change the resolution by typing <CTL><ALT><+> or <CTL><ALT><->. Note: the + or - sign have to be taken from the numeric pad, which can be emulated at the letter pad by some laptops.

Text Mode Just watch the display and determine if it works properly. If not, try to enable different video modes at startup time. Setting up X can sometimes be an exercise in trial and error.

6.3.2 Related HOWTOs

1. XFree86-HOWTO

2. XFree86-Video-Timings-HOWTO

3. XFree86-XInside-HOWTO

4. X-Big-Cursor-mini-HOWTO (useful when running X on a notebook with low contrast LCD)

5. Keyboard-and-Console-HOWTO

6. vesafb-mini-HOWTO

6.3.3 Survey X-Servers

You might discover that some features of your laptop are not supported by XFree86, e.g. high resolutions, accelerated X or an external monitor. Therefore I give a survey of available X servers.

1. XFree86 http://www.xfree86.org <http://www.xfree86.org>

2. VESA Frame-Buffer-Device, available with 2.2.x kernels and XFree86 3.3.2

3. Xinside aka AcceleratedX http://www.xig.com <http://www.xig.com> , commercial

4. SciTech http://www.scitechsoft.com <http://www.scitechsoft.com> , commercial

5. Metro-X at http://www.metrolink.com <http://www.metrolink.com>, commercial .

If you can’t get an appropriate X server working, but don’t want to effort a commercial X server you may try the VGA16 or the mono server included in XFree86.

6.3.4 Resources

You may find a survey about X windows resources at Kenneth E. Harker’s page Linux on Laptops <http:

//www.cs.utexas.edu/users/kharker/linux-laptop/> and a survey about current graphic chips used in
laptops at LiLAC - Linux with Laptop Computers <http://www.snafu.de/~wehe/index_li.html>.

6.3.5 External Monitor

There are several different methods to activate support for an external monitor: as a BIOS option or during runtime with a keystroke e.g. <Fn>+<F4>. Maybe you have to edit /etc/XF86Config by configuring int_disp and ext_disp. If you can’t get this to work with XFree, try a demo version of the commercial X servers mentioned above. Also check with the RedHat and SuSE WWW sites as they may have new, binary-only, X servers that may work with your laptop.

6.3.6 Miscellaneous

Sometimes you may encounter a display not working properly in text mode. Currently I don’t have any recommendations, please see Keyboard-Console-HOWTO.

Take care of the backlight AFAIK this device can only bear a limited number of uptime circles. So avoid using screensavers too much.

For problems with X windows and APM please see the APM chapter.

6.4 Sound

6.4.1 Linux Compatibility Check

The only way I know to check this, is to compile the different sound drivers into the kernel and check whether they are detected or not. The best way to do so, is to compile them as modules because it’s easier to load different parameters such as interrupts and IO ports than. For the new 2.2.x kernels, read the

/usr/src/linux/Documentation/sound/Introduction document by Wade Hampton. This document may

help you get started with sound. Also, you might try one of the commercial sound drivers mentionend below.

6.4.2 Related HOWTOs

1. Sound-HOWTO

2. Visual-Bell-mini-HOWTO

6.4.3 Survey Sound Drivers

Many new laptops come with 16-bit sound. But MWave and some other sound technologies won’t work or are very hard to get working, e.g. booting to DOS, loading a driver, then using the soundcard as a standard SB-PRO. So you might need a commercial sound driver. With the recent announcement of Linux support by IBM, it would be GREAT if IBM supported the MWave under Linux (hint, hint...). As a last ressort you may try the speaker module pcsnd, which tries to emulate a soundcard.

1. Kernel Sound Driver by Hannu Savolainen

2. ALSA Advanced Linux Sound Architecture <http://alsa.jcu.cz> , commercial or at least non-GPL (since I found a Debian/GNU Linux package I’m not sure anymore, about the commercial status)

  3. OSS UNIX Sound System Lite / OSS <http://www.4front-tech.com/usslite/ossfree.html>,

commercial or at least non-GPL (since the 2.2.x kernels I’m not sure about the commercial status), also available from http://www.opensound.com <http://www.opensound.com> .

6.5 Keyboard

6.5.1 Linux Compatibility Check

Usually there are no problems with Linux and the keyboard. Though there are two minor caveats: First the setleds program might not work. Second the key mapping might not fit your needs. Some Unix users and vi users expect to find the <CONTROL> key to the left of the <A> key. Many PC-type keyboards have the <CAPS-LOCK> key there. You may use xmodmap or loadkeys to re-map the keyboard. Some laptops (e.g., Toshiba) allow you to swap the <CAPS-LOCK> and <CONTROL> keys. Mark Alexander offered this solution in the linux-laptop mailing list: On RedHat, it’s a one-line patch to /usr/lib/kbd/keytables/

us.map , or whatever file is referenced in /etc/sysconfig/keyboard:
*** us.map~     Tue Oct 31 14:00:07 1995
--- us.map      Thu Aug 28 13:36:03 1997
***************
*** 113,119 ****
  keycode  57 = space            space
        control keycode  57 = nul
        alt     keycode  57 = Meta_space
! keycode  58 = Caps_Lock
  keycode  59 = F1               F11              Console_13
        control keycode  59 = F1
        alt     keycode  59 = Console_1
--- 113,119 ----
  keycode  57 = space            space
        control keycode  57 = nul
        alt     keycode  57 = Meta_space
! keycode  58 = Control
  keycode  59 = F1               F11              Console_13
        control keycode  59 = F1
        alt     keycode  59 = Console_1

6.5.2 External (Second) Keyboard

A second (or external) keyboard can be attached using the PS/2 port (I suppose this is not possible via the serial port, since there is no keyboard controller for the serial port). Also there is one laptop with a detachable keyboard the Siemens Scenic Mobile 800. This machine uses an infrared connection to the keyboard, but I don’t know whether this works with Linux. WARNING: Don’t plug the external keyboard in while the laptop is booted, or plug the mouse in the keyboard port and the keyboard in the mouse port. On a Toshiba, this caused one user to have to completely shutdown the laptop, remove the keyboard/mouse, and do a cold reboot.

For PS/2 ports there are so called Y-Cable available, which make it possible to use external mouse and external keyboard at the same time if your laptop supports this feature.

Parport to AUX port adapter <http://www.suse.cz/development/input/> In some cases one kbd port and one aux port is not enough and you may want to add another keyboard or mouse. You can use this adapter, together with the parkbd.c module for that.

6.6 Pointing Devices - Mice and Their Relatives

6.6.1 Linux Compatibility Check

You may check your mouse with the mev command from the GPM package.

6.6.2 Related HOWTOs

1. 3-Button-Mouse-mini-HOWTO for serial mice

2. Bus-Mouse-HOWTO

3. Kernel-HOWTO

6.6.3 Mice Species

1. Trackpad, Touchpad, used with the majority of current laptops

2. Trackball, e.g. COMPAQ LTE

3. Pop-up-Mouse, e.g. HP OmniBook 800

4. Trackpoint, Mouse-Pin, e.g. IBM ThinkPad and Toshiba

5. 3 Button Mice, e.g. IBM Thinkpads at least the 600s. I have heard rumor about a 3 button mouse for Texas Instruments Travelmates, but couldn’t verify this yet.

6.6.4 PS/2 Mice

Most of the mice used in laptops are PS/2 mice (actually I don’t know one with another mouse protocol). You may communicate with the PS/2 mouse through /dev/psaux or /dev/psmouse. If you use X windows this device and the protocol has to be set in /etc/XF86Config, too. In earlier releases, sometimes the GPM mouse manager and X windows had trouble sharing a mouse when enabled at the same time. But AFAIK this is no problem anymore for the latest versions.

6.6.5 Touchpad

Usually a touchpad works with the PS/2 mouse driver. A tip: I’ve heard that tipping with one , two or three fingers on the touchpad simultaneously results in pressing the left, middle and respectively the right mouse-button (by Martin Hoffmann <mh@rrz.uni-hamburg.de> for an IPC-Radiance 900).

There is also a dedicated touchpad driver available. The Synaptics Touchpad Linux Driver <http://www. pdos.lcs.mit.edu/~cananian/Synaptics/> supports pointing devices used in notebooks by Acer, Compaq, Dell, Gateway, Olivetti, Texas Instruments, Winbook, and others. Other URL N.N. <http://compass.com/

synaptics/>.

The recent gpm package (gpm >=1.8 <ftp://ftp.prosa.it/pub/gpm/>) includes the above mentioned synaptics touchpad device driver. This device driver has been developed by H. Davies <hdavies@ameritech.net>. Instead of using the PS/2 compatibility mode of touchpad devices, you can now use native touchpad mode with some pretty impressive features.

In addition to translating finger motion into mouse motion and supporting the buttons, this support currently has several features (from the README):

• a "tap" on the TouchPad causes a left mouse click

• a "tap" followed quickly by a finger motion causes a left button drag type action.

• a "tap" in one of the corners causes an action the default configuration is upper right causes middle mouse click and lower right causes right mouse click

• more pressure on the touch pad speeds the motion of the cursor

• a "tap" with a motion component (default > 2mm) initiates a toss and catch sequence. This is terminated by a finger touch on the pad (the toss also ends after 1 sec since that is the idle timeout period for the touchpad).

• if the finger moves close to an edge then the mouse motion will be continued in that direction so that you don’t need to pick up your finger and start moving again. This continued motion is pressure sensitive (more pressure is faster motion).

These features can be enabled/disabled and many of them have time and speed parameters which can be adjusted to the taste of the user.

It seems gpm is best known as a console biased tool. This is true, but you may use it as an X input device. gpm is used as a repeater device. In this way you can use both the built-in synaptics touchpad with all the features and at the same time a serial mouse (with three buttons). This all works smoothly together. X reads the mouse events from a named pipe /dev/gpmdata in a protocol it understands, which in my case is Mouse-Systems-Compatible (5bytes). Most 3-button mice use the default protocol. So a simple reconfiguration in XF86Config is all that is required, after starting gpm in an appropriate way, of course.

gpm could be started on your laptop with the following arguments : /usr/bin/gpm -t synps2 -M -t ms -m /dev/ttyS0 . Both touchpad and serial mouse work in console and X mode. You do have to create the named pipe /dev/gpmdata yourself.

Thanks to Geert Van der Plas for most of the touchpad chapter.

6.6.6 Touchscreen

The only laptop I know which includes a touchscreen is the Fujitsu Biblo 112. It may work in PS/2 compatibility mode. But I couldn’t check this yet.

6.6.7 COMPAQ Concerto Pen

The latest version of the Linux Compaq Concerto Pen Driver <http://www.cs.nmsu.edu/~pfeiffer/ \#pen> is available from Joe Pfeiffer’s home page.

6.6.8 External Mouse

For better handling, e.g. with a 3 button mouse you may use an external mouse. This usually a serial mouse or a PS/2 mouse, according to the port your laptop offers. Usually this is no problem.

For PS/2 ports there are so called Y-Cable available, which make it possible to use external mouse and external keyboard at the same time if your laptop supports this feature.

WARNING: Don’t plug in the external mouse while powered up. If you have separate mouse and keyboard ports, make sure you plug the mouse in the mouse port and the keyboard in the keyboard port. If you don’t, you may have to do a hard reboot of the laptop to get it to recover.

6.7 Advanced Power Managment - APM

6.7.1 Linux Compatibility Check

From the Battery-Powered-mini-HOWTO " .. for APM to work on any notebook or energy-conscious desktop, the system BIOS ROM in the machine must support the APM standard. Furthermore, for APM to work with the Linux operating system, the system BIOS ROM must support either the 1.0 or 1.1 version of the APM standard, and it must also support 32-bit protected mode connections. A system that supports APM 1.1 is preferred, as it provides more features that the device driver and supporting utilities can take advantage of."

You may get information about the APM version with the dmesg command and in the /proc/apm file.

6.7.2 Introduction

Features of APM according to Documentation/Configure.help: "The system time will be reset after a USER RESUME operation, the /proc/apm device will provide battery status information, and user-space programs will receive notification of APM events (e.g., battery status change). "

APM support consists of two parts: kernel support and user-land support.

For kernel support, enable the parameters in the corresponding kernel section. Some features need special tweaking with certain machines (e.g. IBM ThinkPad) or even don’t work, ("TI 4000M TravelMate and the ACER 486/DX4/75 because they don’t have compliant BIOSes"). Currently all distributions I know don’t provide a kernel with APM support enabled. So you usually have to compile your custom kernel. Please see Kernel-HOWTO or distribution manual for details. The available APM options are (please see Documentation/Configure.help in the kernel source tree for more details):

• CONFIG_APM_IGNORE_USER_SUSPEND Just a workaround for some NEC Versa M series laptops.

• CONFIG_APM_DO_ENABLE Enable APM features at boot time.

• CONFIG_APM_CPU_IDLE. Puts CPU in power save mode, if there is nothing to do for the kernel.

• CONFIG_APM_DISPLAY_BLANK Some laptops can use this to turn off the LCD backlight when the screen blanker of the Linux virtual console blanks the screen. Note that this is only used by the virtual console screen blanker, and won’t turn off the backlight when using the X Window system.

• CONFIG_APM_POWER_OFF Turns the machine completely down, when using halt. This feature works with most laptops without problems.

   • CONFIG_APM_IGNORE_MULTIPLE_SUSPEND Just a workaround for IBM ThinkPad 560.

• CONFIG_APM_IGNORE_SUSPEND_BOUNCE Just a workaround for Dell Inspiron 3200 and other notebooks.

• CONFIG_APM_RTC_IS_GMT Stores time in Greenwich Mean Time format. It is in fact recommended to store GMT in your real time clock (RTC) in the BIOS.

• CONFIG_APM_ALLOW_INTS Resolves some problems with Suspend to Disk for some laptops, for instance many newer IBM ThinkPads.

The utilities for userland support may be found at http://worldvisions.ca/˜ apenwarr/apmd/ <http:// worldvisions.ca/~apenwarr/apmd/>. APMD is a set of programs that control the Advanced Power Management system found in most modern laptop computers. If you run a 2.2.x kernel and want to experiment, Gabor Kuti <seasons@falcon.sch.bme.hu> has made a kernel patch that allows you to hibernate any Linux system to disk, even if your computers APM BIOS doesn’t support it directly. IMHO you don’t need this features if your laptop provides a function key to invoke suspend mode directly.

When you first install Linux, you will probably have to recompile the kernel. The kernel that came with your distribution probably does not have APM enabled.

Please see the Battery Powered Linux Mini-HOWTO by <hanno@lava.de> Hanno Mueller <http:

//www.hanno.de> and the page of Kenneth E. Harker <http://www.cs.utexas.edu/users/kharker/

linux-laptop/> for detailed information.

Richard Gooch wrote: I’have had a look at the beta version of apmd, and I still don’t like it, because:

• Only supports one command to run at suspend time.

• Doesn’t distinguish between user and system suspends.

• doesn’t provide a way to disable policy (the sync(); sleep(0) ; sync(); sleep(1); sequence)

• Does not document extra features.

• And I’m not sure that what we want is a single super daemon. A collection of smaller daemons might be better, since it allows people to pick and choose. A super daemon is bloat for those who only want one small feature.

Though this topic was discussed controversly Richard Gooch has put together a package suspendd at

http://www.atnf.csiro.au/˜ rgooch/linux/ <http://www.atnf.csiro.au/~rgooch/linux/> .

Also, have a look at apmcd (apm based crontab) at apmcd <ftp://ftp.binary9.net/pub/linux/> . A tool made by Nicolas J. Leon <nicholas@binary9.net> http://mrnick.binary9.net/ <http://mrnick.binary9.

net/>.

Note: I didn’t check wether this features are merged into one package (apmd eventually) already.

6.7.3 Caveats

If you have another operating system preinstalled or use another operating system at the same disk, make sure there is no "hibernation" or "suspend" tool installed, which could severely interfere with Linux, e.g. it might use disk space which is occupied by Linux or vice versa.

6.7.4 Troubleshooting

If your machine worked with 2.0.x kernels but not with the 2.2.x series, take this advice from Klaus Franken kfr@klaus.franken.de : "The default changed in 2.2. Search in the init-scripts for halt and change it to halt -p or poweroff. See man halt , if you don’t have this option you need a newer version of halt." You may find it in the SysVinit package.

PCMCIA Card Services and Advanced Power Management (from the PCMCIA-HOWTO):

"Card Services can be compiled with support for APM (Advanced Power Management) if you’ve configured your kernel with APM support. ... The PCMCIA modules will automatically be configured for APM if a compatible version is detected on your system. Whether or not APM is configured, you can use cardctl suspend before suspending your laptop, and cardctl resume after resuming, to cleanly shut down and restart your PCMCIA cards. This will not work with a modem that is in use, because the serial driver isn’t able to save and restore the modem operating parameters. APM seems to be unstable on some systems. If you experience trouble with APM and PCMCIA on your system, try to narrow down the problem to one package or the other before reporting a bug. Some drivers, notably the PCMCIA SCSI drivers, cannot recover from a suspend/resume cycle. When using a PCMCIA SCSI card, always use cardctl eject prior to suspending the system."

Sometimes X windows and APM don’t work smoothly together, the machine might even hang. A recommendation from Steve Rader: Some linux systems have their X server hang when doing apm -s. Folks with this affliction might want switch to the console virtual terminal then suspend chvt 1; apm -s as root, or, more appropiately.sudo chvt 1; sudo apm -s. I have these commands in a script, say, my-suspend and

then do xapmload –click-command my-suspend .

On some new machines (for instance HP Omnibook 4150 - 366 MHz model) when accessing /proc/apm, you may get a kernel fault general protection fault: f000. Stephen Rothwell <Stephen.Rothwell@canb.auug.org.au> http://www.canb.auug.org.au/˜ sfr/ <http://www.canb.auug.org. au/~sfr/> explaines: "This is your APM BIOS attempting to use a real mode segment while in protected mode, i.e. it is a bug in your BIOS. .. We have seen a few of these recently, except all the others are in the power off code in the BIOS wher we can work around it by returning to real mode before attempting to power off. Here we cannot do this."

apmd-rhcn-2.4phil-1 by RedHat ftp://rhcn.redhat.com/pub/rhcn/ <ftp://rhcn.redhat.com/pub/

rhcn/> contains an unofficial patch for shutting down the PCMCIA sockets before a suspend and patches for multiple batteries.

According to Documentation/Configure.help: "Some other things you should try when experiencing seemingly random, weird problems:

1. make sure that you have enough swap space and that it is enabled.

2. pass the no-hlt option to the kernel.

3. switch on floating point emulation in the kernel and pass the no387 option to the kernel.

4. pass the floppy=nodma option to the kernel.

5. pass the mem=4M option to the kernel (thereby disabling all but the first 4 MB of RAM).

6. make sure that the CPU is not over clocked.

7. read the sig11 FAQ at http://www.bitwizard.nl/sig11/ <http://www.bitwizard.nl/sig11/> .

8. disable the cache from your BIOS settings.

9. install a fan for the video card or exchange video RAM.

10. install a better fan for the CPU.

11. exchange RAM chips.

12. exchange the motherboard.

6.8 ACPI

ACPI stands for Advanced Configuration and Power Interface. This is a specification by Toshiba, Intel and Microsoft. Besides many other things it also defines power management. This is why it is often compared to APM.

The ACPI4Linux project has started at the beginning of 1999. The ACPI4Linux project is a kernel driver project aimed at implementing full ACPI support for Linux, including fan control, dock/undock detection and a WindowMaker dockable temperature meter. You may reach it at ACPI4Linux <http://phobos.

fachschaften.tu-muenchen.de/acpi/>.

6.9 Batteries

For information about available battery types, take a look at the Hardware Features chapter above.

Please see Battery Powered Linux Mini-HOWTO by Hanno Mueller <kontakt@hanno.de> http://www.hanno.de <http://www.hanno.de/> Power Supplies for Laptops - (Draft) <http:

//www.snafu.de/~wehe/energy_laptops.html> for further information.

Stephen Rothwell http://www.canb.auug.org.au/˜ sfr/ <http://www.canb.auug.org.au/~sfr/> is currently integrating a patch that will add multiple battery support to the kernel APM.

From the mobile-update page (modified by WH): Discharge the battery. If your battery runs only for about 20 minutes, you probably suffer from memory effects. Most laptops do not discharge the battery properly. With low powered devices like old computer fans they can be discharged completely. This removes memory effects. You should do so even with LiIon batteries, though they don’t suffer much from memory effext (the manual of an IBM Thinkpad says to cycle the batteries through a full charge/discharge cycle 3 times every few months or so).

WARNING: Try this at your own risk! Make sure the voltage of the fans is compatible to your battery. It works for me.

In the US, this company has most batteries for anything and can rebuild many that are no longer manufactured: Batteries Plus, 2045 Pleasant Hill Road, Duluth, GA 30096 +1 770 495 1644.

6.10 Memory

Unfortenately most laptops come with a proprietary memory chips. So they are not interchangeable between different models. But this seems changing.

6.11 Plug-and-Play Devices (PnP)

The Plug and Play driver project for Linux is a project to create support within the Linux kernel (see Linux.Org for more information) for handling Plug and Play (and other semi-PnP) devices in a clean, consistent way. It aims to allow a driver of any type of hardware to have this hardware configured by the PnP driver in the kernel. This driver is then notified when the device is reconfigured, or even removed from the system, so as to allow for graceful action in these circumstances http://www.io.com/˜ cdb/mirrors/lpsg/pnp-

linux.html <http://www.io.com/~cdb/mirrors/lpsg/pnp-linux.html> .

ISA PnP tools is another useful package.

And there is a project at RedHat http://www.redhat.com/pnp/overview.html <http://www.redhat.com/

pnp/overview.html> .

6.12 Docking Station / Port Replicator

6.12.1 Definitions

First some definitions. There is a difference between docking station and port replicator.

I use the term docking station for a box which contains slots to put some interface cards in, and space to put a harddisk, etc. in. This box can be permanently connected to a PC. A port replicator is just a copy of the laptop ports which may be connected permanently to a PC.

6.12.2 Other Solutions

I don’t use a docking station. They seem really expensive and I can’t see any usefulness. OK you have to mess up with some more cables, but is it worth so much money? Docking stations are useful in an office environment when you have a permanent network connection, or need the docking station’s SCSI adaptor (e.g., for a CD-R).

Also all docking stations I know are proprietary models, so if you change your laptop you have to change this device, too. I just found one exception a docking station which connects to your laptop via IrDA the IRDocking IR-660 by Tekram http://www.tekram.com/Hot_Products.asp?Product=IR-660 <http://www. tekram.com/Hot_Products.asp?Product=IR-660> . It supports these connectors: 10Base-T (RJ-45); PS/2 Keyboard; PS/2 Mouse; 25-Pin Printer Port (LPT); IR Transceiver; Power (6 VDC). So it seems that a VGA port and a port to connect a desktop PC directly are missing. This device should work with Linux/IrDA, though I couldn’t check it out.

I would prefer to buy a PC instead and connect it via network to the laptop.

Or use an external display, which usually works well as described above, and an external keyboard and mouse. If your laptop supports an extra PS/2 port you may use a cheap solution a Y cable, which connects the PS/2 port to an external keyboard and an external monitor. Note: Your laptop probably has support for the Y cable feature, e.g. the COMPAQ Armada 1592DT.

6.12.3 Connection Methods

AFAIK there are three solutions to connect a laptop to a docking station:

1. SCSI port

2. parallel port

3. (proprietary) docking port

From Martin J. Evans martin@mjedev.demon.co.uk <http://www.mjedev.demon.co.uk/index.html>

"The main problem with docking stations is getting the operating system to detect you are docked. Fortunately, if you configure your kernel with the /proc file system (does anyone not do this?) you can examine the devices available and thus detect a docked state. With this in mind a few simple scripts is all you need to get your machine configured correctly in a docked state.

You may want to build support for the docking station hardware as modules instead of putting it directly into the kernel. This will save space in your kernel but your choice probably largely depends on how often you are docked.

1) Supporting additional disks on the docking station SCSI card

To my mind the best way of doing this is to:

1. Either build support for the SCSI card into the kernel or build it as a module.

2. Put the mount points into /etc/fstab but use the "noauto" flag to prevent them from being mounted automatically with the mount -a flag. In this way, when you are docked you can explicitly mount the partitions off any disk connected to the docking station SCSI card.

2) Supporting additional network adaptors in the docking station

You can use a similar method to that outlined above for the graphics card. Check the /proc filesystem in your rc scripts to see if you are docked and then set up your network connections appropriately. "

Once you determine this information, you may use a script, similar to the following example, to configure the connection to your docking station at startup. The script is provided by Friedhelm Kueck:

# check, if Laptop is in docking-station (4 PCMCIA slots available)
# or if it is standalone (2 slots available)
# Start after cardmgr has started
#
# Friedhelm Kueck mailto:fk@impress.de
# 08-Sep-1998
#
# Find No. of Sockets
SOCKETS=`tail -1 /var/run/stab | cut -d ":" -f 1`
case "$SOCKETS" in
"Socket 3")
echo Laptop is in Dockingstation ...
echo Disabeling internal LCD Display for X11
echo
cp /etc/XF86Config_extern /etc/XF86Config
#
# Setup of PCMCIA Network Interface after start of cardmge
#
echo
echo "Setting up eth0 for use at Network ..."
echo
/sbin/ifconfig eth0 10.1.9.5 netmask 255.255.0.0 broadcast 10.1.255.255
/sbin/route add -net 10.1.0.0 gw 10.1.9.5
/sbin/route add default gw 10.1.10.1
;;
"Socket 1")
echo Laptop is standalone
echo Disabling external Monitor for X11
cp /etc/XF86Config_intern /etc/XF86Config
echo
echo Network device NOT setup
;;
esac

6.13 Network Connections

6.13.1 Related HOWTOs

1. PLIP-mini-HOWTO

2. NET-3-HOWTO

3. Ethernet-HOWTO

4. Term-Firewall-mini-HOWTO

6.13.2 Connection Methods

PCMCIA Network Card If your laptop supports PCMCIA this is the easiest and fastest way to get network support. Make sure your card is supported before buying one.

Serial Null Modem Cable Probably the cheapest way to connect your laptop to another computer, but quite slow. You may use PPP or SLIP to start the connection.

Parallel Port NIC (Pocket Adaptor) Accton Pocket Ethernet and Linux <http://www.unix-ag. uni-siegen.de/~nils/accton_linux.html> This ethernet adaptor uses a parallel port and delivers approximately 110k Bytes/s throughput for those notebooks that do not have PCMCIA slots.

Linux and Linksys Ethernet Adaptors <http://www.cs.utexas.edu/users/kharker/linux-laptop/

linksys.html> A short note on the use of the Linksys parallel-port ethernet adaptor under Linux. This is a widely available networking adaptor that doesn’t require a PCMCIA slot.

Parallel "Null" Modem Cable Offers more speed than a serial connection. Some laptops use chipsets that will not work with PLIP. Please see PLIP-HOWTO for details.

Docking Station NIC I don’t have experience with a NIC in a docking station yet.

6.14 Modem

6.14.1 Modem Types

There are three kinds of modems available: internal, PCMCIA card or external serial port modems. But some internal modems will NOT work with Linux such as the MWave modems (IBM) or if the laptop has a WinModem. This is caused by non-standard hardware. So you have to use either a PCMCIA card modem or an external modem.

Quotation from the Kernel-FAQ: "9.Why aren’t WinModems supported? (REG, quoting Edward S. Marshall) The problem is the lack of specifications for this hardware. Most companies producing so-called WinModems refuse to provide specifications which would allow non-Microsoft operating systems to use them. The basic issue is that they don’t work like a traditional modem; they don’t have a DSP, and make the CPU do all the work. Hence, you can’t talk to them like a traditional modem, and you -need- to run the modem driver as a realtime task, or you’ll have serious data loss issues under any kind of load. They’re simply a poor design."

"Win modems are lobotomized modems which expect Windows to do some of their thinking for them. If you do not have Windows, you do not have a connection. " Anyway, I have set up a page collecting information on laptops with internal modems at http://www.snafu.de/˜ wehe/index_li.html <http://www.snafu.de/~wehe/index_li.html> . Maybe it’s possible to run such modems with MS-Windows9x/NT emulators like wine or VMware, but I don’t know it.

Recently there is a driver for Lucent WinModems (alpha) available at SuSE - Labs <http://www.suse.cz/

development/ltmodem/>.

6.14.2 Caveats

WARNING: Pay attention to the different kinds of phone lines: analog and ISDN. You can’t connect an analog modem to an ISDN port and vice versa. Though there might be hybrid modems available. Connecting to the wrong port may even destroy your modem. Trick: If you are looking for an analog phone port in an office building which is usually wired with ISDN, take a look at the fax lines, they are often analog lines.

For tracking the packets on PPP you may use pppstats. Or pload this provides a graphical view of the traffic (in and out) of the PPP connection. It is based on athena widgets hence is very portable. It also uses very little CPU time. The home of pload is http://www.engr.utk.edu/˜ mdsmith/pload/ <http:

//www.engr.utk.edu/~mdsmith/pload/> .

6.15 SCSI

6.15.1 Hardware Compatibility Check

If unsure about the right SCSI support, compile a kernel with all available SCSI drivers as modules. Load each module step by step until you get the right one.

6.15.2 Related HOWTOs

1. SCSI-HOWTO

6.15.3 Survey

AFAIK there is no laptop yet with a SCSI harddisk. Though there are two models with a built in SCSI port: Texas Instruments TI 4000 and HP OmniBook 800. For other models, if you need SCSI support you may get it by using a SCSI-PCMCIA card or via a SCSI adapter in a docking station.

6.16 Universal Serial Bus - USB

Newer laptops come with the Universal Serial Bus (USB). I haven’t tried it on any of my systems because I don’t have any USB devices.

Visit  http://peloncho.fis.ucm.es/˜ inaky/uusbd-www/  <http://peloncho.fis.ucm.es/~inaky/

uusbd-www/> for the USB Linux home page. Also I have set up a page collecting information about laptops

and USB at LiLAC - Linux with Laptop Computers <http://www.snafu.de/~wehe/index_li.html> .

6.17 Floppy Drive

6.17.1 Linux Compatibility Check

Usually there are no problems connecting a floppy drive to a Linux laptop. But with a laptop floppy drive you may sometimes not be able to use every feature. I encountered the superformat command (from the fdutils package) couldn’t format more than 1.44MB with my HP OmniBook 800. You may also have difficulty when the floppy drive and CD drive are mutually exclusive, or when the floppy drive is a PCMCIA device (as with the Toshiba Libretto 100). With older laptops, there might be a minor problem if they use a 720K drive. AFAIK all distributions come with support for 1.44M (and sometimes 1.2M) floppies only. Though it’s possible to install Linux anyway. Please see Installation chapter. Please see kernel documentation for boot time parameters concerning certain laptop floppy drives, for instance IBM ThinkPad. Or man bootparam .

6.18 CD Drive

Most notebooks today come with CD drives. If floppy and CD drive are swappable they are usually mutually exclusive. Sometimes they come as PCMCIA devices. Or as SCSI device (HP OmniBook 800). AFAIK there are discmans available which have a port to connect them to a computer or even a SCSI port. I found an article published by Ziff-Davis Publishing Company (September 1996 issue, but missed to note the URL) written by Mitt Jones: "Portable PC Card CD-ROM drives transform laptops into mobile multimedia machines", which listed: Altec Lansing AMC2000 Portable Multimedia CD-ROM Center; Axonix ProMedia 6XR; CMS PlatinumPortable; EXP CDS420 Multimedia Kit; H45 QuickPCMCIA CD; Liberty 115CD; Panasonic KXL-D740; Sony PRD-250WN CD-ROM Discman.

6.19 DVD Drive

The Linux Video and DVD Project <http://livid.on.openprojects.net> has made great headway since its start last February. They have just released the source code ( http://livid.on.openprojects.net/css.tgz) so that a DVD decoder card can unlock and read the DVD. Also provided on the site are links to various documents discussing DVD chipset specifications. The Linux Video and DVD Project is avidly seeking help from the opensource community for development.

Universal Disk Format (UDF) Driver <http://www.trylinux.com/projects/udf/index.html>: "UDF is

a newer CDROM filesystem standard that’s required for DVD roms. It’s meant to be a replacement for the ISO9660 filesystem used on today’s CDROMs, but the immediate impact for most will be DVD. DVD multimedia cdroms use the UDF filesystem to contain MPEG audio and video streams. To access DVD cdroms you would need a DVD cdrom drive, the kernel driver for the cdrom drive, some kind of MPEG video support, and a UDF filesystem driver (like this one). Some DVD cdroms may contain both UDF filesystems and ISO9660 filesystems. In that case, you could get by without UDF support."

6.20 Harddisk

6.20.1 Linux Compatibility Check

Useful programms are hdparm, dmesg, fsck and fdisk .

6.20.2 Miscellaneaous

Be careful when using your laptop abroad. I have heard about some destroyed harddisks due to a magnetic field emitted from the magnetic-holds at the backresttable of the seats in a german railway waggon.

Though I am quite satisfied with the quality of the harddisk in my laptop, when I removed it from the case I unintendedly dropped it, I recommend to be very careful.

AFAIK there is only one form factor for harddisks used in laptops the 2.5" format. This format seems to be available in two flavors. Laptops build before 1996 usually have drives 18mm high, since then the drives are 11mm high. There seem to be no SCSI drives for laptops available.

6.21 Video Port / ZV Port

Some high end laptops come with a video or ZV port (NTSC/PAL). Since I don’t have a laptop with a ZV or video port yet, I can provide only some URLs http://www.thp.uni-koeln.de/˜ rjkm/linux/bttv.html

<http://www.thp.uni-koeln.de/~rjkm/linux/bttv.html> (driver)  http://www.mathematik.uni-
kl.de/˜ wenk/xwintv.html <http://www.mathematik.uni-kl.de/~wenk/xwintv.html> (tvviewer). For fur-

ther information see video4linux at http://roadrunner.swansea.uk.linux.org/v4l.shtml <http://roadrunner. swansea.uk.linux.org/v4l.shtml>. To collect information about laptops with video port I have setup a page at http://www.snafu.de/˜ wehe/index_li.html <http://www.snafu.de/~wehe/index_li.html> . Alternatively to the ZV port you might use the USB port.

7 Palmtops, Personal Digital Assistansts - PDAs, Handheld PCs - HPCs

Palmtops and PDAs are currently not much covered in this HOWTO. Anyway it may be useful therefore, too. I just include some links, most of them are from Kenneth E. Harker’s page <http://www.cs.utexas.

edu/users/kharker/linux-laptop/> :

1. Highly recommended is the page by Russell King ARM Linux <http://www.arm.uk.linux.org/ ~rmk/> about PDAs with ARM CPU and with links to other Linux related PDA sites.

2. PalmOS-HOWTO (former Pilot-HOWTO) by David H. Silber.

  3. Newton and Linux Mini-HOWTO <http://privat.swol.de/ReinholdSchoeb/Newton/> .

4. Newtl: Newton/Linux Communications System <http://www.tcel.com/~aehall/newtl/> Newtl allows a Linux machine to communicate with a Newton PDA. Automatically send e-mail, print, and fax outboxes through your Linux machine, and more.

5. PilotLink and XCoPilot <ftp://ryeham.ee.ryerson.ca/pub/PalmOS/> PilotLink is an utility that performs data transfers from 3com PalmPilot handheld computers to your Linux machine. XCoPilot is an emulator of the PalmPilot operating system that runs under Linux.

  6. PalmVNC <http://www.icsi.berkeley.edu/~minenko/PalmVNC> is an implementation of the Vir-

tual Network Client architecture that will allow you to use a Linux or other UNIX machine to put up a (tiny) X Window on a 3COM PalmPilot.

7. PDAs and infrared remote control, see Hiromu Okada <http://hp.vector.co.jp/authors/

     VA005810/remocon/remocone.htm>

8. AFAIK you can run Linux on the IBM PC110 (a tiny PC handheld that’s no longer manufactured). There’s a HOWTO on it running around somewhere but I don’t have an URL, instead I found a

     description in LINUX REDUX July 1997 <http://boardwatch.internet.com/mag/97/jul/bwm70.

html> by Alan Cox.

9. For more information on Virtual Network Computing, see VNC <http://www.uk.research.att.com/

     vnc> .

10. There is also the Handheld Systems(TM) On-line Archives <http://www.cdpubs.com/hhsys/ archives.html> and a search engine about palmtop related topics Palmtop.Net/ <http://www.

     palmtop.net/> .

11. I have setup a small page about Linux with PDAs and Handheld PCs <http://www.snafu.de/~wehe/

     pda_linux.html>, too.

8 Cellular Phones, Pagers, Calculators, Digital Cameras, Wearable Computing

Though in my opinion related to the topic, these devices are not much covered in this text, yet. For general information about Embedded Systems, see http://www.embedded.com <http://www.embedded.com>. For Linux information, see ELKS http://www.elks.ecs.soton.ac.uk/ <http://www.elks.ecs.soton.ac.uk/> and the uCLinux project at http://ryeham.ee.ryerson.ca/uClinux <http://ryeham.ee.ryerson.ca/uClinux> . See also news:comp.arch.embedded

Also related to this topic but not covered yet seems wearable computing, see http://lcs.www.media.mit.edu/projects/wearables/ <http://lcs.www.media.mit.edu/ projects/wearables/> and the page of Lionel, "trollhunter" Bouchpan-Lerust-Juery, http://infonomade.linuxfr.org/indexen.html <http://infonomade.linuxfr.org/indexen.html> for further information. http://wearables.blu.org <http://wearables.blu.org>

The datalink library <http://datalink.fries.net/> allows sending information to the Timex DataLink watches. The original datalink library supports the model 150 and possibly the model 70 watch. This version has been extended to work with the DataLink Ironman Triathlon watch. It has been tested with the SVGA output on the Ironman watch only, other output devices and other watches may or may not work, I have no reports either way. The display must be a CRT display (not a LCD).

For NOKIA cellular phones see GNOKII project <http://multivac.fatburen.org/gnokii/> . And Linux

Nserver <http://www.users.globalnet.co.uk/~syrinx/nserver/index.html>. This project aim is to

produce a GPL replacement for Nokia’s Windows Nserver, and maybe improve upon it along the way. Initially it will emulate the Windows 3.1 version (ie. allow backup, restore and install).

SMS Client <http://www.styx.demon.co.uk/> is a UNIX command line based utility which allows you to send SMS messages to mobile phones and pagers. This software has been written and tested on Linux however a number of users have reported success running under both AIX and Solaris. SMS Client currently supports a wide variety of services providers and protocols.

For information about cellular phones and digital cameras see some links at my page about Linux with

Infrared Devices <http://www.snafu.de/~wehe/ir_misc.html> and my IR-HOWTO.

Information about calculators e.g. HP48 is at HP-Calculator.Org <http://www.hpcalc.org> and Keith’s HP48 Page <http://www.gmi.edu/~madd0118/hp48/>. See also at my page about Linux with Infrared

Devices <http://www.snafu.de/~wehe/ir_misc.html>.

9 Accessories

9.1 PCMCIA Cards

9.1.1 Card Families

1. Ethernet adapter

2. Token Ring adapter

3. Ethernet + Modem / GSM

4. Fax-Modem / GSM adapter

5. SCSI adapter

6. I/O cards: RS232, LPT, RS422, RS485, GamePort, IrDA, Radio, Video

7. Memory cards

8. harddisks

9. 2.5" harddisk adapters

For desktops there are PCMCIA slots for ISA and PCI bus available.

Source: http://www.lapshop.de <http://www.lapshop.de>

Linux Compatibility Check With the command cardctl ident you may get information about your card. Put this information into /etc/pcmcia/config.opts if necessary. But this may not be enough to get the card to work, but works sometimes for no-name network cards or modem cards. If you get a card to work or have written a new driver please don’t forget to announce this to the developer of the PCMCIA-CS package

David Hinds <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html> . Look the current issue
of his file SUPPORTED.CARDS <http://hyper.stanford.edu/~dhinds/pcmcia/ftp/SUPPORTED.CARDS>

to get information about supported cards.

Since there are not all cards mentioned I have set up a page PCMCIA Cards "Unofficially" Supported by

Linux <http://www.snafu.de/~wehe/index_li.html> .

9.2 SmartCards

SmartCard reader, see Project Muscle - Movement for the Use of Smart Cards in a Linux Environment

<http://www.linuxnet.com/smartcard/index.html>

9.3 Memory Technology Devices - RAM and Flash Cards

The Linux Memory Technology Device <http://www.linux-mtd.infradead.org/> project aims to provide a unified subsystem for handling RAM and Flash cards (Memory Technology Devices). It is intended to be compatible with the Linux PCMCIA code, to prevent duplication of code and effort, yet its main target is small embedded systems, so it will be possible to compile the drivers into the kernel for use as a root filesystem, and a close eye will be kept on the memory footprint.

9.4 Printers

Survey about small mobile printers:

1. CANON: BJC-80, for infrared connections to this printer see the links at my page about Linux and

     Infrared Devices <http://www.snafu.de/~wehe/ir_misc.html>

2. CANON: BJ-30

3. HP: DeskJet 340Cbi. This is a small, portable, low-duty-cycle printer. It prints either black, or color (3 color). I have had some problems with it loading paper. Overall, the small size and portability make it a nice unit for use with laptops. I use the HP 500/500C driver with Linux.

4. Olivetti: JP-90

AFAIK only the HP and the BJC-80 machine have an infrared port. Pay attention to the supplied voltage of the power supply if you plan to travel abroad. Source: http://www.lapshop.de <http://www.lapshop.de>

9.5 Power and Phone Plugs, Power Supply

When travelling abroad you might consider to take a set of different power and phone plugs with you. Also, it’s useful if you can change the input voltage of the power supply, for instance from 110V in the US to 220V in Germany. There also power supplies for 12V batteries from cars.

Some models of power plugs:

                ____
               / () \          ___
frontal view: |()  ()|        (_)=(_)            (_)           N.N.
               ------
abbrevation.:    C13             C8              ??            PS/2
symbol......:    ??              ??              -O)-          N.N.

Caveats: Though some -O)- plug may seem to be compatible to your laptop, because of the according physical size, take extremely care it uses the same plus-minus voltage scheme, for instance plus for the inner ring and minus for the outer one. Often but not always there are the according symbols near the plug.

9.6 Bags and Suitcases

You probably wonder, why I include this topic here. But shortly after using my COMPAQ Armada 1592DT I recognized that the rear side of the machine (where the ports are arranged) was slightly damaged. Though I have taken much care when transporting the laptop, this was caused by putting the bag on the floor. It seems that the laptop has so much weight, that it bounces inside the bag on its own rear side. So I decided to put a soft pad into the bag before loading the laptop. A good bag is highly recommended if you take your laptop on trips, or take it home every night.

Emerson, Tom # El Monte <TOMEMERSON@ms.globalpay.com> wrote: "I use for a laptop travelling bag: a Pyrex casserole carrier bag. Yup, you might think it odd to use a casserole bag for a laptop, but it turns out it has several advantages:

• The one I use has a microwavable heating pad in it – while I don’t actually heat this pad (it’s meant to keep food warm while in transport), it does provide padding underneath the laptop. The carrier I have only has a lower - heating - pad, but there is also a similar carrier that has both a lower - heating - pad and an upper - cooling - pad - placed in the freezer to get it cold - – the intent is that you keep one or the other in the bag to keep your food hot or cold as desired. A secondary advantage to the - cooling pad - pad is that if you’ve - chilled - it before taking the computer out for the day, it will keep the CPU cooler while you’re running the laptop...

• the top of the bag has a zipper on three sides, so it - opens - the same way as my laptop – I don’t even need to take it out of the carrier to use the laptop

• there is enough room at the side of the bag to store the external power supply, a regular Logitech mouseman, and the network - dongle - with BNC/TP ports - and if I had it, the modem/phone port as well -

• there is enough clearance on top of the machine to include a handful of CD’s or diskettes, if needed...

• when it’s left - unattended - in a car, it’s less likely to be stolen – think about it, if you were a thief walking through a parking lot and eyeing the contents of cars, a - laptop bag - is instantly recognizable as holding a laptop computer – something that can be fenced at a pretty hefty profit, but if you saw a casserole carrier in the front seat of a car, would you think it contained anything OTHER than a casserole? - and probably half-eaten, at that... - Unless you are a hungry thief, chances are you’ll skip this and move on...

• likewise, I’ve heard that keeping a laptop computer in a diaper bag is another good - camouflage - technique – who in their right mind is going to steal a bag of - dirty - diapers?"

10 Different Environments - On the Road

10.1 Related HOWTOs

1. Security-HOWTO

2. Multiboot-with-LILO-mini-HOWTO

3. Ethernet-HOWTO

4. NET-3-HOWTO

5. Offline-Mailing-mini-HOWTO

6. Plip-mini-HOWTO

7. Slip-PPP-Emulator-mini-HOWTO

10.2 Configuration Tools

10.2.1 NetEnv

Do you use your laptop in different network environments? At home? In the office? At a customers site?

If yes, the small package "netenv" might be useful for you. When booting your laptop it provides you with a simple interface from which you can choose the current network environment. The first time in a new environment, you can enter the basic data and save it for later reuse.

Netenv sets up a file containing variable assignments which describe the current environment. This can be used by the PCMCIA setup scheme, e.g. like the one that comes with Debian/GNU Linux and perhaps others.

The netenv data can be used for things like:

1. Network Device: Configure the network device for different environments.

2. Choose a proper XF86Config: Think of using your laptop standalone with touchpad vs. connected to a CRT monitor along with an external mouse. For example, a wheel mouse could be used when docked, but the driver is not compatible with the normal trackpoint or touchpad.

3. Windowmanager: You can set up your windowmanager according to the current location of your machine.

4. Printing Environment: The netenv data can easily be used to set up the printing environment.

Netenv is available as Debian/GNU Linux package as well as tarball. It depends on dialog(1) for the menu system. It is developed by Gerd Bavendiek bav@rw.sni.de you may get it at http://www.uni-

bielefeld.de/˜ portgym/net/netenv.html <http://www.uni-bielefeld.de/~portgym/net/netenv.html> .

10.2.2 divine

divine <http://www.fefe.de/divine/> is an utility for people who use their machines in different networks all the time. "The idea is this:

• you describe the possible networks in /etc/divine.conf, including one or more machines that are probably up (routers and NIS servers come to mind).

• at boot time, you run divine.

• divine starts a thread that injects fake arp requests into the network. The thread will try again up to three times, pausing 1 second between retries. If the last try times out again, the thread will print an error message, leave the interface in the original state and exit cleanly.

• the main thread just looks for arp replies and exits if one is found.

• You have one resolv.conf per network, for example /etc/resolv.conf.default and /etc/resolv. conf.work, and divine will symlink one of them to /etc/resolv.conf for you.

• You can specify a proxy server plus port and divine will write the proxy server to /etc/proxy. This can be evaluated inside your shell startup script, like this (zsh):

     export http_proxy="http://`</etc/proxy`/"

The included perl script edit-netscape-proxy.pl will edit the proxy settings in your Netscape 4 preferences file.

• You can even specify an additional script to be run for each selection. You can use this to edit /etc/printcap or /etc/issue or do something else I forgot.

The point about divine in contrast to other solutions is that other solutions normally use ping or something like that. divine can check a large number of networks instantaneously, assuming that the machines you ping answer within one second (.4 seconds are normal on Ethernets). And pinging an unknown address will do an arp request anyway, so why not do an arp request in the first place?" 10.2.3 Mobile IP

Mobile IP allows a portable computer access to the Internet from different networks without changing its IP address.

HUT Mobile IP <http://www.cs.hut.fi/Research/Dynamics/Dynamics> is a dynamical, hierarchical Mo-

bile IP system for Linux operating system. The implementation enables a hierarchical model for IP mobility, thus decreasing the location update times as a mobile host moves. Dynamics system has been deisgnet Wireless LAN technology in mind, and the system has optimized functionality for mobility in WLAN.

Resources

  1. Linux Mobile-IP <http://anchor.cs.binghamton.edu/~mobileip/>

2. Linux Mobile IP from HP Labs Bristol by Manuel Rodríguez <http://hplbwww.hpl.hp.com/people/

     jt/MobileIP/index.html>
  3. MosquitoNet Mobile IP <http://mosquitonet.Stanford.EDU/software/mip.html>
  4. Mobile IP at NUS <http://mip.ee.nus.sg/>
  5. Linux Mobile-IP <http://anchor.cs.binghamton.edu/~mobileip/>

6. Bay Area Research Wireless Access Network (BARWAN) <http://http.cs.berkeley.edu/~randy/

     Daedalus/BARWAN/>

Sources: Kenneth E. Harker and Dag Brattli

10.2.4 DHCP/BootP

DHCP and BootP are also useful for working in different environments. Please see the DHCP-HOWTO and BootP-HOWTO.

10.2.5 PPPD Options

The pppd command can be configured via several different files: pppd file /etc/ppp/<your_options> .

10.2.6 /etc/init.d

You may even choose to do your configuration by editing the /etc/init.d files manually.

10.2.7 PCMCIA - Schemes

How can I have separate PCMCIA device setups for home and work? This is fairly easy using PCMCIA scheme support. Use two configuration schemes, called home and work. For details please read the according chapter in the PCMCIA-HOWTO by David Hinds.

10.2.8 Bootloaders

LILO From http://www.mjedev.demon.co.uk/index.html <http://www.mjedev.demon.co.uk/index. html> <Martin J. Evans martin@mjedev.demon.co.uk> I have taken this recommendation: The first point to note is that init will take any arguments of the form name=value as environment variable assignments if they are not recognized as something else. This means you can set environment variables from the LILO boot prompt before your rc scripts run. I set the LOCATION environment variable depending on where I am when I boot Linux. e.g.

LILO: linux LOCATION=home

Or

LILO: linux LOCATION=work

Or simply

LILO: linux

where failing to set LOCATION means the same as LOCATION=home (i.e. my default). Instead of typing LOCATION=place each time you boot you can add an entry to your /etc/lilo.conf file and use the append instruction. e.g.

# Linux bootable partition for booting Linux at home
#
image = /vmlinuz
root = /dev/hda3
label = linux
read-only
# Linux bootable partition config ends
#
# Linux bootable partition for booting Linux at work
#
image = /vmlinuz
root = /dev/hda3
label = work
read-only
append="LOCATION=work"
# Linux bootable partition config ends

With the example above you can use "linux" for booting at home and "work" for booting at work.

Armed with the facility above, you can now edit the relevant rc scripts to test ENVIRONMENT before running ifconfig, setting up route etc.

Other Bootloaders There are several other bootloaders which are often overlooked. Besides LILO, have a look at loadlin, CHooseOS (CHOS) (not GPL), GRand Unified Bootloader (GRUB), System Commander and take a look at ftp://metalab.unc.edu/pub/Linux/system/boot/loaders/ <ftp://metalab.unc.edu/pub/ Linux/system/boot/loaders/>. The NT boot loader or OS/2 boot loader may even be used.

10.2.9 X-Windows

From Steve <steve@cygnet.co.uk> I got a configuration for X windows with an external monitor: Note that I have introduced a neat trick! For my nice 17" monitor I start X with no options and get the default 16-bit 1152x864 display - but when using the LCD screen I specify a 15-bit display (startx – -bpp 15) and get the correct 800x600 resolution automatically. This saves having to have two XConfig files.

10.2.10 E-Mail

A short introduction about how to setup email on a laptop used at home (dial-up) and work (ethernet) by Peter Englmaier <ppe@pa.uky.edu>:

Features As a laptop user, I have special demands for my email setup. The setup described below, enables me to:

• Read my email from home using a POP email server, which is supplied by my university, but could also be setup on a work place computer.

• Write email from home with the right return address in the email (which does not mention my computer name).

• Read/write my email while working on a workstation without access to my laptop or the POP email server (as a backup).

• Read my email while working on my laptop connected to the ethernet of our institut.

• Direct email while connected via ethernet (faster than the fetchmail method).

• Indirect email (over pop mail server) while not connected to the ethernet at work (either at home via modem or somewhere else via ethernet).

• Use any emailer, e.g. elm or the simple mail command.

• Sort incomming email, delete spam, split email-collections (digests) into seperate emails

The configuration is based on sendmail, fetchmail, and a remote pop account for email.

Configuration of sendmail This is the most complicated part. Having installed the sendmail-cf pack-

age, I created a file named /usr/lib/sendmail-cf/laptop.mc:
divert(-1)
include(`../m4/cf.m4')
define(`confDEF_USER_ID',''8:12'')
define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')
define(`confDOMAIN_NAME',''pa.uky.edu'')   <---- here you define your domain
OSTYPE(`linux')
undefine(`UUCP_RELAY')
undefine(`BITNET_RELAY')
define(`SMART_HOST',`server1.pa.uky.edu')  <---- there we send outgoing email
define(`LUSER_RELAY',`server1.pa.uky.edu') <---- there we send mail to users my laptop does not know
MASQUERADE_AS(pa.uky.edu)                  <---- again the domain, we want to be seen as
FEATURE(allmasquerade)

FEATURE(nouucp)
FEATURE(nodns)
FEATURE(nocanonify)
FEATURE(redirect)
FEATURE(always_add_domain)
FEATURE(use_cw_file)
FEATURE(local_procmail)
MAILER(procmail)
MAILER(smtp)
HACK(check_mail3,`hash -a@JUNK /etc/mail/deny')
HACK(use_ip,`/etc/mail/ip_allow')
HACK(use_names,`/etc/mail/name_allow')
HACK(use_relayto,`/etc/mail/relay_allow')
HACK(check_rcpt4)
HACK(check_relay3)

This looks more complicated as it is. All it does is, that it redirectes outbound mail to server1 (SMART_HOST) and also mail for local users which are not known (LUSER_RELAY). That way, I can write email to my colleques without using their full email address. More important: the From line in my email points back to my MASQUARADE_AS domain and not directly to my laptop. If this where not the case, email returned with the reply button might not reach me. You must restart sendmail for changes to take effect. Note: this configuration is for Redhat 5.2 systems. You may have to change some details.

Now, all what is needed is to generate the /etc/sendmail.cffile m4 laptop.mc >/etc/sendmail.cf and

to add all possible domain names my laptop should respond to in /etc/sendmail.cw:

# sendmail.cw - include all aliases for your machine here.
laptop
laptop.pa.uky.edu
128.17.18.30
guest1
guest1.somewhere.org

It is important to have all aliases in this file, otherwise sendmail will not accept the mail (and will reply we don’t relay to the sender). Finally, you must now test the setup by sending email, replying to mail for all possible configurations. Any missconfiguration can result in loss of email.

Configuration for fetchmail on Laptop One method to get the email into your machine is through fetchmail. Fetchmail periodically checks for new email at one or more remote mail servers. I use the following fetchmail configuration file (in my user home directory): fetchmailrc

set postmaster "myusername"
set daemon 900
poll pop.uky.edu with proto POP3
      user "mypopusername" there with password "mypoppassword" is mylaptopusername here

Fetchmail will just get the the email and send it to sendmail which will it deliver into your /var/spool/

mail/\$USER file.

Forward E-Mail to the Laptop On my work station I have the following .forward file:

me@pop.acount.edu,me@server1

Here server1 is the machine where I keep my mailbox. All email is send to the pop account to be picked up later by my laptop (using fetchmail). However, when my laptop is connected via ethernet, I want my email to go directly to the laptop, instead of pop:

me@laptop,me@server1

In both cases, a backup of my email is send to server1 (where I also can read it, in case I cannot get my laptop). I keep/store all email on the laptop.

Switching is done by three script files and a crontab file (on the workstation):

forward\_pop
#!/bin/sh
echo "me@pop.acount.edu,me@server1" > ${HOME}/.forward
forward\_laptop
#!/bin/sh
echo "ppe@laptop,ppe@server1" > ${HOME}/.forward
crontab ${HOME}/mycrontab
${HOME}/utl/check_laptop
check\_laptop
#!/bin/sh
if /usr/sbin/ping -c 1 laptop  >/dev/null 2>&1 ; then
   :
else
   # redirect mail to pop
   ${HOME}/utl/forward_pop
   sleep 10
   if /usr/sbin/ping -c 1 laptop  >/dev/null 2>&1 ; then
      # back to normal
      ${HOME}/utl/forward_laptop
   else
      # deactivate crontab check
      /bin/crontab -l | grep -v check_laptop >${HOME}/tmp/mycrontab.tmp
      /bin/crontab ${HOME}/tmp/mycrontab.tmp
      rm -f ${HOME}/tmp/mycrontab.tmp
   fi
fi
mycrontab
# mycrontab
0,10,20,30,40,50 * * * * ${HOME}/utl/check_laptop

Each time I connect the laptop to the ethernet, I have to run forward_laptop, and each time I disconnect I run forward_pop. In case I forget to run forward_pop, the crontab job runs it for me less then 10 minutes later. To do all that automatically, I change the network script files on my laptop as follows:

/sbin/ifdown (this script runs, whenever a network device is stopped, new stuff between BEGIN and END)

...
fi
# BEGIN new stuff
# turn off forwarding email
mail ppe <<EOF
turning off forwarding email
device = ${DEVICE}
hostname = `hostname`
EOF
if [ "${DEVICE}" = "eth0" -a "`hostname`"
= "laptop" ]; then
  su -lc "ssh -l myusername server1
utl/forward_pop" myusername >& /dev/null
fi
# END new stuff
ifconfig ${DEVICE} down
exec /etc/sysconfig/network-scripts/ifdown-post $CONFIG

Note, that the script checks for the value of hostname. In case, I am connected to a foreign ethernet, my hostname and ip-address will be something else, e.g. guest1.

/etc/sysconfig/network-scripts/ifup-post (this script is run, whenever a network device is started)

# Notify programs that have requested notification
do_netreport
# BEGIN new stuff
# check for email -- I'm using fetchmail for this
if [ "${DEVICE}" = "eth0" -o "${DEVICE}"
= "ppp0" ]; then
   su -lc fetchmail myusername >& /dev/null &
fi
# set clock if connected to ethernet, redirect email
if [ "${DEVICE}" = "eth0" -a dquot;`hostname`" = "zaphod" ]; then
   ( rdate -s server1 ; hwclock --systohc --utc ) >& /dev/null &
   # forward email
   su -lc "ssh -l myusername gradj utl/forward_laptop" myusername >& /dev/null &
fi
# END new stuff
exit 0

Processing Incomming E-Mail with procmail This step is completely optional. The above described sendmail configuration calls procmail for each received email, but you could have called procmail using the .forward file (see the procmail man page). Procmail is a handy tool to block spam and to sort incomming email.

You need to setup a .procmailrc file to use procmail. See the man page for procmail, procmailrc, and procmailex (examples). My setup demonstrates, how to ignore certain email messages and split emailcollections (digest) into pieces:

# -- mail filtering -- procmail is called by sendmail --
PATH=/bin:/usr/bin
MAILDIR=$HOME/Mail
LOGFILE=$MAILDIR/from
# keep in mind:
# use ":0:" when writing to a file
# use ":0"  when writing to a device, e.g. /dev/null, or send email
# - make first a backup of *all* incomming email (but ignore mail tagged below) -
:0 c:
*! Sissa-Repro
backup
# - keep only last 50 messages
:0 ic
| cd backup && rm -f dummy `ls -t msg.* | sed -e 1,50d`
# - delete email comming through the 'postdocs' email list, when
# it is not of any interest
:0
* From.*postdocs
* From.*Ernst Richter
/dev/null
:0
* From.*postdocs
* Subject.*card charge
/dev/null
# Split mailing list from the sissa preprint server into individual emails
# - this is quite complicated :(   I can flip through the list much
#   faster and ignore preprints which have uninteresting titles. Instead of
#   having to browse through the whole list, my mailer will just present a
#   list of papers.
# 1. split it in individual messages
:0
* From no-reply@xxx.lanl.gov
| formail +1 -de -A "Sissa-Repro: true" -s procmail
# 2. reformat messages a bit
# 2.1. extract 'Title:' from email-Body and add to email-header
as 'Subject:'
:0 b

* Sissa-Repro
*! Subject
TITLE=| formail -xTitle:
:0 a
|formail -A "Subject: $TITLE " -s procmail
# 2.2. store in my incomming sissa-email folder. Here, we could
#      also reject (and thereafter delete) uninteresting 'Subjects'
#      we could also mark more interesting subjects as urgend or send a copy
#      to regular mail box.
:0:
* Sissa-Repro
* Subject
*! replaced with
sissa

BTW, there is a tk GUI tool to configure procmail (I think it is called dotfiles).

10.2.11 More Info

Using a Laptop in Different Environments <http://www.ssc.com/lg/issue20/laptop.html> by Gerd

Bavendiek . This article appeared in the August, 1997 issue of the Linux Gazette <http://www.ssc.com/ lg/>. This is an excellent, short technical article describing an easy way to setup your Linux notebook to boot into different network and printing configurations, especially useful for those who use their machines at home as well as other locations such as in the office, at school, or at a customer site.

10.3 Data Transport Between Different Machines

I don’t have experience with this topic yet. So just a survey about some means of data transport and maintaining data consistency between different machines.

10.3.1 Hardware

1. external harddisks

2. ZIP drive

Wade Hampton wrote: "You may use MS-DOS formatted ZIP and floppy discs for data transfer. You may be able to also use LS120. If you have SCSI, you could use JAZ, MO or possibly DVD-RAM (any SCSI disc that you could write to). I have the internal ZIP for my Toshiba 700CT. It works great (I use automount to mount it). I use VFAT on the ZIP disks so I can move them to Windows boxes, Linux boxes, NT, give them to coworkers, etc. One problem, I must SHUTDOWN to swap the internal CD with the ZIP."

10.3.2 Software

Source Code Control System (SCCS) Currently I had no time to check a SCCS system, such as RCS or CVS for this purpose.

CODA Filesystem The Coda File System is a descendant of the Andrew File System. Like AFS, Coda offers location-transparent access to a shared Unix file name-space that is mapped on to a collection of dedicated file servers. But Coda represents a substantial improvement over AFS because it offers considerably higher availability in the face of server and network failures. The improvement in availability is achieved using the complementary techniques of server replication and disconnected operation. Disconnected operation proven especially valuable in supporting portable computers http://www.coda.cs.cmu.edu/ <http://www.

coda.cs.cmu.edu/> .

WWWsync This is a program written in Perl that will update your web pages by ftp from your local pages. This was originally written for updating Demon home-pages, but will work with other providers which provide direct FTP access to your web pages. I didn’t check this for laptop purposes yet. You may get the program at http://www.alfie.demon.co.uk/wwwsync/ <http://www.alfie.demon.co.uk/wwwsync/> .

rsync rsync is a program that allows files to be copied to and from remote machines in much the same way as rcp. It has many more options than rcp, and uses the rsync remote-update protocol to greatly speedup file transfers when the destination file already exists. The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link.

10.4 Security in Different Environments

10.4.1 Introduction

I am not a computer security expert. Please read the Security-HOWTO for more information. I just collected some information below. Note, these means are just small steps to additional security, though I recommend that you use them.

LASG Please read Linux Administrator’s Security Guide (LASG) - FAQ <https://www.seifried.org/ lasg/> by Kurt Seifried.

10.4.2 Means of Security

1. International Kernel Patch: The idea of the International Kernel Patch <http://apps.freshmeat. net/homepage/924151776/> is to collect all crypto patches so that using crypto in the kernel will be easier than today. The patch includes a number of crypto patches including a crypto API including Blowfish, CAST-128, DES, DFC, IDEA, MARS, RC6, Rijndael, Safer, Serpent, and Twofish, an encrypted filesystem loopback device using the crypto API, CIPE VPN and EnSKIP patches.

2. Kennsington Lock: AFAIK proprietary lock solution with different laptops

     http://www.kennsington.com <http://www.kennsington.com>

3. SmartCards: by DESKO http://www.desko.de <http://www.desko.de> are not available for Linux yet. The only available laptop with a SmartCard builtin is the Siemens Scenic Mobile 800.

4. User passwords: can be easily bypassed if the intruder gets physical access to your machine

5. BIOS passwords: are also easily crackable, though sometimes harder than with desktops

6. Name plates: to reduce the possibility of theft, you may want to have a nameplate made and affixed to the cover of the laptop. A nice one will cost you about $12, and can be made by any good trophy shop. They’ll glue it on for you too. You could use double-sided tape instead, but glue is more permanent. You may even make an engravement into the laptop cover.

7. Boot loader: a boot loader may be used to put your name and phone number (or whatever text you choose) into the boot sequence before the operating system is loaded. This provides a label that can’t be removed by editing files or even doing a simple format of the harddisk.

8. Antivirus policy: I have seen an antivir RPM somewhere. Check the BIOS for an option to disable writing at the boot sector.

9. Database of stolen laptops: I have provided a survey of databases for stolen laptops <http://www.

     snafu.de/~wehe/stolen_laptops.html>.

10. Laptop as a security risk itself: Since a laptop can easily be used to intrude a network, it seems a good policy to ask the system administrator for permission before connecting a laptop to a network.

11. Secure Protocol: When connecting to a remote server always use a secure protocol.

10.5 Dealing with Down Times (Cron Jobs)

A cron-like program that doesn’t go by time: anacron (like "anac(h)ronistic") is a periodic command scheduler. It executes commands at intervals specified in days. Unlike cron, it does not assume that the system is running continuously. It can therefore be used to control the execution of daily, weekly and monthly jobs (or anything with a period of n days), on systems that don’t run 24 hours a day. When installed and configured properly, anacron will make sure that the commands are run at the specified intervals as closely as machine-uptime permits.

hc-cron This program is a modified version of Paul Vixie’s <paul@vixie.com> widely used cron daemon. Like the original program it runs specified jobs at periodic intervals. However, the original crond relies on the computer running continuously, otherwise jobs will be missed. This problem is addressed by hc-cron, that is indended for use on home-computers that are typically turned off several times a day; hc-cron will remember the time when it was shut down and catch up jobs that have occurred during down time when it is started again. Felix Braun <fbraun@atdot.org> is the author of the programm, it is available at http://metalab.unc.edu /pub/Linux/system/daemons/cron <http://metalab.unc.edu/pub/Linux/

system/daemons/cron> .

10.6 Noise Reduction

Due to the proliferation of cellular phones and walkmans it’s not quite common in our days to take care of a quiet environment. Anyway I want to give some recommendations for the polite ones.

You may configure vi with the flash option, so it will use a flash in case of an error, instead of a bell.

When starting your laptop with PCMCIA-CS configured correctly, this will be shown by two high beeps. If you want to avoid this put CARDMGR_OPTS="-q" into the PCMCIA configuration file, e.g. /etc/pcmcia.conf for Debian/GNU Linux.

For at least one laptop series, the Toshiba models, there seems to be a Linux package available to control the fan and other features.

11 Other Resources

Kenneth E. Harker maintains a quite valuable database at http://www.cs.utexas.edu/users/kharker/linux-

laptop/ <http://www.cs.utexas.edu/users/kharker/linux-laptop/> . Please have a look at his site to

get current information about laptop related mailing lists, newsgroups, magazines and newsletters, WWW sites and a big database about many different laptop pages.

To join the Linux-Laptop-Mailing-List write a mail to <majordomo@vger.rutgers.edu> with subscribe linux-laptop in the subject. You will get a confirmation message than, which you have to reply accordingly.

There is now a debian-laptop mailing list. Any questions or discussions concerning running the Debian/GNU Linux operating system(s) on laptops are welcome. Send mail to <debian-laptop-request@lists.debian.org> with a subject of subscribe. Or visit thehttp://www.debian.org <http://www.debian.org> site and use the online form.

Also recently founded was Running Linux on IBM ThinkPads, to join send an email to

linux-thinkpad-subscribe@topica.com, to post send mail to linux-thinkpad@topica.com . See
http://www.topica.com/lists/linux-thinkpad/ <http://www.topica.com/lists/linux-thinkpad/>.

Lionel, "trollhunter" Bouchpan-Lerust-Juery, <trollhunter@linuxfr.org> has written a similar HOWTO, please look at his laptop pages http://infonomade.linuxfr.org/index.html <http://infonomade.linuxfr. org/index.html> (French version) http://infonomade.linuxfr.org/indexen.html <http://infonomade.

linuxfr.org/indexen.html> (English version).

Newsgroups are comp.os.linux.portable, comp.sys.laptops .

12 Repairing the Hardware

There are several different reasons that could make it necessary to open the case of a laptop.

1. repairing broken hardware

2. get some hardware info, which isn’t available otherwise

3. remove the speakers (speakerrektomie, as described in Visual-Bell-mini-HOWTO)

4. install overdrive for CPU

5. change BIOS battery

6. upgrade harddisk

7. upgrade memory

Repairing a laptop can be quite expensive if you don’t have a manufacturer’s warranty. Sometimes professional support is bad. But opening a laptop case can be difficult. Often the procedures to upgrade the memory and the harddisk are described in the manual. For further details, you should try to get the maintainance/technical manual. Just be extremely careful and make notes as to where each screw goes. You must get most of them back in the right hole or you could ruin the machine by damaging the system board. Also after you get all the screws to an assembly out (some will be hidden) the parts are usually held together with plastic clips molded in, so you still must exercise care to separate them. Sometimes you need certain tools, for instance TORX screw drivers or a solder kit. Good luck.

WARNING: Usually laptop manufacturers declare the warranty to be void if the case was opened by people other than their own staff.

13 Solutions with Laptops

13.1 Introduction

The power and capabilities of laptops are sometimes limited as described above. But in turn, they have a feature which desktops don’t have, their mobility. I try to give a survey about applications which make sense in connection with laptops. Since I couldn’t try all of them, there is currently little documentation. If you can provide further material, please contact me.

13.2 Mobile Network Analyzer

I’m not an expert in this field, so I just mention the tools I know. Please check also for other applications. Besides the usual tools tcpdump, netcat, there are two applications I prefer, which may be used to analyze network traffic:

The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network-links. MRTG generates HTML pages containing GIF images which provide a LIVE visual representation of this traffic. Check http://www.ee.ethz.ch/stats/mrtg/ <http://www.ee.ethz.ch/stats/mrtg/> for an example. MRTG is based on Perl and C and works under UNIX and Windows NT.

Network Top - ntop http://www-serra.unipi.it/˜ ntop/ <http://www-serra.unipi.it/~ntop/> is a Unix tool that shows the network usage, similar to what the popular top Unix command does. ntop is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform and on Win32 as well. ntop can be used in both interactive or web mode. In the first case, ntop displays the network status on the user’s terminal. In web mode a web browser (e.g. netscape) can attach to ntop (that acts as a web server) and get a dump of the network status. In the latter case, ntop can be seen as a simple RMON-like agent with an embedded web interface.

13.3 Mobile Router

Though designed to work from a single floppy, the Linux Router Project (LRP) , seems useful in combination with a laptop, too.

13.4 Hacking and Cracking Networks

When thinking about the powers of laptops, hacking and cracking networks may come into mind. Though I don’t want to handle this topic here, but instead recommend the Security-HOWTO.

13.5 Lectures

If you are giving lectures, readings or presentations in different places, a laptop might suit your needs. You can combine it with an overhead display, a beamer or a second monitor. For a second monitor or a beamer make sure it is supported by your laptop.

BTW though Microsoft’s PowerPoint is often used for such things, there are also Linux solutions. See the software maps at KDE (K-Office) http://www.kde.org <http://www.kde.org> and GNOME http://www.gnome.org/ <http://www.gnome.org/> . Or the commercial packages Applixware http://www.applix.com/appware/linux/slideshow/gfx011.html <http://www.applix.

com/appware/linux/slideshow/gfx011.html> and Staroffice, see article 15 in LinuxFocus

http://vesta.astro.amu.edu.pl/Library/Linux/LinFocus/May1998/ <http://vesta.astro.amu.edu.pl/ Library/Linux/LinFocus/May1998/>. MagicPoint or mgp, is an X11-based presentation tool. The home page is http://www.Mew.org/mgp <http://www.Mew.org/mgp> or ftp://ftp.Mew.org/pub/MagicPoint/

<ftp://ftp.Mw.org/pub/MagicPoint/> or http://jiji.mew.org/mgp/ <http://jiji.mew.org/mgp/> .

13.6 Mobile Data Collecting

13.6.1 Related HOWTOs

1. Coffee-mini-HOWTO

2. AX-25-HOWTO

3. HAM-HOWTO

4. Serial-HOWTO

5. Serial-Programming-HOWTO

13.6.2 Applications

A Linux laptop can be used to collect data outside an office, e.g. geodesy data, sales data, network checks, patient data in a hospital and others. There is support for wireless data connections via cellular phone modems and amateur radio. I am not sure whether PCMCIA radio cards are supported, see Aironet Wireless Communications http://www.aironet.com/ <http://www.aironet.com/>.

13.6.3 Specific Environments

There are laptops available with cases build for a rugged environment (even waterproof laptops). In some environments, for instance in hospitals, take care of the Electro-Magnetic-Endurability (I’m not sure wether this is the right word for the german abbrevation EMV) of the laptop. This is influenced by many factors, for instance by the material used to build the case. Usually magnesium cases shield better than the ones made of plastics.

13.7 Mobile Office

With KDE http://www.kde.org <http://www.kde.org> (K-Office), GNOME, http://www.gnome.org/ <http://www.gnome.org/> and the commercial products WordPerfect, Staroffice and Applixware http://www.applix.com/ <http://www.applix.com/> Linux has more and more business software applications. With the corresponding hardware, e.g. a portable printer and a cellular phone which connects to your laptop, you will have a very nice mobile office.

13.8 Connection to Digital Camera

AFAIK there are currently three methods to connect a digital camera to a laptop: the infrared port (IrDA), serial port and maybe USB. There are also some auxiliary programs for conversion of pictures, etc.

OpenDiS (Open Digita Support) <http://digitalux.netpedia.net/> is a library and utility program for cameras such as the Kodak DC-220, DC-260, DC-265, and DC-280, that run Flashpoint’s Digita operating system. The library is a unix implementation of the Digita Host Interface Specification, intended for embedding Digita support in other products such as gPhoto. The utility is a simple command-line program for standalone downloading of photos from the cameras.

gPhoto <http://www.gphoto.org/> enables you to take a photo from any digital camera, load it onto your PC running a free operating system like GNU/Linux, print it, email it, put it on your web site, save it on your storage media in popular graphics formats or just view it on your monitor. gPhoto sports a new HTML engine that allows the creation of gallery themes (HTML templates with special tags) making publishing images to the world wide web a snap. A directory browse mode is implemented making it easy to create an HTML gallery from images already on your computer. Support for the Canon PowerShot A50, Kodak DC-240/280 USB, and Mustek MDC-800 digital cameras.

13.9 Connection to QuickCam (Video)

AFAIK there are currently two methods to connect a video camera to a laptop: a ZV port and maybe USB, but I don’t know how this works with Linux. I have heard rumors about using a sound card for video data transfer to a Linux box, see http://worldvisions.ca/˜ apenwarr/ <http://worldvisions.ca/~apenwarr/> . I have heard rumors about a Linux-QuickCam-mini-HOWTO, but couldn’t find a reliable URL yet. Check the sane package which is build for scanner support, this should contain support for still-grabbers as well.

kmc_remote <http://rainbow.uchicago.edu/~muet/linux/kmc/kmc_utils.html> provides a graphical

interface for controlling Kodak Motion Corder fast digital cameras over a serial connection. kmc_remote is built on the kmc_serial library, part of the kmc_utils package. kmc_remote provides a virtual button panel and simple one-touch commands for changing system variables which would involve multiple button operations on the real camera button console. Buttons, record settings (image size, record rate, shutter speed, trigger mode, burst mode), and playback rate control should be fully functional. All camera models are supported, as well as both PAL and NTSC video.

Intel PC Camera Pro Pack <http://www.intel.com/PCcamera/> is one of the first webcams with USB ports. Also SONY has announced a webcam with USB port. See a survey at Steve’s Digicams <http:

//www.steves-digicams.com/text_navigator.html>.

13.10 Connection to Television Set

If you have a ZV port in the laptop, it should be easy to connect it to a TV set, using either NSCA or PAL, but I don’t know whether either works with Linux.

13.11 Connection to Cellular Phone

AFAIK there are two methods to connect a cellular phone to a laptop: via the infrared port (IrDA) or via the serial port. See the Linux/IrDA project for the current status of IrDA connections. AFAIK only the Ericsson SH888, the Nokia 8110 provide infrared support.

13.12 Connection to Global Positioning System (GPS)

From the Hardware-HOWTO I know there is Trimble Mobile GPS available. You may also connect a GPS via a serial port. Most GPS receivers have a data port and can connect to a PC with a special serial cable.

13.13 Connection via Amateur Radio (HAM)

AFAIK laptops are used in HAM contests. Please see HAM-HOWTO.

13.14 Satellite Watching

Together with an antenna and software like seesat or sattrack you can use a laptop to locate a satellite for visual observation. You could also use xephem on a laptop when stargazing.

13.15 Aviation

Many people are using laptops for aviation related topics. The Aviation HOWTO <http://metalab.unc. edu/fplan/Aviation-HOWTO/> is an FAQ, HOWTO like document that provides pointers to software packages that run under the Linux operating system and are useful to private, commercial, or military pilots. The ultimate goal is to enable pilots to use the Linux operating system for all their aviation related computing needs.

13.16 Blind or Visually Impaired Users

There are some groups of which could gain a specific profit by using laptops. For instance blind or visually impaired people (I explicitly avoid to say handicapped people). See ACCESS-HOWTO and Blinux - Linux for blind people <http://leb.net/blinux/> for more information. BRLTTY is a program which support different braille terminals. Festival a speech synthesis system screen and cursor magnifiers available.

14 Other Operating Systems

14.1 DOS/Windows9x/NT

14.1.1 Introduction

Unfortunately, there are a few reasons which might make it necessary to put DOS/Windows and Linux together on one laptop. Often the support for the flash ROM of PCMCIA cards and modems is not available for Linux, or you have to retrieve hardware information, which is not visible with Linux, due to a lack of support by some hardware manufacturers. I’m not sure wether this tasks can be achieved under an emulation like DOS-EMU or WINE.

If you want Linux with X, Netscape, etc., and Windows95, things will be tight in a 1GB harddisk. Though I do so with a 810MB disk.

14.1.2 DOS Tools to Repartition a Hard Disk

Often you get a preinstalled version of Windows on your laptop. If you just want to shrink the Windows partition, you need a tool to resize the partition. Or you can remove the partition first, repartition, then reinstall. Most of the following information I found at the page of Michael Egan <Michael.Egan@sonoma.edu> at http://libweb.sonoma.edu/mike/fujitsu/ <http://libweb.sonoma.edu/mike/fujitsu/> .

A well known and reliable, but commercial product is Partition Magic http://www.powerquest.com/product/pm/index.html <http://www.powerquest.com/product/pm/index. html> from Power Quest.

Many  people  have  used  FIPS  15c  (which  may  support  FAT-32)

http://bmrc.berkeley.edu/people/chaffee/fips/fips.html <http://bmrc.berkeley.edu/people/chaffee/ fips/fips.html> for repartitioning FAT partition sizes.) Also, another version from a different source is FIPS 2.0 (claims to support FAT-32) http://www.igd.fhg.de/˜ aschaefe/fips/

<http://www.igd.fhg.de/~aschaefe/fips/> for repartitioning FAT partition sizes.)

One more "newer" utility for repartitioning and resizing FAT partitions is Ranish Partition Manager/Utility (FAT-32 support is claimed for this as well, Linux support is taken into account.)

http://www.users.intercom.com/˜ ranish/part/ <http://www.users.intercom.com/~ranish/part/> .

14.1.3 Partition Sharing

You may share your swap space between Linux and Windows. Please see "Dealing with Limited Resources" section. Also with Linux you can mount any kind of DOS/Windows partition. The other way round there are also some tools, for instance at http://uranus.it.swin.edu.au/˜ jn/linux/ <http://uranus.it.swin.edu. au/~jn/linux/> , which provides a tool to read and write ext2 partitions from Windows9x/NT.

Also you can mount DOS drives of the type msdos, vfat and even compressed drives (Drivespace, etc.). For long file names use vfat and if you like autoconversion ( a nice feature for text files), you may do so by using the conv=auto option. I have used this in my /etc/fstab, but be aware this might cause some strange behaviour sometimes, look at the kernel docs for further details.

/dev/hda8    /dos/d    vfat    user,exec,nosuid,nodev,conv=auto    0    2

14.2 BSD Unix

1. PicoBSD is a one floppy version of FreeBSD 3.0-current, which in its different variations allows you to have secure dialup access, small diskless router or even a dial-in server. And all this on only one standard 1.44MB floppy. It runs on a minimum 386SX CPU with 8MB of RAM (no HDD required!). You probably may also use it to install BSD on a laptop as described with micro Linuxes above. You get PicoBSD at http://www.freebsd.org/˜ picobsd/ <http://www.freebsd.org/~picobsd/>

2. PAO: FreeBSD Mobile Computing Package <http://www.jp.FreeBSD.org/PAO/> FreeBSD is a version of the UNIX operating system that runs on PC hardware. It uses a different set of support for PCMCIA devices, APM, and other mobility related issues.

3. The CMU Monarch Project <http://www.monarch.cs.cmu.edu/> Implementations of Mobile-IPv4 and Mobile-IPv6 for FreeBSD

  4. XF86Config Archive <http://www.yy.cs.keio.ac.jp/~sanpei/note-list.html>. A database of

XF86Config files used by Linux and FreeBSD users. If you need an XF86Config file for your notebook or laptop, check out this site. (Some documents available in Japanese only.)

5. AFAIK there is no IrDA support yet.

14.3 OS/2

At The Notebook/2 Site <http://o2ss.com/users/DrMartinus/> by Dr. Martinus you may find information about different notebooks and PCMCIA cards working with OS/2.

14.4 NOVELL Netware

The client side with DOS/Windows9x style operating systems seems to be no problem, since there are many PCMCIA cards with drivers for Netware available. For Linux connections see the mars_nwe package. Also the Caldera Linux distribtion is well known for its Novell support.

I hadn’t time to build a Netware server on a laptop yet and couldn’t check wether there are network connections possible (PCMCIA driver for Netware server).

15 ToDo

1. mention the corresponding kernel options in the Linux Compatibility Check sections

2. write more Hardware sections

16 Revision History

v0.1 13 January 1999, first draft

v0.2 15 January 1999, minor changes

v0.3 28 January 1999, APM chapter started, minor changes

v0.4 8 February, APM chapter rewritten, removed some lint

v0.5 17 February 1999, added small USB chapter, added Dealing with Limited Resources chapter, added Solutions with Laptops chapter, minor editorial changes, released draft to the public

v1.0 19 February 1999, added Sound and Keyboard chapter, minor changes, release to the LDP

v1.1 28 February 1999, spelling, grammar, style checked and many additional information added by W. Wade Hampton, added CD Drive, Harddisk and Kernel chapters, many minor changes

v1.2 5 March 1999, added Debian-Laptop-Mailing-List, added information about apmcd and suspendd to APM chapter, changed some URLs, minor changes

v1.3 8 March 1999, minor changes

v1.4 25 March 1999, added ACPI information, added chapters Appendix C - NeoMagic Chip NM20xx by Cedric Adjih and Appendix D - Annotated Bibliography , minor changes

v1.5 4 April 1999, added chapters about setting up E-Mail by Peter Englmaier and Noise Reduction, minor changes

v1.6 26 June 1999, rewrite of APM chapter, added install method via LapLink cable, URLs changed or added, spell checking, minor changes

v1.7 28 September 1999, changed <htmlurl ..> SGML tags to <url ..>, ACPI chapter separated, touchpad chapter separated and improved, preface rewritten, added information about divine, noflushd and parted, new chapter Linux Tools to Repartition a Hard Disk, added appendix E about specific laptops, some URLs updated, minor changes

v2.0 2 October 1999, added information about gphoto, kmc_utils, Memory Technology Devices and HUT Mobile IP; changed structur of document (moved chapters Accessories, Laptop Distribution and chapter about partitioning), new DVD chapter, started Aviation chapter, started OS/2 chapter, started Blind and Visually Impaired Users chapter, changed entity &tilde; in URLs to ˜ to improve SGML-Tools PS output (otherwise ˜ is missing), link to new Lucent WinModem driver, minor additions and changes

17 Credits

I would like to thank the many people who assisted with corrections and suggestions. Their contributions have made this work far better than I could ever have done alone. Especially I would like to thank:

• First of all Kenneth E. Harker kharker@cs.utexas.edu, from his page at http://www.cs.utexas.edu/users/kharker/linux-laptop/ <http://www.cs.utexas.edu/users/ kharker/linux-laptop/> I have included much material into this HOWTO, but didn’t always quote him verbatim.

• The other HOWTO authors.

• The members of the Linux/IrDA Project.

• The members of the Linux Laptop Mailing List.

• The visitors and contributors of my Linux Laptop Pages.

• David Hinds maintainer of the PCMCIA-CS package.

• Frank Schneider SPATZ1@T-ONLINE.DE

• Stefan Martig martig@iamexwi.unibe.ch

• Michele Andreoli maintainer of muLinux

• Klaus Franken kfr@klaus.franken.de

• W. Wade, Hampton whampton@staffnet.com, did much of spell, grammar and style checking and added many valuable information

• Anderson MacKay mackay@rice.edu, gave many different detailed recommendations

• Shaleh shaleh@livenet.net

• Bob Toxen spre@lugs.ch

• Peter Sprenger spre@lugs.ch

• Felix Braun fbraun@atdot.org

• Steve Rader rader@wiscnet.net

• Richard Worwood richard@felch01.demon.co.uk

• Marcel Ovidiu Vlad marceluc@leland.Stanford.EDU

• Ludger Berse lberse01@cityweb.de

• Cedric Adjih cedric.adjih@inria.fr, wrote the chapter about the NeoMagic Chipset

• Peter Englmaier ppe@pa.uky.edu, provided the chapter about a sophisticated email setup

• Michael Wiedmann mw@miwie.in-berlin.de, found many spelling errors and more

• Adam Spiers adam@thelonious.new.ox.ac.uk

• Lionel, "trollhunter" Bouchpan-Lerust-Juery, trollhunter@linuxfr.org, for providing the French translation

• Nathan Myers ncm@cantrip.org, from LL - LinuxLaptops <http://www.linuxlaptops.com> for numerous additions

• Ben Attias hfspc002@csun.edu

• Igor Pesando ipesando@to.infn.it

• Geert Van der Plas Geert.VanderPlas@esat.kuleuven.ac.be, provided information about the touchpad driver included in the GPM • Chandran Shukla chandran@xmission.com

• Harald Milz hm@suse.de

• Ingo Dietzel ingo.dietzel@berlin.snafu.de, for his patience with the project

• Emerson, Tom # El Monte <TOMEMERSON@ms.globalpay.com>, for his idea about laptop bags

• Sorry, but probably I have forgotten to mention everybody who helped.

18 Appendix A - Survey about Micro Linuxes

Because of their small or non-existent footprint, micro-Linuxes are especially suited to run on laptops – particularly if you use a company-provided laptop running Windows9x/NT. Or for installation purposes using another non Linux machine. There are several micro Linux distributions out there that boot from one or two floppies and run off a ramdisk.

See http://www.linuxhq.com <http://www.linuxhq.com> or http://www.txdirect.net/users/mdfranz/tinux.html

<http://www.txdirect.net/users/mdfranz/tinux.html> for details.  You may find a FAQ

and a mailing list about boot-floppies at http://os.inf.tu-dresden.de/˜ sr1/boot-floppies/faq.html

<http://os.inf.tu-dresden.de/~sr1/boot-floppies/faq.html>.  Also a BootDisk-HOWTO

is available. Thanks to Matthew D. Franz maintainer of Trinux for this tips and collecting most of the following URLs. See also the content of Console/Mini Distributions at FreshMeat

<http://ma.us.mirrors.freshmeat.net/appindex/console/mini-distributions.html>.
  1. MuLinux <http://mulinux.firenze.linux.it/> by Michele Andreoli

2. tomsrtbt http://www.toms.net/˜ toehser/rb/ <http://www.toms.net/~toehser/rb/> "The most Linux on one floppy. (distribution or panic disk)." by Tom Oehser

3. Trinux http://www.trinux.org <http://www.trinux.org> "A Linux Security Toolkit" by Matthew D. Franz

4. LRP "Linux Router Project" http://www.psychosis.com/linux-router/ <http://www.psychosis.com/

     linux-router/>

5. hal91 http://home.sol.no/˜ okolaas/hal91.html <http://home.sol.no/~okolaas/hal91.html>

6. floppyfw http://www.zelow.no/floppyfw/ <http://www.zelow.no/floppyfw/> by Thomas Lundquist

7. minilinux http://alberti.crs4.it/softw are/mini-linux/ <http://alberti.crs4.it/software/ mini-linux/> (seems no more valid) or http://www.kiarchive.ru/pub/linux/mini-linux/

     <http://www.kiarchive.ru/pub/linux/mini-linux/>

8. monkey http://www.spsselib.hiedu.cz/monkey/docs/english.htm <http://www.spsselib.hiedu.cz/

     monkey/docs/english.htm>

9. DLX http://www.wu-wien.ac.at/usr/h93/h9301726/dlx.html <http://www.wu-wien.ac.at/usr/h93/

     h9301726/dlx.html> by Erich Boem

10. C-RAMDISK http://metalab.unc.edu/pub/Linux/kernel/images/ <http://metalab.unc.edu/pub/

     Linux/kernel/images/>

11. BABEL http://celsius-software.hypermart.net/babel/ <http://celsius-software.hypermart.net/ babel/> "A mini-distribution to run games" 12. Xdenu http://xdenu.tcm.hut.fi/ <http://xdenu.tcm.hut.fi/> , quotating Alan Cox: "Xdenu is a

small distribution program that installs as a set of DOS zips onto a DOS partition and gives you a complete X11 client workstation."

13. LOAF http://www.ecks.org/loaf/ <http://www.ecks.org/loaf/>

14. pocket-linux http://pocket-linux.coven.vmh.net/ <http://pocket-linux.coven.vmh.net/>

15. FLUF http://www.upce.cz/˜ kolo/fluf.htm <http://www.upce.cz/~kolo/fluf.htm>

16. YARD http://www.croftj.net/˜ fawcett/yard/ <http://www.croftj.net/~fawcett/yard/>

17. TLinux http://members.xoom.com/ror4/tlinux/ <http://members.xoom.com/ror4/tlinux/>

18. ODL http://linux.apostols.org/guru/wen/ <http://linux.apostols.org/guru/wen/>

19. SmallLinux by Steven Gibson http://smalllinux.netpedia.net/ <http://smalllinux.netpedia.net/> Three disk micro-distribution of Linux and utilities. Based on kernel 1.2.11. Root disk is ext2 format and has fdisk and mkfs.ext2 so that a harddisk install can be done. Useful to boot up on old machines with less than 4MB of RAM.

20. cLIeNUX by Rick Hohensee client-use-oriented Linux distribution ftp://ftp.blueznet.com /pub/colorg

   <ftp://ftp.blueznet.com/pub/colorg>

21. linux-lite by Paul Gortmaker for very small systems with less than 2MB RAM and 10MB harddisk space (1.x.x kernel) http://metalab.unc.edu/pub/Linux/kernel <http://metalab.unc.edu/pub/

   Linux/kernel>

22. See  also  the  packages  at  MetaLab  formerly  known  as  SunSite

http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html <http://metalab.unc.edu/

   pub/Linux/system/recovery/!INDEX.html> and the Boot-Disk-HOWTO

23. You may also consider some of the boot floppies provided by various distributions falling into this category, e.g. the boot/rescue floppy of Debian/GNU Linux.

24. If you like to build your own flavour of a boot floppy you may do so manually, as described in the BootDisk-HOWTO or using some helper tools, for instance mkrboot (provided at least as a Debian/GNU Linux package) or pcinitrd, which is part of the PCMCIA-CS package by David Hinds.

25. Also you might try to build your Linux system on a ZIP drive. This is described in the ZIP-Install-mini-HOWTO.

19 Appendix B - Dealing with Limited Resources or Tuning the System

19.1 Related HOWTOs

1. LBX-HOWTO

2. Small-Memory-HOWTO

19.2 Introduction

As mentioned in the introduction laptops sometimes have less resources if you compare them to desktops. To deal with limited space, memory, CPU speed and battery power, I have written this chapter.

19.3 Small Space

19.3.1 Introduction

There are different types of techniques to gain more disk space, such as sharing of space, freeing unused or redundant space, filesystem tuning and compression. Note: some of these techniques use memory instead of space. As you will see, there are many small steps necessary to free some space.

19.3.2 Techniques

1. Stripping: Though many distributions come with stripped binaries today it is useful to check this. For details see man strip. To find every unstripped file you can use the file command or more convenient the tool findstrip. Attention: don’t strip libraries, sometimes the wrong symbols are removed due to a bad programming technique. Or use the –strip-unneeded option.

2. Perforation: zum(1)reads a file list on stdin and attempts to perforate these files. Perforation means, that series of null bytes are replaced by lseek, thus giving the file system a chance of not allocating real disk space for those bytes. Example: find . -type f | xargs zum

3. Remove Odd Files and Duplicates: Check your system for core files, emacs recovery files <#FILE#> vi recovery files <FILE>.swp, RPM recovery files <FILE>.rpmorig and patch recovery files. Find duplicates, you may try finddup. Choose a system to name your backup, temporary and test files, e.g. with a signature at the end.

4. Clean Temporary Files: , e.g. /tmp, there is even a tool tmpwatch.

5. Shorten the Log Files: usually the files in /var/log.

6. Remove Files: Remove files which are not "necessary" under all circumstances such as man pages, documentation /usr/doc and sources e.g. /usr/src .

7. Unnecessary Libraries: You may use the binstats package to find unused libraries (Thanks to Tom Ed White).

8. Filesystem: Choose a filesystem which treats disk space economically e.g. rsfs. Tune your filesystem e.g. tune2fs. Choose an appropriate partition and block size.

9. Reduce Kernel Size: Either by using only the necessary kernel features and/or making a compressed kernel image bzImage.

10. Compression: I didn’t check this but AFAIK you may compress your filesystem with gzip and decompress it on the fly. Alternatively you may choose to compress only certain files. You can even execute compressed files with zexec

11. Compressed Filesystems: - For e2fs filesystems there is a compression version available e2compr , see

http://debs.fuller.edu/e2compr/ <http://debs.fuller.edu/e2compr/> .

- DMSDOS which enables your machine to access Windows95 compressed drives (drivespace, doublestacker). If you don’t need DOS/Windows95 compatibility, i.e. if you want to compress Linux-only data, this is really discouraged by the author of the program. See http://fb9nt-ln.uni-duisburg.de/mitarbeiter/gockel/software/dmsdos/ <http://fb9nt-ln.

uni-duisburg.de/mitarbeiter/gockel/software/dmsdos/> .

12. Partition Sharing: You may share swap-space (see Swap-Space-HOWTO) or data partitions between different OS (see mount). For mounting MS-DOS Windows95 compressed drives (doublespace, drivespace) you may use dmsdos http://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/ <http:

//metalab.unc.edu/pub/Linux/system/filesystems/dosfs/>.

13. Libraries: Take another (older) library, for instance libc5 , this library seems to be smaller than libc6

     aka glibc2 .

14. Kernel: If your needs are fitted with an older kernel version, you can save some space.

15. GUI: Avoid as much Graphical User Interface (GUI) as possible.

16. Tiny Distributions: There are some distributions available which fit from one 3.5" floppy to 10MB disk space and fit for small memories, too. See appendix A and below.

17. External Storage Devices (Hard Disks, ZIP Drives, NFS, SAMBA): Since many notebooks may be limited in their expandability, using the parallel port is an attractive option. There are external harddisks and ZIP Drives available. Usually they are also connectable via PCMCIA. Another way is using the resources of another machine through NFS or SAMBA etc.

19.4 Harddisk Speed

Use the tool hdparm to set up better harddisk performance. Though I have seen laptop disk enabled with striping, I can’t see a reason to do so, because IMHO aka RAID0 striping needs at least to different disks to increase performance.

See UNIX and LINUX Computing Journal: Tunable Filesystem Parameters in /proc <http://www.diverge. org/ulcj/199910tfsp.shtml> How to increase, decrease and reconfigure filsystem behavior from within /proc.

19.5 Small Memory

19.5.1 Related HOWTOs

1. Small-Memory-mini-HOWTO  by  Todd  Burgess  <tburgess@uoguelph.ca  >

     http://eddie.cis.uoguelph.ca/˜ tburgess <http://eddie.cis.uoguelph.ca/~tburgess>

2. Modules-mini-HOWTO

3. Kerneld-mini-HOWTO

19.5.2 Techniques

Check the memory usage with free and top.

Mergemem Project <http://www.complang.tuwien.ac.at/ulrich/mergemem/>. Many programs contain

memory areas of the same content that remain undetected by the operating system. Typically, these areas contain data that have been generated on startup and remain unchanged for longer periods. With mergemem such areas are detected and shared. The sharing is performed on the operating system level and is invisible to the user level programs. mergemem is particularily useful if you run many instances of interpreters and emulators (like Java or Prolog) that keep their code in private data areas. But also other programs can take advantage albeit to a lesser degree.

You may also reduce the kernel size as much as possible by removing any feature which is not necessary for your needs and by modularizing the kernel as much as possible.

Also you may shutdown every service or daemon which is not needed, e.g. lpd, mountd, nfsd and close some virtual consoles. Please see Small-Memory-mini-HOWTO for details.

And of coarse use swap space, when possible.

If possible you use the resources of another machine, for instance with X, VNC or even telnet. For more information on Virtual Network Computing (VNC), see http://http://www.uk.research.att.com/vnc/

<http://www.uk.research.att.com/vnc> .

19.6 Low CPU Speed

You may want to overdrive the CPU speed but this can damage your hardware and I don’t have experience with it. For some examples look at Adorable Toshiba Libretto - Overclocking

http://www.cerfnet.com/˜ adorable/libretto.html <http://www.cerfnet.com/~adorable/libretto.html>.

19.7 Power Saving Techniques

1. If you don’t need infrared support, disable it in the BIOS or shutdown the IrDA device driver. There are also some IrDA features of the kernel which are useful for saving power.

2. PCMCIA services consume much power, so shut them down if you don’t need them.

3. I’m not sure to which extend the backlight consumes power. WARNING: AFAIK this device can only bear a limited number of uptime circles. So avoid using screensavers.

4. For some examples to build batteries with increased uptime up to 8 hours look at Adorable Toshiba Libretto http://www.cerfnet.com/˜ adorable/libretto.html <http://www.cerfnet.

com/~adorable/libretto.html>.

5. For information about APM look at the APM chapter above.

6. A hacked rclock <http://www-leland.stanford.edu/~bbense/toys/>. Booker C. Bense has hacked

the rclock program to include a simple battery power meter on the clock face.

7. xbatstat <http://www.jaist.ac.jp/~daisuke/Linux/xbatstat.html>. A battery level status

checker for Linux and X.

8. hdparm <ftp://tsx-11.mit.edu/pub/linux/sources/sbin/hdparm-3.0.tar.gz> hdparm is a

Linux IDE disk utility that lets you set spin-down timeouts and other disk parameters. It works also for some SCSI features.

9. Mobile Update Daemon <http://www.complang.tuwien.ac.at/ulrich/linux/tips.html> This is

a drop-in replacement for the standard update daemon, mobile-update minimizes disk spin ups and reduces disk uptime. It flushes buffers only when other disk activity is present. To ensure a consistent file system call sync manually. Otherwise files may be lost on power failure. mobile-update does not use APM. So it works also on older systems.

10. noflushd <http://www.tuebingen.linux.de/kobras/noflushd/>: noflushd monitors disk activity

and spins down disks that have been idle for more than <timeout> seconds. It requires a kernel >=2.2.11 . Useful in combination with hdparm and mount with noatime option to bring down disk activity.

11. Toshiba Linux Utilities <http://www2.prestel.co.uk/hex/toshiba.html> This is a set of Linux

utilities for controlling the fan, supervisor passwords, and hot key functions of Toshiba Pentium notebooks. There is a KDE package Klibreta, too.

12. At Kenneth E. Harker’s page there is a recommendation for LCDproc LCDProc <http://lcdproc. omnipotent.net/> . "LCDproc is a small piece of software that will enable your Linux box to display live system information on a 20x4 line backlit LCD display. This program shows, among other things, battery status on notebooks." I tried this package and found that it connects only to the external Matrix-Orbital 20x4 LCD display http://www.matrix-orbital.com/ <http://www.matrix-orbital. com/>, which is a LCD display connected to a serial port. I can’t see any use for a laptop yet.

13. Diald: Dial Daemon <http://www.loonie.net/~eschenk/diald.html> . The Diald daemon pro-

vides on demand Internet connectivity using the SLIP or PPP protocols. Diald can automatically dial in to a remote host when needed or bring down dial-up connections that are inactive.

14. KDE http://www.kde.org <http://www.kde.org> provides KAPM , Kbatmon and Kcmlaptop. Written by Paul Campbell kcmlaptop is a set of KDE control panels that implements laptop computer support functions, it includes a dockable battery status monitor for laptops - in short a little icon in the KDE status bar that shows how much battery time you have left. It also will warn you when power is getting low and allows you to configure power saving options. Similar packages you may find at the GNOME project http://www.gnome.org/ <http://www.gnome. org/> . See the software maps at both sites.

15. Please see Battery Powered Linux Mini-HOWTO by Hanno Mueller, hanno@lava.de http://www.lava.de/˜ hanno/ <http://www.lava.de/~hanno/> for more information.

19.8 Kernel

19.8.1 Related HOWTOs

• Kernel-HOWTO

• BootPrompt-HOWTO

Many kernel features are related to laptops. For instance APM, IrDA, PCMCIA and some options for certain laptops, e.g. IBM ThinkPads. In some distributions they not configured. And the kernel is usually bigger than necessary. So it’s seems a good idea to customize the kernel. Though this task might seem difficult for the beginner it is highly recommended. Since this involves dangerous operations you need to be careful. But, if you can install a better kernel successfully, you’ve earned your intermediate Linux sysadmin merit badge. - Since this topic is already covered in other documents I want handle this here.

19.9 Tiny Applications and Distributions

A small collection yet, but I’m looking for more information.

1. BOA - "Lightweight and High Performance WebServer. boa is a single-tasking HTTP server. That means that unlike traditional web servers, it does not fork for each incoming connection, nor does it fork many copies of itself to handle multiple connections. It internally multiplexes all of the ongoing HTTP connections, and forks only for CGI programs (which must be separate processes.) Preliminary tests show boa is capable of handling several hundred hits per second on a 100 MHz Pentium."

2. MGR - a graphical windows system, which uses much less resources than X.

3. Low Bandwidth X: Alan Cox in LINUX REDUX February 1998 " .. there are two that handle normal applications very nicely. LBX (Low Bandwidth X) is the official application of the X Consortium (now OpenGroup www.opengroup.org). Dxpc http://ccwf.cc.utexas.edu/˜ zvonler/dxpc <http://ccwf.cc. utexas.edu/~zvonler/dxpc> is the alternative most people prefer. These systems act as proxy X11 servers and compress datastreams by well over 50 percent for normal requests, often reaching a reduction to 25 percent of the original bandwidth usage. With dxpc, X windows applications are quite usable over a 28.8 modem link or across the Internet." 4. blackbox - "This is a window manager for X. It is similar in many respects to such popular packages as

Window Maker, Enlightenment, and FVWM2. You might be interested in this package if you are tired of window managers that are a heavy drain on your system resources, but you still want an attractive and modern-looking interface."

5. linux-lite - distribution based on a 1.x.x kernel for systems with only 2MB memory and 10MB harddisk. URL see above.

6. smallLinux - http://smalllinux.netpedia.net/ <http://smalllinux.netpedia.net/> . Three disk micro-distribution of Linux and utilities. Based on kernel 1.2.11. Root disk is ext2 format and has fdisk and mkfs.ext2 so that a harddisk install can be done. Useful to boot up on old machines with less than 4MB of RAM.

7. cLIeNUX - client-use-oriented Linux distribution.

8. minix - not a Linux but a UNIX useful for very small systems, such as 286 CPU and 640K RAM http://www.cs.vu.nl/˜ ast/minix.html <http://www.cs.vu.nl/~ast/minix.html> . There is even X support named mini-x by David I. Bell ftp://ftp.linux.org.uk/pub/linux/alan/ <ftp://ftp.linux.

org.uk/pub/linux/alan/> .

9. screen - tiny but powerful console manager. John M. Fisk <fiskjm@ctrvax.vanderbilt.edu> in LINUX GAZETTE July 1, 1996 :"It’s a GUI, GUI, GUI, GUI world! " – or so the major OS manufacturers would have you belief. Truth is, that while this is increasingly the case, there are times when the command line interface (CLI) is still a very good choice for getting things done. It’s fast, generally efficient, and is a good choice on memory or CPU constrained machines. And don’t forget that there are still a lot of very nifty things that can be done at the console."

10. tinyirc - "A tiny, stripped down IRC Client. Doesn’t have most of the more advance commands in the ircII family of IRC Clients, nor does it have any color, but it works, and it’s tiny."

19.10 Hardware Upgrade

You may also take into account to upgrade the hardware itself, though this may have some caveats, see chapter Open a Laptop Case above. If you need a survey about the possibilities, you can take a look at http://www.upgrade.de <http://www.upgrade.de>, this page is also available in French and English.

20 Appendix C - NeoMagic Chip NM20xx

20.1 Introduction

Hence the NeoMagic chipset series NM20xx is one of the most used graphic chips in laptops in our times, I will spent a few words on them. Though a long time this chip was only supported by commercial X servers, since the middle of 1998 RedHat provided a binary X server manufactured by PrecisionInsight. Since version 3.3.3 this X server is also available by XFree86.

20.2 Textmode 100x37

This chapter is a courtesy of Cedric Adjih < cedric.adjih@inria.fr >. I changed some minor parts.

An apparently little known fact about the Neomagic chipset NM20xx is that you can run text mode in 100x37 (i.e. 800x600). This text mode is very nice (as opposed to the 80x25 which is ugly). I tried this with a HP OmniBook 800 and suppose it might work with other laptops using the NeoMagic chip, too. The following that I wrote was much longer than I expected so I wrote it as a kind of mini-howto :-) :

The main problem is that is a bit difficult to set up, and if you’re going wrong with SVGA-TextMode/restoretextmode some results on the LCD might be frightening. Although I didn’t manage to break my LCD with many many attempts going wrong, DISCLAMER: THIS MIGHT DAMAGE YOUR HARDWARE. YOU HAVE BEEN WARNED. FOLLOW THE FOLLOWING INSTRUCTIONS AT YOUR OWN RISKS. I’M NOT RESPONSIBLE IF SOMETHING BAD HAPPENS.

20.2.1 Survey

You need to do three main steps:

1. Enable Linux to boot in 800x600 textmode. The problem is that you won’t see any text before the following two steps aren’t done.

2. Automatically run restoretextmode with correct register data.

3. Automatically run SVGATextMode.

20.2.2 More Details

All the files I have modified, are available for now at http://starship.python.net/crew/adjih/data/cda-omni-

trick.tar.gz <http://starship.python.net/crew/adjih/data/cda-omni-trick.tar.gz>

Enabling Linux to Boot in 800x600 Recent kernels (2.2.x) need to be compiled with CON-FIG_VIDEO_GFX_HACK defined. Default is off. (look in /usr/src/linux-2.2.x/arch/i386/boot/

video.S)

This is done by passing the parameter vga=770 to older kernels or vga=7 to 2.2.x kernels. Example with

lilo.conf:
image=/boot/bzImage-modif
label=22
append="svgatextmode=100x37x8_SVGA" #explained later
vga=7
read-only

Running restoretextmode and SVGATextMode at Boot Time You must arrange to run

restoretextmode <name of some textreg.dat file> and SVGATextMode 100x37x8_SVGA at boot time.

An example textreg.dat for restoretextmode (obtained using savetextmode) is in my tar archive in tmp/,

and an example /etc/TextConfig.
Since I’m lazy, I’ve simply put SVGATextMode and restoretextmode in the /etc/rc.boot/kbd file from my

Debian/GNU Linux which get executed at boot time (also available in the tar archive).

Now the Key Point Annoying things will be displayed if you don’t use the right SVGATextMode in the right video text mode: this is why I also pass the environmental variable "svgatextmode=100x37x8_SVGA" (arbitrary name) to the kernel (using append=xxx in lilo.conf) when I also set vga=7: the script /etc/rc. boot/kbd tests this variable and calls restoretextmode and SVGATextMode IF AND ONLY IF.

20.2.3 Road Map

1. Recompile the kernel 2.2.x with CONFIG_VIDEO_GFX_HACK

2. Insert the restoretextmode with the correct parameter in the initialisation script, with no other changes.

3. Boot with normal text mode (80x25) but restoretextmode: you should see the screen going to 100x37, but with only 80x25 usable. Don’t use SVGATextMode yet.

4. It is much better to conditionnalize your initialize code as I did, to keep the possibility of booting in both modes: you may test this now with some reboots (starting restoretextmode or not).

5. Boot with 100x37 text mode using parameter vga=7 (lilo.conf), you should see white background at some point, but the characters will be black on black. This is ok. You’ll have to reboot blindly now.

6. Insert the <path>/SVGATextMode 100x37x8_SVGA after the restoretextmode in initialization scripts.

7. Reboot with vga=7 (lilo.conf)

8. Should be OK now. Enjoy.

21 Appendix D - Annotated Bibliography

• Linux guides and HOWTOs, available at the Linux Documentation Project (LDP) http://metalab.unc.edu/LDP <http://metalab.unc.edu/LDP> . These sources of information are highly recommended.

• I found two books about PC hardware which contain a dedicated chapter about repairing laptops. Author: Scott Mueller Title: Upgrading and Repairing PCs Publisher: QUE Corporation. Author: Marc Misani Title: The Complete Hardware Upgrade and Maintainance Guide Publisher: unknown Both books don’t know about Linux and both are quite short about laptops. The book by Marc Minasi provides a little more information about laptops.

• Authors: Allesandro Rubini, Andy Oram Title: Linux Device Drivers

• Author: Stephen J. Bigelow Title: Maintain and Repair Your Notebook, Palmtop, or Pen Computer Publisher: McGraw Hill Text, September 1993 Review by Booknews, Inc. , January 1, 1994: A guide to performing routine maintenance and simple repairs to notebook, palmtop and pen computers. Covers such topics as how to diagnose and replace faulty LCD and plasma displays, and how to protect circuitry from electrostatic damage. Written with beginners in mind– but some hardware experience would be helpful in understanding the subtleties and cautions involved. Annotation copyright Book News, Inc. Portland, Or. Though this book seems outdated I don’t know a newer one.

• Author: Frank van Gilluwe Title: The Undocumented PC Publisher: Addison Wesley Developers press Review by Craig Hart: There are two editions. Edition 1 has a purple cover, edition 2 has a grey marble background photo with brown-on-yellow text panel. Edition 2 is not much better than edition one - only about 10%; of the information has changed, although a lot of typographical errors have been corrected. This is an excellent book, because it not only lists the raw data required to program something, but it has lot’s of explanations, how-to’s and example programs.

22 Appendix E - Resources for Specific Laptops

Certain laptops have found some more enthusiastic Linux users, than other models. This list is probably not comprehensive:

22.1 IBM ThinkPad

ThinkPad Configuration Tool for Linux tpctl <http://jhunix.hcf.jhu.edu/~thood/tpctlhome.htm>
Mailing list linux-thinkpad <http://www.topica.com/lists/linux-thinkpad/>.

22.2 Toshiba Laptops

Toshiba Linux Utilities <http://www.buzzard.org.uk/toshiba/>
Mailing lists: linux-on-portege <http://www.onelist.com/subscribe.cgi/linux-on-portege> , Linux on

Toshiba Satellite 40xx linux-tosh-40xx <majordomo@geekstuff.co.uk>

22.3 COMPAQ Concerto Aero

COMPAQ Concerto Fan’s Home Page <http://www.inetdirect.net/stg/pen/chris/concerto.html>
and Aero-FAQ <http://www.reed.edu/~pwilk/aero/aero.faq>.

The latest version of the Linux Compaq Concerto Pen Driver <http://www.cs.nmsu.edu/~pfeiffer/ \#pen> is available from Joe Pfeiffer’s home page.

22.4 DELL Laptops

Mailing list at linux-dell-laptops <http://www.egroups.com/group/linux-dell-laptops>