diff --git a/LDP/howto/docbook/CSPM-HOWTO/CSPM-HOWTO.xml b/LDP/howto/docbook/CSPM-HOWTO/CSPM-HOWTO.xml deleted file mode 100644 index b29225ed..00000000 --- a/LDP/howto/docbook/CSPM-HOWTO/CSPM-HOWTO.xml +++ /dev/null @@ -1,260 +0,0 @@ - - -
- Complete System Performance Monitor HOWTO - - This HOWTO provides an overview of the Complete System Performance Monitor, including a description of the product and installation and configuration information. - - - Chris - Lorenz - -
lorenzc@us.ibm.com
-
-
- 2003-06-10 - - - 2.0 - 2003-06-10 - CL - - -
-Copyright and legal notice - Copyright © 2003 IBM Corporation. All - rights reserved. - - This document is provided "AS IS," with no - express or implied warranties. Use the information in - this document at your own risk. - - Linux is a registered trademark of Linus Torvalds. Other company, product, and service - names may be trademarks or service marks of others. - -Permission is granted to copy, distribute, and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover text, and no Back-Cover text. A copy of the license can be found at http://www.gnu.org/licenses/fdl.txt. - -What Is the Complete System Performance Monitor? -The Complete System Performance Monitor (CSPM), written by Don Dupuis of Compaq Computer Corporation, is a graphical tool that monitors a Linux® system's CPU, memory, storage, network, and IRQ utilization. CSPM gathers all the data automatically and then generates histogram displays of system usage. - -Requirements -CSPM V1.0 and later require the following: -Red Hat Linux 7.2 or later, Mandrake 8.2 or later, or any Linux -kernel that has Stephen Tweedie's sar or sysstat patch applied (such as 2.4.20). -The Trolltech Qt 3.0 or later C++ application development environment, which is available for download from Trolltech for free. - - - -Installing CSPM and its requirements -This section describes how to acquire the Qt application development environment and install CSPM. -Installing Qt 3.0 or later - -Qt 3.0 or later must be installed on the system before you install CSPM. -Follow these steps to acquire and configure Qt: - - - -Download the Qt X/11 Free Edition from http://www.trolltech.com for the latest version of Qt. - - -Follow Trolltech's instructions for installing Qt. - - -Run ./configure with the -thread switch to the configure -program so that Qt is installed to run in multithreaded mode. -# ./configure -thread - -Be sure to export the variables QTDIR and LD_LIBRARY_PATH, as -described in the Qt installation instructions that are downloaded with the software. - - - - -Installing CSPM -The following sections describe how to download and install CSPM. -These steps must be run by the root user. -The installation process creates a directory called spm and places all the files in that directory. - - -Installing from rpm -Follow these steps to install CSPM from the rpm file: - - -Download the CSPM rpm file from SourceForge at http://sourceforge.net/projects/cspm. The program name -for CSPM is spm2. - -Install the software: -# rpm -ihv --nodeps spm2-1.0-1.586.rpm -The rpm creates the binary call spm2 in the current directory. - - - - -Installing from tar -Follow these steps to install CSPM from the tar file: - -Download the CSPM tar file from SourceForge at http://sourceforge.net/projects/cspm. The program name -for CSPM is spm2. - -Untar the spm2.tar.gz file: -# tar xvzf spm2.tar.gz -Compile CSPM: -# make all -The make command creates the binary call spm2 in the current directory. - - - - -Starting the CSPM monitor -The spm2 program should be run by a user other than root so that any changes to -the default preference settings can be changed. -Enter the following command from the directory where CSPM is installed: -# ./spm2 -If a segmentation fault occurs when spm2 is starting up, make sure that you have set the QTDIR and LD_LIBRARY_PATH variables, as described in the Qt installation instructions that are downloaded with the software. - - - -Modifying CSPM defaults -By default, the number of "range bars" along the y-coordinate of each histogram -is five. When there is no activity for a particular device, CSPM provides default values -of 0, 0.2, 0.4, 0.6, and 0.8. Once activity begins on the device, CSPM sets the -five values in equal increments from 0 to the peak data value collected in each -collection interval. Sometimes the grid lines fall directly on the range bar numbers, -making the numbers hard to read. You can either adjust the color of the grid lines, -adjust the collection interval, or try to ignore the grid lines. - - -You can modify the default grid, sizing, and monitoring settings for each of the views from -the Preferences pulldown. From the -Preferences pulldown, you can select System, -Tests, CPU, Memory, Network, -Storage or IRQs. Once you select a particular item, you -can view the Grid, Monitoring, or Sizing tab -(if applicable) for that item. -From the Grid tab you can change such things as: - -the color of the grid lines -the distance (or time), in seconds, between intervals when data is collected (horizontal lines appear at each interval) -the color of the various data bars (such as read, write, user, nice, and "sys") -the number of horizontal range bars (default is 5) -the size of the histogram titles - -From the Monitor tab you can change things such as: - - -the height and width of the display boxes (in pixels) -the colors of the display boxes -the type of data to be monitored (IOs, data, reads and writes, sectors and blocks) - -From the Sizing tab you can change the minimum height and width of the -display boxes (in pixels). - -How CSPM displays data -CSPM displays histograms that provide information about system usage. -The program has 8 display tabs for the different types of system information CSPM -collects. These tabs are: - -System Overview - -IRQs - -CPU Utilization - -Memory - -Network - -Storage - -Tests - -Test Summary - - - -The key at the bottom of the histogram tables on each of the tabs tells how to interpret -the various colors representing data in the tables. -Use the horizontal and vertical scroll bars to view any histograms that do not -fit on the initial screen. - -<guilabel>System Overview</guilabel> tab -When CSPM starts up, the System Overview screen is displayed. The histograms -on the System Overview screen show data for the total system, including CPU, memory, -network, and storage usage. The following screenshot shows a sample view of a -System Overview screen. - -Below each histogram is a key that describes the data that is represented. For example, in the -CPU total histogram, the red line represents user CPU usage, the green line represents commands run with a modified scheduling priority (nice), and the blue line represents system CPU usage. - - -<guilabel>IRQs</guilabel> tab - -When you click the IRQs tab, a histogram opens for each IRQ line that -runs to an ISA slot -on the system. The following screenshot shows a sample view of the IRQs screen. -Note -With Qt 3.0, the horizontal scroll bars on the Irqs tab does not work properly. This -problem does not occur with Qt 3.1. - -The large blue number to the left of the histogram is the number of the IRQ. -The -red line on each histogram represents the number of IRQs per second utilitized by the device -connected to the IRQ's ISA slot. - - - -<guilabel>CPU Utilization</guilabel> tab -When you click the CPU Utilization tab, histograms open for each CPU -on the system, as -shown in the following screenshot: - - -The histograms show information about user (red), system (blue), and nice priority (green) command utilization. - - -<guilabel>Memory</guilabel> tab -The Memory tab is still under development. In a future release of CSPM, -the Memory tab will graphically show how much memory processes use, from most to least. - - -<guilabel>Network</guilabel> tab -When you click the Network tab, histograms that show the amount of traffic on the system's loopback device and each network device are displayed, as shown in the following screenshot. - - -Sends are shown in red and receives are shown in blue. - - -<guilabel>Storage</guilabel> tab -When you click the Storage tab, a collection of histograms opens that -show data -for controllers, disks, and partitions. -The key at the bottom of the histograms tells which -color of histogram box corresponds to which type of device. - - -The screenshot -displays purple for controllers, green for disks, and orange for partitions. -The red lines represent -reads from the devices and the blue lines represent writes to the devices. -To see information about a partition (such as file system name, space used, and -space available), right-click the partition's histogram and then left-click Properties. A -Partition Status window opens that displays information about the selected partition. - - - -<guilabel>Tests</guilabel> tab -The Tests tab opens a list of tests that can be run on the system -and is useful, for example, for quality assurance personnel who need to load test systems when testing hardware or software. - - -<guilabel>Test Summary</guilabel> tab -The Test Summary tab contains test output and utilization numbers for test runs. -You can print these test results and keep them for your records. - - - - - -
- diff --git a/LDP/howto/docbook/CSPM-HOWTO/cpu.png b/LDP/howto/docbook/CSPM-HOWTO/cpu.png deleted file mode 100644 index 4a05e4f2..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/cpu.png and /dev/null differ diff --git a/LDP/howto/docbook/CSPM-HOWTO/irqs.png b/LDP/howto/docbook/CSPM-HOWTO/irqs.png deleted file mode 100644 index e493883c..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/irqs.png and /dev/null differ diff --git a/LDP/howto/docbook/CSPM-HOWTO/network.png b/LDP/howto/docbook/CSPM-HOWTO/network.png deleted file mode 100644 index 042bbc92..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/network.png and /dev/null differ diff --git a/LDP/howto/docbook/CSPM-HOWTO/snapshot5.png b/LDP/howto/docbook/CSPM-HOWTO/snapshot5.png deleted file mode 100644 index 1151d4fc..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/snapshot5.png and /dev/null differ diff --git a/LDP/howto/docbook/CSPM-HOWTO/snapshot7.png b/LDP/howto/docbook/CSPM-HOWTO/snapshot7.png deleted file mode 100644 index dc190b27..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/snapshot7.png and /dev/null differ diff --git a/LDP/howto/docbook/CSPM-HOWTO/snapshot8.png b/LDP/howto/docbook/CSPM-HOWTO/snapshot8.png deleted file mode 100644 index 02dd48a4..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/snapshot8.png and /dev/null differ diff --git a/LDP/howto/docbook/CSPM-HOWTO/snapshot9.png b/LDP/howto/docbook/CSPM-HOWTO/snapshot9.png deleted file mode 100644 index 3f7087ba..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/snapshot9.png and /dev/null differ diff --git a/LDP/howto/docbook/CSPM-HOWTO/storage.png b/LDP/howto/docbook/CSPM-HOWTO/storage.png deleted file mode 100644 index aaafc3c7..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/storage.png and /dev/null differ diff --git a/LDP/howto/docbook/CSPM-HOWTO/sysover.png b/LDP/howto/docbook/CSPM-HOWTO/sysover.png deleted file mode 100644 index fe7c3091..00000000 Binary files a/LDP/howto/docbook/CSPM-HOWTO/sysover.png and /dev/null differ diff --git a/LDP/howto/docbook/HOWTO-INDEX/HOWTO-INDEX.sgml b/LDP/howto/docbook/HOWTO-INDEX/HOWTO-INDEX.sgml index 95e0270d..e1a0f56f 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/HOWTO-INDEX.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/HOWTO-INDEX.sgml @@ -10,6 +10,7 @@ + ]> @@ -31,7 +32,7 @@ Ferguson -v8.0, 2003-05-01 +v9.0, 2005-12-29 @@ -107,7 +108,7 @@ is heavily used, so please use a mirror site if possible. HOWTO Translations -HOWTO translations are available +Some HOWTO translations are available on ibiblio.org and mirrors around the world. So far, there are: @@ -322,7 +323,7 @@ Please send the LDP periodic updates whenever appropriate. This document, LDP HOWTO-INDEX, -is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, +is copyrighted (c) 1995 - 2006 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published diff --git a/LDP/howto/docbook/HOWTO-INDEX/adminSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/adminSect.sgml index d70162a0..b25fed6e 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/adminSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/adminSect.sgml @@ -216,26 +216,6 @@ Explains some things about the Linux Kernel, such as the most important components, how they work, and so on. - - - -KickStart-HOWTO, -RedHat Linux KickStart HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Jan 1999. - -Briefly describes how to use the RedHat Linux KickStart system to -rapidly install large numbers of identical Linux boxes. - - @@ -247,17 +227,6 @@ Describes the installation and usage of the LKCD (Linux Kernel Crash Dump) package. - - - -Linux+XFS-HOWTO, -Linux + XFS HOWTO : Linux on Steroids - -Updated: May 2002. -Describes how to build a Linux system that runs on -top of the SGI XFS journaling filesystem. - - @@ -399,18 +368,6 @@ Discusses some issues associated with the benchmarking of Linux systems and presents a basic benchmarking toolkit. - - - -CSPM-HOWTO, -Complete System Performance Monitor HOWTO - -Updated: Jun 2003. -Provides an overview of the Complete System Performance Monitor, -including a description of the product and installation -and configuration information. - - @@ -536,19 +493,6 @@ Presents a discussion of how to retrieve deleted files from a Second Extended File System. - - - -Ext2fs-Undeletion-Dir-Struct, -Ext2fs Undeletion of Directory Structures - - -Updated: Nov 2000. -Describes a straight forward way of recovering whole -directory structures, instead of file by file, that have been removed -by a misplaced rm -rf - - @@ -598,18 +542,6 @@ A bridge is an intelligent connection wire between two network cards. A firewall is an intelligent insulator. - - - -Bridge+Firewall+DSL, -Bridge + Firewall + DSL Mini-HOWTO - - -Updated: Nov 2000. -Configuring a Linux system to act as a firewall and bridge with -a DSL network connection. - - @@ -773,38 +705,6 @@ Shadow-Password-HOWTO, How to obtain, install, and configure the Linux password Shadow Suite. - - - -Snort-Statistics-HOWTO, -Snort-Setup for Statistics HOWTO - -Updated: Feb 2002. -Describes how to configure Snort version 1.8.3 to be -used in conjunction with the statistical tools ACID (Analysis Console -for Intrusion Databases) and SnortSnarf. - - - - - -Term-Firewall, -Using Term to Pierce an Internet Firewall - - - - - - - [ Archived ] - - - -Archived - Last Update: Jul 1996. -Directions for using ``term'' to do network stuff through -a TCP firewall that you're not supposed to be able to. - - diff --git a/LDP/howto/docbook/HOWTO-INDEX/appsSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/appsSect.sgml index 978078d3..c60319e4 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/appsSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/appsSect.sgml @@ -146,17 +146,6 @@ Installation instructions for the Emacspeak audio desktop application for Linux. - - - -Game-Server-HOWTO, -Game Server HOWTO - -Updated: Apr 2003. -Explains how to install, configure and maintain servers -for various popular multiplayer games. - - @@ -480,17 +469,6 @@ Helps install the Ingres II Relational Database Management System on Linux. - - - -MMBase, -MMBase Mini-HOWTO: Installation on Debian Woody - - -Updated: May 2002. -Describes how to set up MMBase on a Debian GNU/Linux (Woody) system. - - @@ -514,17 +492,6 @@ A guide to installing and configuring the Oracle 7 Database Server on a Linux system. - - - -Oracle-8-HOWTO, -Oracle 8i for Linux Installation HOWTO - -Updated: Jul 2003. -A guide to installing and configuring the -Oracle 8i Enterprise Edition for Linux. - - @@ -1053,25 +1020,6 @@ Updated: Jun 2001. Discuss the essentials of setting up a Virtual Web Site under Linux. - - - -WWW-HOWTO, -Linux WWW HOWTO - - - - - - - [ Archived ] - - -Updated: Nov 1997. -Information about setting up WWW services under Linux (both server -and client). - - @@ -1121,17 +1069,6 @@ Describes in detail one of the simplest ways to setup a fax server on your Linux system. - - - -Game-Server-HOWTO, -Game Server HOWTO - -Updated: Apr 2003. -Explains how to install, configure and maintain servers -for various popular multiplayer games. - - @@ -1155,18 +1092,6 @@ LDAP (Lightweight Directory Access Protocol) Server on a Linux machine. - - - -LDAP-Implementation-HOWTO, -LDAP Implementation HOWTO - -Updated: Mar 2001. -Describes the technical aspects of storing application data -in a LDAP server. It focuses on the configuration of various -applications to make them LDAP-aware. - - @@ -1470,29 +1395,6 @@ configuring the X Window System for Linux users. Window Managers - - - - - - -MGR-HOWTO, -The MGR Window System HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: May 1996. -Information on the installation, configuration and running of the MGR -Window System. - - - diff --git a/LDP/howto/docbook/HOWTO-INDEX/archived.sgml b/LDP/howto/docbook/HOWTO-INDEX/archived.sgml new file mode 100644 index 00000000..adbf2b37 --- /dev/null +++ b/LDP/howto/docbook/HOWTO-INDEX/archived.sgml @@ -0,0 +1,276 @@ + + +Archived Documents + + +The following documents have been archived by the LDP. +They are kept here for historical purposes only and +(in general) pertain to older Linux systems. + + + + + + + + +Bangla-PDF-HOWTO, +Bangla PDF HOWTO + +Archived: Dec 2005. + + + + + + +Bridge+Firewall+DSL, +Bridge + Firewall + DSL Mini-HOWTO + +Archived: Dec 2005. + + + + + + +BTI-PPP, +BTinternet PPPd mini-HOWTO + +Archived: Dec 2005. + + + + + + +CD-Distributions-EN-HOWTO, +English-language GNU/Linux distributions on CD-ROM + +Archived: Dec 2005. + + + + + + +CSPM-HOWTO, +Complete System Performance Monitor HOWTO + +Archived: Dec 2005. + + + + + + +Ext2fs-Undeletion-Dir-Struct, +Ext2fs Undeletion of Directory Structures + +Archived: Dec 2005. + + + + + + +FDU, +XFree86 Font De-uglification HOWTO + +Archived: Dec 2005. + + + + + + +Game-Server-HOWTO, +Game Server HOWTO + +Archived: Dec 2005. + + + + + + +IP-Subnetworking, +IP Sub-Networking mini-HOWTO + +Archived: Dec 2005. + + + + + + +ISP-Connectivity, +ISP-Connectivity mini-HOWTO + +Archived: Dec 2005. + + + + + + +KDE-Kiosk-Mode, +KDE-Kiosk-Mode HOWTO + +Archived: Dec 2005. + + + + + + +KickStart-HOWTO, +RedHat Linux KickStart HOWTO + +Archived: Dec 2005. + + + + + + +LDAP-Implementation-HOWTO, +LDAP Implementation HOWTO + +Archived: Dec 2005. + + + + + + +Linux+XFS-HOWTO, +Linux + XFS HOWTO : Linux on Steroids + +Archived: Dec 2005. + + + + + + +Loopback-Encrypted-Filesystem-HOWTO, +Loopback Encrypted Filesystem HOWTO + +Archived: Dec 2005. + + + + + + +Loopback-Root-FS, +The Loopback Root Filesystem HOWTO + +Archived: Dec 2005. + + + + + + +MGR-HOWTO, +The MGR Window System HOWTO + +Archived: Dec 2005. + + + + + + +MMBase, +MMBase Mini-HOWTO: Installation on Debian Woody + +Archived: Dec 2005. + + + + + + +Oracle-8-HOWTO, +Oracle 8i for Linux Installation HOWTO + +Archived: Dec 2005. + + + + + + +SCSI-Programming-HOWTO, +The Linux SCSI programming HOWTO + +Archived: Dec 2005. + + + + + + +Snort-Statistics-HOWTO, +Snort-Setup for Statistics HOWTO + +Archived: Dec 2005. + + + + + + +Term-Firewall, +Using Term to Pierce an Internet Firewall + +Archived: Dec 2005. + + + + + + +Ultra-DMA, +The Linux Ultra-DMA Mini-Howto + +Archived: Dec 2005. + + + + + + +USB-Digital-Camera-HOWTO, +USB Digital Camera HOWTO + +Archived: Dec 2005. + + + + + + +VPN, +(old) The VPN HOWTO + +Archived: Dec 2005. + + + + + + +WWW-HOWTO, +Linux WWW HOWTO + +Archived: Dec 2005. + + + + + + diff --git a/LDP/howto/docbook/HOWTO-INDEX/categoryChap.sgml b/LDP/howto/docbook/HOWTO-INDEX/categoryChap.sgml index eabc4f9a..db6d5066 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/categoryChap.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/categoryChap.sgml @@ -52,5 +52,10 @@ extensive work on the initial categorization of the HOWTO documents. &miscSect; + + Archived Documents + &archivedSect; + + diff --git a/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml b/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml index 1355d37f..651c09a6 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/howtoChap.sgml @@ -402,17 +402,6 @@ A document to setup and develop support for Bengali (Bangla) in GNU/Linux. - - - -Bangla-PDF-HOWTO, -Bangla PDF HOWTO - -Updated: Apr 2003. -Describes the PDF creation process using KWord with the Bijoy2000 -fonts and Bijoy keyboard, for working in the Bangla language. - - @@ -569,17 +558,6 @@ A bridge is an intelligent connection wire between two network cards. A firewall is an intelligent insulator. - - - -Bridge+Firewall+DSL, -Bridge + Firewall + DSL Mini-HOWTO - -Updated: Nov 2000. -Configuring a Linux system to act as a firewall and bridge with -a DSL network connection. - - @@ -593,17 +571,6 @@ bridging code is part of the mainstream. On 20.06.2000 there are patches for stable kernels 2.2.14 and 2.2.15. - - - -BTI-PPP, -BTinternet PPPd mini-HOWTO - -Updated: Mar 2002. -Describes how to setup a modem PPPd link to Btinternet in -the UK. - - @@ -931,18 +898,6 @@ Cryptoloop functionality. Cryptoloop is part of the CryptoAPI in the 2.6 Linux kernel series. - - - -CSPM-HOWTO, -Complete System Performance Monitor HOWTO - -Updated: Jun 2003. -Provides an overview of the Complete System Performance Monitor, -including a description of the product and installation -and configuration information. - - @@ -1090,26 +1045,6 @@ Another approach to - - -Distributions-HOWTO, -Distributions HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Mar 2002. -Further information on Linux Distributions can -be found on the Linux Weekly News (LWN) site: -Distributions -section. - - @@ -1377,18 +1312,6 @@ Presents a discussion of how to retrieve deleted files from a Second Extended File System. - - - -Ext2fs-Undeletion-Dir-Struct, -Ext2fs Undeletion of Directory Structures - -Updated: Nov 2000. -Describes a straight forward way of recovering whole -directory structures, instead of file by file, that have been removed -by a misplaced rm -rf - - @@ -1411,19 +1334,6 @@ Covers the installation and use of the most popular amateur packet-radio BBS software FBB. - - - -FDU, -XFree86 Font De-uglification HOWTO - -Updated: Oct 2002. -How to fix ugly and unreadable X Window fonts. -This content is now covered in the -Font-HOWTO. - - - @@ -1558,17 +1468,6 @@ FTP, How to use ftp clients and servers - - - -Game-Server-HOWTO, -Game Server HOWTO - -Updated: Apr 2003. -Explains how to install, configure and maintain servers -for various popular multiplayer games. - - @@ -1951,18 +1850,6 @@ IPMasquerading+Napster, Present a way to allow users behind an IPMasq'd system to use Napster. - - - -IP-Subnetworking, -IP Sub-Networking mini-HOWTO - -Updated: Aug 2001. -Describes why and how to subnetwork an IP network - that is using -a single A, B or C Class network number to function correctly on -several interconnected networks. - - @@ -1984,26 +1871,6 @@ IRC, Describes the basics of IRC and respective applications for Linux. - - - -ISP-Connectivity, -ISP-Connectivity mini-HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Nov 2001. -How to setup PPP, connect up to your ISP, configure mail and news, -get a permanent IP (if available), get a domain name, and have a -bona fide system running in a little over thirty minutes. - - @@ -2111,28 +1978,6 @@ KDE-GUI-Login-Configuration-HOWTO, A tutorial on customizing the GUI login screen. - - - -KDE-Kiosk-Mode, -KDE-Kiosk-Mode HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Sep 2002. -Describes how to invoke the kiosk mode of KDE. - -Further information can be found at: - -http://www.brigadoon.de/peter/kde/. - - @@ -2189,26 +2034,6 @@ Contains some information about the Linux (v2.0) keyboard and console, and the use of non-ASCII characters. - - - -KickStart-HOWTO, -RedHat Linux KickStart HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Jan 1999. - -Briefly describes how to use the RedHat Linux KickStart system to -rapidly install large numbers of identical Linux boxes. - - @@ -2230,25 +2055,6 @@ Kodak-Digitalcam-HOWTO, Getting a Kodak digital camera working under GNU/Linux. - - -Laptop-HOWTO, -Linux Laptop HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Feb 2003. -Replaced by -Linux on the Road -(Linux Mobile Guide) - - @@ -2293,18 +2099,6 @@ LDAP (Lightweight Directory Access Protocol) Server on a Linux machine. - - - -LDAP-Implementation-HOWTO, -LDAP Implementation HOWTO - -Updated: Mar 2001. -Describes the technical aspects of storing application data -in a LDAP server. It focuses on the configuration of various -applications to make them LDAP-aware. - - @@ -2589,17 +2383,6 @@ your computer into a Windows + Linux dual boot machine, without affecting your current Linux installation. - - - -Linux+XFS-HOWTO, -Linux + XFS HOWTO : Linux on Steroids - -Updated: May 2002. -Describes how to build a Linux system that runs on -top of the SGI XFS journaling filesystem. - - @@ -2646,40 +2429,6 @@ Describes how to use Loadlin with Windows 95/98/ME to boot to Linux. - - - -Loopback-Encrypted-Filesystem-HOWTO, -Loopback Encrypted Filesystem HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Aug 2003. -Replaced by the -Disk Encryption -HOWTO -Explains how to setup and then use a filesystem that, when mounted by -a user, dynamically and transparently encrypts its contents. - - - - - -Loopback-Root-FS, -The Loopback Root Filesystem HOWTO - -Updated: Sep 1999. -How to use the Linux loopback device to create a Linux native -filesystem format installation that can be run from a DOS -partition without re-partitioning. - - @@ -2817,25 +2566,6 @@ sources if you want to learn more about Linux, or have problems and need help. - - - -MGR-HOWTO, -The MGR Window System HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: May 1996. -Information on the installation, configuration and running of the MGR -Window System. - - @@ -2870,36 +2600,6 @@ How to use SSH and the Java-based program MindTerm to create quick, secure, and reliable VPN-like tunnels over insecure networks. - - -MIPS-HOWTO, -Linux/MIPS HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: May 2004. -Further information on Linux/MIPS -be found at the -Linux/MIPS -Wiki. - - - - - -MMBase, -MMBase Mini-HOWTO: Installation on Debian Woody - -Updated: May 2002. -Describes how to set up MMBase on a Debian GNU/Linux (Woody) system. - - @@ -3387,17 +3087,6 @@ A guide to installing and configuring the Oracle 7 Database Server on a Linux system. - - - -Oracle-8-HOWTO, -Oracle 8i for Linux Installation HOWTO - -Updated: Jul 2003. -A guide to installing and configuring the -Oracle 8i Enterprise Edition for Linux. - - @@ -4144,28 +3833,6 @@ the interface and characteristics of the driver that application writers may need to know. - - - -SCSI-Programming-HOWTO, -The Linux SCSI programming HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: May 1996. -Deals with programming the Linux generic SCSI interface. - -Check the - -SCSI-Generic-HOWTO for more current information. - - @@ -4397,18 +4064,6 @@ SMP-HOWTO, Reviews main issues related to SMP configuration under Linux. - - - -Snort-Statistics-HOWTO, -Snort-Setup for Statistics HOWTO - -Updated: Feb 2002. -Describes how to configure Snort version 1.8.3 to be -used in conjunction with the statistical tools ACID (Analysis Console -for Intrusion Databases) and SnortSnarf. - - @@ -4691,25 +4346,6 @@ TclTk-HOWTO, Describes the Linux approach to Tcl, a scripting language. - - - -Term-Firewall, -Using Term to Pierce an Internet Firewall - - - - - - - [ Archived ] - - -Archived - Last Update: Jul 1996. -Directions for using ``term'' to do network stuff through -a TCP firewall that you're not supposed to be able to. - - @@ -4878,17 +4514,6 @@ Addresses Linux localization issues specific to Turkish users (written in Turkish). - - - -Ultra-DMA, -The Linux Ultra-DMA Mini-Howto - -Updated: Dec 2001. -How to use Ultra-DMA aka Ultra-ATA aka Ultra33 and Ultra66 -hard drives and interfaces with Linux. - - @@ -4966,18 +4591,6 @@ UPS (Uninterruptible Power Supply) intelligently and make it work with your open-source operating system. - - - -USB-Digital-Camera-HOWTO, -USB Digital Camera HOWTO - -Updated: Jun 2002. -Intended for the new Linux user who already has -a camera with Universal Serial Bus (USB) mass storage capabilities -or wants to buy one. - - @@ -5180,24 +4793,6 @@ VPN-HOWTO, How to set up a Virtual Private Network with Linux. - - - -VPN, -The VPN HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Dec 2001. -See the VPN-HOWTO. - - @@ -5357,25 +4952,6 @@ Discusses running WordPerfect on Linux, including a brief discussion on the WordPerfect 7.0 beta. - - - -WWW-HOWTO, -Linux WWW HOWTO - - - - - - - [ Archived ] - - -Updated: Nov 1997. -Information about setting up WWW services under Linux (both server -and client). - - diff --git a/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml index 03375cfa..2859079f 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/hwSect.sgml @@ -194,48 +194,6 @@ Provides a guide for setting up a WWW-based kiosk using Linux, X11R6, FVWM2, Netscape Navigator 4.X, and a customized trackball. - - - -KDE-Kiosk-Mode, -KDE-Kiosk-Mode HOWTO - - - - - - - [ Archived ] - - - -Archived - Last Update: Sep 2002. -Describes how to invoke the kiosk mode of KDE. - -Further information can be found at: - -http://www.brigadoon.de/peter/kde/. - - - - -Laptop-HOWTO, -Linux Laptop HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Feb 2003. -Replaced by -Linux on the Road -(Linux Mobile Guide) - - @@ -475,26 +433,6 @@ K7s5a-HOWTO, Describes how to use Elite's K7s5a board with Linux. - - -MIPS-HOWTO, -Linux/MIPS HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: May 2004. -Further information on Linux/MIPS -be found at the -Linux/MIPS -Wiki. - - @@ -667,18 +605,6 @@ Kodak-Digitalcam-HOWTO, Getting a Kodak digital camera working under GNU/Linux. - - - -USB-Digital-Camera-HOWTO, -USB Digital Camera HOWTO - -Updated: Jun 2002. -Intended for the new Linux user who already has -a camera with Universal Serial Bus (USB) mass storage capabilities -or wants to buy one. - - @@ -789,18 +715,6 @@ BOOTP/TFTP, using the Grub boot loader, and save and restore disk and partition images to and from a TFTP server. - - - -CSPM-HOWTO, -Complete System Performance Monitor HOWTO - -Updated: Jun 2003. -Provides an overview of the Complete System Performance Monitor, -including a description of the product and installation -and configuration information. - - @@ -877,18 +791,6 @@ Multi-Disk-HOWTO, How best to use multiple disks and partitions for a Linux system. - - - -Ultra-DMA, -The Linux Ultra-DMA Mini-Howto - - -Updated: Dec 2001. -How to use Ultra-DMA aka Ultra-ATA aka Ultra33 and Ultra66 -hard drives and interfaces with Linux. - - @@ -1210,28 +1112,6 @@ the interface and characteristics of the driver that application writers may need to know. - - - -SCSI-Programming-HOWTO, -The Linux SCSI programming HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: May 1996. -Deals with programming the Linux generic SCSI interface. - -Check the - -SCSI-Generic-HOWTO for more current information. - - diff --git a/LDP/howto/docbook/HOWTO-INDEX/networkingSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/networkingSect.sgml index 6134cc02..61dd52bd 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/networkingSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/networkingSect.sgml @@ -164,19 +164,6 @@ installing, configuring, and troubleshooting, with an emphasis on how this impacts Linux users. - - - -IP-Subnetworking, -IP Sub-Networking mini-HOWTO - - -Updated: Aug 2001. -Describes why and how to subnetwork an IP network - that is using -a single A, B or C Class network number to function correctly on -several interconnected networks. - - @@ -505,18 +492,6 @@ LDAP (Lightweight Directory Access Protocol) Server on a Linux machine. - - - -LDAP-Implementation-HOWTO, -LDAP Implementation HOWTO - -Updated: Mar 2001. -Describes the technical aspects of storing application data -in a LDAP server. It focuses on the configuration of various -applications to make them LDAP-aware. - - @@ -660,18 +635,6 @@ between a Handspring Visor and jpilot or jpilot-sync. - - - -BTI-PPP, -BTinternet PPPd mini-HOWTO - - -Updated: Mar 2002. -Describes how to setup a modem PPPd link to Btinternet in -the UK. - - @@ -695,27 +658,6 @@ Shows some typical scenarios for easy start using Diald. Replaces the Diald mini-HOWTO. - - - -ISP-Connectivity, -ISP-Connectivity mini-HOWTO - - - - - - - [ Archived ] - - - -Archived - Last Update: Nov 2001. -How to setup PPP, connect up to your ISP, configure mail and news, -get a permanent IP (if available), get a domain name, and have a -bona fide system running in a little over thirty minutes. - - @@ -920,18 +862,6 @@ A bridge is an intelligent connection wire between two network cards. A firewall is an intelligent insulator. - - - -Bridge+Firewall+DSL, -Bridge + Firewall + DSL Mini-HOWTO - - -Updated: Nov 2000. -Configuring a Linux system to act as a firewall and bridge with -a DSL network connection. - - @@ -1071,18 +1001,6 @@ A bridge is an intelligent connection wire between two network cards. A firewall is an intelligent insulator. - - - -Bridge+Firewall+DSL, -Bridge + Firewall + DSL Mini-HOWTO - - -Updated: Nov 2000. -Configuring a Linux system to act as a firewall and bridge with -a DSL network connection. - - @@ -1154,18 +1072,6 @@ An introduction on how the Sentry Firewall CDROM works and how to get started using the system. - - - -Snort-Statistics-HOWTO, -Snort-Setup for Statistics HOWTO - -Updated: Feb 2002. -Describes how to configure Snort version 1.8.3 to be -used in conjunction with the statistical tools ACID (Analysis Console -for Intrusion Databases) and SnortSnarf. - - diff --git a/LDP/howto/docbook/HOWTO-INDEX/osSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/osSect.sgml index 8b0db346..95c77a39 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/osSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/osSect.sgml @@ -120,27 +120,6 @@ switch to Linux. - - -Distributions-HOWTO, -Distributions HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Mar 2002. - -Further information on Linux Distributions can -be found on the Linux Weekly News (LWN) site: -Distributions -section. - - Linux From Scratch HOWTO @@ -831,65 +810,6 @@ Presents a discussion of how to retrieve deleted files from a Second Extended File System. - - - -Ext2fs-Undeletion-Dir-Struct, -Ext2fs Undeletion of Directory Structures - - -Updated: Nov 2000. -Describes a straight forward way of recovering whole -directory structures, instead of file by file, that have been removed -by a misplaced rm -rf - - - - - -Linux+XFS-HOWTO, -Linux + XFS HOWTO : Linux on Steroids - -Updated: May 2002. -Describes how to build a Linux system that runs on -top of the SGI XFS journaling filesystem. - - - - - -Loopback-Encrypted-Filesystem-HOWTO, -Loopback Encrypted Filesystem HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: Aug 2003. -Replaced by the -Disk Encryption -HOWTO -Explains how to setup and then use a filesystem that, when mounted by -a user, dynamically and transparently encrypts its contents. - - - - - -Loopback-Root-FS, -The Loopback Root Filesystem HOWTO - - -Updated: Sep 1999. -How to use the Linux loopback device to create a Linux native -filesystem format installation that can be run from a DOS -partition without re-partitioning. - - diff --git a/LDP/howto/docbook/HOWTO-INDEX/otherLangSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/otherLangSect.sgml index fb3537ed..898e1e92 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/otherLangSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/otherLangSect.sgml @@ -26,17 +26,6 @@ Unicode-HOWTO, How to change your Linux system so it uses UTF-8 as text encoding. - - - -Bangla-PDF-HOWTO, -Bangla PDF HOWTO - -Updated: Apr 2003. -Describes the PDF creation process using KWord with the Bijoy2000 -fonts and Bijoy keyboard, for working in the Bangla language. - - diff --git a/LDP/howto/docbook/HOWTO-INDEX/programmSect.sgml b/LDP/howto/docbook/HOWTO-INDEX/programmSect.sgml index f38bbcec..8b5628f1 100644 --- a/LDP/howto/docbook/HOWTO-INDEX/programmSect.sgml +++ b/LDP/howto/docbook/HOWTO-INDEX/programmSect.sgml @@ -424,28 +424,6 @@ the interface and characteristics of the driver that application writers may need to know. - - - -SCSI-Programming-HOWTO, -The Linux SCSI programming HOWTO - - - - - - - [ Archived ] - - -Archived - Last Update: May 1996. -Deals with programming the Linux generic SCSI interface. - -Check the - -SCSI-Generic-HOWTO for more current information. - - @@ -688,17 +666,6 @@ A guide to installing and configuring the Oracle 7 Database Server on a Linux system. - - - -Oracle-8-HOWTO, -Oracle 8i for Linux Installation HOWTO - -Updated: Jul 2003. -A guide to installing and configuring the -Oracle 8i Enterprise Edition for Linux. - - diff --git a/LDP/howto/linuxdoc/IP-Subnetworking.sgml b/LDP/howto/linuxdoc/IP-Subnetworking.sgml deleted file mode 100644 index e968b605..00000000 --- a/LDP/howto/linuxdoc/IP-Subnetworking.sgml +++ /dev/null @@ -1,630 +0,0 @@ - - -
- - - -IP Sub-Networking Mini-Howto - -<author>Robert Hart, <tt/hartr@interweft.com.au/ -<date>v1.1, 30 August 2001 - -<!-- correct typos reported by users, 30 August 2001 --> -<!-- Greg Ferguson / linux-howto@metalab.unc.edu --> - -<abstract> -This document describes why and how to subnetwork an IP network - that -is using a single A, B or C Class network number to function correctly on -several interconnected networks. </abstract> - -<!-- Copyright 1997, Robert Hart --> - -<sect>Copyright -<p> -This document is distributed under the terms of the GNU Public License (GPL). - -<p> -This document is directly supported by InterWeft IT Consultants -(Melbourne, Australia). - -<p> -The latest version of this document is available at the InterWeft WWW -site at <url url="http://www.interweft.com.au/" name="InterWeft IT -Consultants"> and from <url url="http://sunsite.unc.edu/LDP" name="The -Linux Documentation Project">. - -<sect>Introduction -<p> -With available IP network numbers rapidly becoming an endangered -species, efficient use of this increasingly scarce resource is -important. - -<p> -This document describes how to split a single IP network number up so -that it can be used on several different networks. - -<p> -This document concentrates on C Class IP network numbers - but the -principles apply to A and B class networks as well. - -<sect1>Other sources of information -<p> -There are a number of other sources of information that are of -relevance for both detailed and background information on IP numbers. -Those recommended by the author are:- - -<itemize> - -<item><url url="http://sunsite.unc.edu/LDP/LDP/nag/nag.html" name="The -Linux Network Administrators Guide">. - -<item><url url="http://linuxwww.db.erau.edu/SAG/" name="The Linux System -Administration Guide">. - -<item><url url="http://www.ora.com/catalog/tcp/noframes.html" -name="TCP/IP Network Administration by Craig Hunt, published by O'Reilly -and Associates">. - -</itemize> - -<sect>The Anatomy of IP numbers -<p> -Before diving into the delight of sub-networking, we need to establish -some IP number basics. - -<sect1>IP numbers belong to Interfaces - <bf/NOT/ hosts! -<p> -First of all, let's clear up a basic cause of misunderstanding - IP -numbers are <bf/not/ assigned to hosts. IP numbers are assigned to -network interfaces on hosts. - -<p> -Eh - what's that? - -<p> -Whilst many (if not most) computers on an IP network will possess a -single network interface (and have a single IP number as a consequence), -this is not the only way things happen. Computers and other devices can -have several (if not many) network interfaces - and each interface has -its own IP number. - -<p> -So a device with 6 active interfaces (such as a router) will have 6 IP -numbers - one for each interface to each network to which it is connected. The -reason for this becomes clear when we look at an IP network! - -<p> -Despite this, most people refer to <em/host addresses/ when referring to an -IP number. Just remember, this is simply shorthand for <em/the IP number -of this particular interface on this host/. Many (if not the majority) -of devices on the Internet have only a single interface and thus a -single IP number. - -<sect1>IP Numbers as &dquot;Dotted Quads&dquot; -<p> -In the current (IPv4) implementation of IP numbers, IP numbers consist -of 4 (8 bit) bytes - giving a total of 32 bits of available information. -This results in numbers that are rather large (even when written in -decimal notation). So for readability (and organisational reasons) IP -numbers are usually written in the 'dotted quad' format. The IP number - -<tscreen><verb> - 192.168.1.24 -</verb></tscreen> - -is an example of this - 4 (decimal) numbers separated by (.) dots. - -<p> -As each one of the four numbers is the decimal representation of an 8 -bit byte, each of the 4 numbers can range from 0 to 255 (that is take on -256 unique values - remember, zero is a value too). - -<p> -In addition, part of the IP number of a host identifies the network on -which the host resides, the remaining 'bits' of the IP number identify -the host (oops - network interface) itself. Exactly how many bits are -used by the network ID and how many are available to identify hosts -(interfaces) on that network is determined by the network 'class'. - -<sect1>Classes of IP Networks -<p> -There are three classes of IP numbers - -<itemize> - -<item>Class A IP network numbers use the leftmost 8 bits (the leftmost -of the dotted quads) to identify the network, leaving 24 bits (the -remaining three dotted quads) to identify host interfaces on that -network.<newline> -Class A addresses <bf/always/ have the leftmost bit of the leftmost -byte a zero - that is a decimal value of 0 to 127 for the first dotted -quad. So there are a maximum of 128 class A network numbers -available, with each one containing up to 33,554,430 possible -interfaces. - -<newline><newline> - -However, the networks 0.0.0.0 (known as the default route) and 127.0.0.0 -(the loop back network) have special meanings and are not available for -use to identify networks. So there are only 126 <em/available/ A class -network numbers. - -<item>Class B IP network numbers use the leftmost 16 bits (the leftmost two -dotted quads) to identify the network, leaving 16 bits (the last two -dotted quads) to identify host interfaces. Class B addresses always have -the leftmost 2 bits of the leftmost byte set to 1 0. This leaves 14 bits -left to specify the network address giving 32767 available B class -networks. B Class networks thus have a range of 128 to 191 for the first -of the dotted quads, with each network containing up to 32,766 possible -interfaces. - -<item>Class C IP network numbers use the leftmost 24 bits (the leftmost -three bytes) to identify the network, leaving 8 bits (the rightmost -byte) to identify host interfaces. Class C addresses always start with -the leftmost 3 bits set to 1 1 0 or a range of 192 to 255 for the -leftmost dotted quad. There are thus 4,194,303 available C class network -numbers, each containing 254 interfaces. (C Class networks with the -first byte greater than 223 are however reserved and unavailable for use). -</itemize> - -In summary: - -<tscreen><verb> - Network class Usable range of first byte values (decimal) - A 1 to 126 - B 128 to 191 - C 192 to 254 -</verb></tscreen> - -<p> -There are also special addresses that are reserved for 'unconnected' -networks - that is networks that use IP but are not connected to the -Internet, These addresses are:- - -<itemize> -<item>One A Class Network<newline> -10.0.0.0 -<item>16 B Class Networks<newline> -172.16.0.0 - 172.31.0.0 -<item>256 C Class Networks -192.168.0.0 - 192.168.255.0 -</itemize> - -<p> -You will note that this document uses these sequences throughout to avoid -confusion with 'real' networks and hosts. - -<sect1>Network numbers, interface addresses and broadcast addresses -<p> -IP numbers can have three possible meanings:- - -<itemize> - -<item>the address of an IP network (a group of IP devices sharing common -access to a transmission medium - such as all being on the same Ethernet -segment). A network number will always have the interface (host) bits of -the address space set to 0 (unless the network is sub-networked - as we -shall see); - -<item>the broadcast address of an IP network (the address used to 'talk', -simultaneously, to all devices in an IP network). Broadcast -addresses for a network always have the interface (host) bits of the the -address space set to 1 (unless the network is sub-networked - again, as -we shall see). - -<item>the address of an interface (such as an Ethernet card or PPP interface -on a host, router, print server etc). These addresses can have any value -in the host bits <bf/except/ all zero or all 1 - because with the host bits all -0, the address is a network address and with the host bits all 1 the -address is the broadcast address. - -</itemize> - -<p> -In summary and to clarify things - -<tscreen><verb> -For an A class network... -(one byte of network address space followed by three bytes of host -address space) - - 10.0.0.0 is an A Class network number because all the host - bits of the address space are 0 - 10.0.1.0 is a host address on this network - 10.255.255.255 is the broadcast address of this network - because all the host bits of the address space are 1 - -For a B class network... -(two bytes of network address space followed by two bytes of host -address space) - - 172.17.0.0 is a B Class network number - 172.17.0.1 is a host address on this network - 172.17.255.255 is the network broadcast address - -For a C Class network... -(three bytes of network address space followed by one byte of host -address space) - - 192.168.3.0 is a C Class network number - 192.168.3.42 is a host address on this network - 192.168.3.255 is the network broadcast address -</verb></tscreen> - -<p> -Almost all IP network numbers remaining available for allocation at -present are C Class addresses. - -<sect1>The network mask -<p> -The network mask is more properly called the subnetwork mask. However, -it is generally referred to as the network mask. - -<p> -It is the network mask and its implications on how IP addresses are -interpreted <em/locally/ on an IP network segment that concerns us most -here, as this determines what (if any) sub-networking occurs. - -<p> -The standard (sub-) network mask is all the network bits in an address -set to '1' and all the host bits set to '0'. This means that the -standard network masks for the three classes of networks are:- - -<itemize> -<item>A Class network mask: 255.0.0.0 -<item>B Class network mask: 255.255.0.0 -<item>C Class network mask: 255.255.255.0 -</itemize> - -<p> -There are two important things to remember about the network mask:- -<itemize> -<item>The network mask affects only the <bf/local/ interpretation of -<bf/local/ IP numbers (where local means on this particular network segment); -<item>The network mask is <bf/not/ an IP number - it is used to modify -how local IP numbers are interpreted locally. -</itemize> - -<sect>What are subnets? -<p> -A subnet is a way of taking a single IP network address and <bf/locally/ -splitting it up so that this single network IP address can actually be -used on several interconnected local networks. Remember, a single IP -network number can only be used on a single network. - -<p> -The important word here is <bf/locally/: as far as the world outside the -machines and physical networks covered by the sub-netted IP network are -concerned, nothing whatsoever has changed - it is still just a single IP -network. This is important - sub-networking is a <bf/local/ configuration -and is invisible to the rest of the world. - -<sect>Why subnetwork? -<p> -The reasons behind sub-networking date back to the early specification of -IP - where just a few sites were running on Class A network numbers, -which allow for millions of connected hosts. - -<p> -It is obviously a huge traffic and administration problem if all IP -computers at a large site need to be connected to the same network: -trying to manage such a huge beast would be a nightmare and the network -would (almost certainly) collapse under the load of its own traffic -(saturate). - -<p> -Enter sub-networking: the A class IP network address can be split up to -allow its distribution across several (if not many) separate networks. -The management of each separate network can easily be delegated as well. - -<p> -This allows small, manageable networks to be established - quite -possibly using different networking technologies. Remember, you cannot mix -Ethernet, Token Ring, FDDI, ATM etc on the same physical network - they -can be interconnected, however! - -<p> -Other reasons for sub-networking are:- -<itemize> -<item>Physical site layout can create restrictions (cable run lengths) -in terms of the how the physical infrastructure can be connected, -requiring multiple networks. Sub-networking allows this to be done in an -IP environment using a single IP network number. -<newline><newline> -This is in fact now very commonly done by ISPs who wish to give their -permanently connected clients with local networks static IP numbers. - -<item>Network traffic is sufficiently high to be causing significant -slow downs. By splitting the network up using subnetworks, traffic that -is local to a network segment can be kept local - reducing overall -traffic and speeding up network connectivity without requiring more -actual network bandwidth; -<item>Security requirements may well dictate that different classes of -users do not share the same network - as traffic on a network can always -be intercepted by a knowledgeable user. Sub-networking provides a way to -keep the marketing department from snooping on the R & D network traffic -(or students from snooping on the administration network)! -<item>You have equipment which uses incompatible networking technologies -and need to interconnect them (as mentioned above). -</itemize> - -<sect>How to subnetwork a IP network number -<p> -Having decided that you need to subnetwork your IP network number, how -do you go about it? The following is an overview of the steps which will -then be explained in detail:- - -<itemize> -<item>Set up the physical connectivity (network wiring and network -interconnections - such as routers; -<item>Decide how big/small each subnetwork needs to be in terms of the -number of devices that will connect to it - ie how many usable IP -numbers are required for each individual segment. -<item>Calculate the appropriate network mask and network addresses; -<item>Give each interface on each network its own IP address and the -appropriate network mask; -<item>Set up the routes on the routers and the appropriate gateways, -routes and/or default routes on the networked devices; -<item>Test the system, fix problems and then relax! -</itemize> - -<p> -For the purpose of this example, we will assume we are sub-networking a single C -class network number: 192.168.1.0 - -<p> -This provides for a maximum of 254 connected interfaces (hosts), plus -the obligatory network number (192.168.1.0) and broadcast address -(192.168.1.255). - -<sect1>Setting up the physical connectivity -<p> -You will need to install the correct cabling infrastructure for all the -devices you wish to interconnect designed to meet your physical layout. - -<p> -You will also need a mechanism to interconnect the various segments -together (routers, media converters etc.). - -<p> -A detailed discussion of this is obviously impossible here. Should you -need help, there are network design/installation consultants around who -provide this sort of service. Free advice is also available on a number of -Usenet news groups (such as comp.os.linux.networking). - -<sect1>Subnetwork sizing -<p> -There is a play off between the number of subnetworks you create and 'wasted' -IP numbers. - -<p> -Every individual IP network has two addresses unusable as interface -(host) addresses - the network IP number itself and the broadcast -address. When you subnetwork, each subnetwork requires its own, unique -IP network number and broadcast address - and these have to be valid -addresses from within the range provided by the IP network that you are -sub-networking. - -<p> -So, by sub-networking an IP network into two separate subnetworks, there -are now <bf/two/ network addresses and <bf/two/ broadcast addresses - -increasing the 'unusable' interface (host) addresses; creating 4 -subnetworks creates <bf/eight/ unusable interface (host) addresses and -so on. - -<p> -In fact the smallest usable subnetwork consists of 4 IP numbers:- -<itemize> -<item>Two usable IP interface numbers - one for the router interface on -that network and one for the single host on that network. -<item>One network number. -<item>One broadcast address. -</itemize> - -<p> -Quite why one would want to create such a small network is another -question! With only a single host on the network, any network -communication must go out to another network. However, the example does -serve to show the law of diminishing returns that applies to -sub-networking. - -<p> -In principle, you can only divide your IP network number into 2^n (where -n is one less that the number of host bits in your IP network number) -equally sized subnetworks (you can subnetwork a subnetwork and combine -subnetworks however). - -<p> -So be realistic about designing your network design - you want the -<bf/minimum/ number of separate local networks that is consistent with -management, physical, equipment and security constraints! - -<sect1>Calculating the subnetwork mask and network numbers -<p> -The network mask is what performs all the <bf/local/ magic of dividing -an IP network into subnetworks. - -<p> -The network mask for an un-sub-networked IP network number is simply a -dotted quad which has all the 'network bits' of the network number -set to '1' and all the host bits set to '0'. - -<p> -So, for the three classes of IP networks, the standard network masks -are:- -<itemize> -<item>Class A (8 network bits) : 255.0.0.0 -<item>Class B (16 network bits): 255.255.0.0 -<item>Class C (24 network bits): 255.255.255.0 -</itemize> - -<p> -The way sub-networking operates is to <em/borrow/ one or more of the -available host bits and make then make interfaces <bf/locally/ interpret -these borrowed bits as part of the network bits. So to divide a network -number into two subnetworks, we would borrow one host bit by setting the -appropriate bit in the network mask of the first (normal) host bit to '1'. - -<p> -For a C Class address, this would result in a netmask of -<newline> -11111111.11111111.11111111.10000000 -<newline> -or 255.255.255.128 - -<p> -For our C Class network number of 192.168.1.0, these are some of the -sub-networking options you have:- - -<code> -No of No of -subnets Hosts/net netmask -2 126 255.255.255.128 (11111111.11111111.11111111.10000000) -4 62 255.255.255.192 (11111111.11111111.11111111.11000000) -8 30 255.255.255.224 (11111111.11111111.11111111.11100000) -16 14 255.255.255.240 (11111111.11111111.11111111.11110000) -32 6 255.255.255.248 (11111111.11111111.11111111.11111000) -64 2 255.255.255.252 (11111111.11111111.11111111.11111100) -</code> - -<p> -In principle, there is absolutely no reason to follow the above way of -subnetworking where network mask bits are added from the most -significant host bit to the least significant host bit. However, if you -do not do it this way, the resulting IP numbers will be in a <em/very/ -odd sequence! This makes it extremely difficult for us humans to decide -to which subnetwork an IP number belongs as we are not too good at thinking -in binary (computers on the other hand are and will use whatever scheme -you tell them with equal equanimity). - -<p> -Having decided on the appropriate netmask, you then need to work out -what the various Network and broadcast addresses are - and the IP number -range for each of these networks. Again, considering only a C Class IP -Network number and listing only the <em/final/ (host part) we have:- - -<code> -Netmask Subnets Network B'cast MinIP MaxIP Hosts Total Hosts --------------------------------------------------------------------------- - 128 2 0 127 1 126 126 - 128 255 129 254 126 252 - - 192 4 0 63 1 62 62 - 64 127 65 126 62 - 128 191 129 190 62 - 192 255 193 254 62 248 - - 224 8 0 31 1 30 30 - 32 63 33 62 30 - 64 95 65 94 30 - 96 127 97 126 30 - 128 159 129 158 30 - 160 191 161 190 30 - 192 223 193 222 30 - 224 255 225 254 30 240 -</code> - -<p> -As can be seen, there is a very definite sequence to these numbers, -which make them fairly easy to check. The 'downside' of sub-networking is -also visible in terms of the reducing total number of available host -addresses as the number of subnetworks increases. - -<p> With this information, you are now in a position to assign host and -network IP numbers and netmasks. - -<sect>Routing -<p> -If you are using a Linux PC with two network interfaces to route between -two (or more) subnets, you need to have IP Forwarding enabled in your -kernel. Do a - -<code> - cat /proc/ksyms | grep ip_forward -</code> - -<p> -You should get back something like... -<code> -00141364 ip_forward_Rf71ac834 -</code> - -<p> -If you do not, then you do not have IP-Forwarding enabled in your kernel -and you need to recompile and install a new kernel. - -<p> -For the sake of this example, let us assume that you have decided to -subnetwork you C class IP network number 192.168.1.0 into 4 subnets -(each of 62 usable interface/host IP numbers). However, two of these -subnets are being combined into a larger single network, giving three -physical networks. - -<p> -These are :- -<code> -Network Broadcast Netmask Hosts -192.168.1.0 192.168.1.63 255.255.255.192 62 -192.168.1.64 192.168.1.127 255.255.255.192 62 -192.168.1.128 192.168.1.255 255.255.255.128 124 (see note) -</code> - -<p> -Note: the reason the last network has only 124 usable network addresses -(not 126 as would be expected from the network mask) is that it is -really a 'super net' of two subnetworks. Hosts on the other two networks -will interpret 192.168.1.192 as the <em/network/ address of the 'non-existent' -subnetwork. Similarly, they will interpret 192.168.1.191 -as the broadcast address of the 'non-existent' subnetwork. - -<p> -So, if you use 192.168.1.191 or 192 as host addresses on the third -network, then machines on the two smaller networks will not be able to -communicate with them. - -<p> -This illustrates an important point with subnetworks - the usable -addresses are determined by the <bf/SMALLEST/ subnetwork in that address -space. - -<sect1>The routing tables -<p> -Let us assume that a computer running Linux is acting as a router for -this network. It will have three network interfaces to the local LANs -and possibly a fourth interface to the Internet (which would be its -default route. - -<p> -Let us assume that the Linux computer uses the lowest available IP -address in each subnetwork on its interface to that network. It would -configure its network interfaces as - -<code> -Interface IP Address Netmask -eth0 192.168.1.1 255.255.255.192 -eth1 192.168.1.65 255.255.255.192 -eth2 192.168.1.129 255.255.255.128 -</code> - -<p> -The routing it would establish would be - -<code> -Destination Gateway Genmask Iface -192.168.1.0 0.0.0.0 255.255.255.192 eth0 -192.168.1.64 0.0.0.0 255.255.255.192 eth1 -192.168.1.128 0.0.0.0 255.255.255.128 eth2 -</code> - -<p> -On each of the subnetworks, the hosts would be configured with their own -IP number and net mask (appropriate for the particular network). Each host -would declare the Linux PC as its gateway/router, specifying the Linux -PCs IP address for its interface on to that particular network. - - -<p> -Robert Hart -Melbourne, Australia March 1997. - -</article> diff --git a/LDP/howto/linuxdoc/KickStart-HOWTO.html b/LDP/howto/linuxdoc/KickStart-HOWTO.html deleted file mode 100644 index d9af7b72..00000000 --- a/LDP/howto/linuxdoc/KickStart-HOWTO.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - -<head> - -<title>KickStart HOWTO - - - - - -

KickStart HOWTO

- -

This document has been removed at the request of the author, Martin -Hamilton, because it has been replaced by RedHat's own documentation.

- -

For more information on KickStart Installations and Configurations, you -may want to try the following Web sites:

- - - - - diff --git a/LDP/howto/linuxdoc/archived/Beowulf-HOWTO.sgml b/LDP/howto/linuxdoc/archived/Beowulf-HOWTO.sgml deleted file mode 100644 index 6d610fd8..00000000 --- a/LDP/howto/linuxdoc/archived/Beowulf-HOWTO.sgml +++ /dev/null @@ -1,1211 +0,0 @@ - - -
-Beowulf HOWTO - - -<author>Jacek Radajewski and Douglas Eadline - -<date>v1.1.1, 22 November 1998 - - -<abstract> -This document introduces the Beowulf Supercomputer architecture and -provides background information on parallel programming, including -links to other more specific documents, and web pages. - -</abstract> - -<toc> - -<sect>Preamble - -<sect1>Disclaimer -<p> -We will not accept any responsibility for any incorrect information -within this document, nor for any damage it might cause when applied. - -<sect1>Copyright -<p> -Copyright © 1997 - 1998 Jacek Radajewski and Douglas Eadline. -Permission to distribute and modify this document is granted under the -GNU General Public Licence. - -<sect1>About this HOWTO -<p> -Jacek Radajewski started work on this document in November 1997 and -was soon joined by Douglas Eadline. Over a few months the Beowulf -HOWTO grew into a large document, and in August 1998 it was split into -three documents: Beowulf HOWTO, Beowulf Architecture Design HOWTO, and -the Beowulf Installation and Administration HOWTO. Version 1.0.0 of -the Beowulf HOWTO was released to the Linux Documentation Project on -11 November 1998. We hope that this is only the beginning of what -will become a complete Beowulf Documentation Project. - -<sect1>About the authors -<p> -<itemize> - -<item>Jacek Radajewski works as a Network Manager, and is studying for -an honors degree in computer science at the University of Southern -Queensland, Australia. Jacek's first contact with Linux was in 1995 -and it was love at first sight. Jacek built his first Beowulf cluster -in May 1997 and has been playing with the technology ever since, -always trying to find new and better ways of setting things up. You -can contact Jacek by sending e-mail to <htmlurl -name="jacek@usq.edu.au" url="mailto:jacek@usq.edu.au"> - -<item>Douglas Eadline, Ph.D. is President and Principal Scientist at -Paralogic, Inc., Bethlehem, PA, USA. Trained as Physical/Analytical -Chemist, he has been involved with computers since 1978 when he built -his first single board computer for use with chemical instrumentation. -Dr. Eadline's interests now include Linux, Beowulf clusters, and -parallel algorithms. Dr. Eadline can be contacted by sending -email to <htmlurl name="deadline@plogic.com" -url="mailto:deadline@plogic.com"> - -</itemize> - -<sect1>Acknowledgements -<p> -The writing of the Beowulf HOWTO was a long proces and is finally -complete, thanks to many individuals. I would like to thank the -following people for their help and contribution to this HOWTO. -<itemize> - -<item> Becky for her love, support, and understanding. - -<item> Tom Sterling, Don Becker, and other people at NASA who started -the Beowulf project. - -<item> Thanh Tran-Cong and the Faculty of Engineering and Surveying -for making the <it>topcat</it> Beowulf machine available for experiments. - -<item> My supervisor Christopher Vance for many great ideas. - -<item> My friend Russell Waldron for great programming ideas, his -general interest in the project, and support. - -<item> My friend David Smith for proof reading this document. - -<item> Many other people on the Beowulf mailing list who provided me -with feedback and ideas. - -<item> All the people who are responsible for the Linux operating -system and all the other free software packages used on -<it>topcat</it> and other Beowulf machines. - -</itemize> - -<sect>Introduction -<p> - -As the performance of commodity computer and network hardware -increase, and their prices decrease, it becomes more and more -practical to build parallel computational systems from off-the-shelf -components, rather than buying CPU time on very expensive -Supercomputers. In fact, the price per performance ratio of a Beowulf -type machine is between three to ten times better than that for -traditional supercomputers. Beowulf architecture scales well, it is -easy to construct and you only pay for the hardware as most of the -software is free. - -<sect1>Who should read this HOWTO ? -<p> -This HOWTO is designed for a person with at least some exposure to the -Linux operating system. Knowledge of Beowulf technology or -understanding of more complex operating system and networking -concepts is not essential, but some exposure to parallel computing -would be advantageous (after all you must have some reason to read -this document). This HOWTO will not answer all possible questions you -might have about Beowulf, but hopefully will give you ideas and guide -you in the right direction. The purpose of this HOWTO is to provide -background information, links and references to more advanced -documents. - -<sect1>What is a Beowulf ? -<p> -<it>Famed was this Beowulf: far flew the boast of him, son of Scyld, -in the Scandian lands. So becomes it a youth to quit him well with -his father's friends, by fee and gift, that to aid him, aged, in after -days, come warriors willing, should war draw nigh, liegemen loyal: by -lauded deeds shall an earl have honor in every clan.</it> Beowulf is -the earliest surviving epic poem written in English. It is a story -about a hero of great strength and courage who defeted a monster -called Grendel. See <ref id="history" name="History"> to find out -more about the Beowulf hero. -<p> -There are probably as many Beowulf definitions as there are people who -build or use Beowulf Supercomputer facilities. Some claim that one -can call their system Beowulf only if it is built in the same way as -the NASA's original machine. Others go to the other extreme and call -Beowulf any system of workstations running parallel code. My -definition of Beowulf fits somewhere between the two views described -above, and is based on many postings to the Beowulf mailing list: - -<p> -Beowulf is a multi computer architecture which can be used for -parallel computations. It is a system which usually consists of one -server node, and one or more client nodes connected together via -Ethernet or some other network. It is a system built using commodity -hardware components, like any PC capable of running Linux, standard -Ethernet adapters, and switches. It does not contain any custom -hardware components and is trivially reproducible. Beowulf also uses -commodity software like the Linux operating system, Parallel Virtual -Machine (PVM) and Message Passing Interface (MPI). The server node -controls the whole cluster and serves files to the client nodes. It -is also the cluster's console and gateway to the outside world. Large -Beowulf machines might have more than one server node, and possibly -other nodes dedicated to particular tasks, for example consoles or -monitoring stations. In most cases client nodes in a Beowulf system -are dumb, the dumber the better. Nodes are configured and controlled -by the server node, and do only what they are told to do. In a -disk-less client configuration, client nodes don't even know their IP -address or name until the server tells them what it is. One of the -main differences between Beowulf and a Cluster of Workstations (COW) -is the fact that Beowulf behaves more like a single machine rather -than many workstations. In most cases client nodes do not have -keyboards or monitors, and are accessed only via remote login or -possibly serial terminal. Beowulf nodes can be thought of as a CPU + -memory package which can be plugged in to the cluster, just like a CPU -or memory module can be plugged into a motherboard. - -<p> Beowulf is not a special software package, new network topology or -the latest kernel hack. Beowulf is a technology of clustering Linux -computers to form a parallel, virtual supercomputer. Although there -are many software packages such as kernel modifications, PVM and MPI -libraries, and configuration tools which make the Beowulf architecture -faster, easier to configure, and much more usable, one can build a -Beowulf class machine using standard Linux distribution without any -additional software. If you have two networked Linux computers which -share at least the <tt>/home</tt> file system via NFS, and trust each -other to execute remote shells (rsh), then it could be argued that you -have a simple, two node Beowulf machine. - - -<sect1>Classification -<p> -Beowulf systems have been constructed from a variety of parts. For the sake -of performance some non-commodity components (i.e. produced by a single -manufacturer) have been employed. In order to account for the different -types of systems and to make discussions about machines a bit easier, we -propose the following simple classification scheme: -<p> -CLASS I BEOWULF: -<p> -This class of machines built entirely from commodity "off-the-shelf" parts. -We shall use the "Computer Shopper" certification test to define commodity -"off-the-shelf" parts. (Computer Shopper is a 1 inch thick monthly -magazine/catalog of PC systems and components.) The test is as follows: - - A CLASS I Beowulf is a machine that can be assembled - from parts found in at least 3 nationally/globally circulated - advertising catalogs. - -The advantages of a CLASS I system are: -<itemize> -<item> hardware is available form multiple sources (low prices, easy maintenance) -<item> no reliance on a single hardware vendor -<item> driver support from Linux commodity -<item> usually based on standards (SCSI, Ethernet, etc.) -</itemize> - -The disadvantages of a CLASS I system are: -<itemize> -<item>best performance may require CLASS II hardware -</itemize> -<p> -CLASS II BEOWULF -<p> -A CLASS II Beowulf is simply any machine that does not pass the Computer -Shopper certification test. This is not a bad thing. Indeed, it is merely a -classification of the machine. - -The advantages of a CLASS II system are: -<itemize> -<item> Performance can be quite good! -</itemize> - -The disadvantages of a CLASS II system are: -<itemize> -<item> driver support may vary -<item> reliance on single hardware vendor -<item> may be more expensive than CLASS I systems. -</itemize> - -One CLASS is not necessarily better than the other. It all depends on your -needs and budget. This classification system is only intended to make -discussions about Beowulf systems a bit more succinct. The "System Design" -section may help determine what kind of system is best suited for your needs. - - - - -<sect>Architecture Overview -<p> - -<sect1>What does it look like ? -<p> -I think that the best way of describing the Beowulf supercomputer -architecture is to use an example which is very similar to the actual -Beowulf, but familiar to most system administrators. The example that -is closest to a Beowulf machine is a Unix computer laboratory with a -server and a number of clients. To be more specific I'll use the DEC -Alpha undergraduate computer laboratory at the Faculty of Sciences, -USQ as the example. The server computer is called <it>beldin</it> and -the client machines are called <it>scilab01</it>, <it>scilab02</it>, -<it>scilab03</it>, up to <it>scilab20</it>. All clients have -a local copy of the Digital Unix 4.0 operating system installed, but -get the user file space (<tt>/home</tt>) and <tt>/usr/local</tt> from -the server via NFS (Network File System). Each client has an entry -for the server and all the other clients in its -<tt>/etc/hosts.equiv</tt> file, so all clients can execute a remote -shell (rsh) to all others. The server machine is a NIS server for the -whole laboratory, so account information is the same across all the -machines. A person can sit at the <it>scilab02</it> console, -login, and have the same environment as if he logged onto the server -or <it>scilab15</it>. The reason all the clients have the same look -and feel is that the operating system is installed and configured -in the same way on all machines, and both the user's <tt>/home</tt> -and <tt>/usr/local</tt> areas are physically on the server and -accessed by the clients via NFS. For more information on NIS and NFS -please read the <htmlurl name="NIS" -url="http://sunsite.unc.edu/LDP/HOWTO/NIS-HOWTO.html"> and <htmlurl -name="NFS" url="http://sunsite.unc.edu/LDP/HOWTO/NFS-HOWTO.html"> -HOWTOs. - - -<sect1>How to utilise the other nodes ? -<p> - -Now that we have some idea about the system architecture, let us take -a look at how we can utilise the available CPU cycles of the machines -in the computer laboratory. Any person can logon to any of the -machines, and run a program in their home directory, but they can also -spawn the same job on a different machine simply by executing remote -shell. For example, assume that we want to calculate the sum of the -square roots of all integers between 1 and 10 inclusive. We write a -simple program called <tt>sigmasqrt</tt> (please see <ref -id="sigmasqrt" name="source code">) which does exactly that. To -calculate the sum of the square roots of numbers from 1 to 10 we -execute : -<verb> -[jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 10 -22.468278 - -real 0m0.029s -user 0m0.001s -sys 0m0.024s - -</verb> -The <tt>time</tt> command allows us to check the wall-clock (the -elapsed time) of running this job. As we can see, this example took -only a small fraction of a second (0.029 sec) to execute, but what if -I want to add the square root of integers from 1 to 1 000 000 000 ? -Let us try this, and again calculate the wall-clock time. - -<verb> -[jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 1000000000 -21081851083600.559000 - -real 16m45.937s -user 16m43.527s -sys 0m0.108s -</verb> - - -This time, the execution time of the program is considerably longer. -The obvious question to ask is what can we do to speed up the -execution time of the job? How can we change the way the job is -running to minimize the wall-clock time of running this job? The -obvious answer is to split the job into a number of sub-jobs and to -run these sub-jobs in parallel on all computers. We could split one -big addition task into 20 parts, calculating one range of square roots -and adding them on each node. When all nodes finish the -calculation and return their results, the 20 numbers could be added -together to obtain the final solution. Before we run this job we will -make a named pipe which will be used by all processes to write their -results. - -<verb> -[jacek@beldin sigmasqrt]$ mkfifo output -[jacek@beldin sigmasqrt]$ ./prun.sh & time cat output | ./sum -[1] 5085 -21081851083600.941000 -[1]+ Done ./prun.sh - -real 0m58.539s -user 0m0.061s -sys 0m0.206s -</verb> - -This time we get about 58.5 seconds. This is the time from starting -the job until all the nodes have finished their computations and -written their results into the pipe. The time does not include the -final addition of the twenty numbers, but this time is a very small -fraction of a second and can be ignored. We can see that there is a -significant improvement in running this job in parallel. In fact the -parallel job ran about 17 times faster, which is very reasonable for a -20 fold increase in the number of CPUs. The purpose of the above -example is to illustrate the simplest method of parallelising -concurrent code. In practice such simple examples are rare and -different techniques (PVM and PMI APIs) are used to achieve the -parallelism. - - -<sect1>How does Beowulf differ from a COW ? -<p> -The computer laboratory described above is a perfect example of a -Cluster of Workstations (COW). So what is so special about Beowulf, -and how is it different from a COW? The truth is that there is not -much difference, but Beowulf does have few unique characteristics. -First of all, in most cases client nodes in a Beowulf cluster do not -have keyboards, mice, video cards nor monitors. All access to the -client nodes is done via remote connections from the server node, -dedicated console node, or a serial console. Because there is no need -for client nodes to access machines outside the cluster, nor for -machines outside the cluster to access client nodes directly, it -is a common practice for the client nodes to use private IP addresses -like the 10.0.0.0/8 or 192.168.0.0/16 address ranges (RFC 1918 <htmlurl -name="http://www.alternic.net/rfcs/1900/rfc1918.txt.html" -url="http://www.alternic.net/rfcs/1900/rfc1918.txt.html">). Usually -the only machine that is also connected to the outside world using a -second network card is the server node. The most common ways of using -the system is to access the server's console directly, or either -telnet or remote login to the server node from personal workstation. -Once on the server node, users can edit and compile their code, and -also spawn jobs on all nodes in the cluster. In most cases COWs are -used for parallel computations at night, and over weekends when people -do not actually use the workstations for every day work, thus -utilising idle CPU cycles. Beowulf on the other hand is a machine -usually dedicated to parallel computing, and optimised for this -purpose. Beowulf also gives better price/performance ratio as it is -built from off-the-shelf components and runs mainly free software. -Beowulf has also more single system image features which help the -users to see the Beowulf cluster as a single computing workstation. - - -<sect>System Design -<p> -Before you purchase any hardware, it may be a good idea to consider -the design of your system. There are basically two hardware issues -involved with design of a Beowulf system: the type of nodes or -computers you are going to use; and way you connect the computer -nodes. There is one software issue that may effect your hardware -decisions; the communication library or API. A more detailed -discussion of hardware and communication software is provided later in -this document. -<p> -While the number of choices is not large, there are some important -design decisions that must be made when constructing a Beowulf -systems. Because the science (or art) of "parallel computing" has -many different interpretations, an introduction is provided below. If -you do not like to read background material, you may skip this -section, but it is advised that you read section <ref id="suitability" -name="Suitability"> before you make you final hardware decisions. - -<sect1>A brief background on parallel computing. -<p> -This section provides background on parallel computing concepts. It -is NOT an exhaustive or complete description of parallel computing -science and technology. It is a brief description of the issues that -may be important to a Beowulf designer and user. -<p> -As you design and build your Beowulf, many of these issues described -below will become important in your decision process. Due to its -component nature, a Beowulf Supercomputer requires that we consider -many factors carefully because they are now under our control. In -general, it is not all that difficult to understand the issues -involved with parallel computing. Indeed, once the issues are -understood, your expectations will be more realistic and success will -be more likely. Unlike the "sequential world" where processor speed is -considered the single most important factor, processor speed in the -"parallel world" is just one of several factors that will determine -overall system performance and efficiency. -<p> - -<sect1>The methods of parallel computing -<p> -Parallel computing can take many forms. From a user's perspective, it is -important to consider the advantages and disadvantages of each methodology. -The following section attempts to provide some perspective on the methods of -parallel computing and indicate where the Beowulf machine falls on this -continuum. -<p> -<sect2>Why more than one CPU? -<p> -Answering this question is important. Using 8 CPUs to run your word -processor sounds a little like "over-kill" -- and it is. What about a -web server, a database, a rendering program, or a project scheduler? -Maybe extra CPUs would help. What about a complex simulation, a fluid -dynamics code, or a data mining application. Extra CPUs definitely -help in these situations. Indeed, multiple CPUs are being used to -solve more and more problems. -<p> -The next question usually is: "Why do I need two or four CPUs, I will -just wait for the 986 turbo-hyper chip." There are several reasons: -<enum> -<item> Due to the use of multi-tasking Operating Systems, it is -possible to do several things at once. This is a natural -"parallelism" that is easily exploited by more than one low cost CPU. - -<item> Processor speeds have been doubling every 18 months, but what -about RAM speeds or hard disk speeds? Unfortunately, these speeds are -not increasing as fast as the CPU speeds. Keep in mind most -applications require "out of cache memory access" and hard disk -access. Doing things in parallel is one way to get around some of -these limitations. - -<item> Predictions indicate that processor speeds will not continue to double -every 18 months after the year 2005. There are some very serious obstacles to -overcome in order to maintain this trend. - -<item> Depending on the application, parallel computing can speed things up by any -where from 2 to 500 times faster (in some cases even faster). Such performance -is not available using a single processor. Even supercomputers that at one -time used very fast custom processors are now built from multiple "commodity- -off-the-shelf" CPUs. -</enum> - -If you need speed - either due to a compute bound problem and/or an I/O bound -problem, parallel is worth considering. Because parallel computing is -implemented in a variety of ways, solving your problem in parallel will -require some very important decisions to be made. These decisions may -dramatically effect portability, performance, and cost of your application. -<p> -Before we get technical, let's look take a look at a real "parallel computing -problem" using an example with which we are familiar - waiting in long lines -at a store. - -<sect2>The Parallel Computing Store -<p> -Consider a big store with 8 cash registers grouped together in the front of -the store. Assume each cash register/cashier is a CPU and each customer is a -computer program. The size of the computer program (amount of work) is the -size of each customer's order. The following analogies can be used to -illustrate parallel computing concepts. -<p> -<sect3>Single-tasking Operating System -<p> -One cash register open (is in use) and must process each customer one at a -time. -<p> -Computer Example: MS DOS -<p> -<sect3>Multi-tasking Operating System: -<p> -One cash register open, but now we process only a part of each order at a -time, move to the next person and process some of their order. Everyone -"seems" to be moving through the line together, but if no one else is in the -line, you will get through the line faster. -<p> -Computer Example: UNIX, NT using a single CPU -<p> -<sect3>Multitasking Operating Systems with Multiple CPUs: -<p> -Now we open several cash registers in the store. Each order can be processed -by a separate cash register and the line can move much faster. This is called -SMP - Symmetric Multi-processing. Although there are extra cash registers -open, you will still never get through the line any faster than just you and a -single cash register. -<p> -Computer Example: UNIX and NT with multiple CPUs -<p> - -<sect3>Threads on a Multitasking Operating Systems extra CPUs -<p> -If you "break-up" the items in your order, you might be able to move through -the line faster by using several cash registers at one time. First, we must -assume you have a large amount of goods, because the time you invest "breaking -up your order" must be regained by using multiple cash registers. In theory, -you should be able to move through the line "n" times faster than before*; -where "n" is the number of cash registers. When the cashiers need to get sub- -totals, they can exchange information quickly by looking and talking to all -the other "local" cash registers. They can even snoop around the other cash -registers to find information they need to work faster. There is a limit, -however, as to how many cash registers the store can effectively locate in any -one place. - -Amdals law will also limit the application speed-up to the slowest -sequential portion of the program. - -Computer Example: UNIX or NT with extra CPU on the same motherboard running -multi-threaded programs. - - -<sect3>Sending Messages on Multitasking Operating Systems with extra CPUs: -<p> -In order to improve performance, the store adds 8 cash registers at the back -of the store. Because the new cash registers are far away from the front cash -registers, the cashiers must call on the phone to send their sub-totals to the -front of the store. This distance adds extra overhead (time) to communication -between cashiers, but if communication is minimized, it is not a problem. If -you have a really big order, one that requires all the cash registers, then as -before your speed can be improved by using all cash registers at the same -time, the extra overhead must be considered. In some cases, the store may have -single cash registers (or islands of cash registers) located all over the -store - each cash register (or island) must communicate by phone. Since all -the cashiers working the cash registers can talk to each other by phone, it -does not matter too much where they are. - -Computer Example: One or several copies of UNIX or NT with extra CPUs on the -same or different motherboard communicating through messages. - -The above scenarios, although not exact, are a good representation of -constraints placed on parallel systems. Unlike a single CPU (or cash -register) communication is an issue. - -<sect1>Architectures for parallel computing -<p> -The common methods and architectures of parallel computing are presented -below. While this description is by no means exhaustive, it is enough to -understand the basic issues involved with Beowulf design. - -<sect2>Hardware Architectures -<p> - -There are basically two ways parallel computer hardware is put together: - -<enum> -<item> Local memory machines that communicate by messages (Beowulf Clusters) -<item> Shared memory machines that communicate through memory (SMP machines) -</enum> - -A typical Beowulf is a collection of single CPU machines connected using fast -Ethernet and is, therefore, a local memory machine. A 4 way SMP box is a -shared memory machine and can be used for parallel computing - parallel -applications communicate using shared memory. Just as in the computer store -analogy, local memory machines (individual cash registers) can be scaled up to -large numbers of CPUs, while the number of CPUs shared memory machines (the -number of cash registers you can place in one spot) can have is limited due to -memory contention. - -It is possible, however, to connect many shared memory machines to create a -"hybrid" shared memory machine. These hybrid machines "look" like a single -large SMP machine to the user and are often called NUMA (non uniform memory -access) machines because the global memory seen by the programmer and shared -by all the CPUs can have different latencies. At some level, however, a NUMA -machine must "pass messages" between local shared memory pools. - -It is also possible to connect SMP machines as local memory compute nodes. -Typical CLASS I motherboards have either 2 or 4 CPUs and are often used as a -means to reduce the overall system cost. The Linux internal scheduler -determines how these CPUs get shared. The user cannot (at this point) assign -a specific task to a specific SMP processor. The user can however, start two -independent processes or a threaded processes and expect to see a performance -increase over a single CPU system. - -<sect2>Software API Architectures -<p> -There basically two ways to "express" concurrency in a program: -<enum> -<item> Using Messages sent between processors -<item> Using operating system Threads -</enum> -<p> -Other methods do exist, but these are the two most widely used. It is -important to remember that the expression of concurrency is not necessary -controlled by the underlying hardware. Both Messages and Threads can be -implemented on SMP, NUMA-SMP, and clusters - although as explained below -efficiently and portability are important issues. -<p> -<sect3>Messages -<p> -Historically, messages passing technology reflected the -design of early local memory parallel computers. Messages require -copying data while Threads use data in place. The latency and speed -at which messages can be copied are the limiting factor with message -passing models. A Message is quite simple: some data and a destination -processor. Common message passing APIs are <htmlurl -url="http://www.epm.ornl.gov/pvm" name="PVM"> or <htmlurl -url="http://www.mcs.anl.gov/Projects/mpi/index.html" name="MPI">. Message -passing can be efficiently implemented using Threads and Messages work -well both on SMP machine and between clusters of machines. The -advantage to using messages on an SMP machine, as opposed to Threads, -is that if you decided to use clusters in the future it is easy to add -machines or scale your application. -<p> -<sect3>Threads -<p> -Operating system Threads were developed because shared memory SMP -(symmetrical multiprocessing) designs allowed very fast shared memory -communication and synchronization between concurrent parts of a -program. Threads work well on SMP systems because communication is -through shared memory. For this reason the user must isolate local -data from global data, otherwise programs will not work properly. In -contrast to messages, a large amount of copying can be eliminated with -threads because the data is shared between processes (threads). Linux -supports POSIX threads. The problem with threads is that it is -difficult to extend them beyond one SMP machine and because data is -shared between CPUs, cache coherence issues can contribute to -overhead. Extending threads beyond the SMP boundary efficiently -requires NUMA technology which is expensive and not natively -supported by Linux. Implementing threads on top of messages has been -done (<htmlurl name="(http://syntron.com/ptools/ptools_pg.htm)" -url="http://syntron.com/ptools/ptools_pg.htm">), but Threads are often -inefficient when implemented using messages. -<p> -The following can be stated about performance: -<verb> - SMP machine cluster of machines scalability - performance performance - ----------- ------------------- ----------- -messages good best best - -threads best poor* poor* - -* requires expensive NUMA technology. -</verb> - -<sect2>Application Architecture -<p> -In order to run an application in parallel on multiple CPUs, it must be -explicitly broken in to concurrent parts. A standard single CPU application -will run no faster than a single CPU application on multiple processors. -There are some tools and compilers that can break up programs, but -parallelizing codes is not a "plug and play" operation. Depending on the -application, parallelizing code can be easy, extremely difficult, or in some -cases impossible due to algorithm dependencies. -<p> -Before the software issues can be addressed the concept of Suitability -needs to be introduced. - -<sect1>Suitability<label id="suitability"> -<p> -Most questions about parallel computing have the same answer: -<p> -"It all depends upon the application." -<p> -Before we jump into the issues, there is one very important distinction that -needs to be made - the difference between CONCURRENT and PARALLEL. For the -sake of this discussion we will define these two concepts as follows: -<p> -CONCURRENT parts of a program are those that can be computed independently. -<p> -PARALLEL parts of a program are those CONCURRENT parts that are executed on -separate processing elements at the same time. -<p> -The distinction is very important, because CONCURRENCY is a property of the -program and efficient PARALLELISM is a property of the machine. Ideally, -PARALLEL execution should result in faster performance. The limiting factor -in parallel performance is the communication speed and latency between compute -nodes. (Latency also exists with threaded SMP applications due to cache -coherency.) Many of the common parallel benchmarks are highly parallel and -communication and latency are not the bottle neck. This type of problem can be -called "obviously parallel". Other applications are not so simple and -executing CONCURRENT parts of the program in PARALLEL may actually cause the -program to run slower, thus offsetting any performance gains in other -CONCURRENT parts of the program. In simple terms, the cost of communication -time must pay for the savings in computation time, otherwise the PARALLEL -execution of the CONCURRENT part is inefficient. -<p> -The task of the programmer is to determining what CONCURRENT parts of the -program SHOULD be executed in PARALLEL and what parts SHOULD NOT. The answer -to this will determine the EFFICIENCY of application. The following graph -summarizes the situation for the programmer: -<p> -<verb> - - - - | * - | * - | * - % of | * - appli- | * - cations | * - | * - | * - | * - | * - | * - | **** - | **** - | ******************** - +----------------------------------- - communication time/processing time -</verb> -<p> -In a perfect parallel computer, the ratio of communication/processing would be -equal and anything that is CONCURRENT could be implemented in PARALLEL. -Unfortunately, Real parallel computers, including shared memory machines, are -subject to the effects described in this graph. When designing a Beowulf, the -user may want to keep this graph in mind because parallel efficiency depends -upon ratio of communication time and processing time for A SPECIFIC PARALLEL -COMPUTER. Applications may be portable between parallel computers, but there -is no guarantee they will be efficient on a different platform. -<p> -IN GENERAL, THERE IS NO SUCH THING AS A PORTABLE AND EFFICIENT PARALLEL -PROGRAM -<p> -There is yet another consequence to the above graph. Since efficiency depends -upon the comm./process. ratio, just changing one component of the ratio does -not necessary mean a specific application will perform faster. A change in -processor speed, while keeping the communication speed that same may have non- -intuitive effects on your program. For example, doubling or tripling the CPU -speed, while keeping the communication speed the same, may now make some -previously efficient PARALLEL portions of your program, more efficient if they -were executed SEQUENTIALLY. That is, it may now be faster to run the -previously PARALLEL parts as SEQUENTIAL. Furthermore, running inefficient -parts in parallel will actually keep your application from reaching its -maximum speed. Thus, by adding faster processor, you may actually slowed down -your application (you are keeping the new CPU from running at its maximum -speed for that application) -<p> -UPGRADING TO A FASTER CPU MAY ACTUALLY SLOW DOWN YOUR APPLICATION -<p> -So, in conclusion, to know whether or not you can use a parallel hardware -environment, you need to have some insight into the suitability of a -particular machine to your application. You need to look at a lot of issues -including CPU speeds, compiler, message passing API, network, etc. Please -note, just profiling an application, does not give the whole story. You may -identify a computationally heavy portion of your program, but you do not -know the communication cost for this portion. It may be that for a given -system, the communication cost as do not make parallelizing this code -efficient. -<p> -A final note about a common misconception. It is often stated that "a program -is PARALLELIZED", but in reality only the CONCURRENT parts of the program have -been located. For all the reasons given above, the program is not -PARALLELIZED. Efficient PARALLELIZATION is a property of the machine. -<p> - -<sect1>Writing and porting parallel software -<p> -Once you decide that you need parallel computing and would like to design and -build a Beowulf, a few moments considering your application with respect to -the previous discussion may be a good idea. -<p> -In general there are two things you can do: -<enum> -<item>Go ahead and construct a CLASS I Beowulf and then "fit" your - application to it. Or run existing parallel applications that - you know work on your Beowulf (but beware of the portability and - efficiently issues mentioned above) - -<item>Look at the applications you need to run on your Beowulf and - make some estimations as to the type of hardware and software you - need. -</enum> - -In either case, at some point you will need to look at the efficiency issues. -In general, there are three things you need to do: -<enum> -<item> Determine concurrent parts of your program -<item> Estimate parallel efficiently -<item> Describing the concurrent parts of your program -</enum> - -Let's look at these one at a time. - -<sect2>Determine concurrent parts of your program -<p> -This step is often considered "parallelizing your program". Parallelization -decisions will be made in step 2. In this step, you need to determine data -dependencies. -<p> ->From a practical standpoint, applications may exhibit two types of -concurrency: compute (number crunching) and I/O (database). Although in many -cases compute and I/O concurrency are orthogonal, there are application that -require both. There are tools available that can perform concurrency analysis -on existing applications. Most of these tools are designed for FORTRAN. -There are two reasons FORTRAN is used: historically most number crunching -applications were written in FORTRAN and it is easier to analyze. If no tools -are available, then this step can be some what difficult for existing -applications. -<p> -<sect2>Estimate parallel efficiency -<p> -Without the help of tools, this step may require trial and error tests or just -a plain old educated guess. If you have a specific application in mind, try -to determine if it is CPU limited (compute bound) or hard disk limited (I/O -bound). The requirements of your Beowulf may be quite different depending -upon your needs. For example, a compute bound problem may need a few very -fast CPUs and high speed low latency network, while an I/O bound problem may -work better with more slower CPUs and fast Ethernet. -<p> -This recommendation often comes as a surprise to most people because, the -standard assumption is that faster processor are always better. While this is -true if your have an unlimited budget, real systems may have cost constraints -that should be maximized. For I/O bound problems, there is a little known -rule (called the Eadline-Dedkov Law) that is quite helpful: -<p> - For two given parallel computers with the same cumulative CPU performance - index, the one which has slower processors (and a probably correspondingly - slower interprocessor communication network) will have better performance - for I/O-dominant applications. -<p> -While the proof of this rule is beyond the scope of this document, you -find it interesting to download the paper <it>Performance -Considerations for I/O-Dominant Applications on Parallel -Computers</it> (Postscript format 109K ) <htmlurl -url="ftp://www.plogic.com/pub/papers/exs-pap6.ps" -name="(ftp://www.plogic.com/pub/papers/exs-pap6.ps)"> -<p> -Once you have determined what type of concurrency you have in your -application, you will need to estimate how efficient it will be in -parallel. See Section <ref id="software" name="Software"> for a -description of Software tools. -<p> -In the absence of tools, you may try to guess your way through this step. If -a compute bound loop measured in minutes and the data can be transferred in -seconds, then it might be a good candidate for parallelization. But remember, -if you take a 16 minute loop and break it into 32 parts, and your data -transfers require several seconds per part, then things are going to get -tight. You will reach a point of diminishing returns. -<p> -<sect2>Describing the concurrent parts of your program -<p> -There are several ways to describe concurrent parts of your program: -<enum> -<item> Explicit parallel execution -<item> Implicit parallel execution -</enum> - -The major difference between the two is that explicit parallelism is -determined by the user where implicit parallelism is determined by the -compiler. - -<sect3>Explicit Methods -<p> -These are basically method where the user must modify source code -specifically for a parallel computer. The user must either add -messages using <htmlurl url="http://www.epm.ornl.gov/pvm" name="PVM"> or -<htmlurl url="http://www.mcs.anl.gov/Projects/mpi/index.html" name="MPI"> or -add threads using POSIX threads. (Keep in mind however, threads can -not move between SMP motherboards). -<p> -Explicit methods tend to be the most difficult to implement and debug. Users -typically embed explicit function calls in standard FORTRAN 77 or C/C++ source -code. The MPI library has added some functions to make some standard parallel -methods easier to implement (i.e. scatter/gather functions). In addition, it -is also possible to use standard libraries that have been written for parallel -computers. Keep in mind, however, the portability vs. efficiently trade-off) -<p> -For historical reasons, most number crunching codes are written in FORTRAN. -For this reasons, FORTRAN has the largest amount of support (tools, -libraries, etc.) for parallel computing. Many programmers now use C or re- -write existing FORTRAN applications in C with the notion the C will allow -faster execution. While this may be true as C is the closest thing to a -universal machine code, it has some major drawbacks. The use of pointers in C -makes determining data dependencies extremely difficult. Automatic analysis -of pointers is extremely difficult. If you have an existing FORTRAN program -and think that you might want to parallelize it in the future - DO NOT CONVERT -IT TO C! -<p> -<sect3>Implicit Methods -<p> -Implicit methods are those where the user gives up some (or all) of the -parallelization decisions to the compiler. Examples are FORTRAN 90, High -Performance FORTRAN (HPF), Bulk Synchronous Parallel (BSP), and a whole -collection of other methods that are under development. -<p> -Implicit methods require the user to provide some information about the -concurrent nature of their application, but the compiler will then make many -decisions about how to execute this concurrency in parallel. These methods -provide some level of portability and efficiency, but there is still no "best -way" to describe a concurrent problem for a parallel computer. - -<sect>Beowulf Resources -<p> - -<sect1>Starting Points -<p> - -<itemize> - -<item>Beowulf mailing list. To subscribe send mail to <htmlurl -url="mailto:beowulf-request@cesdis.gsfc.nasa.gov" -name="beowulf-request@cesdis.gsfc.nasa.gov"> with the word -<it>subscribe</it> in the message body. - -<item>Beowulf Homepage <htmlurl name="http://www.beowulf.org" -url="http://www.beowulf.org"> - -<item>Extreme Linux <htmlurl name="http://www.extremelinux.org" -url="http://www.extremelinux.org"> - -<item>Extreme Linux Software from Red Hat <htmlurl name="http://www.redhat.com/extreme" -url="http://www.redhat.com/extreme"> - -</itemize> - - -<sect1>Documentation -<p> - -<itemize> - -<item>The latest version of the Beowulf HOWTO <htmlurl -name="http://www.sci.usq.edu.au/staff/jacek/beowulf" -url="http://www.sci.usq.edu.au/staff/jacek/beowulf">. - -<item>Building a Beowulf System <htmlurl -url="http://www.cacr.caltech.edu/beowulf/tutorial/building.html" -name="http://www.cacr.caltech.edu/beowulf/tutorial/building.html"> - -<item>Jacek's Beowulf Links <htmlurl -name="http://www.sci.usq.edu.au/staff/jacek/beowulf" -url="http://www.sci.usq.edu.au/staff/jacek/beowulf">. - -<item>Beowulf Installation and Administration HOWTO (DRAFT) <htmlurl -name="http://www.sci.usq.edu.au/staff/jacek/beowulf" -url="http://www.sci.usq.edu.au/staff/jacek/beowulf">. - -<item>Linux Parallel Processing HOWTO <htmlurl -name="http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html" -url="http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html"> - -</itemize> - - -<sect1>Papers<label id="papers"> -<p> - -<itemize> - -<item>Chance Reschke, Thomas Sterling, Daniel Ridge, Daniel Savarese, -Donald Becker, and Phillip Merkey <it>A Design Study of Alternative -Network Topologies for the Beowulf Parallel Workstation</it>. -Proceedings Fifth IEEE International Symposium on High Performance -Distributed Computing, 1996. <htmlurl -name="http://www.beowulf.org/papers/HPDC96/hpdc96.html" -url="http://www.beowulf.org/papers/HPDC96/hpdc96.html"> - - -<item>Daniel Ridge, Donald Becker, Phillip Merkey, Thomas Sterling -Becker, and Phillip Merkey. <it>Harnessing the Power of Parallelism in -a Pile-of-PCs</it>. Proceedings, IEEE Aerospace, 1997. <htmlurl -name="http://www.beowulf.org/papers/AA97/aa97.ps" -url="http://www.beowulf.org/papers/AA97/aa97.ps"> - - -<item>Thomas Sterling, Donald J. Becker, Daniel Savarese, Michael -R. Berry, and Chance Res. <it>Achieving a Balanced Low-Cost -Architecture for Mass Storage Management through Multiple Fast -Ethernet Channels on the Beowulf Parallel Workstation</it>. -Proceedings, International Parallel Processing Symposium, 1996. -<htmlurl name="http://www.beowulf.org/papers/IPPS96/ipps96.html" -url="http://www.beowulf.org/papers/IPPS96/ipps96.html"> - - -<item>Donald J. Becker, Thomas Sterling, Daniel Savarese, Bruce -Fryxell, Kevin Olson. <it>Communication Overhead for Space Science -Applications on the Beowulf Parallel Workstation</it>. -Proceedings,High Performance and Distributed Computing, 1995. -<htmlurl name="http://www.beowulf.org/papers/HPDC95/hpdc95.html" -url="http://www.beowulf.org/papers/HPDC95/hpdc95.html"> - - - -<item>Donald J. Becker, Thomas Sterling, Daniel Savarese, John -E. Dorband, Udaya A. Ranawak, Charles V. Packer. <it>BEOWULF: A -PARALLEL WORKSTATION FOR SCIENTIFIC COMPUTATION</it>. Proceedings, -International Conference on Parallel Processing, 95. -<htmlurl name="http://www.beowulf.org/papers/ICPP95/icpp95.html" -url="http://www.beowulf.org/papers/ICPP95/icpp95.html"> - -<item>Papers at the Beowulf site <htmlurl -url="http://www.beowulf.org/papers/papers.html" -name="http://www.beowulf.org/papers/papers.html"> - - -</itemize> - - -<sect1>Software<label id="software"> -<p> -<itemize> -<item>PVM - Parallel Virtual Machine <htmlurl -name="http://www.epm.ornl.gov/pvm/pvm_home.html" -url="http://www.epm.ornl.gov/pvm/pvm_home.html"> - - - -<item>LAM/MPI (Local Area Multicomputer / Message Passing Interface -<htmlurl url="http://www.mpi.nd.edu/lam" -name="http://www.mpi.nd.edu/lam"> - -<item>BERT77 - FORTRAN conversion tool <htmlurl -url="http://www.plogic.com/bert.html" -name="http://www.plogic.com/bert.html"> - -<item>Beowulf software from Beowulf Project Page <htmlurl -name="http://beowulf.gsfc.nasa.gov/software/software.html" -url="http://beowulf.gsfc.nasa.gov/software/software.html"> - -<item>Jacek's Beowulf-utils <htmlurl -name="ftp://ftp.sci.usq.edu.au/pub/jacek/beowulf-utils" -url="ftp://ftp.sci.usq.edu.au/pub/jacek/beowulf-utils"> - -<item>bWatch - cluster monitoring tool <htmlurl -url="http://www.sci.usq.edu.au/staff/jacek/bWatch" -name="http://www.sci.usq.edu.au/staff/jacek/bWatch"> - -</itemize> - - - -<sect1>Beowulf Machines -<p> -<itemize> - -<item>Avalon consists of 140 Alpha processors, 36 GB of RAM, and is -probably the fastest Beowulf machine, cruising at 47.7 Gflops and -ranking 114th on the Top 500 list. <htmlurl -name="http://swift.lanl.gov/avalon/" -url="http://swift.lanl.gov/avalon/"> - -<item>Megalon-A Massively PArallel CompuTer Resource (MPACTR) consists -of 14, quad CPU Pentium Pro 200 nodes, and 14 GB of RAM. <htmlurl -name="http://megalon.ca.sandia.gov/description.html" -url="http://megalon.ca.sandia.gov/description.html"> - -<item>theHIVE - Highly-parallel Integrated Virtual Environment is -another fast Beowulf Supercomputer. theHIVE is a 64 node, 128 CPU -machine with the total of 4 GB RAM. <htmlurl -name="http://newton.gsfc.nasa.gov/thehive/" -url="http://newton.gsfc.nasa.gov/thehive/"> - -<item>Topcat is a much smaller machine and consists of 16 CPUs and 1.2 -GB RAM. <htmlurl name="http://www.sci.usq.edu.au/staff/jacek/topcat" -url="http://www.sci.usq.edu.au/staff/jacek/topcat"> - -<item>MAGI cluster - this is a very interesting site with many good -links. <htmlurl name="http://noel.feld.cvut.cz/magi/" -url="http://noel.feld.cvut.cz/magi/"> - -</itemize> - - - -<sect1>Other Interesting Sites -<p> - -<itemize> -<item>SMP Linux <htmlurl name="http://www.linux.org.uk/SMP/title.html" -url="http://www.linux.org.uk/SMP/title.html"> - -<item>Paralogic - Buy a Beowulf <htmlurl name="http://www.plogic.com" -url="http://www.plogic.com"> - -</itemize> - -<sect1>History<label id="history"> -<p> -<itemize> - -<item> Legends - Beowulf <htmlurl name="http://legends.dm.net/beowulf/index.html" -url="http://legends.dm.net/beowulf/index.html"> - -<item> The Adventures of Beowulf <htmlurl -name="http://www.lnstar.com/literature/beowulf/beowulf.html" -url="http://www.lnstar.com/literature/beowulf/beowulf.html"> - -</itemize> - -<sect>Source code -<p> -<sect1>sum.c<label id="sum"> -<p> -<verb> -/* Jacek Radajewski jacek@usq.edu.au */ -/* 21/08/1998 */ - -#include <stdio.h> -#include <math.h> - -int main (void) { - - double result = 0.0; - double number = 0.0; - char string[80]; - - - while (scanf("%s", string) != EOF) { - - number = atof(string); - result = result + number; - } - - printf("%lf\n", result); - - return 0; - -} -</verb> - -<sect1>sigmasqrt.c<label id="sigmasqrt"> -<p> -<verb> -/* Jacek Radajewski jacek@usq.edu.au */ -/* 21/08/1998 */ - -#include <stdio.h> -#include <math.h> - -int main (int argc, char** argv) { - - long number1, number2, counter; - double result; - - if (argc < 3) { - printf ("usage : %s number1 number2\n",argv[0]); - exit(1); - } else { - number1 = atol (argv[1]); - number2 = atol (argv[2]); - result = 0.0; - } - - for (counter = number1; counter <= number2; counter++) { - result = result + sqrt((double)counter); - } - - printf("%lf\n", result); - - return 0; - -} -</verb> - - -<sect1>prun.sh<label id="prun"> -<p> - -<verb> -#!/bin/bash -# Jacek Radajewski jacek@usq.edu.au -# 21/08/1998 - -export SIGMASQRT=/home/staff/jacek/beowulf/HOWTO/example1/sigmasqrt - -# $OUTPUT must be a named pipe -# mkfifo output - -export OUTPUT=/home/staff/jacek/beowulf/HOWTO/example1/output - -rsh scilab01 $SIGMASQRT 1 50000000 > $OUTPUT < /dev/null& -rsh scilab02 $SIGMASQRT 50000001 100000000 > $OUTPUT < /dev/null& -rsh scilab03 $SIGMASQRT 100000001 150000000 > $OUTPUT < /dev/null& -rsh scilab04 $SIGMASQRT 150000001 200000000 > $OUTPUT < /dev/null& -rsh scilab05 $SIGMASQRT 200000001 250000000 > $OUTPUT < /dev/null& -rsh scilab06 $SIGMASQRT 250000001 300000000 > $OUTPUT < /dev/null& -rsh scilab07 $SIGMASQRT 300000001 350000000 > $OUTPUT < /dev/null& -rsh scilab08 $SIGMASQRT 350000001 400000000 > $OUTPUT < /dev/null& -rsh scilab09 $SIGMASQRT 400000001 450000000 > $OUTPUT < /dev/null& -rsh scilab10 $SIGMASQRT 450000001 500000000 > $OUTPUT < /dev/null& -rsh scilab11 $SIGMASQRT 500000001 550000000 > $OUTPUT < /dev/null& -rsh scilab12 $SIGMASQRT 550000001 600000000 > $OUTPUT < /dev/null& -rsh scilab13 $SIGMASQRT 600000001 650000000 > $OUTPUT < /dev/null& -rsh scilab14 $SIGMASQRT 650000001 700000000 > $OUTPUT < /dev/null& -rsh scilab15 $SIGMASQRT 700000001 750000000 > $OUTPUT < /dev/null& -rsh scilab16 $SIGMASQRT 750000001 800000000 > $OUTPUT < /dev/null& -rsh scilab17 $SIGMASQRT 800000001 850000000 > $OUTPUT < /dev/null& -rsh scilab18 $SIGMASQRT 850000001 900000000 > $OUTPUT < /dev/null& -rsh scilab19 $SIGMASQRT 900000001 950000000 > $OUTPUT < /dev/null& -rsh scilab20 $SIGMASQRT 950000001 1000000000 > $OUTPUT < /dev/null& -</verb> - - -</article> diff --git a/LDP/howto/linuxdoc/archived/ISP-Connectivity.sgml b/LDP/howto/linuxdoc/archived/ISP-Connectivity.sgml deleted file mode 100644 index 4fd2b87c..00000000 --- a/LDP/howto/linuxdoc/archived/ISP-Connectivity.sgml +++ /dev/null @@ -1,299 +0,0 @@ -<!doctype linuxdoc system> -<article> -<title> -ISP-Connectivity-mini-HOWTO -<author>Michael Strates, <tt>mstrates@croftj.net</tt> -<date>v2.0.1, 2001-11-28 -<abstract> -This document describes how to setup PPP, connect up to your -ISP, configure mail and news, get a permanent IP (if available), -get a domain name, and have a bonda fide system running -in a little over thirty minutes. -<p> -<bf>Archived Document Notice:</bf> This document has been archived by the LDP -because it does not apply to modern Linux systems. It is no longer -being actively maintained. -</p> -</abstract> -<toc> -<p> - -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect> Introduction -<p> -The main goal of this document obviously is to make the new user -friendly with the many terms of connecting your Linux PC up to -the Internet, obtaining IP addresses, domain names, and setting things -up. This guide is intended for the intermediate user in mind, although -intelligent newbies shouldn't have any problems. -<p> - -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect1> New versions of this document -<p> -New versions of this document will be periodically posted to -<it>comp.os.linux.answers</it>. They will also be added to the -various anonymous FTP sites who archive such information, -including: -<p> -<tt> -<htmlurl url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO" -name="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO"> -</tt> -<p> -In addition, you should generally be able to find this document -on the Linux Documentation Project page via: -<p> -<tt> -<htmlurl url="http://sunsite.unc.edu/LDP/" -name="http://sunsite.unc.edu/LDP/"> -</tt> -<p> -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect1> Feedback -<p> -I certaintly welcome any feedback about this HOWTO, spelling mistakes, -how it all worked out, thankyou notes and critisisms. I hope I helped -a few people with this HOWTO, and if I did, I'd be really happy to -hear from you. -<p> -<tt> -<htmlurl url="mailto:mstrates@croftj.net" -name="mstrates@croftj.net"> -</tt> -<p> -<tt> -<htmlurl url="http://linloft.home.ml.org/" -name="http://linloft.home.ml.org/"> -</tt> -<p> -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect1> Standard Disclaimer -<p> -No liability for the contents of this documents can be accepted. -Use the concepts, examples and other content at your own risk. -As this is a new edition of this document, there may be errors -and inaccuracies, that may of course be damaging to your system. -Proceed with caution, and although this is highly unlikely, -I don't take any responsibility for that. -<p> -Naturally, there are probably better and easier ways to do things -in this document. There will always be another way in the Linux -World. This is the way I've done things, and that's the way I'll -be presenting them in this HOWTO. -<p> - -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect1> Copyright Information -<p> -This document is copyrighted (c)1997 Michael Strates and -distributed under the terms of the GNU Free Documentation License, -which can be obtained from -<a href="http://www.fsf.org/licenses/fdl.html">http://www.fsf.org/licenses/fdl.html</a>. - -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect> Connecting to the Outside World -<p> -In this document, we'll explain how to do this using PPP (Point -to Point Protocol), a popular protocol nearly always used over the -Internet. It allows your modem to <tt>speak</tt> to the outside -world. This is what applications like Trumpet Winsock in Windows -3.x did, and many other programs that you've probably have never -seen. -<p> -In Linux, we use a thing called chat to do the dialing up to the -ISP and then use a utility called pppd to 'use' the connection. In -a sense, chat is your dialer, and pppd is your protocol. We'll -describe how to setup both below. -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect1> Talking and Communicating with pppd and chat -<p> -Probably the easiest way to go about things is to make a shell -script in root's home directory called <tt>ppp-connect</tt> and -involke the script whenever you wish to make your connection. We'll -discuss this method. -<p> -Open up your favourite editor as root on ~/ppp-connect. You'll -then have to decide on your parameters. -<p> -<it>pppd connect 'chat -v "" "your_init_string" "" ATDTisp_number -CONNECT "" ogin: your_username word: your_passwd' /dev/tty(0/1/2) speed -modem</it> -<p> -pppd involkes /usr/sbin/pppd on my system, then loads up chat to do the -dialing. Chat sends <it>your_init_string</it> to the modem, then -dials <it>isp_number</it>. It then waits for CONNECT, then waits for -ogin: (l removed as the first character is sometimes lost), sends -<it>your_passwd</it>, chat then terminates and hands the show over to -pppd. -<p> -The last of the command specifies your modem port (mine's /dev/ttyS1). In -most cases it will be ttyS1 (COM2: in DOS), ttyS0 (COM1: in DOS), or if -your using Slackware, cua1 or cua0. The speed is the speed of the modem. I -use 115200 for my modem (a 33.6k). If you have got a fairly recent -computer (one with a 16550 UART), then I wouldn't go any lower than 57600. -Otherwise, for 14.4k 38400. Modem just tells pppd that it's a serial/modem -based connection. Remove the -v option if you don't want verbose logging -to your logfiles. -<p> -The scenario below is one of a person who dials up an ISP that -automatically starts PPP for them, ie; they don't have a shell that -actually starts. This is his command in his ~/ppp-connect: -<p> -<it>pppd connect 'chat "" "ATZ" "" ATDT555-1800 -CONNECT "" ogin: johnny word: blackjak' /dev/ttyS1 115200 -modem</it> -<p> -But for some people, they're ISP starts up a shell and doesn't -automatically start PPP this may be a problem. Luckily, chat can deal with -that too. You just add another command to your chat script. For example, -below this johnny character is using an ISP that just dumps him to a -shell, requiring him to type ppp to get a ppp connection. His shell prompt -ends with a $. -<it>pppd connect 'chat "" "ATZ" "" ATDT555-1800 -CONNECT "" ogin: johnny word: blackjak $ ppp' /dev/ttyS1 115200 -modem</it> -<p> -If it's more than one word, ensure you quote it. I hope you can see the -drift of this, and are able to create your own script up to suit your -connection. Simply modify either the first johnny or the second johnny -script to suit your taste, port, server, etc and save the file. -<p> -Now you've made your file, ensure that only root can execute, read or -write to it. This is extreemly important. Also make sure nobody can -read your logfiles, if you decide to leave the -v option in, as your -password is seen in cleartext in the logs (I don't see much need for -v, -if you don't know what I'm talking about, leave -v out). -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect1> IP's, Domain Names and Subnets -<p> -For most people using the options above, a changing IP address won't -bother them. These people include basic, easy going users, that just have -dialup accounts, and aren't very technically minded. For those people, -skim read this section, I'll come to important things you need to do to -setup your system properly. Newbies, skip the sections dealing with -permanent IP, Domain Names, Subnets, and just read the last bit of this -section.<p> -Getting a permanent IP address might be free for your ISP, so if in doubt -ask them. Personally, I'd pay for a permanent IP address. It lets you send -e-mail to and from using a unique IP or domain, etc. If you want to get -yourself a permanent IP, write an e-mail to root@yourisp.com, and ask him -nicely if he can arrange a permanent IP for you. -<p> -When you get your permanent IP address, grep through your /etc directory -to find where your old IP addresses are. I had to change files in my -sendmail directory and /etc/hosts. There are some other key files that you -will only discover with grepping. Open up /etc/hosts, and add your new IP -address in the standard format. Reboot your computer, and you should be -ready to go. -<p> -You'll now need to change your chat script to reflect your new settings. -If you are forced into PPP as soon as you start your connection, you'll -need to tell your System Administrator of your ISP to ensure their PPP -system recognises that you have a permanent IP address and allocates you -that instead of a changing one. If you get dumped at a shell prompt, and -you need to type ppp or something to start the connection, instead of -typing that, change your ~/ppp-connect script to send this instead of just -ppp or whatever when it sees $ or whatever your shell prompt is. -<p> -<it>/usr/sbin/pppd :Your_IP_Address</it> -<p> -Substitute your IP address for the IP address your ISP gave to you. Be -sure you encapsulate the thing in " " marks when you put it into your chat -script. If this doesn't work, consult your ISP where your PPP daemon is -located, and ask him for the command to give. You could just try leaving -it as is and seeing if the server will recognise you and give you your -rightful address. -<p> -The next thing probably to do is to get yourself a domain name. I know -that in Australia, .asn.au and .org.au are free. In the United States, you -can get a .us domain for free, but they tend to be long. If your in -Australia, you must go to -<htmlurl url="http://www.aunic.net/" name="http://www.aunic.net/"> -to register your domains. In the United States, it is -<htmlurl url="http://www.internic.net/" name="http://www.internic.net/"> . -<p> -To register domains you need to be able to provide DNS services, and gorey -stuff like that. If your ISP can't provide these, throw out an official -.asn.au or whatever domain out the window, and get a Monolith Internet -Domain. -<p> -Monolith offer free domains to anybody and anyone all around the world. -Everything is done without human interaction, via a web forms interface -with your browser. Your domain comes in the form of Your_Choice.ml.org. -Monolith will then host the DNS locally for you. If you want to send and -receive mail from that domain, ask your ISP to become a mail exchanger for -you. -<p> -Go to -<htmlurl url="http://www.ml.org/" name="http://www.ml.org/"> -and fill out an application, enter the NIC with your username and -password, and make a FREED domain. You'll need to enter your IP address, -so have that ready. Your domain will be in the DNS in a couple of days. -<p> -Okay now, we'll move onto the newbies section, or for those people who -can't get a permanent IP address or a domain name. All you have to do is -edit /etc/hosts as root, call your site something that won't clash, give -it a 10.10.10 or something for an IP address and reboot your computer. -<p> -There you go, you've just setup your computer with pppd and chat in just -ten minutes. Now let's move onto the next section, which deals with -Electronic Mail. -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -<sect> Electronic Mail on your Linux Box -<p> -One of the most important aspects of the Internet, is it's fasinating -capaiblity to transfer mail to and from countries, or more locally -perhaps. Linux is extreemly strong in easy mail packages for the console. -The one we're going to document today is called Pine (Program for Internet -Mail and News), made by the University of Washington, and to download the -mail, a program called Fetchmail, made by Eric S. Raymond. Both should be -included in your Linux distribution. -<p> -Fetchmail is a program that downloads your e-mail from your server using -POP, transfers the mail onto your computer and then deletes it off the -server, much like programs like Eudora or Microsoft Internet Mail/Exchange -do. To configure and automate fetchmail, you use a file in your home -directory called .fetchmailrc. Simply open up ~/.fetchmailrc -(Remember: your doing this bit as yourself, not as root) with your -favourite editor and observe the command lin eoptions below: -<p> -<EM>poll mail.yourisp.com proto pop3 user login_name password your_passwd</EM> -<p> -<EM>user login_name with pass your_passwd is login_name here</EM> -<p> -All you have to do is replace <EM>mail.yourisp.com</EM> with the name of -the mail server of your ISP, <EM>your_passwd</EM> with your password, and -<EM>login_name</EM> with your login name. -<p> -An important thing to note. For Pine and this procedure to work correctly, -your login name must corrospond with the login name you use on your ISP. -That is your local login name must match the one you use on your server, -and your e-mail address. -<p> -Next, ensure that .fetchmailrc has the correct permissions (user -read/write only) and your laughing. Fetchmail can be started in two ways, -in standard mode (where it'll fetch messages from the server and -terminate), or in daemon mode (where it will stay active, and -check/download mail every X seconds). To use daemon mode, type -<it>fetchmail -a -d(Seconds between Polls)</it>. -a ensures it downloads -all mail. To use the standard mode, just type <it>fetchmail -a</it>. -<p> -Next, you need to setup Pine. Open up Pine, by typing pine at your prompt, -choose Setup - Configuration. Setup your userdomain as the domain in your -e-mail address, for example jack@linux.org, would be linux.org. Next, -setup smtp-server as your POP mail server (the same you used in the -fetchmail setup). So we enter www.linux.org. If you want news, setup your -nntp server to your ISP's news server. -<p> -So there you have it folks, everything should be working now. To connect -up to your ISP, just run ~/ppp-connect as root. Then, to get your e-mail -run fetchmail -a as yourself. To browse your e-mail and news, use -Pine. Install a text-based browser such as Lynx to browse the web if you -like. -<p> -<it>Send any comments questions and suggestions to -mstrates@croftj.net</it> -<p> -<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - --> -</article> diff --git a/LDP/howto/linuxdoc/archived/KickStart-HOWTO.sgml b/LDP/howto/linuxdoc/archived/KickStart-HOWTO.sgml deleted file mode 100644 index ac65edf6..00000000 --- a/LDP/howto/linuxdoc/archived/KickStart-HOWTO.sgml +++ /dev/null @@ -1,1184 +0,0 @@ -<!doctype linuxdoc system> - -<article> -<title>RedHat Linux KickStart HOWTO - -<author>Martin Hamilton <tt/<martinh@gnu.org>/ -<date>v0.2, 11 January 1999 - -<abstract> -Archived: 2004-05-17 at the request of the author by Emma Jane Hogbin -(Technical Review Coodinator). Additional information -can be obtained from: <url name="Red Hat Linux Customization Guide" -url="http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/part-install-info.html"> - -<p> -This HOWTO briefly describes how to use the RedHat Linux -<em>KickStart</em> system to rapidly install large numbers of -identical Linux boxes. For advanced users, we describe how to modify -the KickStart installation procedure to do your own thing, and give a -quick guide to building RPM packages of your own. -</abstract> - -<toc> - - -<sect>Copyright<p> - -Copyright (c) 1998 Martin Hamilton, All rights reserved. This is free -documentware; you can redistribute it and/or modify it under the terms of -version 2 or later of the <url name="GNU General Public License" -url="http://www.gnu.org/copyleft/gpl.html">.<p> - - -<sect>Homepage<p> - -If you got this document from a Linux HOWTO mirror site or a CD-ROM, -you might want to check back to the <url name="KickStart HOWTO home -page" url="http://wwwcache.ja.net/dev/kickstart/"> to see if there's a -newer version around.<p> - - -<sect>Introduction<p> - -RedHat Linux version 5 comes with a a little-known (and until now, not -hugely documented) feature called <em>KickStart</em>. This lets you -automate most/all of a RedHat Linux installation, including:<p> - -<itemize> -<item> Language selection -<item> Network configuration and distribution source selection -<item> Keyboard selection -<item> Boot loader installation (e.g. lilo) -<item> Disk partitioning and filesystem creation -<item> Mouse selection -<item> X Window system server configuration -<item> Timezone selection -<item> Selection of an (initial) root password -<item> Which packages to install -</itemize><p> - -Eagle eyed RedHat users will probably have realised by now that these -are essentially the main steps involved in the manual installation of -a RedHat Linux system. KickStart makes it possible for you to script -the regular installation process, by putting the information you would -normally type at the keyboard into a configuration file.<p> - -<em>But wait - there's more :-)</em><p> - -Having finished the normal installation process, KickStart also lets -you specify a list of shell level commands which you would like to be -executed. This means that you can automatically install extra local -software not distributed as part of RedHat Linux (yes, there are even -more free software programs than the ones you get with the RedHat -distribution. Some can't be distributed by RedHat on legal grounds, -e.g. the <tt>ssh</tt> and <tt>PGP</tt> encryption systems) and carry -out any tidying up you may need to do in order to get a fully -operational system.<p> - - -<sect>Prerequisites<p> - -There are two approaches to a KickStart install - one is to simply -copy your KickStart configuration file to a RedHat boot floppy. The -other is to use a regular boot floppy and get your KickStart config -file off the network.<p> - -In both cases, you'll need: - -<enum> -<item> Intel (i386) class machines - KickStart appears to only work - on these at the time of writing. -<item> KickStart config file - we'll talk about this in the next - section. -<item> RedHat boot disk - preferably from the <em>updates</em> - directory, to take advantage of any fixes/driver updates. -<item> DNS entries for the IP addresses you'll be using - optional, - but will stop the installation from prompting you for your - machine's domain name. -</enum><p> - -If you want to fetch your config file over the network, you'll need to -export it via NFS - this is the only access method supported at the -moment. The config file lets you specify a different NFS server to -fetch the RedHat distribution itself from.<p> - -You can configure a static IP address for your machine - e.g. a special -one reserved for KickStart installations. Alternatively, if you don't -want to hard code an IP address in the config file you can tell KickStart -to use a BOOTP/DHCP server to fetch this. Some servers will allocate new -addresses in a given range automatically, e.g. <url name="the CMU BOOTP -server with dynamic addressing extensions" - url="ftp://ftp.ntplx.net/pub/networking/bootp">.<p> - -More information on NFS and BOOTP/DHCP is in Appendix A.<p> - - -<sect>Setting up a boot floppy<p> - -Essentially, all you have to do is copy your KickStart config file -to <em>/ks.cfg</em> on the RedHat boot floppy, e.g.<p> - -<tscreen><verb> - mcopy ks.cfg a: -</verb></tscreen><p> - -However - the RedHat boot floppy is pretty full, and you may find that -you have to delete some of the other files to make room for the -KickStart config file. I was able to make enough room for mine by -deleting the various message files normally displayed by the -<tt>SYSLINUX</tt> boot loader, e.g.<p> - -<tscreen><verb> - mdel a:\*.msg -</verb></tscreen><p> - -Another approach would be to throw away the drivers for some of the -hardware you don't have - see the section on modifying the boot -floppy below.<p> - -You may also want to edit <em>syslinux.cfg</em>, the <tt>SYSLINUX</tt> -config file. This also lives in the top level directory of the RedHat -boot floppy. For instance, the following <em>syslinux.cfg</em> will -cause KickStart mode to be entered into automatically as the machine -boots up, without the normal delay:<p> - -<tscreen><verb> - default ks - prompt 0 - label ks - kernel vmlinuz - append ks=floppy initrd=initrd.img -</verb></tscreen><p> - -Note that you almost probably want to base your boot and supplementary -floppies on the most recent disk images available in the -<em>updates/i386</em> on your local RedHat mirror site. Older images -may be buggy or have driver support for less hardware.<p> - - -<sect>The KickStart config file<p> - -There are three main sections to the config file:<p> - -<enum> -<item> System info, e.g. disk partitioning and network config -<item> RedHat packages to install -<item> Post-installation shell commands to run -</enum<p> - -There are some other possibilities which we won't talk about here, but -<bf>might</bf> work. For more information check out the sample -KickStart config in <em>misc/src/install/ks.samp</em> and -<em>doc/README.ks</em> under the top level <em>i386</em> RedHat -distribution directory on your CD-ROM or local RedHat mirror site.<p> - - -<sect1>System info<p> - -The available directives which I've been using are:<p> - -<descrip> -<tag/lang/Language configuration, e.g. for English -<tscreen><verb> -lang en -</verb></tscreen> -<tag/network/Network configuration, e.g. to use BOOTP/DHCP -<tscreen><verb> -network --bootp -</verb></tscreen> -<tag/nfs/NFS server and directory to install from, e.g. -<tscreen><verb> -nfs --server chicken.swedish-chef.org /mnt/cdrom -</verb></tscreen> -to use the NFS server <em>chicken.swedish-chef.org</em> and try to -mount the RedHat distribution from the directory <em>/mnt/cdrom</em>. -<tag/keyboard/Select keyboard type, e.g. for UK keyboards -<tscreen><verb> -keyboard uk -</verb></tscreen> -<tag/zerombr/Clear the Master Boot Record - removes any existing -operating system boot loader from your disk -<tag/clearpart/Clear existing partitions - e.g. to remove all existing -disk partitions prior to installation -<tscreen><verb> -clearpart --all -</verb></tscreen> -<tag/part/Partition the disk, e.g. to make a root filesystem of - 500MB -<tscreen><verb> -part / --size 500 -</verb></tscreen> -<tag/install/Make a fresh installation of RedHat Linux. -<tag/mouse/Set the mouse being used, e.g. for a PS/2 or compatible -"bus mouse" -<tscreen><verb> -mouse ps/2 -</verb></tscreen> -<tag/timezone/Set the timezone, e.g. for local time in the UK -<tscreen><verb> -timezone --utc Europe/London -</verb></tscreen> -<tag/rootpw/Set the initial root password, based on a previously -derived encrypted password -<tscreen><verb> -rootpw --iscrypted XaacoeGPmf/A. -</verb></tscreen> -<tag/lilo/Install the LILO boot loader, e.g. in the Master Boot Record -<tscreen><verb> -lilo --location mbr -</verb></tscreen> -<tag/%packages/Packages to install - see below. -<tag/%post/Post-installation shell commands - see below. -</descrip><p> - -Note that the directory where KickStart is looking for the RedHat -distribution should have a subdirectory <em>RedHat</em>, which -contains the RedHat distribution tree for the platform in question. -In the above example, we should see something like the following files -and directories:<p> - -<tscreen><verb> -/mnt/cdrom/RedHat -/mnt/cdrom/RedHat/base -/mnt/cdrom/RedHat/contents -/mnt/cdrom/RedHat/i386 -/mnt/cdrom/RedHat/instimage -/mnt/cdrom/RedHat/RPMS -/mnt/cdrom/RPM-PGP-KEY -</verb></tscreen><p> - -If you're installing off a CD-ROM rather than off the network, the -contents should look something like this:<p> - -<tscreen><verb> -RedHat -RedHat/base -RedHat/contents -RedHat/i386 -RedHat/instimage -RedHat/RPMS -RPM-PGP-KEY -</verb></tscreen><p> - -If you have the RedHat distribution for multiple architectures (e.g. -on an NFS server - they're too big to fit more than one architecture's -version onto a single CD-ROM), you'll notice that each distribution -has the same files and directories under a subdirectory, e.g.<p> - -<tscreen><verb> -alpha/RPM-PGP-KEY -i386/RPM-PGP-KEY -sparc/RPM-PGP-KEY -</verb></tscreen><p> - -There should be a file <tt>architecture</tt>/Redhat/<tt>architecture</tt>, -e.g. <em>i386/Redhat/i386</em>.<p> - -If you want to create your own encrypted passwords, it's very easy -using Perl, e.g.<p> - -<tscreen><verb> -% perl -e 'print crypt("schmurrdegurr", "Xa") . "\n";'p -</verb></tscreen><p> - -Other options (or mooted options), which I've not tried:<p> - -<descrip> -<tag/cdrom/Install off CD-ROM rather than network. -<tag/device/Explicitly declare device details, e.g. -<tscreen><verb> -device ethernet 3c509 --opts "io=0x330, irq=7" -</verb></tscreen> -Alternative values of <tt>device</tt> include <tt>scsi</tt> for SCSI -controllers and <tt>cdrom</tt> for proprietary CD-ROM drives. -<tag/upgrade/Upgrade an existing installation rather than make - a fresh installation. -<tag/xconfig/Configure X Window server, graphics card and monitor. -e.g. -<tscreen><verb> -xconfig --server "Mach64" --monitor "tatung cm14uhe" -</verb></tscreen> -</descrip><p> - -I've not delved too deeply into this last one, because I'm not ever -planning to run X on the console of any of my KickStarted machines. -I'm told that running <tt>xconfig</tt> within KickStart itself is a -bit flaky, but the same functionality is also available from the -command line via <tt>Xconfigurator</tt> - so you might be best off -leaving this to the post-installation script.<p> - -Here's how this first part of a KickStart config file looks when we -put all the bits together:<p> - -<tscreen><verb> -lang en -network --static --ip 198.168.254.253 --netmask 255.255.255.0 - --gateway 198.168.254.1 --nameserver 198.168.254.2 -nfs --server chicken.swedish-chef.org /mnt/cdrom -keyboard uk -zerombr yes -clearpart --all -part / --size 500 -part swap --size 120 -install -mouse ps/2 -timezone --utc Europe/London -rootpw --iscrypted XaacoeGPmf/A. -lilo --location mbr -</verb></tscreen><p> - -Note that some of the RedHat documentation refers to an invocation -of the <tt>network</tt> directive which doesn't actually work in -practice: <tt>network --option</tt>. The correct invocation is to -put <tt>network</tt> followed by <tt>--static</tt>, <tt>--bootp</tt> -or <tt>--dhcp</tt>. Be aware that the BOOTP and DHCP options are -different - to the extent that they even use different code.<p> - -You can add the <tt>--grow</tt> parameter to a <tt>part</tt> -directive to indicate that it's OK to grow the partition beyond -the size you specify. It probably only makes sense to have one -partition tagged with <tt>--grow</tt>.<p> - - -<sect1>Packages to install<p> - -The start of the packages section of the KickStart config file is -indicated by the presence of a <tt>%packages</tt> directive on a line -of its own. This is followed by one or both of two types of package -specifier - individual packages may be installed by giving the name of -their RPM (excluding the version and platform information), and groups -of packages may be installed by giving their group name.<p> - -Here's a sample <tt>packages</tt> section for a KickStart config file: - -<tscreen><verb> -%packages -@ Base -netkit-base -bind-utils -ncftp -rdate -tcp_wrappers -traceroute -cmu-snmp -</verb></tscreen><p> - -So, what are these groups ? Well, there are a number of groups -defined by default in a file called <em>base/comps</em> under the -RedHat distribution's top level directory. Here are the ones which -were current at the time of writing:<p> - -<itemize> -<item> Base -<item> Printer Support -<item> X Window System -<item> Mail/WWW/News Tools -<item> DOS/Windows Connectivity -<item> File Managers -<item> Graphics Manipulation -<item> X Games -<item> Console Games -<item> X multimedia support -<item> Console Multimedia -<item> Print Server -<item> Networked Workstation -<item> Dialup Workstation -<item> News Server -<item> NFS Server -<item> SMB (Samba) Connectivity -<item> IPX/Netware(tm) Connectivity -<item> Anonymous FTP/Gopher Server -<item> Web Server -<item> DNS Name Server -<item> Postgres (SQL) Server -<item> Network Management Workstation -<item> TeX Document Formatting -<item> Emacs -<item> Emacs with X windows -<item> C Development -<item> Development Libraries -<item> C++ Development -<item> X Development -<item> Extra Documentation -</itemize><p> - -You'll notice that they correspond to the various configurations which -you're prompted for during a manual installation. Note that some of -the packages in a given package group are duplicated in other groups, -and that you can install multiple groups of packages without this -causing problems. Each group's entry in the <em>comps</em> listing -looks similar to this:<p> - -<tscreen><verb> -0 Extra Documentation -sag -lpg -howto -faq -man-pages -end -</verb></tscreen><p> - -It seems that groups with a <em>1</em> next to their name (the first -line above) are selected for installation by default. You can customise -the Linux installation process even further by creating your own groups -or redefine existing ones by editing this file.<p> - - -<sect1>Post-installation shell commands<p> - -This is probably the best feature of all, and something which there is -no direct equivalent to in the manual installation process. What we -can do here is specify a sequence of shell level commands which should -be executed after the main installation (disk partitioning, package -installation, and so on) is complete.<p> - -The beginning of this section is signified by the <tt>%post</tt> -directive in the KickStart config file. In what follows you can take -advantage of all of the utilities which have been installed on your -newly built Linux system, e.g.<p> - -<tscreen><verb> -%post -ln -s /etc/rc.d/init.d /etc/init.d -ln -s /etc/rc.d/rc.local /etc/rc.local -ln -s /usr/bin/md5sum /usr/bin/md5 -ln -s /usr/bin/perl /usr/local/bin/perl -chmod ug-s /bin/linuxconf -mkdir /var/tmp/tmp -perl -spi -e 's!image=/boot/vmlinuz-.*!image=/boot/vmlinuz!' /etc/lilo.conf -rm /etc/rc.d/rc*.d/*sendmail -</verb></tscreen><p> - -You can also use I/O redirection and here documents:<p> - -<tscreen><verb> -cat <<EOF >>/etc/passwd -squid:*:102:3500:Squid Proxy:/usr/squid:/bin/bash -EOF - -cat <<EOF >>/etc/group -cache:x:3500: -EOF -</verb></tscreen><p> - -Modify the run-time startup scripts:<p> - -<tscreen><verb> -cat <<EOF >>/etc/rc.local -echo 8192 > /proc/sys/kernel/file-max -echo 32768 > /proc/sys/kernel/inode-max - -[ -x /usr/sbin/sshd ] && /usr/sbin/sshd -[ -x /usr/sbin/cfd ] && /usr/sbin/cfd - -EOF -</verb></tscreen><p> - -Set up <em>crontab</em> entries:<p> - -<tscreen><verb> -cat <<EOF >/tmp/crontab.root -# Keep the time up to date -0,15,30,45 * * * * /usr/sbin/ntpdate -s eggtimer 2>&1 >/dev/null -# Recycle Exim log files -1 0 * * * /usr/exim/bin/exicyclog -# Flush the Exim queue -0,15,30,45 * * * * /usr/exim/bin/exim -q -EOF - -crontab /tmp/crontab.root -rm /tmp/crontab.root -</verb></tscreen><p> - -And even install other RPMs which you made yourself:<p> - -<tscreen><verb> -rpm -i ftp://chicken.swedish-chef.org/rpms/squid.rpm -rpm -i ftp://chicken.swedish-chef.org/rpms/ssh.rpm -rpm -i ftp://chicken.swedish-chef.org/rpms/exim.rpm -rpm -i ftp://chicken.swedish-chef.org/rpms/cfengine.rpm -rpm -i ftp://chicken.swedish-chef.org/rpms/linux.rpm - -ssh-keygen -b 1024 -f /etc/ssh_host_key -N "" -depmod -a -</verb></tscreen><p> - -Note that you can achieve the same effect by making your own RPMs -containing the commands you want executed - see below for more -information. Give them a carefully chosen name and you can force them -to be installed first (e.g. name starts with 'aaa') or last (e.g. -name starts with 'zzz').<p> - -Be aware that a less painful way of doing root crontab entries is to -create them as files in one or more of the directories -<em>/etc/cron.hourly</em>, <em>/etc/cron.daily</em>, -<em>/etc/cron.weekly</em> and <em>/etc/cron.monthly</em>.<p> - -More information about making your own RPMs is available in Appendix B.<p> - - -<sect>Installation itself<p> - -Boot the to-be-installed machine off your RedHat boot floppy as usual, -but instead of pressing <tt>RETURN</tt> at the <tt>SYSLINUX</tt> -prompt, type <tt>linux ks</tt>.<p> - -If you're lucky, this will be all you have to type!<p> - -If you customised your RedHat boot floppy as outlined above, you won't -even need to do this bit :-)<p> - -Since we're really just automating the normal steps involved in a -RedHat installation, the normal dialogs may appear if/when KickStart -gets confused about what to do next. The most likely case is that -your network interface won't be detected automatically, and you'll be -prompted for its IRQ and I/O address space. KickStart tends to need -help for ISA bus cards, but detects PCI bus cards automatically.<p> - -You can keep an eye on what KickStart is doing by by switching virtual -consoles as usual:<p> - -<itemize> -<item> Alt-F1 - installation dialog -<item> Alt-F2 - shell prompt -<item> Alt-F3 - install log (messages from install program) -<item> Alt-F4 - system log (messages from kernel, etc.) -<item> Alt-F5 - other messages -</itemize><p> - - -<sect>Mounting the boot/supp disks<p> - -The RedHat boot disk <em>boot.img</em> is in MS-DOS format, using the -<tt>SYSLINUX</tt> program to boot up. The supplementary disk -<em>supp.img</em> is a Linux <tt>ext2</tt> filesystem. If you have -support for the loopback filesystem in your Linux kernel, you can mount -both of these files in your filesystem and hack at them:<p> - -<tscreen><verb> -# mkdir -p /mnt/boot /mnt/supp -# mount -o loop -t msdos boot.img /mnt/boot -# mount -o loop supp.img /mnt/supp -</verb></tscreen><p> - -Now you should be able to see and manipulate the files on the boot and -supplementary disk under <em>/mnt/boot</em> and <em>/mnt/supp</em> -respectively. Phew! Note that older versions of <tt>mount</tt> may -not be able to handle the <tt>-o loop</tt> option. In these cases -you'll need to explicitly use <tt>losetup</tt> to configure the -loopback device for each file, e.g.<p> - -<tscreen><verb> -# losetup /dev/loop0 boot.img -# mount -t msdos /dev/loop0 /mnt/boot -</verb></tscreen><p> - -You might also need to explicitly use the <tt>-t ext2</tt> option when -mounting an <tt>ext2</tt> filesystem like the one on the supplementary disk. -But, it looks like people with modern Linux distributions shouldn't have to -worry about this.<p> - -Of course, if you don't want to mess around too much, you can cut a -corner and manipulate actual floppy disks rather than these floppy -disk images. If time is important, you'll probably prefer to use the -loopback devices, since you can hack around with the disk images -without incurring the latency associated with a genuine floppy disk -read/write.<p> - - -<sect>Modifying the RedHat installer<p> - -If you want to mess around with the installation procedure itself, the -source code can be found on the RedHat CD-ROM or your local RedHat -mirror site. It's in <em>misc/src/install</em> under the -<em>i386</em> distribution top level directory.<p> - -If you examine the RedHat boot disk you'll see that, in addition to -the Linux kernel <em>vmlinuz</em>, there's a large file -<em>initrd.img</em>:<p> - -<tscreen><verb> -- -rwxr-xr-x 1 root root 559 May 11 15:48 boot.msg -- -rwxr-xr-x 1 root root 668 May 11 15:48 expert.msg -- -rwxr-xr-x 1 root root 986 May 11 15:48 general.msg -- -rwxr-xr-x 1 root root 968842 May 11 15:48 initrd.img -- -rwxr-xr-x 1 root root 1120 May 11 15:48 kickit.msg -- -r-xr-xr-x 1 root root 5352 May 11 15:48 ldlinux.sys -- -rwxr-xr-x 1 root root 875 May 11 15:48 param.msg -- -rwxr-xr-x 1 root root 1239 May 11 15:48 rescue.msg -- -rwxr-xr-x 1 root root 402 May 11 15:48 syslinux.cfg -- -rwxr-xr-x 1 root root 444602 May 11 15:48 vmlinuz -</verb></tscreen><p> - -You guessed it, this is another <tt>ext2</tt> filesystem saved as a file -- - but with a twist. It's actually compressed as well. You can uncompress -it and then mount the result, e.g.<p> - -<tscreen><verb> -# gzip -dc /mnt/boot/initrd.img >/tmp/initrd.ext2 -# mkdir /mnt/initrd -# mount -o loop /tmp/initrd.ext2 /mnt/initrd -</verb></tscreen><p> - -Probably the most important part of this filesystem is the collection -of loadable kernel modules which are included with the boot disk. If -you need to merge in a new version of a driver, you'll need to either -replace <em>vmlinuz</em> with a new kernel which has this statically -linked, or replace it in the modules collection. What's more, you may -need to throw other modules away to make room.<p> - -The modules collection is the file <em>modules/modules.cgz</em>. -Wondering what that might be ? It's actually a compressed -<tt>cpio</tt> archive, believe it or not! And you thought nobody used -<tt>cpio</tt> any more... Actually RPM itself uses <tt>cpio</tt> -internally, too. Here's how to hack around with it:<p> - -<tscreen><verb> -# gzip -dc /mnt/initrd/modules/modules.cgz >/tmp/modules.cpio -# cpio -itv <modules.cpio >modules.listing -# mkdir modules -# cpio -idumv <../modules.cpio -</verb></tscreen><p> - -I don't believe that there is currently a way under Linux (at least in -mainstream distributions) to transparently access compressed -filesystems. Let me know if you know better!<p> - -If you change anything, remember to:<p> - -<enum> -<item> Use <tt>cpio</tt> to recreate the archive. How to do this is - left as an exercise for the reader... -<item> Use <tt>gzip</tt> to compress the resulting archive. -<item> Copy it to <em>/mnt/initrd</em>, or wherever you put the - uncompressed <em>initrd.img</em> archive. -<item> Unmount <em>/mnt/initrd</em> (or whatever you called it). -<item> Compress the new <em>initrd.img</em> using <tt>gzip</tt> - again. -<item> Copy the resulting archive onto the boot disk image - - <em>/mnt/boot/initrd.img</em> in our example. -<item> Unmount the boot disk image, e.g. <em>/mnt/boot</em>. -</enum><p> - -Finally, you can now create new boot floppies using this modified boot -disk setup, e.g.<p> - -<tscreen><verb> -# cat boot.img >/dev/fd0 -</verb></tscreen><p> - - -<sect>FAQs/Wish list<p> - -<bf>Q:</bf> After KickStart installation, my machine won't boot up. -The BIOS complains with a message like <tt>Missing operating system</tt>.<p> - -<bf>A:</bf> Sounds like the partition with the root filesystem on isn't -bootable. Use <tt>fdisk</tt> to toggle its bootable status.<p> - -<bf>Q:</bf> After the floppy boots, I get the message: - <tt>Error opening files for kickstart copy: File exists</tt>.<p> - -<bf>A:</bf> Use a more recent version of <em>boot.img</em> and -<em>supp.img</em> - look in the <em>updates</em> directory of your -local RedHat mirror site. There was a bug in some older versions -of these for RedHat 5.1.<p> - -<bf>Q:</bf> Can you have all outstanding patches (update RPMs) applied -automatically too ? How ?<p> - -<bf>A1:</bf> Copy the RPMs you want installing to the RPMS directory -from which the installation is going to take place, get rid of the -older RPMs, and update the file <em>RedHat/base/hdlist</em> with the -new RPM details. See Appendix C for a script from Eric Doutreleau to do -this for you. If you do this yourself, remember to run <em>genhdlist</em> -afterwards!<p> - -<bf>A2:</bf> Try this Perl script: <url name="patchup" -url="http://wwwcache.ja.net/dev/patchup/">. This compares the RPMs -your system has installed with those in a nominated directory and -reports on the ones it thinks need updating. It can even install them -for you if you trust it to.<p> - -<bf>A3:</bf> <url name="rpm2hml" url="http://rufus.w3.org/linux/rpm2html/"> -has a much more powerful (12MB of C code vs. a page of Perl!) version of A2.<p> - -<bf>Q:</bf> A single config file on the install server for all of the clients, -perhaps as a fallback after trying <em>IPADDR-kickstart</em> ?<p> - -<bf>A1:</bf> Use the BOOTP/DHCP 'boot file' parameter <em>bf</em> to set -the filename.<p> - -<bf>A2:</bf> Add a a record <tt>bf=/kickstart/ks.cfg</tt> to the relevant -entry in <em>/etc/bootptab</em>. - -<bf>Q:</bf> More flexibility when things go wrong - e.g. prompt for alternate -locations if distribution not found on CD-ROM.<p> - -<bf>A:</bf> ?<p> - -<bf>Q:</bf> Explicit exclusion of packages - e.g. everything apart from -<em>sendmail</em>.<p> - -<bf>A:</bf> Rebuild the <bf>BASE</bf> package without sendmail.<p> - -<bf>Q:</bf> Choose which services are started automatically on boot-up by the -run-level scripts under <em>/etc/rc.d/</em>.<p> - -<bf>A:</bf> The <em>chkconfig</em> utility lets you configure which -services are run automatically on boot-up. You can run this in your -post-installation script section, e.g. to run <em>ypbind</em> in run -levels 3, 4 and 5:<p> - -<tscreen><verb> -chkconfig --level 345 ypbind on -</verb></tscreen><p> - -and it will start the ypbind level on the 345 level. - -<bf>Q:</bf> When executing the shell commands in the <tt>%post</tt> section, -bring any output up in another virtual console rather than overwriting the -main screen. <em>Could be done in the shell commands section using -<tt>open</tt>?</em>.<p> - -<bf>A:</bf> No problem - do something like this:<p> - -<tscreen><verb> - exec >/dev/tty5 -</verb></tscreen><p> - -<bf>Q:</bf> Does the filesystem creation code check for bad blocks ?<p> - -<bf>A:</bf> If you switch to the virtual console where the filesystem -creation output is being displayed, you won't see any mention of the -'read-only' test being performed. Looks like the answer is no.<p> - -<bf>Q:</bf> Can I arrange things so some of my machines are configured -differently from others ?<p> - -<bf>A:</bf> You could move the host dependent stuff into the -scripted section of the KickStart config - e.g. only install a given -RPM if on a given machine. It would be useful to have a conditional -installation feature in the packages section of the config file, -e.g. switching on architecture, or hostname/domain name/IP address.<p> - -<bf>Q:</bf> Are there any changes between RedHat 5.1 and 5.2 ?<p> - -<bf>A1:</bf> Lots of changes in the installer, but mostly bug fixes -or cosmetic improvements. No impact on KickStart as far as I can -tell - from a <em>diff -rcs</em> of the two <em>misc/src/install</em> -directories.<p> - -<bf>A2:</bf> RH5.2 now apparently includes the automatic IP allocation/DHCP -patches to <tt>bootpd</tt>, but they have left out the documentation -which tells you how to use it. - -<bf>Q:</bf> (How) can you clear a specific partition or partitions ? -e.g. to leave <em>/home</em> but zap <em>/</em>.<p> - -<bf>A:</bf> You can't - yet!<p> - -<bf>Q:</bf> Can you arrange to have your partitions created across -multiple drives ? e.g. <em>/</em> on <tt>sda</tt> and <em>/home</em> -on <tt>sdb</tt>.<p> - -<bf>A:</bf> Don't think so - looks like you only get access to the -first drive from the partitioning tool.<p> - -<bf>Q:</bf> Is it possible to specify existing partitions to be -included in the mount table, or is it only possible to specify the -creation of new partitions that will then be included?<p> - -<bf>A:</bf> ?<p> - -<bf>Q:</bf> After running <tt>mkkickstart</tt>, where is the file -it creates?<p> - -<bf>A:</bf> It doesn't create a file - it dumps the KickStart -config to <tt>stdout</tt>.<p> - -<bf>Q:</bf> In virtual console 4 (Alt-F4) I get <tt>Unable to load NLS -charset cp437(nls_cp437)</tt>. What does this mean ? Should I be -worried ?<p> - -<bf>A:</bf> Sounds like you're trying to mount a CD-ROM burned with -the Joliet (Unicode extensions to ISO 9660. In theory the filenames -on the CD-ROM might get munched and not make it through to Linux -correctly. In practice it doesn't seem to cause any problems - -could be a spurious dependency ?<p> - -<bf>Q:</bf> Why am i getting the X Window System installed ? I didn't -put it in my list of packages.<p> - -<bf>A:</bf> The <tt>XFree86-VGA16</tt> RPM is a 'base' component, and -as such always gets installed - unless you change the definition of -the base class.<p> - -<bf>Q:</bf> In my post-installation script, can I use the packages -which have been installed by now to do funky things not possible with -the limited tools on the floppies ?<p> - -<bf>A:</bf> Yep - e.g. if you chose to install Perl when you put your -KickStart config together, almost anything is possible in about five -lines :-)<p> - - -<sect>Credits<p> - -Thanks to Eric Doutreleau for the info about <em>chkconfig</em>, the -<tt>SYSLINUX</tt> config file hack, and the Perl script for updating -your distribution server's RPMs. Thanks to Robert Kaminsky for -extensive investigations. Thanks to Piete Brooks, Flavia Regina -Munhoz, Tom Toffoli, Bob Robbins, Charlie Brady and Ragen Herrington, -for their comments and questions.<p> - - -<sect>Appendix A - Configuring BOOTP/DHCP and NFS<p> - -If you're wondering what on earth this BOOTP and DHCP stuff is, more -information is available at <url name="the DHCP WWW site" -url="http://www.dhcp.org/">. NFS is documented separately in detail -in the NFS HOWTO, and there's a DHCP mini-HOWTO too. I've tried to -provide enough details here to help you get started, whilst not -treating the topics in depth - let me know if you think this is -overkill.<p> - -In the BOOTP/DHCP + NFS configuration we're discussing, the KickStart -config file should be NFS mountable by the machine being installed -from <em>/kickstart/IPADDR-kickstart</em> on the BOOTP/DHCP server, -where <em>IPADDR</em> is the IP address of the new machine, e.g. -<em>/kickstart/198.168.254.254-kickstart</em> for the machine -<em>198.168.254.254</em>.<p> - -You should be able to override this location by returning -the <tt>bf</tt> parameter (boot file) in your BOOTP/DHCP response. It -may even be possible to have this NFS mounted off another machine -entirely.<p> - -To NFS export some directories from an existing Linux box, create the -file <em>/etc/exports</em> with contents something like:<p> - -<tscreen><verb> -/kickstart *.swedish-chef.org(ro,no_root_squash) -/mnt/cdrom *.swedish-chef.org(ro,no_root_squash) -</verb></tscreen><p> - -Note that if you didn't register the IP addresses you're going to be -using in the DNS, you may be told to get lost by the NFS server and/or -the RPC portmapper. In this you can probably get away with putting -IP address/netmask pairs in the config files, e.g.<p> - -<tscreen><verb> -/kickstart 198.168.254.0/255.255.255.0(ro,no_root_squash) -</verb></tscreen><p> - -and in <em>/etc/hosts.allow</em>:<p> - -<tscreen><verb> -ALL: 194.82.103.0/255.255.255.0: ALLOW -</verb></tscreen><p> - -This is because most Linux distributions use TCP wrappers to do -access control for some or all of the NFS related daemons. Be aware -that the <em>/etc/exports</em> syntax tends to be different on other -Unix variants - the NFS servers bundled with Linux distributions -tend to offer a much wider range of options than the ones shipped -with other versions of Unix. - -Be aware that if you include a root password in your KickStart config -file, or NFS export directories containing sensitive information, you -should take care to expose this information to as few people as -possible. This can be done by making the NFS export permissions as -fine grained as you can, e.g. by specifying a particular host or -subnet to export to rather than a whole domain. If you keep a special -IP address free for KickStart installations, everything's nice and -simple, but you'll have to change it later - or reconfigure the -machine to get its IP address via BOOTP/DHCP.<p> - -Most NFS servers require you to tell <tt>mountd</tt> and <tt>nfsd</tt> -(on some versions of Unix they're prefixed with a <tt>rpc.</tt>) that -the <em>/etc/exports</em> file has changed - usually by sending a -<tt>SIGHUP</tt>. There's often a program or script called -<tt>exportfs</tt>, which will do this for you, e.g.<p> - -<tscreen><verb> -# exportfs -a -</verb></tscreen><p> - -If you didn't have NFS up and running when this machine was booted, -the directories may not be exported automatically. Try rebooting, or -running the following programs as root:<p> - -<tscreen><verb> -# portmap -# rpc.nfsd -# rpc.mountd -</verb></tscreen><p> - -As noted, on some systems the <tt>rpc.</tt> prefix isn't used. In -most modern Unix distributions, these programs can be found in the -<em>/usr/sbin</em> or <em>/usr/libexec</em> directories. These might -not be in your path already, e.g. if you used <tt>su</tt> to become -<em>root</em>. The <tt>portmap</tt> program is also sometimes called -<tt>rpcbind</tt>, e.g. on Solaris, some versions of <tt>nfsd</tt> -require a command line argument specifying the number of instances of -the server to run, and you may find you also need to run another -daemon called <tt>biod</tt>. The above should suffice on most (all?) -Linux systems.<p> - -If you're using the CMU BOOTP server with DHCP and dynamic addressing -extensions referred to earlier, a sample <em>/etc/bootptab</em> entry -(<em>/etc/bootptab</em> is the normal location of the BOOTP/DHCP -configuration file) would look something like this:<p> - -<tscreen><verb> - .dynamic-1:ip=198.168.254.128:T254=0x30:T250="ds=198.168.254.2: - dn=swedish-chef.org:sm=255.255.255.0:gw=198.168.254.1: - dl=0xFFFFFFFF": -</verb></tscreen><p> - -(wrapped for clarity)<p> - -This says to allocate IP addresses dynamically on encountering new -machines, starting at <em>198.168.254.128</em> and continuing for the -next 48 (the hexadecimal value <em>30</em>) addresses. Each client -will be passed back the value of <em>T250</em>. In this case that -sets:<p> - -<itemize> -<item> the DNS server <tt>ds</tt> to <em>198.168.254.2</em> -<item> the domain name <tt>dn</tt> to <em>swedish-chef.org</em> -<item> the subnet mask <tt>sm</tt> to <em>255.255.255.0</em> -<item> the default gateway <tt>gw</tt> to <em>198.168.254.1</em> -<item> the lease length <tt>dl</tt> (how long the address is - valid for) to "forever" -</itemize><p> - -There seem to be a number of other versions of this server kicking -around which do not support dynamic addressing. For these, you would -have to list the hardware (typically Ethernet MAC) address of each -to-be-installed machine in <em>/etc/bootptab</em>, and the entries -would look something like this:<p> - -<tscreen><verb> -bork.swedish-chef.org:ip=198.168.254.128:ha=0000E8188E56: - ds=198.168.254.2:dn=swedish-chef.org:sm=255.255.255.0: - gw=198.168.254.1:dl=0xFFFFFFFF": -</verb></tscreen><p> - -(wrapped for clarity)<p> - -Note that the parameter <tt>ha</tt> corresponds to the hardware -address of the machine being installed.<p> - - -<sect>Appendix B - Making your own RPMs<p> - -The RPM package format is already very well documented, particularly -in the book <em>Maximum RPM</em> by Ed Bailey, which you can download -from the <url url="http://www.rpm.org/" name="RPM WWW site"> - also -available from all good book stores! This is just a couple of quick -hints for people in a hurry.<p> - -RPM packages are built from a <em>spec</em> file. This consists (in a -similar fashion to the KickStart config file) of a recipe of steps -that need to be taken in order to build the package - it's expected -that you'll have to build it from source, potentially for multiple -platforms, and may need to apply patches before compiling. Once built -and installed, a binary RPM will be created from the files and -directories you specify as being associated with the package. It's -important to note that RPM has no idea of which files and directories -are related to a given package - you have to tell it. - -Here's a sample specification for a custom RPM of the <url name="Squid -WWW cache server" url="http://squid.nlanr.net/">:<p> - -<tscreen><verb> -Summary: Squid Web Cache server -Name: squid -Version: 1.NOVM.22 -Release: 1 -Copyright: GPL/Harvest -Group: Networking/Daemons -Source: squid-1.NOVM.22-src.tar.gz -Patch: retry-1.NOVM.20.patch -%description -This is just a first attempt to package up the Squid Web Cache for easy -installation on our RedHat Linux servers - -%prep -%setup -%build -configure --prefix=/usr/squid -perl -spi -e 's!#( -DALLOW_HOSTNAME_UNDERSCORES)!$1!' src/Makefile -make - -%install -make install - -%files -/usr/squid -</verb></tscreen><p> - -Here's how to build this RPM:<p> - -<tscreen><verb> -% mkdir -p SOURCES BUILD SRPMS RPMS/i386 -% cp ~/squid-1.NOVM.22-src.tar.gz SOURCES -% cp ~/retry-1.NOVM.20.patch SOURCES -% rpm -ba squid-1.NOVM.22+retry-1.spec -</verb></tscreen><p> - -This will automatically create a subdirectory under the <em>BUILD</em> -directory, into which it'll unpack the source code and then apply the -patch (there are a number of options available for patching - check -the book for details). Now, RPM will automatically build the package -by running <tt>configure</tt> and then <tt>make</tt>, install it using -<tt>make install</tt>, and take a snapshot of the files under -<em>/usr/squid</em>. It's the latter which will form the binary RPM -of the Squid software.<p> - -Note that we can insert arbitrary shell commands into the unpacking, -building and installing processes, e.g. the call to <tt>perl</tt> -which tweaks one of Squid's compile-time parameters.<p> - -The final binary RPM will be left under the <em>RPMS</em> directory in -the platform specific subdirectory <em>i386</em>. In this case it -will be called <em>squid-1.NOVM.22-1.i386.rpm</em>. Note that the -filename is created by concatenating the values of the following -parameters from the spec file: <tt>Name</tt>, <tt>Version</tt> and -<tt>Release</tt> - plus the hardware platform in question, -<em>i386</em> in this case. Try to bear this in mind when creating -your own RPMs, to avoid giving them overly long or painful names!<p> - -It's also worth bearing in mind that you can build RPMs without having -to rebuild the whole software package, e.g.<p> - -<tscreen><verb> -Summary: Linux 2.0.36 kernel + filehandle patch + serial console patch -Name: linux -Version: 2.0.36+filehandle+serial_console -Release: 1 -Copyright: GPL -Group: Base/Kernel -Source: linux-2.0.36+filehandle+serial_console.tar.gz -%description -This is just a first attempt to package up the Linux kernel with patches -for installation on our RedHat Linux servers - -%prep -echo - -%setup -echo - -%build -echo - -%install -echo - -%post -/sbin/lilo - -%files -/lib/modules/2.0.36 -/boot/vmlinuz -</verb></tscreen><p> - -In this case we simply create an RPM based on the -<em>/boot/vmlinuz</em> file and the contents of the directory -<em>/lib/modules/2.0.36</em>, and execute <em>/sbin/lilo</em> after -the package has been installed on a target machine. Let me know if -you know much neater way of writing the spec file than this.<p> - - -<sect>Appendix C - Munging your own RPMs into the distribution<p> - -Here is Eric's script for munging updated RPMs into the RedHat -distribution area: - -<tscreen><verb> -#!/usr/bin/perl -# -$redhatdir="/cdrom/i386"; -$rpmdir="/cdrom/i386/RedHat/RPMS/"; -$updatedir="/cdrom/updates/"; -@OTHERDIR=($updatedir); -foreach $dir (@OTHERDIR) - { - print "update for $dir\n"; - system(" find $dir -name \"*.rpm\" -exec cp {} $rpmdir \\; "); - } -chdir($contribdir) || die "peux pas aller dans $contribdir $!\n"; -system("chmod -R 755 $redhatdir"); -chdir($rpmdir) || die "problem to go in $rpmdir $!\n"; -# -# remove the old file -# -opendir(DIR,'.'); -@package=grep(/\.rpm$/,readdir(DIR)); -foreach $file (@package) - { - $file =~ /(.*)\-([\d+|\.]+\w*)\-(\d+)\.[i386|noarch].*/; - $nom=$1; - $version=$2; - $buildvers=$3; - if ($NOM{$nom}) - { - $version2=$VERSION{$nom}; - $buildver2=$BUILDVERS{$nom}; - $file2=$FILE{$nom}; - $nom2=$NOM{$nom}; - if ( $version2 gt $version ) - { - print "$file2 is newer than $file\n"; - unlink($file); - } - else - { - if ( $version2 lt $version ) - { - print "$file is newer than $file2\n"; - unlink($file2); - $VERSION{$nom}=$version; - $BUILDVERS{$nom}=$buildvers; - $FILE{$nom}=$file; - $NOM{$nom}=$nom; - } - else - { - if ( $buildver2 > $buildvers ) - { - print "$file2 : $buildver2 est mieux que $file : $buildvers\n"; - unlink($file); - } - else - { - print "$file2 : $buildver2 is older than $file : $buildvers\n"; - unlink($file2); - $VERSION{$nom}=$version; - $BUILDVERS{$nom}=$buildvers; - $FILE{$nom}=$file; - $NOM{$nom}=$nom; - } - } - } - } - else - { - $VERSION{$nom}=$version; - $BUILDVERS{$nom}=$buildvers; - $FILE{$nom}=$file; - $NOM{$nom}=$nom; - } - } - -# we do the hard thing here -# -system("$redhatdir/misc/src/install/genhdlist $redhatdir"); -</verb></tscreen><p> - -</article> diff --git a/LDP/howto/linuxdoc/archived/Laptop-HOWTO.sgml b/LDP/howto/linuxdoc/archived/Laptop-HOWTO.sgml deleted file mode 100644 index 2fbe3c99..00000000 --- a/LDP/howto/linuxdoc/archived/Laptop-HOWTO.sgml +++ /dev/null @@ -1,3721 +0,0 @@ -<!doctype linuxdoc system> -<article> -<title>Linux Laptop-HOWTO -<author>Werner Heuser <htmlurl url ="mailto:wehe@tuxmobil.org" name="<wehe@tuxmobil.org>"> -<date>v2.2b, 27 February 2003 -<abstract> -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. - -</abstract> -<toc> - -<sect>Preface -<p> -Life is the first gift, love is the second, and understanding is the third. -- <url url="http://www.capecod.net/~tmpiercy/" name="Marge Piercy"> - -<sect1>About the Author -<p> -People like either <idx>laptops</idx> or <idx>desktops</idx>. I like to work with laptops rather than with desktops. I like Linux too. My first HOWTO was the <url url="http://tuxmobil.org/howtos.html" name="Linux/IR-HOWTO"> 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. -<p> -Also I have written some pages about Linux with certain laptops: <url url="http://tuxmobil.org/echos133.html" name="Olivetti Echos 133 DM (German)"> (together with Kurt Saetzler), <url url="http://tuxmobil.org/hp800e.html" name="HP OmniBook 800CT">, <url url="http://tuxmobil.org/hp3100e.html" name="HP OmniBook 3100"> (together with Friedhelm Kueck) <url url="http://tuxmobil.org/armada1592dte.html" name="COMPAQ Armada 1592 DT"> and <url url="http://tuxmobil.org/c286lte.html" name="COMMODORE C286LT">. -<p> -During the work with the Laptop-HOWTO I have collected some surveys about laptop related hardware: <url url="http://tuxmobil.org/graphic_linux.html" name="graphic chips">, <it>unofficially</it> <url url="http://tuxmobil.org/pcmcia_linux.html" name="supported PCMCIA cards">, <url url="http://tuxmobil.org/modem_linux.html" name="internal modems"> and <url url="http://tuxmobil.org/ir_misc.html" name="infrared chips">. -<p> -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. -<p> -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. - -<sect1>Sponsoring -<p> -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 <url url="http://tuxmobil.org/hp800e.html" name="HP OmniBook 800CT 5/100">. -<p> -Or sponsor a banner ad at my WWW pages <url url="http://tuxmobil.org/ " name="TuxMobil">. -<p> -You can hire me for readings or workshops on <it>Linux with Laptops</it>, <it>Repairing of Laptops</it> and other Linux topics, too. - -<sect1>About the Document (Mirrors, Translations, Versions, Formats, URLs) -<p> -Many times I have mentioned <it>MetaLab</it> formerly known as <it>SunSite</it>. This site carries a heavy load, so do yourself a favor, use one of the <url url="http://metalab.unc.edu/pub/Linux/MIRRORS.html" name="MetaLab mirrors"> . -<p> -For <it>Debian/GNU Linux</it> the mirror URLs are organized in this scheme <tt>http://www.<country code, e.g. uk>.debian.org</tt> . -<p> -This text is included in the <url url="http://tldp.org/" name="LINUX DOCUMENTATION PROJECT - LDP"> . -<p> -Richard Worwood mirrors this HOWTO at <url url="http://www.felch01.demon.co.uk/laptop-howto.html" name="http://www.felch01.demon.co.uk/laptop-howto.html"> . -<p> -Lionel, &dquot;trollhunter&dquot; Bouchpan-Lerust-Juery, <trollhunter@linuxfr.org> provides a translation into French. You can download or browse it at <url url="http://infonomade.linuxfr.org/portables/ressourcesfr.html#howto" name="http://infonomade.linuxfr.org/portables/ressourcesfr.html#howto"> . And he mirrors the English version at <url url="http://infonomade.linuxfr.org/portables/ressourcesen.html#howto" name="http://infonomade.linuxfr.org/portables/ressourcesen.html#howto "> -<p> -He has also written a HOWTO about portables and wearables, please look at his pages <url url="http://infonomade.linuxfr.org/index.html" name="http://infonomade.linuxfr.org/index.html "> (French version) <url url="http://infonomade.linuxfr.org/indexen.html" name="http://infonomade.linuxfr.org/indexen.html"> (English version). -<p> -Translations into Japanese (Ryoichi Sato <rsato@ipf.de>), Italian (Alessandro Grillo <Alessandro_Grillo@tivoli.com>), Portuguese (Gledson Evers <pulga_linux@bol.com.br> the translation will be announced at <url url="http://www.linuxall.org" name="LinuxALL">) and Greek (Vassilis Rizopoulos <mscyvr@scs.leeds.ac.uk>) are under construction. -<p> -Please contact me before starting a translation to avoid double work. Since a translation is a great amount of work, I recommend to do this work as a group. -<p> -Nearly all of the programms I mention are available as <url url="http://www.debian.org" name="Debian/GNU Linux"> packages, or as RPM packages, look up your favorite RPM server, for instance <url url="http://rufus.w3.org/linux/RPM/ByName.html" name="RUFUS"> . -<p> -The latest version of this document is available in different formats at <url url="http://tuxmobil.org/" name="TuxMobil"> . - -<sect1>Contact -<p> -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. -<p> -Since I want to write much more stuff about mobile computing and Linux I'm thinking about turning this HOWTO into a book. -<p> -Werner Heuser <wehe@tuxmobil.org> - -<sect>Copyright, Disclaimer and Trademarks -<p> -Copyright © 1999 by Werner Heuser. This document may be distributed under the terms set forth in the <url url="http://metalab.unc.edu/LDP/COPYRIGHT.html" name="LDP license"> . -<p> -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. -<p> -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. -<p> -Though I hope trademarks will be superfluous sometimes (you may see what I mean at <url url="http://www.opensource.org/osd.html" name="Open Source Definition">) : If certain words are trademarks, the context should make it clear to whom they belong. For example &dquot;MS Windows NT&dquot; implies that &dquot;Windows NT&dquot; belongs to Microsoft (MS). Mac is a trademark by Apple Computer. All trademarks belong to their respective owners. - -<sect>Which Laptop to Buy? -<p> -<sect1>Introduction -<p> -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: - -<enum> - -<item> -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. -<p> -Most peripheral cables are appallingly heavy. If you get a subnotebook -and carry it around with a bunch of external drives, cables, and <it>port -expander</it> dongles and power converter, you may be lugging a heavier -bag than if it were all in one box. Subnotebooks are useful mainly -if you can afford to leave all the other junk behind.</item> - -<item> -Supported Operations Systems: proprietary versus open</item> - -<item> -Price: NoName versus Brand</item> - -<item> -Hardware Features: display size, harddisk size, CPU speed, battery type, etc.</item> - -<item> -Linux Support: graphic chip, sound card, infrared controller (IrDA), internal modem, etc.</item> - -</enum> - -<sect1>Portables, Laptops/Notebooks, Sub/Mini-Notebooks, Palmtops, PDAs/HPCs -<p> -<sect2>Portables -<p> -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., <url url="http://www.bsicomputer.com/" name="http://www.bsicomputer.com/">) - -<sect2>Laptops/Notebooks -<p> -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 <it>laptop</it> and <it>notebook</it> seem equivalent to me. - -<sect2>Sub-Notebooks/Mini-Notebooks -<p> -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. - -<sect2>Palmtops -<p> -Weight between 0.7 and 1.3 kg (1.5 to 3 lbs). Features: proprietary commercial operating systems. Examples: HP200LX. - -<sect2>Personal Digital Assistants (PDAs)/Handheld PCs (HPCs) -<p> -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. - -<sect2>Wearables -<p> -Watches, digital pens, calculators, digital cameras, cellular phones and other wearables. - -<sect1>Linux Features -<p> -Due to a lack of support by some <idx>hardware manufacturers</idx>, 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 <idx>Compatibility Check</idx> chapter in the Hardware In Detail sections below. -<p> -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 the <url url="http://tuxmobil.org/laptop_manufacturer.html" -name="Linux Laptop Manufacturer Survey">. - -<sect1>Main Hardware Features -<p> -Besides its Linux features, there often are some <it>main features</it> which have to be considered when buying a laptop. For <it>Linux features</it> please see the Hardware In Detail section below. - -<sect2>Weight -<p> -Don't underestimate the weight of a laptop. This weight is mainly influenced by: - -<enum> - -<item> -screen size</item> - -<item> -battery type</item> - -<item> -internal components, such as CD drive, floppy drive</item> - -<item> -power supply</item> - -<item> -material used for the case, usually they are either from plastics or from magnesium. - -</enum> - -<sect2>Display -<p> -Laptops come with one of two types of displays: <it>active</it> matrix (TFT) and <it>passive</it> 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&dquot;. A bigger screen weighs more, costs more, and is harder to carry, but is good for a portable desktop replacement. - -<sect2>Batteries -<p> -The available battery types are <it>Lithium Ion (LiIon)</it>, <it>Nickel Metal Hydride ( NiMH)</it> and <it>Nickel Cadmium (NiCd)</it>. - -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. - -<sect2>CPU -<p> -<sect3>Supported CPU Families -<p> -For details about systems which are supported by the Linux Kernel, see the <url url="http://www.cl.cam.ac.uk/users/iwj10/linux-faq/" name="Linux FAQ"> . See also <url url="http://www.ctv.es/USERS/xose/linux/linux_ports.html" name="Current ports of Linux OS"> - -<enum> - -<item>i286: -Linux doesn't support this CPU family yet. But there are some efforts at <url url="http://www.elks.ecs.soton.ac.uk/" name="ELKS">. If you like, you may use <url url="http://www.cs.vu.nl/~ast/minix.html" name="Minix"> one of the predecessors of Linux. Minix supports 8088 to 286 with as little as 640K memory. Actually there are some laptops with ELKS around, for instance the <url url="http://tuxmobil.org/c286lte.html" name="Commodore C286LT"> - -<item>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. - -<item>m68k: -This covers Amigas and Ataris having a Motorola 680x0 processor for x>=2; with MMU. And the early Apple/Macintosh computers. -<p> -There was a long series of Apple PowerBooks and other laptops based on the m68k chip. Macintosh Portable (an ugly 16-pound first attempt); PowerBook 100, 140, 170, 145, 160, 180c, 165c, 520c, 540c, 550c, 190; Duo 210, 230, 250, 270c, 280. The PowerBook Duos were available at the same time as the PowerBooks, they were a sort of subnotebook, but were designed so that you could plug them into a base station (a DuoDock) with more RAM, peripherals, etcetera, so that they could also act as a desktop computer. The first PowerPC PowerBooks were the ill-starred PowerBook 5300 (after the 190) and the Duo 2300c. -<p> -For a complete list of all Macintosh computers ever made, with specifications, see <url url="http://www.apple-history.com/gallery.html" name="Apple-History">. -<p> -Note also that readers should *not* go to www.linuxppc.org for hardware compatibility with 68k laptops--as the name implies, LinuxPPC is only for PowerPC machines. The proper place to go for information on running Linux on m68k Macintoshes is: <url url="http://www.mac.linux-m68k.org/" name="linux-m68k">. -<p> -In particular, their hardware compatibility list is at: <url url="http://www.mac.linux-m68k.org/status/sysreq.html" name="linux-m68k-status"> and it states in regards to laptops: -<p> -&dquot;Much like laptops of the Intel/Linux world, Mac laptops have generally different setups that can be very hard to figure out. Also, because of a general lack of machines to test, we are only aware of boots on the Powerbook 145, Powerbook 150, Powerbook 170, Powerbook 180, and Powerbook 190. Even if it boots, we currently have no support for Powerbook-style ADB, the APM support, or just about anything else on them. This means the only way to log in is with a terminal hooked up to the serial interface, this has been tested on the 170.&dquot; -<p> -&dquot;Several Powerbooks have internal IDE which is supported. PCMCIA drivers will be forthcoming if someone can supply the necessary hardware information to write a driver. As always, an FPU is needed also. Many of the later models have the 68LC040 processor without FPU, and many of these processors are broken with respect to the FPU trap mechanism so they can't run regular Linux binaries even with FPU emulation. Current status on Powerbooks 140, 160, 165, 165c, 180c, 190, 520 and Duos 210, 230, 250, 270c, 280, and 280c is unknown.&dquot; - -<p> -Also there are two Atari laptops, for which I don't have enough information. The following quotations are from the <url url="http://capybara.sk-pttsc.lj.edus.si/yescrew/eng/atari.htm" name="Atari Gallery">. -<p> -&dquot;The <it>STacy</it> was released shortly after the <it>Mega ST</it> to provide a portable means of Atari computing. STacy computers were shipped with TOS v1.04. -<p> -Designed to replace the <it>STacy</it> as the defacto portable ST computer, the <it>ST Book</it> brought the basic computing power of an ST to a lightweight notebook computer. This machine was only released in Europe and Atari only shipped a very small quantity. The ST Book was shipped with TOS v2.06.&dquot; -<p> -Is there an Amiga notebook? - -<item>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 <url url="http://www.linuxppc.org/hardware/" name="LinuxPPC"> for a current list of supported machines. -<p> -BTW: The team at <url url="http://www.imaclinux.net" name="iMac Linux"> has managed to get the iMac DV to boot Linux to a usable point. You may get information about the iBook there as well. - -<item>Alpha, Sparc, Sparc64 architectures: -These are currently under construction. AFAIK there are only the Tadpole SPARC and ALPHA laptops, and some other ALPHA laptops available. - -<item>StrongARM: -a very low-power CPU found in Rebel.com's popular NetWinder (some kind of mobile computer, too), -and actively supported in the Debian project, it is also in several -WinCE machines, such as HP's Jornadas. Only the lack of tech specs -prevents Linux from being ported to these tiny, long-battery-life -machines. A full-scale StrongARM-based laptop would make a superb -Linux platform, but none exists yet. -<p> -For PDAs with ARM/StrongARM CPU see the PDA chapter below. - -<item>MIPS: -Used in SGI mainframes and Cobalt Micro intranet appliances, -chips based on this architecture are used in many Wince machines. -Linux has been ported to a few of these, including the lovely little -Vadem Clio. Vadem has been admirably cooperative. -<p> -More about Linux on Wince boxes may be found at -<url url="http://www.2gn.com/~jjorgens/linuxce_faq.html" name="LinuxCE-FAQ">. - -</enum> - -<sect3>Miscellaneous -<p> -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. - -<sect2>Cooling -<p> -An enormously important issue. -Anything based on PPC or Pentium will generate enormous amounts -of heat which must be dissipated.Generally, this means either a -fan, or a heat sink the size of the case.If it's a fan, the air -path had better not ever get blocked, or it will overhead and burn -out.This means machines with a fan mounted in the bottom are a -big, big mistake: you can't use them on a soft surface. - -<sect2>Keyboard Quality -<p> -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: <tt><ESC></tt>, <tt><TAB></tt>, <tt><Pos1></tt>, <tt><End></tt>, <tt><PageDown></tt>, <tt><PageUp></tt> and the cursor keys. -<p> - -<sect2>Price -<p> -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 <it>no-name</it> 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 <it>second hand</it> 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 <url url="http://www.hardware.de" name="http://www.hardware.de">, which offers a good survey about current prices for second hand machines. - -<sect2>Power Supply -<p> -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. - -<sect1>Sources of More Information -<p> -Specifications, manuals and manufacturer support often are not helpful. Therefore you should retrieve information from other sources too: - -<enum> - -<item> -Highly recommended is the survey by Kenneth E. Harker <url url="http://www.linux-on-laptops.com/" name=" http://www.linux-on-laptops.com/"> .</item> - -<item> -<url url="ftp://tsx-11.mit.edu/pub/linux/packages/laptops/" name=" ftp://tsx-11.mit.edu/pub/linux/packages/laptops/"> .</item> - -<item> -Hardware-HOWTO</item> - -<item> -open hardware - The Open Hardware Certification Program <url url="http://www.debian.org/OpenHardware/" name=" http://www.debian.org/OpenHardware/"> </item> - -<item>HARDWARE.doa.org - dedicated to the hardware aspects of (Linux) computing <url url="http://hardware.doa.org/" name=" http://hardware.doa.org/"> </item> - -<item>How to Build a PC FAQ - excellent hardware overview by Billy Newsom <url url="http://www.motherboards.org/build.html" name="http://www.motherboards.org/build.html"></item> - -<item> -Last but not least the WWW itself.</item> - -</enum> - -<sect1>Linux Compatibility Check -<p> -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -Hardware-HOWTO</item> - -<item> -Kernel-HOWTO</item> - -<item> -PCMCIA-HOWTO</item> - -<item> -PCI-HOWTO</item> -<item> -Plug-and-Play-mini-HOWTO</item> - -</enum> - -<sect2>Check Methods in General -<p> -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: - -<enum> - -<item> -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 <tt>dmesg</tt> or by looking into <file>/var/log/messages</file>. - -<item> -If your kernel supports the <file>/proc</file> file system you may get detailed information about PCI devices by <tt>cat /proc/pci</tt> Please read the kernel documentation <file>pci.txt</file>. You may get further information about unknown PCI devices at the database from Craig Hart at <url url="http://members.hyperlink.net.au/~chart" name="http://members.hyperlink.net.au/~chart">. From 2.1.82 kernels on you may use the <tt>lspci</tt> command from the <tt>pci-utils</tt> package. - -<item> -To retrieve information about Plug-and-Play (PNP) devices use <tt>isapnp-tools</tt> . - -<item> -Use <tt>scsi_info</tt> by David Hinds for SCSI devices or <tt>scsiinfo</tt>. - -</enum> - -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 <tt>muLinux</tt> provides even a small <tt>systest</tt> program and <tt>TomsRtBt</tt> comes with <tt>memtest</tt>. To use <tt>memtest</tt> you have to copy it on a floppy <tt>dd if=/usr/lib/memtest of=/dev/fd0</tt> and to reboot from this floppy. -<p> -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. -<p> -Using Windows9x/NT to get hardware settings, basically boot Windows, then <tt>Start -> Settings -> Control Panel -> System -> Device Manager</tt> and write down everything, or make a hardcopy from the display using the <tt><PRINT></tt> key, plus keep a log of settings, hardware, memory, etc. -<p> -Using MS-DOS and Windows3.1x you can use the command <tt>msd</tt>, which is an akronym for MicroSoft Diagnostics. Or you might try one of the numerous DOS shareware utilities: <tt>CHECK-IT</tt>, <tt>DR.HARD</tt> and others. -<p> -Sometimes it's difficult to know what manufacturer has built the machine or parts of it actually. The <url url="http://www.fcc.gov/fcc-bin/ead" name="FCC"> &dquot;Federal Communications Commission On-line Equipment Authorization Database may be used, if you are having problems identifying the manufacturer of a laptop or notebook computer (or other electronic device,) this site lets you search the FCC database based on the FCC ID number you can usually find on the equipment if it was marketed in the United States of America.&dquot; -<p> -<url url="http://www.linux-mandrake.com/lothar/" name="The Lothar Project"> -is a Mandrake-related project to provide a GUIed interface to get at hardware -configuration information on Linux-based systems. It provides a -library for different system informations, too. -<p> -Many laptops are no more compatible with Windows than Linux. David Hinds, author of the PCMCIA drivers, points out that Toshiba notebooks use a proprietary Toshiba PCMCIA bridge chip that exhibits the same bugs under Windows as under Linux. IBM Thinkpads have serious BIOS problems that affect delivery of events to the power management daemon <tt>apmd</tt>. These bugs also affect MS-Windows, and are listed in IBM's documentation as <it>considerations</it>. -<p> -Some incompatibilities are temporary, for instance laptops that have Intel's USB chip will probably get full USB support, eventually. - -<sect1>Writing a Device Driver -<p> -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 Alessandro Rubini, Andy Oram: Linux Device Drivers. - -<sect1>Buying a Second Hand Laptop -<p> -Some recommendations to check an used laptop, before buying it: - -<enum> - -<item> -Review the surface of the case for visible damages.</item> - -<item> -Check the display for pixel faults. Maybe it's useful to take a magnifying glass therefore.</item> - -<item> -Do an IO stress-test, .e.g. with the tool <tt>bonnie</tt>.</item> - -<item> -You may use <tt>memtest</tt> and <tt>crashme</tt> to achieve a memory test. - -<item> -Do a CPU stress test, e.g. with the tool <tt>Byte</tt> or by compiling a kernel.</item> - -<item> -Check the floppy drive by formatting a floppy.</item> - -<item> -Check the CD drive by reading a CD.</item> - -<item> -To check the battery seems difficult, because it needs some time: one charge and one work cycle.</item> - -<item> -To check the surface of the harddisk you may take <tt>e2fsck</tt>. There is also a Linux tool <tt>dosfsck</tt> or the other <tt>fsck</tt> tools.</item> - -<item> -To test the entire disk (non-destructively), time it for performance, and determine its size, as root do: <tt>time dd if=/dev/hda of=/dev/null bs=1024k</tt> . - -<item> -Check wether the machine seems stolen. I have provided a <url url="http://tuxmobil.org/stolen_laptops.html" name="survey of databases for stolen laptops">. - -</enum> - -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 <tt>PC Diagnostics 95</tt> made by Craig Hart <url url="http://members.hyperlink.net.au/~chart" name="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. -<p> -Please note this quotation from the disclaimer: &dquot;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 <it>pretty</it> 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.&dquot; -<p> -Laptop computers, unlike desktop machines, really do get used up. -<it>Lithium batteries</it> are good for no more than 400 recharge cycles, -sometimes much fewer. <it>Keyboards</it> wear out. <it>LCD screen backlighting</it> -grows dim. <it>Mouse buttons</it> fail. Worst of all, <it>connectors</it> get loose -as a result of vibration, causing intermittent failures (e.g. only -when you hit the <Enter> key). We have heard of a machine used on the -table in a train being shaken to unusability in one trip. - -<sect1>No Hardware Recommendations -<p> -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. - -<sect>Laptop Distribution -<p> -<sect1>Requirements -<p> -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 <it>minimal install</it> 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 <it>laptop-specific installation problems</it>, e. g. how to install your distribution without a cd-rom drive or how to setup the plip network driver. - -Add better <it>power management</it> and seamless <it>PCMCIA support</it> to your distribution. Add a recompiled kernel and an alternative set of PCMCIA drivers with <it>apm support</it> that the user can install on demand. Include a precompiled <it>apmd package</it> with your distribution. - -Add support for dynamically <it>switching network configurations</it>. 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 <it>convenient PPP dialer</it> 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 <tt>usernet</tt> 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 <tt>wvdial</tt> from Worldvisions <url url="http://www.worldvisions.ca/wvdial/" name="http://www.worldvisions.ca/wvdial/">. - -<sect1>Recommendation -<p> -The <url url="http://www.debian.org" name="Debian/GNU Linux"> 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 <it>debian-laptop</it> including a searchable archiv is provided. And Debian/GNU Linux is free. -<p> -At the end of August 1999 the <url url="http://tuxmobil.org/debian_linux.html" name="Debian Laptop Distribution - Proposal"> was issued. And some more laptop related packages and a Debian <it>meta-package</it> dedicated to laptops are on the way. -<p> -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. - -<sect>Installation -<p> -<sect1>Related HOWTOs -<p> -<enum> -<item> -CDROM-HOWTO</item> - -<item> -Config-HOWTO</item> - -<item> -Diskless-mini-HOWTO</item> - -<item> -Installation-HOWTO</item> - -<item> -Pre-Installation-Checklist-mini-HOWTO</item> - -<item> -Update-mini-HOWTO</item> - -<item> -Hard-Disk-Upgrade-mini-HOWTO</item> - -<item> -Installation and getting started by Matt Welsh and others available at the LINUX DOCUMENTATION PROJECT <url url="http://metalab.unc.edu/LDP" name="http://metalab.unc.edu/LDP"></item> - -<item> -Installing Debian Linux 2.1 For x86 by Bruce Perens, Sven Rudolph, Igor Grobman, James Treacy, Adam P. Harris <url url="ftp://ftp.debian.org/debian/dists/slink/main/disks-i386/current/install.html" name="ftp://ftp.debian.org/debian/dists/slink/main/disks-i386/current/install.html"> - -<item> -Install-From-Zip-mini-HOWTO</item> - -<item> -<url url="http://www.torque.net/~campbell" name="ZIP-Drive-mini-HOWTO "> </item> -</enum> - -<sect1>Prerequisites - Partitioning -<p> -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: - -<itemize> -<item>BIOS, some current BIOSes use a separate partition -<item>suspend to disk, some laptops support this feature -<item>swap space Linux -<item>swap space Windows9x/NT -<item>Linux base -<item>Linux <file>/home</file> or data -<item>common data between Linux and Windows9x/NT -</itemize> - -Note this chapter isn't ready yet. Please read the according HOWTOs first. - -<sect1>Linux Tools to Repartition a Hard Disk -<p> -<sect2>GNU parted -<p> -<url url="http://www.alphalink.com.au/~clausen/parted/" name="GNU 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. <tt>parted</tt> is currently in its early developement stage. - -<sect2>ext2resize -<p> -<url url="http://www.dsv.nl/~buytenh/ext2resize/" name="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 <tt>parted</tt> project. - -<sect2>fixdisktable -<p> -Something was recently published on the <linux-kernel@vger.kernel.org> 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 &dquot;fixdisktable&dquot; at <url url="http://bmrc.berkeley.edu/people/chaffee/fat32.html" name="http://bmrc.berkeley.edu/people/chaffee/fat32.html ">. It is quite a ways down in that page. Or look for it via ftp in <url url="ftp://bmrc.berkeley.edu/pub/linux/rescue/" name=" ftp://bmrc.berkeley.edu/pub/linux/rescue/"> and locate the latest &dquot;fixdisktable&dquot; in that ftp directory. (Source and binary dist should be available.) - -<sect2>Caveats -<p> -Before repartitioning your harddisk take care about the disk layout. Especially look for hidden disk space or certain partitions used for <it>suspend to disk</it> or <it>hibernation</it> mode. Some laptops come with a partition which contains some BIOS programs (e.g. COMPAQ Armada 1592DT). Search the manual carefully for tools like <tt>PHDISK.EXE</tt>, Suspend to Disk, Diagnostic TOOLS. -<p> -Please see chapter <ref id="dostools" name="DOS Tools to Repartition a Hard Disk">, too. -<p> -By Nathan Myers from <url url="http://www.linuxlaptops.com" name="LL - LinuxLaptops">: &dquot;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.&dquot; - -<sect2>Multi Boot -<p> -Please see the Different Environments chapter, for information about booting different operating systems from the same harddisk. - -<sect1>Installation Methods -<p> -From the Battery-HOWTO:&dquot;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.&dquot; -<p> -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 <it>laptop specific methods</it>, which are necessary only in certain circumstances. -<p> -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. - -<sect1>From a Boot Floppy plus CD-ROM - The Usual Way -<p> -With modern laptops, the usual Linux <idx>installation</idx> (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 <it>floppy drive and CD-ROM drive </it>, or if the floppy drive is <it>only available as a PCMCIA device</it>, 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. -<p> -Certain laptops will only boot <it>zImage</it> kernels. <it>bzImage</it> 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 <url url="http://www.debian.org" name="http://www.debian.org"> for instance. - -<sect1>From a DOS or Windows Partition at the Same Machine -<p> -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 <it>swappable floppy and CD-ROM components</it> (if both are mutually exclusive) or if they are <it>only available as PCMCIA devices</it>. I have taken this method from &dquot;Installing Debian GNU/Linux 2.1 For Intel x86 - Chapter 5 Methods for Installing Debian&dquot; <url url="http://www.debian.org" name="http://www.debian.org"> : - -<enum> - -<item>Get the following files from your nearest Debian FTP mirror and put them into a directory on your DOS partition: <tt>resc1440.bin drv1440.bin base2_1.tgz root.bin linux install.bat</tt> and <tt>loadlin.exe</tt>. - -<item>Boot into DOS (not Windows) without any drivers being loaded. To do this, you have to press <<tt>F8</tt>> at exactly the right moment. - -<item>Execute <tt>install.bat</tt> from that directory in DOS. - -<item>Reboot the system and install the rest of the distribution, you may now use all the advanced features such as PCMCIA, PPP and others. - -</enum> - -This should work for other distributions with similar changes. For RedHat see <url url="http://www.linux-on-laptops.com/install_advice.html" name="How to Install from CD-ROM without Boot and Supplemental Disks"> . -<p> -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. - -<sect1>From a Second Machine With a Micro Linux On a Floppy -<p> -<sect2>Introduction -<p> -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 <it>micro</it> Linux distributions out there that boot from one or two floppies and run off a ramdisk. See appendix A for a listing of distributions. -<p> -I tried the following with <tt>muLinux</tt> <url url="http://mulinux.firenze.linux.it/" name="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 <tt>muLinux</tt> doesn't support PCMCIA yet, you may use <tt>TomsRtBt</tt> instead. In turn <tt>TomsRtBt</tt> doesn't support <tt>PPP</tt> but provides <tt>slip</tt>. Note: Since version 7.0 <tt>muLinux</tt> provides an Add-On with PCMCIA support. -<p> -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 the SMB protocol with SAMBA, which is also supported by <tt>muLinux</tt> . - -<sect2>Prerequisites -<p> -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 &dquot;null modem&dquot; cable and PLIP. As the basic protocol I used PPP, but you may also use SLIP. For the data-transfer I used <tt>nc</tt>. Note: this is an abbrevation for <tt>netcat</tt>, some distributions use this as the program name. You may use <tt>ftp</tt>, <tt>tftp</tt>, <tt>rsh</tt>, <tt>ssh</tt>, <tt>dd</tt>, <tt>rcp</tt>, <tt>kermit</tt>, <tt>NFS</tt>, <tt>SMB</tt> and other programs instead. - -Basic requirements are: - -<enum> - -<item> -A good knowledge about using Linux. You have to know exactly what you are doing, if not you might end destroying former installations.</item> - -<item> -A nullmodem serial cable.</item> - -</enum> - -<sect2>Source Machine -<p> -At your <it>source</it> machine issue the following commands (attention: IP address, port number, partition and tty are just examples!): - -<enum> - -<item> -Edit <file>/etc/ppp/options</file>, it should contain only: -<code> -/dev/ttyS0 -115200 -passive -</code></item> - -<item>With muLinux versions 3.x you may even use the convenient command <tt>setup -f ppp</tt> .</item> - -<item> -Start PPP: <tt>pppd</tt> .</item> - -<item> -Configure the PPP network device: <tt>ifconfig ppp0 192.168.0.1</tt> .</item> - -<item> -Add the default route: <tt>route add default gw 192.168.0.1</tt> .</item> - -<item> -Check the network connection: <tt>ping 192.168.0.2</tt>, though the destination machine isn't up yet.</item> - -<item> -Start the transfer from another console, remember <tt><LEFT-ALT><Fx></tt>: <tt>cat /dev/hda2 | gzip -c | nc -l -p 5555</tt> .</item> - -<item> -After the transfer (there are no more harddisk writings) stop the ping: <tt>killall ping</tt> .</item> - -</enum> - -<sect2> Destination Machine -<p> -At the <it>destination</it> machine issue: - -<enum> - -<item> -Edit <file>/etc/ppp/options</file>, it should contain only: -<code> -/dev/ttyS0 -115200 -passive -</code></item> - -<item>With muLinux versions >= 3.x you may even use the convenient command <tt>setup -f ppp</tt> .</item> - -<item> -Start PPP: <tt>pppd</tt> .</item> - -<item> -Configure the PPP network device: <tt>ifconfig ppp0 192.168.0.2</tt> .</item> - -<item> -Add the default route: <tt>route add default gw 192.168.0.2</tt> .</item> - -<item> -Check the network connection, by pinging to the source machine: <tt>ping 192.168.0.1</tt> .</item> - -<item> -Change to another console and get the data from the server: <tt>nc 192.168.0.1 5555 | gzip -dc >/dev/hda4</tt> .</item> - -<item> -400 MB may take app. 6 hours, but YMMV.</item> - -<item> -Stop the transfer, when it is finished with: <tt><CTL><C></tt> . This can probably be avoided (but I didn't test it) by adding a timeout of 3 seconds using the <tt>-w 3</tt> parameter for <tt>nc</tt> at the destination machine <tt>nc -w 3 192.168.0.1 5555 | gzip -dc >/dev/hda4</tt></item> - -<item> -After the transfer is completed, stop the ping: <tt>killall ping</tt> .</item> - -</enum> - -<sect2>Configuration of the Destination Machine after the Transfer -<p> - -<enum> - -<item> -Edit <file>/etc/fstab</file> .</item> - -<item> -Edit <file>/etc/lilo.conf</file> and <file>/etc/lilo.msg</file> and start <tt>lilo</tt> .</item> - -<item> -Set the new root device to the kernel: <tt>rdev image root_device</tt> .</item> - -</enum> - -<sect2>Miscellaneous -<p> - -<enum> - -<item> -You may use <tt>bzip2</tt> the same way as <tt>gzip</tt> (untested). - -<item> -Since <tt>rshd</tt>, <tt>sshd</tt>, <tt>ftpd</tt> daemons are not available with muLinux you have to build your own daemon with <tt>nc</tt> aka <tt>netcat</tt>, as described above.</item> - -<item> -I had to set up both PPP sides very quick or the connection broke, I don't know why.</item> - -<item> -Speed optimization has to be done, <tt>asyncmap 0</tt> or <tt>local</tt>?</item> - -<item> -I checked this only with a destination partition greater than the source partition. Please check <tt>dd</tt> instead of <tt>cat</tt> therefore. -<p> -Or do the following (untested): At the destination machine <tt>cd</tt> into the root directory <file>/</file> and do <tt>nc -l -p 5555 | bzip2 -dc | tar xvf -</tt>. At the source machine machine <tt>cd</tt> into the root directory <file>/</file> and do <tt>tar cvf - . | bzip2 | nc -w 3 192.168.0.2 5555</tt>. This should shorten the time needed for the operation, too. Because only the allocated blocks need to be transfered. - -<item> -Don't <tt>mount</tt> the destination partition.</item> - -</enum> - -<sect1>From a Second Machine With a 2.5&dquot; Hard Disk Adapter -<p> -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&dquot; 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. - -<sect1>From a PCMCIA Device -<p> -Since I don't have a laptop which comes with a PCMCIA <it>floppy drive</it> (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 <it>harddisk</it> is possible. -<p> -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. - -<sect1>From a Parallel Port Device (ZIP Drive, CD Drive) -<p> -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. - -<sect1>From a Second Machine Using the Parallel Port - PLIP Network Install -<p> -I got this courtesy by Nathan Myers <ncm@cantrip.org>: &dquot;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. -<p> -Installation via the parallel port using the PLIP protocol has been demonstrated on, at least, Red Hat. All you need is a <it>Laplink</it> 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 <tt>export</tt> your CD file system on NFS, or <tt>mount</tt> it where the ftp or web daemon can find it, as needed for the installation.&dquot; -<p> -The PLIP Install HOWTO by Gilles Lamiral describes how to install the Debian GNU-Linux distribution on a computer without ethernet card, nor cdrom, but just a local floppy drive and a remote nfs server attached by a Null-Modem parallel cable. The nfs server has a cdrom drive mounted and exported. - -<sect1>Installing Linux on Small Machines -<p> -If you have less than 8MB memory and want to install via NFS you may get the message &dquot;fork: out of memory&dquot;. To handle this problem, use <tt>fdisk</tt> to make a swap partition (<tt>fdisk</tt> 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 <tt>swapon /dev/xxx</tt> (xxx = swap partition ). Thanks to Thomas Schmaltz. - -<sect> -Hardware In Detail -<p> -<sect1> -PCMCIA Controller -<p> -<sect2> -Linux Compatibility Check -<p> -With the <tt>probe</tt> 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 <tt>cat /proc/pci</tt> . - -<sect2> -Related HOWTOs -<p> - -<enum> - -<item> -PCMCIA-HOWTO</item> - -</enum> - -<sect2>PCMCIA Configuration - Survey -<p> -In the mailing lists where I'm a member, the question &dquot;How can I set up PCMCIA support, after the Linux installation?&dquot; comes up sometimes. Therefore I try to give a short survey. But the authoritative source for the latest information about the <it>PCMCIA Card Services for Linux</it>, including documentation, files, and generic PCMCIA information is the <url url="http://pcmcia.sourceforge.org" name="Linux PCMCIA Information Page"> . For problems with PCMCIA and APM see the APM chapter. - -<sect3>Software -<p> -<enum> - -<item> -Read the PCMCIA HOWTO, usually included in the PCMCIA-CS package.</item> - -<item> -Install the newest available PCMCIA-CS package, if you take a rpm or deb package it is quite easy.</item> - -<item> -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.</item> - -<item> -Make sure your kernel has module support and PCMCIA support enabled (and often APM support)</item> - -<item> -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.</item> - -<item> -If you have a custom made kernel, don't forget to compile the PCMCIA-CS source against your kernel. - -</enum> - -<sect3>PCMCIA Controller -<p> - -<enum> - -<item> -Use the <tt>probe</tt> command to get information whether your PCMCIA controller is detected or not.</item> - -<item> -Edit the file <file>/etc/sysconfig/pcmcia</file>. It should include <tt>PCMCIA=y</tt> and the type of your PCMCIA controller, e.g. <tt>PCIC=i82365</tt>. </item> - -<item> -Start the PCMCIA services typically via <tt>/etc/init.d/pcmcia start</tt>. If you get two high beeps, everything should be fine.</item> - -<item> -If something doesn't work, check the messages in <file>/var/log/messages</file> . </item> - -</enum> - -<sect3> -PCMCIA Card -<p> -<enum> -<item> -Check your card with <tt>cardctl ident</tt> .</item> - -<item> -If your card is not in <file>/etc/pcmcia/config</file>, edit the file <file>/etc/pcmcia/config.opts</file> 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 <tt>pcnet_cs</tt> supports many NE2000 compatible PCMCIA network cards. - -<item> -A list of supported cards is included in the PCMCIA-CS package. The current list you may find at <url url="http://pcmcia-cs.sourceforge.net" name=" SUPPORTED.CARDS">. -<p> -Since there are not all cards mentioned I have set up a page <url url="http://tuxmobil.org/pcmcia_linux.html" name="PCMCIA Cards &dquot;Unofficially&dquot; Supported by Linux"> . - -<item> -If you use X, you can use <tt>cardinfo</tt> to insert, suspend, or restart a PCMCIA card via a nice graphical interface. - -</enum> - -<sect1>Infrared Port -<p> -<sect2>Linux Compatibility Check -<p> -To get the IrDA port of your laptop working with Linux/IrDA you may use StandardInfraRed (SIR) or FastInfraRed (FIR). - -<sect3>SIR -<p> -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 <file>serial</file> module. If infrared support is enabled in the BIOS, for most laptops you will get a kernel message like: - -<code> -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 -</code> - -<sect3>FIR -<p> -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: - -<enum> - -<item>Read the <it>specification</it> of the machine, though it is very rare that you will find enough and reliable information there. - -<item>Try to find out wether the FIR chip is a <it>PCI</it> device. Do a <tt>cat /proc/pci</tt> . The according files for 2.2.x kernels are in <file>/proc/bus/pci</file> . 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 <file>/usr/src/linux/Documentation</file> or at the page of Craig Hart <url url="http://members.hyperlink.net.au/~chart" name="http://members.hyperlink.net.au/~chart"> . From kernel 2.1.82 on, you may use <tt>lspci</tt> from the <tt>pci-utils</tt> package, too. - -<item>Use the <it>DOS tool</it> <tt>CTPCI330.EXE</tt> provided in ZIP format by the German computer magazine CT <url url="http://www.heise.de/ct/ftp/pci.shtml" name=" http://www.heise.de/ct/ftp/pci.shtml"> . The information provided by this program is sometimes better than that provided by the Linux tools. - -<item>Try to get information about <it>Plug-and-Play (PnP)</it> devices. Though I didn't use them for this purpose yet, the <tt>isapnp</tt> tools, could be useful. - -<item>If you have installed the <it>Linux/IrDA software</it> load the FIR modules and watch the output of <tt>dmesg</tt>, whether FIR is detected or not. - -<item>Another way how to figure it out explained by Thomas Davis (modified by WH): &dquot;Dig through the FTP site of the vendor, find the <it>Windows9x FIR drivers</it>, and they have (for a SMC chip): - -<code> --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 -</code> - -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).&dquot - -<item>Also Thomas Davis found a package of small <it>DOS utilities made by SMC</it>. Look at <url url="http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip" name="http://www.smsc.com/ftppub/chips/appnote/ir_utils.zip"> . The package contains <tt>FINDCHIP.EXE</tt>. And includes a <tt>FIRSETUP.EXE</tt> utility that is supposed to be able to set all values except the chip address. Furthermore it contains <tt>BIOSDUMP.EXE</tt>, which produces this output: -<p> -Example 1 (from a COMPAQ Armada 1592DT) - -<code> - 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 -</code> - -Result 1: -<p> -<tt>Irq Tag, Mask (bit mapped - ) = 0x0010 = 0000 0000 0000 0001 0000</tt> so, it's IRQ 4. (start at 0, count up ..), so this is a SIR only device, at IRQ=4, IO=x03e8. -<p> -<p> -Example 2 (from an unknown machine) - -<code> - 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 -</code> - -Result 2: -<p> -a) it's a SMC IrCC chip -<p> -b) one portion is at 0x02f8, has an io-extent of 8 bytes; irq = 3 -<p> -c) another portion is at 0x02e8, io-extent of 8 bytes; dma = 1 (0x02 =0000 0010) -<p> -<p> -Thomas Davis has placed some device information at <url url="http://www.jps.net/tadavis/irda/devids.txt" name="http://www.jps.net/tadavis/irda/devids.txt"> . -<p> -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 <tt>catdoc</tt>, available at <url url="http://www.fe.msk.ru/~vitus/catdoc/" name="http://www.fe.msk.ru/~vitus/catdoc/"> . - -<item>Use the <it>Device Manager</it> of Windows9x/NT. - -<item>You may also use the <it>hardware surveys</it> mentioned below. - -<item>And as a last ressort, you may even <it>open the laptop</it> and look at the writings at the chipsets themselfs. - -</enum> - -<sect3>Hardware Survey -<p> -I have made a hardware survey at <url url="http://tuxmobil.org/ir_misc.html" name="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.). -<p> -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. -<p> -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). -<p> -Also you can help by contributing detailed technological information about some infrared devices, which is necessary for the development of drivers for Linux. - -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -Linux/IR-HOWTO</item> - -</enum> - -<sect2>IrDA Configuration - Survey -<p> -<sect3>IrDA -<p> -The Linux infrared support is still experimental, but rapidly improving. I try to describe the installation in a short survey. Please read my <url url="http://tuxmobil.org/howtos.html" name="Linux/IR-HOWTO"> for detailed information. - -<sect4>Kernel -<p> - -<enum> - -<item> -Get a 2.2.x kernel.</item> - -<item> -Compile it with all IrDA options enabled.</item> - -<item> -Also enable experimental, sysctl, serial and network support.</item> - -</enum> - -<sect4>Software -<p> - -<enum> - -<item> -Get the Linux/IrDA software <tt>irda-utils</tt> at <url url="http://irda.sourceforge.net" name="The Linux IrDA Project"> .</item> - -<item> -Untar the package.</item> - -<item> -Do a <tt>make depend; make all; make install</tt></item> - -</enum> - -<sect4>Hardware -<p> - -<enum> - -<item> -Enable the IrDA support in the BIOS.</item> - -<item> -Check for SIR or FIR support, as described above.</item> - -<item> -Start the Linux/IrDA service with <tt>irmanager -d 1</tt> .</item> - -<item> -Watch the kernel output with <tt>dmesg</tt> .</item> - -</enum> - -<sect3>Linux Remote Control - LiRC -<p> -Linux Remote Control <url url="http://fsinfo.cs.uni-sb.de/~columbus/lirc/" name="http://fsinfo.cs.uni-sb.de/~columbus/lirc/"> is maintained by Christoph Bartelmus. &dquot;Lirc is a package 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.&dquot; I don't have valid information about how much infrared remote control is working with laptop infrared devices. - -<sect1>Graphic Chip -<p> -<sect2>Linux Compatibility Check -<p> -<sect3>Video Mode -<p> -The tool <tt>SuperProbe</tt> is part of XFree86 and is able to check many graphic chips. Please read the documentation carefully, because it might crash your hardware. From <tt>man SuperProbe</tt>: -<p> -&dquot;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 <tt>-no_bios</tt> 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).&dquot: - -For testing reasons start the X server with <tt>X 2> <error.msg></tt>. And try to change the resolution by typing <tt><CTL><ALT><+></tt> or <tt><CTL><ALT><-></tt>. Note: the + or - sign have to be taken from the numeric pad, which can be emulated at the letter pad by some laptops. - -<sect3>Text Mode -<p> -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. - -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -XFree86-HOWTO</item> - -<item> -XFree86-Video-Timings-HOWTO</item> - -<item> -XFree86-XInside-HOWTO</item> - -<item> -X-Big-Cursor-mini-HOWTO (useful when running X on a notebook with low contrast LCD)</item> - -<item> -Keyboard-and-Console-HOWTO</item> - -<item> -vesafb-mini-HOWTO</item> - -</enum> - -<sect2>Survey X-Servers -<p> -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. - -<enum> - -<item> -XFree86 <url url="http://www.xfree86.org" name="http://www.xfree86.org"></item> - -<item> -VESA Frame-Buffer-Device, available with 2.2.x kernels and XFree86 3.3.2 </item> - -<item> -Xinside aka AcceleratedX <url url="http://www.xig.com" name="http://www.xig.com"> , commercial </item> - -<item> -SciTech <url url="http://www.scitechsoft.com" name="http://www.scitechsoft.com"> , commercial</item> - -<item> -Metro-X at <url url="http://www.metrolink.com" name=" http://www.metrolink.com">, commercial . - -</enum> - -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. - -<sect2>Resources -<p> -You may find a survey about X windows resources at Kenneth E. Harker's page <url url="http://www.linux-on-laptops.com/" name="Linux on Laptops"> and a survey about current graphic chips used in laptops at <url url="http://tuxmobil.org/" name="TuxMobil">. - -<sect2>External Monitor -<p> -There are several different methods to activate support for an external monitor: as a <it>BIOS option</it> or during runtime with a <it>keystroke</it> e.g. <tt><Fn>+<F4></tt>. Maybe you have to edit <file>/etc/XF86Config</file> by configuring <tt>int_disp</tt> and <tt>ext_disp</tt>. 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. - -<sect2>Miscellaneous -<p> -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 <it>backlight</it> 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. - -<sect1>Sound -<p> -<sect2>Linux Compatibility Check -<p> -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 <file>/usr/src/linux/Documentation/sound/Introduction</file> 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. -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -Sound-HOWTO - -<item> -Visual-Bell-mini-HOWTO - -</enum> - -<sect2>Survey Sound Drivers -<p> -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 <tt>pcsnd</tt>, which tries to emulate a soundcard. - -<enum> - -<item> -Kernel Sound Driver by Hannu Savolainen</item> - -<item> -ALSA <url url="http://alsa.jcu.cz" name="Advanced Linux Sound Architecture"> , commercial or at least non-GPL (since I found a Debian/GNU Linux package I'm not sure anymore, about the commercial status)</item> - -<item> -OSS <url url="http://www.4front-tech.com/usslite/ossfree.html" name="UNIX Sound System Lite / OSS">, commercial or at least non-GPL (since the 2.2.x kernels I'm not sure about the commercial status), also available from <url url="http://www.opensound.com" name="http://www.opensound.com"> .</item> - -</enum> - -<sect1>Keyboard -<p> -<sect2>Linux Compatibility Check -<p> -Usually there are no problems with Linux and the keyboard. Though there are two minor caveats: First the <tt>setleds</tt> program might not work. Second the key mapping might not fit your needs. Some Unix users and <tt>vi</tt> 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 <tt>xmodmap</tt> or <tt>loadkeys</tt> 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 <file>/usr/lib/kbd/keytables/us.map</file> , or whatever file is referenced in <file>/etc/sysconfig/keyboard</file>: - -<code> -*** 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 -</code> - -<sect2>External (Second) Keyboard -<p> -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. -<p> -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. -<p> -<url url="http://www.suse.cz/development/input/" name=" Parport to AUX port adapter"> 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 <tt>parkbd.c</tt> module for that. -<p> -On some laptops a splitter works to allow both mouse and keyboard -to be plugged in; on others it doesn't work at all.If you might -want to use both you had better check that it works, or you may -find yourself waiting anxiously for USB support. -<p> -<url url="http://www.suse.cz/development/input/" name="Sun keyboard to PC serial port adapter">: Many people have dreamed having their Sun Type 5 keyboard attached to their Linux box up to now. And with this adapter, it is finally possible. Because the standard Sun keyboards use TTL RS232 at 1200 bps to talk to the Suns, it's very easy to make them talk to any non-Sun computer by converting this to true RS232. All what you need is a MAX232 chip that'll take care about the correct voltage levels, and also some chip to invert the signals (CD4049 in the pic, I've used a 7400 quad-nand myself), since the MAX232 inverts them as well, and we don't need this. This all easily fits into a 25-pin serial connector. - -<sect1>Pointing Devices - Mice and Their Relatives -<p> -<sect2>Linux Compatibility Check -<p> -You may check your mouse with the <tt>mev</tt> command from the GPM package. -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -3-Button-Mouse-mini-HOWTO for serial mice</item> - -<item> -Bus-Mouse-HOWTO</item> - -<item> -Kernel-HOWTO</item> - -</enum> - -<sect2>Mice Species -<p> - -<enum> - -<item> -Trackpad, Touchpad, used with the majority of current laptops</item> - -<item> -Trackball, e.g. COMPAQ LTE</item> - -<item> -Pop-up-Mouse, e.g. HP OmniBook 800</item> - -<item> -Trackpoint, Mouse-Pin, e.g. IBM ThinkPad and Toshiba</item> - -<item> -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. </item> - -</enum> - -<sect2>PS/2 Mice -<p> -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 <file>/dev/psaux</file> or <file>/dev/psmouse</file>. If you use X windows this device and the protocol has to be set in <file>/etc/XF86Config</file>, 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. -<p> -Speaking of Emulate3Buttons, 100ms is usually better than the 50ms -allowed in most default setups of <file>/etc/X11/XF86Config</file>. -<code> -Section &dquot;Pointer&dquot; -Protocol &dquot;PS/2&dquot; -Device &dquot;/dev/psaux&dquot; -Emulate3Buttons -Emulate3Timeout 100 -EndSection -</code> - -<sect2>Touchpad -<p> -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). -<p> -There is also a dedicated touchpad driver available. <url url="http://www.pdos.lcs.mit.edu/~cananian/Synaptics/" name="The Synaptics Touchpad Linux Driver"> supports pointing devices used in notebooks by Acer, Compaq, Dell, Gateway, Olivetti, Texas Instruments, Winbook, and others. Other URL <url url="http://compass.com/synaptics/" name="N.N.">. -<p> -The recent <tt>gpm</tt> package (<url url="ftp://ftp.prosa.it/pub/gpm/" name="gpm >=1.8">) 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. -<p> -In addition to translating finger motion into mouse motion and supporting the buttons, this support currently has several features (from the README): - -<itemize> - -<item>a &dquot;tap&dquot; on the TouchPad causes a left mouse click - -<item>a &dquot;tap&dquot; followed quickly by a finger motion causes a left button drag type action. - -<item>a &dquot;tap&dquot; 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 - -<item>more pressure on the touch pad speeds the motion of the cursor - -<item>a &dquot;tap&dquot; 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). - -<item>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). - -</itemize> - -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. -<p> -It seems <tt>gpm</tt> is best known as a console biased tool. This is true, but you may use it as an X input device. <tt>gpm</tt> 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 <file>/dev/gpmdata</file> in a protocol it understands, which in my case is <it>Mouse-Systems-Compatible</it> (5bytes). Most 3-button mice use the default protocol. So a simple reconfiguration in XF86Config is all that is required, after starting <tt>gpm</tt> in an appropriate way, of course. -<p> -<tt>gpm</tt> could be started on your laptop with the following arguments : <tt>/usr/bin/gpm -t synps2 -M -t ms -m /dev/ttyS0</tt> . Both touchpad and serial mouse work in console and X mode. You do have to create the named pipe <file>/dev/gpmdata</file> yourself. -<p> -Tapping with two fingers simultaneously to simulate a middle mouse -button works on Logitech touchpads used in a few machines. -<p> -Thanks to Geert Van der Plas for most of the touchpad chapter. - -<sect2>Touchscreen -<p> -The only laptop I know which includes a touchscreen is the Fujitsu Biblo 112. It may work in PS/2 or serial mouse compatibility mode. But I couldn't check this yet. - -<sect2>COMPAQ Concerto Pen -<p> -The latest version of the <url url="http://www.cs.nmsu.edu/~pfeiffer/#pen" name="Linux Compaq Concerto Pen Driver"> is available from Joe Pfeiffer's home page. - -<sect2>External Mouse -<p> -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. -<p> -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. -<p> -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. - -<sect1>Advanced Power Management - APM -<p> -<sect2>Linux Compatibility Check -<p> -From the Battery-Powered-mini-HOWTO &dquot; .. for APM to work on any notebook or energy-conscious desktop, the system BIOS ROM in the machine must support the <htmlurl url="http://www.intel.ocm/IAL/powermgm" name="APM Specification"> 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.&dquot; - -You may get information about the APM version with the <tt>dmesg</tt> command and in the <file>/proc/apm</file> file. - -<sect2>Introduction -<p> -Features of APM according to <file>Documentation/Configure.help</file>: &dquot;The system time will be reset after a USER RESUME operation, the <file>/proc/apm</file> device will provide battery status information, and user-space programs will receive notification of APM <it>events</it> (e.g., battery status change). &dquot; - -APM support consists of two parts: <it>kernel</it> support and <it>user-land</it> support. - -<sect3>Kernel Land -<p> -For <it>kernel</it> 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, (&dquot;TI 4000M TravelMate and the ACER 486/DX4/75 because they don't have compliant BIOSes&dquot;). 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 <file>Documentation/Configure.help</file> in the kernel source tree for more details): - -<itemize> - -<item><tt>CONFIG_APM_IGNORE_USER_SUSPEND</tt> Just a workaround for some NEC Versa M series laptops. - -<item><tt>CONFIG_APM_DO_ENABLE</tt> Enable APM features at boot time. - -<item><tt>CONFIG_APM_CPU_IDLE</tt>. Puts CPU in power save mode, if there is nothing to do for the kernel. - -<item><tt>CONFIG_APM_DISPLAY_BLANK</tt> 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. - -<item><tt>CONFIG_APM_POWER_OFF</tt> Turns the machine completely down, when using <tt>halt</tt>. This feature works with most laptops without problems. - -<item><tt>CONFIG_APM_IGNORE_MULTIPLE_SUSPEND</tt> Just a workaround for IBM ThinkPad 560. - -<item><tt>CONFIG_APM_IGNORE_SUSPEND_BOUNCE</tt> Just a workaround for Dell Inspiron 3200 and other notebooks. - -<item><tt>CONFIG_APM_RTC_IS_GMT</tt> Stores time in Greenwich Mean Time format. It is in fact recommended to store GMT in your real time clock (RTC) in the BIOS. - -<item><tt>CONFIG_APM_ALLOW_INTS</tt> Resolves some problems with <it>Suspend to Disk</it> for some laptops, for instance many newer IBM ThinkPads. - -</itemize> -<p> -Joey Hess <joey@kitenet.net> wrote at debian-laptop@lists.debian.org -&dquot;I just installed kernel 2.2.12 on my laptop, and was having some trouble -getting apm working. it said <it>apm disabled on user request</it> at boot time. -Well, some grepping the kernel sources found that passing <tt>apm=on</tt> to the -kernel at boot time enables it now. I can't find any record or docs of this -change. - -<sect3>User Land -<p> - -The utilities for <it>userland</it> support may be found at <url url="http://worldvisions.ca/~apenwarr/apmd/" name="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 <it>hibernate</it> 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 <kontakt@hanno.de> <url url="http://www.hanno.de" name="Hanno Mueller"> and the page of <url url="http://www.linux-on-laptops.com/" name="Kenneth E. Harker"> for detailed information. - -<p> -README <tt>apmd</tt>?:On laptop computers, the APM support provides access to battery status -information and may help you to conserve battery power, depending on your -laptop and the APM implementation. - -Rik Faith <faith@acm.org> has transferred maintenance of the Linux apmd -package over to me, Avery Pennarun <apenwarr@worldvisions.ca> and I'm -finally getting around to making a release with the many updates we've -collected since the last release back in 1996. - -Here's what <tt>apmd</tt> can do: - -<itemize> -<item>apmd(8): logs the battery status to syslog every now and then and handles background power management tasks; -<item>apm(1): a command-line tool to print the current battery status or suspend the computer; -<item>xapm(1x): provides a battery meter for X; -<item>libapm.a: a library for writing similar APM applications. -</itemize> - -Richard Gooch wrote: I'have had a look at the beta version of <tt>apmd</tt>, and I still don't like it, because: - -<itemize> - -<item> -Only supports one command to run at suspend time. - -<item> -Doesn't distinguish between user and system suspends. - -<item>doesn't provide a way to disable policy (the <tt>sync()</tt>; <tt>sleep(0) </tt>; <tt>sync()</tt>; <tt>sleep(1)</tt>; sequence) - -<item> -Does not document extra features. - -<item> -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. - -</itemize> - -Though this topic was discussed controversly Richard Gooch has put together a package <tt>suspendd</tt> at <url url="http://www.atnf.csiro.au/~rgooch/linux/" name="http://www.atnf.csiro.au/~rgooch/linux/"> . - -Also, have a look at <tt>apmcd</tt> (<tt>apm</tt> based crontab) at <url url="ftp://ftp.binary9.net/pub/linux/" name="ftp://ftp.binary9.net/pub/linux/"> . A tool made by Nicolas J. Leon <nicholas@binary9.net> <url url="http://mrnick.binary9.net/" name="http://mrnick.binary9.net/">. - -Note: I didn't check wether this features are merged into one package (<tt>apmd</tt> eventually) already. - -<sect2>Caveats -<p> -If you have another operating system preinstalled or use another operating system at the same disk, make sure there is no &dquot;hibernation&dquot; or &dquot;suspend&dquot; tool installed, which could severely interfere with Linux, e.g. it might use disk space which is occupied by Linux or vice versa. - -<sect2>Troubleshooting -<p> -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 : &dquot;The default changed in 2.2. Search in the init-scripts for <tt>halt</tt> and change it to <tt>halt -p</tt> or <tt>poweroff</tt>. See <tt>man halt</tt> , if you don't have this option you need a newer version of <tt>halt</tt>.&dquot; You may find it in the <tt>SysVinit</tt> package. -<p> -On some new machines (for instance HP Omnibook 4150 - 366 MHz model) when accessing <file>/proc/apm</file>, you may get a kernel fault <tt>general protection fault: f000</tt>. Stephen Rothwell <Stephen.Rothwell@canb.auug.org.au> <url url="http://www.canb.auug.org.au/~sfr/" name="http://www.canb.auug.org.au/~sfr/"> explaines: &dquot;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.&dquot; -<p> -<tt> apmd-rhcn-2.4phil-1</tt> by RedHat <url url="ftp://rhcn.redhat.com/pub/rhcn/" name="ftp://rhcn.redhat.com/pub/rhcn/"> contains an unofficial patch for shutting down the PCMCIA sockets before a suspend and patches for multiple batteries. -<p> -According to <file>Documentation/Configure.help</file>: &dquot;Some other things you should try when experiencing seemingly random, <it>weird</it> problems: - -<enum> - -<item>make sure that you have enough swap space and that it is enabled. -<item>pass the <tt>no-hlt</tt> option to the kernel. -<item>switch on floating point emulation in the kernel and pass the <tt>no387</tt> option to the kernel. -<item>pass the <tt>floppy=nodma</tt> option to the kernel. -<item>pass the <tt>mem=4M</tt> option to the kernel (thereby disabling all but the first 4 MB of RAM). -<item>make sure that the CPU is not over clocked. -<item>read the sig11 FAQ at <url url="http://www.bitwizard.nl/sig11/" name="http://www.bitwizard.nl/sig11/"> . -<item>disable the cache from your BIOS settings. -<item>install a fan for the video card or exchange video RAM. -<item>install a better fan for the CPU. -<item>exchange RAM chips. -<item>exchange the motherboard. - -</enum> - -<sect2>APM and PCMCIA -<p> -PCMCIA Card Services and Advanced Power Management (from the PCMCIA-HOWTO): -<p> -"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 <tt>cardctl suspend</tt> before suspending your laptop, and <tt>cardctl resume</tt> 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 <tt>cardctl eject</tt> prior to suspending the system.". - -<sect2>APM and Resuming X Windows -<p> -&dquot;Many (most?) BIOSes fail to save and restore display -controller chip registers, and X has no protocol to -be notified of resume events, so on many systems -suspend/resume is more-or-less incompatible with X.&dquot; -<htmlurl url="http://www.linuxlaptops.com/ll/xresume.html" name="Linux Laptops"> -has created a fix for this problem. -<p> -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 <tt>apm -s</tt>. Folks with this affliction might want switch to the console virtual terminal then suspend <tt>chvt 1; apm -s</tt> as root, or, more appropiately.<tt>sudo chvt 1; sudo apm -s</tt>. I have these commands in a script, say, <tt>my-suspend</tt> and then do <tt>xapmload --click-command my-suspend</tt> . - -<sect2>Modularization of APM -<p> -As far as I remember this is controversly discussed, but I don't remember the URL. It isn't a kernel feature yet. - -<sect2>APM Resume Options -<p> -The new 3.0beta versions add a new feature to apmd: it can run arbitrary -commands (like <tt>cardctl suspend</tt>) when you suspend or resume your system. -It also supports BIOS clocks that are set to UTC time. - -<sect2>APM and Sound -<p> -Lots of BIOSes fail to restore sound chip registers, so you may get -a squeal of feedback when you wake up the machine. A script in -<file>/etc/apm/event.d</file> can use <tt>aumix</tt> to save and restore sound mixer settings. - -<sect2> Software Suspend -<p> -<htmlurl url="http://falcon.sch.bme.hu/˜seasons/linux/swsusp.html" name="Software suspend"> -enables the possibilty of suspendig machine. It doesn't need APM. You may suspend your machine by either pressing Sysrq-d -or with 'swsusp' or 'shutdown -z (patch for sysvinit needed). It creates an image which is saved in your active swaps. By the -next booting the kernel detects the saved image, restores the memory from it and then it continues to run as before you've -suspended. If you don't want the previous state to continue use the 'noresume' kernel option. - -<sect1>ACPI -<p> -ACPI stands for <it>Advanced Configuration and Power Interface</it>. 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. -<p> -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 <url url="http://phobos.fachschaften.tu-muenchen.de/acpi/" name="ACPI4Linux">. - -<sect1>Batteries -<p> -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> <url url="http://www.hanno.de/" name="http://www.hanno.de"> <url url="http://tuxmobil.org/energy_laptops.html" name="Power Supplies for Laptops - (Draft)"> for further information. - -Stephen Rothwell <url url="http://www.canb.auug.org.au/~sfr/" name="http://www.canb.auug.org.au/~sfr/"> is currently integrating a patch that will add multiple battery support to the kernel APM. - -From the <tt>mobile-update</tt> 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. - -<sect1>Memory -<p> -Unfortenately most laptops come with a proprietary memory chips. So they are not interchangeable between different models. But this seems changing. - -<sect1>Plug-and-Play Devices (PnP) -<p> -The <it>Plug and Play driver project</it> 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 <url url="http://www.io.com/~cdb/mirrors/lpsg/pnp-linux.html" name="http://www.io.com/~cdb/mirrors/lpsg/pnp-linux.html"> . -<p> -<it>ISA PnP tools</it> is another useful package. -<p> -And there is a project at RedHat <url url="http://www.redhat.com/pnp/overview.html" name="http://www.redhat.com/pnp/overview.html"> . -<p> -The latest PCMCIA driver package (>>3.1.0) has utilities <tt>lspnp</tt> and -<tt>setpnp</tt> to manipulate PNP settings. Note that in 3.1.0 you may -need this patch to compile them: -<code> --#ifdef __GLIBC__ -+#if 0 /* def __GLIBC__ */ - #include <byteswap.h> - #else -</code> - -<sect1>Docking Station / Port Replicator -<p> -<sect2>Definitions -<p> -First some definitions. There is a difference between <it>docking station</it> and <it>port replicator</it>. - -I use the term <it>docking station</it> 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 <it>port replicator</it> is just a copy of the laptop ports which may be connected permanently to a PC. - -<sect2>Other Solutions -<p> -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 <url url="http://www.tekram.com/Hot_Products.asp?Product=IR-660" name="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 <it>network</it> 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 <it>Y cable</it>, which connects the PS/2 port to an external keyboard and an external monitor. Note: Your laptop probably has support for the <it>Y cable</it> feature, e.g. the COMPAQ Armada 1592DT. - -<sect2>Connection Methods -<p> -AFAIK there are <it>three solutions</it> to connect a laptop to a docking station: - -<enum> - -<item> -SCSI port</item> - -<item> -parallel port</item> - -<item> -(proprietary) docking port</item> - -</enum> - -From <url url="http://www.mjedev.demon.co.uk/index.html" name="Martin J. Evans martin@mjedev.demon.co.uk "> &dquot;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. -<p> -1) Supporting <it>additional disks</it> on the docking station SCSI card -<p> -To my mind the best way of doing this is to: - -<enum> - -<item> -Either build support for the SCSI card into the kernel or build it as a module.</item> - -<item> -Put the mount points into <file>/etc/fstab</file> but use the &dquot;noauto&dquot; flag to prevent them from being mounted automatically with the <tt>mount -a</tt> flag. In this way, when you are docked you can explicitly mount the partitions off any disk connected to the docking station SCSI card.</item> - -</enum> -<p> -2) Supporting <it>additional network adaptors</it> in the docking station -<p> -You can use a similar method to that outlined above for the graphics card. Check the <file>/proc</file> filesystem in your rc scripts to see if you are docked and then set up your network connections appropriately. &dquot; - -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: -<p> - -<code> -# 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 &dquot:&dquot; -f 1` - -case &dquot;$SOCKETS&dquot; in - -&dquot;Socket 3&dquot;) -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 &dquot;Setting up eth0 for use at Network ...&dquot; -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 -;; - -&dquot;Socket 1&dquot;) -echo Laptop is standalone -echo Disabling external Monitor for X11 -cp /etc/XF86Config_intern /etc/XF86Config -echo -echo Network device NOT setup -;; -esac -</code> - -<sect1>Network Connections -<p> -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -PLIP-mini-HOWTO</item> - -<item> -NET-3-HOWTO</item> - -<item> -Ethernet-HOWTO</item> - -<item> -Term-Firewall-mini-HOWTO</item> - -</enum> - -<sect2>Connection Methods -<p> -<sect3>PCMCIA Network Card -<p> -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. - -<sect3>Serial Null Modem Cable -<p> -Probably the cheapest way to connect your laptop to another computer, but quite slow. You may use PPP or SLIP to start the connection. - -<sect3>Parallel Port NIC (Pocket Adaptor) -<p> -<url url="http://www.unix-ag.uni-siegen.de/~nils/accton_linux.html" name="Accton Pocket Ethernet and Linux"> This ethernet adaptor uses a parallel port and delivers approximately 110k Bytes/s throughput for those notebooks that do not have PCMCIA slots. - -<url url="http://www.linux-on-laptops.com/linksys.html" name="Linux and Linksys Ethernet Adaptors"> 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. - -<sect3>Parallel &dquot;Null&dquot; Modem Cable -<p> -Offers more speed than a serial connection. Some laptops use chipsets that will not work with PLIP. Please see PLIP-HOWTO for details. - -<sect3>Docking Station NIC -<p> -I don't have experience with a NIC in a docking station yet. - -<sect1>Modem -<p> -<sect2>Modem Types -<p> -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: &dquot;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 <it>WinModems</it> 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.&dquot; - -&dquot;<it>Win</it> 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. &dquot; - -Anyway, I have set up a page collecting information on laptops with internal modems at <url url="http://tuxmobil.org/" name="http://tuxmobil.org/"> . Maybe it's possible to run such modems with MS-Windows9x/NT emulators like <tt>wine</tt> or <tt>VMware</tt>, but I don't know it. -<p> -Recently there is a driver for Lucent WinModems (alpha) available at <url url="http://www.suse.cz/development/ltmodem/" name="SuSE - Labs"> and <url url="http://www.close.u-net.com" name="LTModem diagnostic tool">. - -<sect2>Caveats -<p> -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 <tt>pppstats</tt>. Or <tt>pload</tt> 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 <tt>pload</tt> is <url url="http://www.engr.utk.edu/~mdsmith/pload/" name="http://www.engr.utk.edu/~mdsmith/pload/"> . - -<sect1>SCSI -<p> -<sect2>Hardware Compatibility Check -<p> -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. - -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -SCSI-HOWTO</item> - -</enum> - -<sect2>Survey -<p> -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. Maybe the PowerBook G3 has a SCSI disk, but I didn't check this yet. The old Apple Powerbook Duo models had a SCSI hard disk. -<p> -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. - -<sect1>Universal Serial Bus - USB -<p> -<sect2>Linux Compatibility Check -<p> -You should get information about the USB controller with <tt>cat /proc/pci</tt> and about USB devices with <tt>cat /proc/bus/usb/devices</tt>. - -<sect2>Miscelleaneous -<p> -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. -<p> -Visit <url url="http://www.linux-usb.org" name="http://www.linux-usb.org"> for the USB Linux home page. Also I have set up a page collecting information about laptops and USB at <url url="http://tuxmobil.org/" name="TuxMobil"> . - -<sect1>Floppy Drive -<p> -<sect2>Linux Compatibility Check -<p> -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 <tt>superformat</tt> 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 <tt>man bootparam</tt> . - -<sect1>CD Drive -<p> -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: &dquot;Portable PC Card CD-ROM drives transform laptops into mobile multimedia machines&dquot;, 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. - -<sect1>DVD Drive -<p> -<url url="http://livid.on.openprojects.net" name="The Linux Video and DVD Project"> 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. -<p> -<url url="http://www.trylinux.com/projects/udf/index.html" name="Universal Disk Format (UDF) Driver">: &dquot;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.&dquot; - -<sect1>Harddisk -<p> -<sect2>Linux Compatibility Check -<p> -Useful programms are <tt>hdparm</tt>, <tt>dmesg</tt>, <tt>fsck</tt> and <tt>fdisk</tt> . - -<sect2>Miscellaneous -<p> -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. -<p> -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. - -<sect2>Form Factors -<p> -AFAIK there is only one form factor for harddisks used in laptops the 2.5&dquot; format. This format seems to be available in different heights (Please note I couldn't verify this information yet): - -<itemize> - -<item> 18mm: laptops build before 1996 usually have drives 18mm high - -<item>12.7mm: I got a report about such disks but without a notebook model or manufacturer name - -<item> 11mm: since 1996 the drives are 11mm high - -<item> 9mm: many laptops, including the subnotebooks, now use a 9mm-high disk drive. The largest available in this format in late 1999 is IBM <it>12GN</it>. - -<item> 9.5mm: Toshiba Libretto L70 and L100 have a 9.5mm HD - -<item>8.45mm: Toshiba Libretto 20, 30, 50 and 60 have 8.45mm tall HDs - -<item>6.35mm: Toshiba Libretto L1000 has a 6.35mm HD - -</itemize> - -It might be possible to use a hard disk wich doesn't fit with some case modifications. -<p> -Some laptops come with a removable hard disk in a tray, for instance the KAPOK 9600D. There seem to be no SCSI drives for laptops available. - -<sect1>Video Port / ZV Port -<p> -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 <url url="http://www.thp.uni-koeln.de/~rjkm/linux/bttv.html" name=" http://www.thp.uni-koeln.de/~rjkm/linux/bttv.html "> (driver) <url url="http://www.mathematik.uni-kl.de/~wenk/xwintv.html" name=" http://www.mathematik.uni-kl.de/~wenk/xwintv.html "> (tvviewer). For further information see video4linux at <url url=" http://roadrunner.swansea.uk.linux.org/v4l.shtml" name="http://roadrunner.swansea.uk.linux.org/v4l.shtml">. To collect information about laptops with video port I have setup a page at <url url="http://tuxmobil.org/" name="http://tuxmobil.org/"> . Alternatively to the ZV port you might use the USB port. - -<sect>Palmtops, Personal Digital Assistants - PDAs, Handheld PCs - HPCs -<p> -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 <url url="http://www.linux-on-laptops.com/" name="Kenneth E. Harker's page"> : - -<enum> - -<item> -Highly recommended is the page by Russell King <url url="http://www.arm.uk.linux.org/~rmk/" name=" ARM Linux "> about PDAs with ARM CPU and with links to other Linux related PDA sites. - -<item> -PalmOS-HOWTO (former Pilot-HOWTO) by David H. Silber. - -<item> -<url url="http://privat.swol.de/ReinholdSchoeb/Newton/"name="Newton and Linux Mini-HOWTO"> . - -<item><url url="http://www.tcel.com/~aehall/newtl/" name="Newtl: Newton/Linux Communications System"> 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. - -<item> -<url url="ftp://ryeham.ee.ryerson.ca/pub/PalmOS/" name="PilotLink and XCoPilot"> 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. - -<item> -<url url="http://www.icsi.berkeley.edu/~minenko/PalmVNC" name="PalmVNC"> is an implementation of the Virtual 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. - -<item>PDAs and infrared remote control, see <url url="http://hp.vector.co.jp/authors/VA005810/remocon/remocone.htm" name="Hiromu Okada"> - -<item> -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 <url url="http://boardwatch.internet.com/mag/97/jul/bwm70.html" name=" LINUX REDUX July 1997"> by Alan Cox. - -<item> -For more information on Virtual Network Computing, see <url url="http://www.uk.research.att.com/vnc" name="VNC"> . - -<item> -There is also the <url url="http://www.cdpubs.com/hhsys/archives.html" name="Handheld Systems(TM) On-line Archives"> and a search engine about palmtop related topics <url url="http://www.palmtop.net/" name="Palmtop.Net/"> . - -<item> -I have setup a small page about <url url="http://tuxmobil.org/pda_linux.html" name="Linux with PDAs and Handheld PCs">, too. - -</enum> - -<sect>Cellular Phones, Pagers, Calculators, Digital Cameras, Wearable Computing -<p> -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 <url url="http://www.embedded.com" name="http://www.embedded.com ">. For Linux information, see <url url="http://www.elks.ecs.soton.ac.uk/" name="ELKS"> and the <url url="http://ryeham.ee.ryerson.ca/uClinux" name=" uCLinux"> project. See news:comp.arch.embedded - -<sect1>Cellular Phones -<p> -For NOKIA cellular phones see <url url="http://multivac.fatburen.org/gnokii/" name="GNOKII project"> . And <url url="http://www.users.globalnet.co.uk/~syrinx/nserver/index.html" name="Linux Nserver">. 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). -<p> -<url url="http://www.openwap.org/" name="openWAP"> is an open source project for the implementation of the Wireless Application Protocol (WAP) for use with browsers, servers and tools. WAP is used by PDA devices, cell phones, pagers and other wireless devices to transmit internet content to these devices. The project is still in its early stages and nothing can be downloaded yet. -<p> -<url url="http://www.pxh.de/fs/gsmlib/download/" name="GSMLIB"> is a library to access GSM mobile phones through GSM modems. Features include: modification of phonebooks stored in the mobile phone or on the SIM card, reading and writing of SMS messages stored in the mobile phone, sending and reception of SMS messages. Additionally, some simple command line programs are provided to use these features. - -<sect1>Pagers - SMS Messages -<p> -<url url="http://www.qpage.org/" name="QuickPage"> is a client/server software package that enables you to send messages to an alphanumeric pager. The client accepts a message from the user and forwards it to a server using SNPP. The server uses a modem to transmit the message to the recipient's paging service using the TAP protocol (also known as the IXO protocol). -<p> -<url url="http://www.fts.frontec.se/~dast/mail2sms/" name="mail2sms"> converts a (MIME) mail to a short message, allowing search/replace, conditional rules, date/time dependent actions, customizing the output format, etc. The output defaults to 160 characters, which is perfectly suitable for sending the text to a GSM telephone as an SMS message. This software does not include any code for actually sending the text to anything else but another program or stdout. -<p> -<url url="http://www.new.ox.ac.uk/~adam/computing/email2sms/" name="email2sms"> is a filter written in Perl which converts an e-mail into a form suitable for sending as an SMS message. Its main advantage over the alternatives is that it uses the CPAN module <it>Lingua::EN::Squeeze</it> to compress the text down to as little as 40% of its original size, so you can get much more of your e-mail into the 160 character limit imposed by SMS. It is fully MIME compatible, and has many configurable options, including removal of quoted text. Ideal for use with procmail. A Perl script for sending the output to a typical e-mail to SMS web gateway is included. -<p> -<url url="http://www.styx.demon.co.uk/smslink/" name="SMSLink"> implements a client/server gateway to the SMS protocol (short messages on the mobile phones). It requires the use of dedicated hardware though (a serial GSM module). Both SMS emission and reception are supported. The server only runs under Linux at the present time and also supports interactive mode via <tt>telnet</tt>. The command-line client already exists for Linux, Solaris and HP-UX. A basic web interface is provided. A Win32 client is in the works. -<p> -<url url="http://lide.pruvodce.cz/~wayne/" name="nmsms"> is a very simple program to announce incoming email to an SMS address (email address) defined at compile time. The original <it>From:</it> and <it>Subject:</it> header are included in each mail announced. -<p> -<url url="http://www.hof-berlin.de/mepl/" name="mepl"> is a software for 3COM/USRobotics Messagemodems to control the self-employed-mode. This program can be used for downloading the messages and saving or mailing them in gsm or fax-format. - -<sect1>Digital Cameras -<p> -For information about cellular phones and digital cameras see some links at my page about <url url="http://tuxmobil.org/ir_misc.html" name="Linux with Infrared Devices"> and my IR-HOWTO. -<p> -Newsgroup: rec.photo.digital . -<p> -The Flashpath adapter is a diskette like device which is used to transfer data from a digital camera to a computer. See <url url="http://www.schou.dk/flashpath/" name="Flashpath for Linux"> and James Radley's <url url="http://www.susie.demon.co.uk/flashpath.html" name="flashpath homepage">. - -<sect1>Calculators -<p> -Information about calculators e.g. HP-48 is at <url url="http://www.hpcalc.org" name="HP-Calculator.Org"> and <url url="http://www.gmi.edu/~madd0118/hp48/" name="Keith's HP-48 Page">. <url url="http://www.columbia.edu/kermit/hp48.html" name="HP-48 Kermit Hints and Tips"> shows how to talk to the HP48 via its serial-line Kermit protocol. The HP-48 may also be used as a <url url="http://panic.et.tudelft.nl/~costar/hp48" name="Linux terminal">. -<p> -See also at my page about <url url="http://tuxmobil.org/ir_misc.html" name="Linux with Infrared Devices">. -<p> -<url url="http://www.tunbury.demon.co.uk/casio/" name="Backup utility for the CASIO diary">. It is a package ported from DOS to allow communication to the CASIO series of hand-held organizers. It allows backup from CASIO to your computer and restore a backup file from your computer to the CASIO. It can also output human readable file from CASIO. Currently supports: phone, calendar, schedule, memo, and reminder. See also http://www.aloha.net/~alank/ http://www.casioworld.com , http://home.t-online.de/home/Milan.Urosevic/ and http://sunsite.unc.edu/pub/Linux/apps/ -<p> -<url url="http://www.multimania.com/rlievin/" name="GtkTiLink"> is a program which allows you to transfer data between a Texas Instruments calculator and a computer. It works with all cables (parallel, serial, Black and Gray TI Graph Link). It supports the TI82, TI89, TI92 and TI92+ calculators. It can send/receive data and backups, make a capture of the calculator screen and do remote control. - -<sect1>Wearable Computing -<p> -Also related to this topic but not covered yet seems wearable computing, see <url url="http://lcs.www.media.mit.edu/projects/wearables/" name="http://lcs.www.media.mit.edu/projects/wearables/"> , the page of Lionel, &dquot;trollhunter&dquot; Bouchpan-Lerust-Juery, <url url="http://infonomade.linuxfr.org/indexen.html" name="http://infonomade.linuxfr.org/indexen.html"> for further information and <url url="http://wearables.blu.org" name="http://wearables.blu.org"> and <url url="http://www.wearcomp.org/" name="http://www.wearcomp.org/">. -<p> -<url url="http://wearables.essex.ac.uk/sulawesi/" name="Sulawesi"> was developed due to the problems running a desktop GUI on a wearable computer. It has been designed and implemented to tackle what has been considered to be important challenges in a wearable user interface, the ability to accept input from any number of input devices, such as machine vision, speech recognition, portable keyboards, GPS devices, infra-red, etc. and to allow services to manipulate the information and generate a suitable output such as speech generation, graphics using a headmounted display, vibrotactile stimuli, etc. The <it>Gili</it> user interface has been updated, more documentation has been added, and the <it>Spatial Reminder</it> has been introduced. - -<sect1>Watches -<p> -The <url url="http://datalink.fries.net/" name="datalink library"> 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). - -<sect>Accessories -<p> -<sect1>PCMCIA Cards -<p> -<sect2>Card Families -<p> - -<enum> - -<item> -Ethernet adapter</item> - -<item> -Token Ring adapter</item> - -<item> -Ethernet + Modem / GSM</item> - -<item> -Fax-Modem / GSM adapter</item> - -<item> -SCSI adapter</item> - -<item> -I/O cards: RS232, LPT, RS422, RS485, GamePort, IrDA, Radio, Video</item> - -<item> -Memory cards</item> - -<item> -harddisks</item> - -<item> -2.5&dquot; harddisk adapters</item> - -</enum> - -For desktops there are PCMCIA slots for ISA and PCI bus available. - -Source: <url url="http://www.lapshop.de" name="http://www.lapshop.de"> - -<sect2>Linux Compatibility Check -<p> -With the command <tt>cardctl ident</tt> you may get information about your card. Put this information into <file>/etc/pcmcia/config.opts</file> 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 <url url="http://pcmcia.sourceforge.org" name="the developer of the PCMCIA-CS package David Hinds"> . Look the current issue of his file <url url=" http://pcmcia.sourceforge.org" name="SUPPORTED.CARDS"> to get information about supported cards. -<p> -Since there are not all cards mentioned I have set up a page <url url="http://tuxmobil.org/" name="PCMCIA Cards &dquot;Unofficially&dquot; Supported by Linux"> . - -<sect1>SmartCards -<p> -SmartCard reader, see Project Muscle - <url url="http://www.linuxnet.com/smartcard/index.html" name="Movement for the Use of Smart Cards in a Linux Environment"> - -<sect1>Memory Technology Devices - RAM and Flash Cards -<p> -<url url="http://www.linux-mtd.infradead.org/" name="The Linux Memory Technology Device"> 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. - -<sect1>Printers -<p> -Survey about small mobile printers: - -<enum> - -<item> -CANON: BJC-80, for infrared connections to this printer see the links at my page about <url url="http://tuxmobil.org/ir_misc.html" name="Linux and Infrared Devices"></item> - -<item> -CANON: BJ-30</item> - -<item> -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. </item> - -<item> -Olivetti: JP-90</item> - -</enum> - -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: <url url="http://www.lapshop.de" name="http://www.lapshop.de"> - -<sect1>Power and Phone Plugs, Power Supply -<p> -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: -<code> - ____ - / () \ _ _ _ -frontal view: |() ()| (_)=(_) (_) N.N. - ------ - -abbrevation.: C13 C8 ?? PS/2 - -symbol......: ?? ?? -O)- N.N. -</code> -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. - -<sect1>Bags and Suitcases -<p> -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. -<p> -Laptops computers are frequently demolished in their carrying bag. -The two main causes of demolition are poking the LC display and -banging the edges.A good case has very stiff sides to spread out -pokes, and lots of energy-absorbent padding around the edges to help -when you whack it on the door jamb.Few cases actually have either -of these features. -<p> -More laptops are lost to theft than damage, so camouflage is a wise too. -Emerson, Tom # El Monte <TOMEMERSON@ms.globalpay.com> wrote: &dquot;I use for a laptop <it>travelling bag</it>: a Pyrex <it>casserole carrier</it> bag. Yup, you might think it <it>odd</it> to use a casserole bag for a laptop, but it turns out it has several advantages: - -<itemize> - -<item> -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... - -<item> -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 - -<item> -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 - - -<item> -there is enough clearance on top of the machine to include a handful of CD's or diskettes, if needed... - -<item> -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... - -<item> -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?&dquot; - -</itemize> - -<sect>Different Environments - On the Road -<p> -<sect1>Related HOWTOs -<p> - -<enum> - -<item> -Security-HOWTO</item> - -<item> -Multiboot-with-LILO-mini-HOWTO</item> - -<item> -Ethernet-HOWTO</item> - -<item> -NET-3-HOWTO</item> - -<item> -Offline-Mailing-mini-HOWTO</item> - -<item> -Plip-mini-HOWTO</item> - -<item> -Slip-PPP-Emulator-mini-HOWTO</item> - -</enum> - -<sect1>Configuration Tools -<p> -<sect2>NetEnv -<p> -Do you use your laptop in different network environments? At home? In the office? At a customers site? - -If yes, the small package &dquot;netenv&dquot; 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: - -<enum> - -<item> -Network Device: Configure the network device for different environments.</item> - -<item> -Choose a proper <file>XF86Config</file>: 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.</item> - -<item> -Windowmanager: You can set up your windowmanager according to the current location of your machine.</item> - -<item> -Printing Environment: The netenv data can easily be used to set up the printing environment.</item> - -</enum> - -Netenv is available as Debian/GNU Linux package as well as tarball. It depends on <tt>dialog(1)</tt> for the menu system. It is developed by Gerd Bavendiek <htmlurl url="mailto:bav@rw.sni.de" name="bav@rw.sni.de"> you may get it at <url url="http://www.uni-bielefeld.de/~portgym/net/netenv.html" name="http://www.uni-bielefeld.de/~portgym/net/netenv.html"> . - -<sect2>divine -<p> -<url url="http://www.fefe.de/divine/" name="divine"> is an utility for people who use their machines in different networks all the time. &dquot;The idea is this: - -<itemize> - -<item> -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). - -<item> -at boot time, you run divine. - -<item> -<tt>divine</tt> 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. - -<item> -the main thread just looks for arp replies and exits if one is found. - -<item> -You have one resolv.conf per network, for example <file>/etc/resolv.conf.default</file> and <file>/etc/resolv.conf.work</file>, and <tt>divine</tt> will symlink one of them to <file>/etc/resolv.conf</file> for you. - -<item> -You can specify a proxy server plus port and divine will write the proxy server to <file>/etc/proxy</file>. This can be evaluated inside your shell startup script, like this (<tt>zsh</tt>): - -<code> -export http_proxy="http://`</etc/proxy`/" -</code> -The included perl script edit-netscape-proxy.pl will edit the proxy settings in your Netscape 4 preferences file. - -<item> -You can even specify an additional script to be run for each selection. You can use this to edit <file>/etc/printcap</file> or <file>/etc/issue</file> or do something else I forgot. - -</itemize> - -<p> -The point about <tt>divine</tt> in contrast to other solutions is that other solutions normally use <tt>ping</tt> or something like that. <tt>divine</tt> 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?&dquot; - -<sect2>Mobile IP -<p> -From the NET3-4-HOWTO: &dquot;The term <it>IP Mobility</it> describes the ability of a host that is able to move its network connection from one point on the Internet to another without changing its IP address or losing connectivity. Usually when an IP host changes its point of connectivity it must also change its IP address. IP Mobility overcomes this problem by allocating a fixed IP address to the mobile host and using IP encapsulation (tunneling) with automatic routing to ensure that datagrams destined for it are routed to the actual IP address it is currently using.&dquot; -<p> -<url url="http://www.cs.hut.fi/Research/Dynamics/Dynamics" name="HUT Mobile IP"> is a dynamical, hierarchical Mobile 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 designed Wireless LAN technology in mind, and the system has optimized functionality for mobility in WLAN. There is now a mailing list available. You can join it by sending <it>subscribe</it> on the subject line to <dynamics-user-request@cs.hut.fi> - or you can simply check the <url url="http://www.cs.hut.fi/Research/Dynamics/mail/user" name=" mail archive">. - -<sect3>Resources -<p> - -<enum> -<item> -<url url="http://anchor.cs.binghamton.edu/~mobileip/" name="Linux Mobile-IP"> - -<item> -<url url="http://hplbwww.hpl.hp.com/people/jt/MobileIP/index.html" name="Linux Mobile IP from HP Labs Bristol by Manuel Rodríguez"> - -<item> -<url url="http://mosquitonet.Stanford.EDU/software/mip.html" name="MosquitoNet Mobile IP"> - -<item> -<url url="http://mip.ee.nus.sg/" name="Mobile IP at NUS"> - -<item> -<url url="http://anchor.cs.binghamton.edu/~mobileip/" name="Linux Mobile-IP"> - -<item> -<url url="http://http.cs.berkeley.edu/~randy/Daedalus/BARWAN/" name="Bay Area Research Wireless Access Network (BARWAN)"> - -</enum> - -Sources: Kenneth E. Harker and Dag Brattli - -<sect2>DHCP/BootP -<p> -DHCP and BootP are also useful for working in different environments. Please see the DHCP-HOWTO and BootP-HOWTO. - -<sect2>PPPD Options -<p> -The <tt>pppd</tt> command can be configured via several different files: <tt>pppd file /etc/ppp/<your_options></tt> . - -<sect2>/etc/init.d -<p> -You may even choose to do your configuration by editing the <file>/etc/init.d</file> files manually. - -<sect2>PCMCIA - Schemes -<p> -How can I have separate PCMCIA device setups for home and work? This is fairly easy using PCMCIA <it>scheme</it> support. Use two configuration schemes, called <tt>home</tt> and <tt>work</tt>. For details please read the according chapter in the PCMCIA-HOWTO by David Hinds. - -<sect2>Bootloaders -<p> -<sect3>LILO -<p> -From <url url="http://www.mjedev.demon.co.uk/index.html" name="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 <tt>init</tt> will take any arguments of the form <tt>name=value</tt> 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 <tt>LOCATION</tt> environment variable depending on where I am when I boot Linux. e.g. -<code>LILO: linux LOCATION=home</code> -Or -<code>LILO: linux LOCATION=work</code> -Or simply -<code>LILO: linux</code> -where failing to set <tt>LOCATION</tt> means the same as <tt>LOCATION=home</tt> (i.e. my default). Instead of typing <tt>LOCATION=place</tt> each time you boot you can add an entry to your <file>/etc/lilo.conf</file> file and use the append instruction. e.g. -<code> -# 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=&dquot;LOCATION=work&dquot; -# Linux bootable partition config ends -</code> -With the example above you can use &dquot;linux&dquot; for booting at home and &dquot;work&dquot; for booting at work. - -Armed with the facility above, you can now edit the relevant rc scripts to test ENVIRONMENT before running <tt>ifconfig</tt>, setting up <tt>route</tt> etc. - -<sect3>Other Bootloaders -<p> -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 <url url="ftp://metalab.unc.edu/pub/Linux/system/boot/loaders/" name="ftp://metalab.unc.edu/pub/Linux/system/boot/loaders/">. The NT boot loader or OS/2 boot loader may even be used. - -<sect2>X-Windows -<p> -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&dquot; 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 (<tt>startx -- -bpp 15</tt>) and get the correct 800x600 resolution automatically. This saves having to have two XConfig files. - -<sect2>E-Mail -<p> -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>: - -<sect3>Features -<p> -As a laptop user, I have special demands for my email setup. The setup described below, enables me to: - -<itemize> - -<item> -Read my email from <it>home</it> using a POP email server, which is supplied by my university, but could also be setup on a <it>work</it> place computer.</item> - -<item> -Write email from home with the <it>right</it> return address in the email (which does not mention my computer name).</item> - -<item> -Read/write my email while working on a workstation without access to my laptop or the POP email server (as a backup).</item> - -<item> -Read my email while working on my laptop connected to the ethernet of our institut.</item> - -<item> -Direct email while connected via ethernet (faster than the fetchmail method).</item> - -<item> -Indirect email (over pop mail server) while not connected to the ethernet at work (either at home via modem or somewhere else via ethernet).</item> - -<item> -Use any emailer, e.g. <tt>elm</tt> or the simple <tt>mail</tt> command.</item> - -<item> -Sort incomming email, delete spam, split email-collections (digests) into seperate emails</item> - -</itemize> - -The configuration is based on <tt>sendmail</tt>, <tt>fetchmail</tt>, and a <it>remote pop account</it> for email. - -<sect3>Configuration of sendmail -<p> -This is the most complicated part. Having installed the <tt>sendmail-cf</tt> package, I created a file named <file>/usr/lib/sendmail-cf/laptop.mc</file>: - -<code> -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) -</code> - -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 <it>reply</it> button might not reach me. You must restart <tt>sendmail</tt> 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 <file>/etc/sendmail.cf </file>file <tt>m4 laptop.mc >/etc/sendmail.cf</tt> and to add all possible domain names my laptop should respond to in <file>/etc/sendmail.cw</file>: - -<code> -# sendmail.cw - include all aliases for your machine here. -laptop -laptop.pa.uky.edu -128.17.18.30 -guest1 -guest1.somewhere.org -</code> - -It is important to have all aliases in this file, otherwise <tt>sendmail</tt> will not accept the mail (and will reply <it>we don't relay</it> 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. - -<sect3>Configuration for fetchmail on Laptop -<p> -One method to get the email into your machine is through <tt>fetchmail</tt>. 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): -<file>fetchmailrc</file> - -<code> -set postmaster &dquot;myusername&dquot; -set daemon 900 -poll pop.uky.edu with proto POP3 - user &dquot;mypopusername&dquot; there with password &dquot;mypoppassword&dquot; is mylaptopusername here -</code> - -Fetchmail will just get the the email and send it to <tt>sendmail</tt> which will it deliver into your <file>/var/spool/mail/$USER</file> file. - -<sect3>Forward E-Mail to the Laptop -<p> -On my work station I have the following <file>.forward</file> file: - -<code> -me@pop.acount.edu,me@server1 -</code> - -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 <tt>fetchmail</tt>). However, when my laptop is connected via ethernet, I want my email to go directly to the laptop, instead of pop: - -<code> -me@laptop,me@server1 -</code> - -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. -<p> -Switching is done by three script files and a crontab file (on the workstation): - -<file>forward_pop</file> - -<code> -#!/bin/sh -echo &dquot;me@pop.acount.edu,me@server1&dquot; > ${HOME}/.forward -</code> - -<file>forward_laptop</file> - -<code> -#!/bin/sh -echo &dquot;ppe@laptop,ppe@server1&dquot; > ${HOME}/.forward -crontab ${HOME}/mycrontab -${HOME}/utl/check_laptop -</code> - -<file>check_laptop</file> - -<code> -#!/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 -</code> - -<file>mycrontab</file> - -<code> -# mycrontab -0,10,20,30,40,50 * * * * ${HOME}/utl/check_laptop -</code> - -Each time I connect the laptop to the ethernet, I have to run <tt>forward_laptop</tt>, and each time I disconnect I run forward_pop. In case I forget to run <tt>forward_pop</tt>, 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: - -<file>/sbin/ifdown</file> (this script runs, whenever a network device is stopped, new stuff between BEGIN and END) - -<code> -... -fi - -# BEGIN new stuff -# turn off forwarding email -mail ppe <<EOF -turning off forwarding email -device = ${DEVICE} -hostname = `hostname` -EOF -if [ &dquot;${DEVICE}&dquot; = &dquot;eth0&dquot; -a &dquot;`hostname`&dquot; -= &dquot;laptop&dquot; ]; then - su -lc &dquot;ssh -l myusername server1 -utl/forward_pop&dquot; myusername >& /dev/null -fi -# END new stuff - -ifconfig ${DEVICE} down -exec /etc/sysconfig/network-scripts/ifdown-post $CONFIG -</code> - -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. - -<file>/etc/sysconfig/network-scripts/ifup-post</file> (this script is run, whenever a network device is started) - -<code> -# Notify programs that have requested notification -do_netreport - -# BEGIN new stuff -# check for email -- I'm using fetchmail for this -if [ &dquot;${DEVICE}&dquot; = &dquot;eth0&dquot; -o &dquot;${DEVICE}&dquot; -= &dquot;ppp0&dquot; ]; then - su -lc fetchmail myusername >& /dev/null & -fi - -# set clock if connected to ethernet, redirect email -if [ &dquot;${DEVICE}&dquot; = &dquot;eth0&dquot; -a dquot;`hostname`&dquot; = &dquot;zaphod&dquot; ]; then - ( rdate -s server1 ; hwclock --systohc --utc ) >& /dev/null & - # forward email - su -lc &dquot;ssh -l myusername gradj utl/forward_laptop&dquot; myusername >& /dev/null & -fi -# END new stuff - -exit 0 -</code> - -<sect3>Processing Incomming E-Mail with procmail -<p> -This step is completely optional. The above described sendmail configuration calls <tt>procmail</tt> for each received email, but you could have called <tt>procmail</tt> using the <tt>.forward</tt> file (see the procmail man page). Procmail is a handy tool to block spam and to sort incomming email. - -You need to setup a <tt>.procmailrc</tt> file to use <tt>procmail</tt>. See the man page for procmail, procmailrc, and procmailex (examples). My setup demonstrates, how to ignore certain email messages and split email-collections (digest) into pieces: - -<code> -# -- mail filtering -- procmail is called by sendmail -- -PATH=/bin:/usr/bin -MAILDIR=$HOME/Mail -LOGFILE=$MAILDIR/from -# keep in mind: -# use &dquot;:0:&dquot; when writing to a file -# use &dquot;:0&dquot; 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 &dquot;Sissa-Repro: true&dquot; -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 &dquot;Subject: $TITLE &dquot; -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 -</code> - -BTW, there is a <tt>tk</tt> GUI tool to configure <tt>procmail</tt> (I think it is called <tt>dotfiles</tt>). - -<sect2>Email with UUCP -<p> -Another possible solution for Email is to use UUCP. This software -was made for disconnected machines, and is by far the easiest solution -if you have several users on your laptop (we are talking about Unix, -remember?), each with his/her own account. - -Unlike what most people think, UUCP does not need a serial -connection: it works fine over TCP/IP, so your UUCP partner can be any -machine on the Internet, if it is reachable from your network -attachment point. Here is the UUCP <file>sys</file> for a typical laptop: - -<tscreen> -<verb> -system mylaptop -time any -chat &dquot;&dquot; \d\d\r\c ogin: \d\L word: \P -address uucp.mypartner.org -port TCP -</verb> -</tscreen> - -<sect2>More Info -<p> -<url url="http://www.ssc.com/lg/issue20/laptop.html" name="Using a Laptop in Different Environments"> by <htmlurl url="mailto:bav@rw.sni.de" name="Gerd Bavendiek"> . This article appeared in the August, 1997 issue of the <url url="http://www.ssc.com/lg/" name="Linux Gazette">. 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. - -<sect1>Data Transport Between Different Machines -<p> -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. - -<sect2>Hardware -<p> - -<enum> - -<item> -external harddisks</item> - -<item> -ZIP drive</item> - -</enum> - -Wade Hampton wrote: &dquot;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 <tt>automount</tt> 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.&dquot; - -<sect2>Software -<p> -<sect3>Version Management Software -<p> -Although it is certainly not their main aim, version management -software like CVS (Concurrent Version System) are a perfect tool when -you work on several machines and you have trouble keeping them in sync -(something which is often called "disconnected filesystems" in the -computer science literature). Unlike programs like rsync, which are -assymetric (one side is the master and its files override those of the -slave), CVS accept that you make changes on several machines, and try -afterwards to merge them. Assymetric tools are good only when you can -respect a strict discipline, when you switch from one machine to -another. On the contrary, tools like CVS are more forgetful. - -To synchronize two or more machines (typically a desktop and a -laptop), just choose a CVS repository somewhere on the network. It can -be on one of the machines you want to synchronize or on a third -host. Anyway, this machine should be easily reachable via the network -and have good disks. - -Then, <tt>cvs co</tt> the module you want to work on, edit it, and -<tt>cvs commit</tt> when you reached a synch point and are -connected. If you made changes on both hosts, CVS will try to merge -them (it typically succeeds automatically) or give in and ask you to -resolve it by hand. - -The typical limits of this solution: CVS does not deal well with -binary files, so this solution is more for users of vi or emacs than -for GIMP fans. CVS has trouble with some Unix goodies like symbolic -links. - -For more information on CVS, see the <htmlurl name="Web page" -url="http://www.loria.fr/~molli/cvs-index.html">. The CVS -documentation is excellent (in info format). - -<sect3>CODA Filesystem -<p> -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 <url url="http://www.coda.cs.cmu.edu/" name=" http://www.coda.cs.cmu.edu/"> . - -<sect3>WWWsync -<p> -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 <url url="http://www.alfie.demon.co.uk/wwwsync/" name="http://www.alfie.demon.co.uk/wwwsync/"> . - -<sect3>rsync -<p> -<tt>rsync</tt> is a program that allows files to be copied to and from remote machines in much the same way as <tt>rcp</tt>. It has many more options than <tt>rcp</tt>, and uses the <it>rsync remote-update protocol</it> to greatly speedup file transfers when the destination file already exists. The <it>rsync remote-update protocol</it> allows <tt>rsync</tt> to transfer just the differences between two sets of files across the network link. - -<sect3>Xfiles - file tree synchronization and cross-validation -<p> -Xfiles is an interactive utility for comparing and merging one file tree with another over a network. It supports freeform work on several machines (no need to keep track of what files are changed on which machine). Xfiles can also be used as a cross-validating disk <-gt; disk backup strategy (portions of a disk may go bad at any time, with no simple indication of which files were affected. Cross-validate against a second disk before backup to make sure you aren't backing up bad data). - -A client/server program (GUI on the client) traverses a file tree and reports any files that are missing on the server machine, missing on the client machine, or different. For each such file, the file size/sizes and modification date(s) are shown, and a comparison (using Unix diff) can be obtained. For files that are missing from one tree, <it>similarly named</it> files in that tree are reported. Inconsistent files can then be copied in either direction or deleted on either machine. The file trees do not need to be accessible via nfs. Files checksums are computed in parallel, so largely similar trees can be compared over a slow network link. The client and server processes can also be run on the same machine. File selection and interaction with a revision control system such as RCS can be handled by scripting using jpython. Requirements Java1.1 or later and JFC/Swing1.1 are needed. <url url="http://www.idiom.com/~zilla" name="Xfiles">. - -<sect3>sitecopy -<p> -Sitecopy is for copying locally stored websites to remote web servers. The program will upload files to the server which have changed locally, and delete files from the server which have been removed locally, to keep the remote site synchronized with the local site, with a single command. The aim is to remove the hassle of uploading and deleting individual files using an FTP client. <url url="http://www.lyra.org/sitecopy" name="sitecopy"> . - -<sect3>KBriefcase -<p> -The KDE tool <url url="http://netnow.micron.net/~mrolig/kbriefcase/" name="Kbriefcase"> tries to achieve a similar goal as the Windows briefcase, -but in a different way. Rather than pulling your files from the -desktop, they are pushed to the laptop. You drag a file from the local -location to the briefcase. You are then asked for the remote path to -copy it to. It will then copy the file to the remote location and make -the original read-only. When you restore and remove, the file is copied -back and write permissions are given back. The read-only status, of -course, makes sure you don't start editing the file again before you've -brought your changes back from the remote location. - -<sect1>Security in Different Environments -<p> -<sect2>Introduction -<p> -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. - -<p> -LASG Please read <url url="https://www.seifried.org/lasg/" name="Linux Administrator's Security Guide (LASG) - FAQ"> by Kurt Seifried. - -<sect2>Means of Security -<p> - -<enum> - -<item> -International Kernel Patch: The idea of the <url url="http://www.kerneli.org/" name="International Kernel Patch"> 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. - -<item> -Kennsington Lock: AFAIK proprietary lock solution with different laptops <url url="http://www.kennsington.com" name="http://www.kennsington.com "> </item> - -<item> -SmartCards: by DESKO <url url="http://www.desko.de" name=" http://www.desko.de "> are not available for Linux yet. The only available laptop with a SmartCard builtin is the Siemens Scenic Mobile 800.</item> - -<item> -User passwords: can be easily bypassed if the intruder gets physical access to your machine</item> - -<item> -BIOS passwords: are also easily crackable, though sometimes harder than with desktops</item> - -<item> -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.</item> - -<item> -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.</item> - -<item> -Antivirus policy: I have seen an <tt>antivir</tt> RPM somewhere. Check the BIOS for an option to disable writing at the boot sector.</item> - -<item> -Database of stolen laptops: I have provided a <url url="http://tuxmobil.org/stolen_laptops.html" name="survey of databases for stolen laptops">. - -<item> -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. - -<item> -Secure Protocol: When connecting to a remote server always use a secure protocol.</item> - -</enum> - -<sect1>Dealing with Down Times (Cron Jobs) -<p> -A cron-like program that doesn't go by time: <tt>anacron</tt> (like &dquot;anac(h)ronistic&dquot;) is a periodic command scheduler. It executes commands at intervals specified in days. Unlike <tt>cron</tt>, 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, <tt>anacron</tt> will make sure that the commands are run at the specified intervals as closely as machine-uptime permits. -<p> -<tt>hc-cron</tt> This program is a modified version of Paul Vixie's <paul@vixie.com> widely used <tt>cron</tt> daemon. Like the original program it runs specified jobs at periodic intervals. However, the original <tt>crond</tt> relies on the computer running continuously, otherwise jobs will be missed. This problem is addressed by <tt>hc-cron</tt>, that is indended for use on <it>home-computers</it> that are typically turned off several times a day; <tt>hc-cron</tt> 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 <url url="http://metalab.unc.edu /pub/Linux/system/daemons/cron" name="http://metalab.unc.edu /pub/Linux/system/daemons/cron"> . - -<sect1>Noise Reduction -<p> -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. - -<sect2>Console (Shell) and X -<p> -For the console <tt>setterm -blength 0</tt> and for X <tt>xset b off</tt> turns the bell off. See also PCMCIA-HOWTO, and much more details in the Visible-Bell-mini-Howto by Alessandro Rubini. - -<sect2>PCMCIA -<p> -When starting your laptop with PCMCIA-CS configured correctly, this will be shown by two high beeps. If you want to avoid this put <tt>CARDMGR_OPTS=&dquot;-q&dquot;</tt> into the PCMCIA configuration file, e.g. <file>/etc/pcmcia.conf</file> for Debian/GNU Linux. -<p> -To avoid the dialtones during the modem dialing add - -<code> - module &dquot;serial_cs&dquot; opts &dquot;do_sound=0&dquot; -</code> - -to <file>/etc/pcmcia/config.opts</file> (from <tt>man serial_cs</tt>). This will disable speaker output completely, but the <tt>ATM</tt> command should let you selectively control when the speaker is active. - -<sect2>Miscellaneous Applications -<p> -You may configure <tt>vi</tt> with the <tt>flash</tt> option, so it will use a flash in case of an error, instead of a bell. -<p> -For at least one laptop series, the Toshiba models, there seems to be a Linux package available to control the fan and other features. - -<sect>Other Resources -<p> -Kenneth E. Harker maintains a quite valuable database at <url url="http://www.linux-on-laptops.com/ " name="http://www.linux-on-laptops.com/"> . 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. -<p> -To join the <it>linux-laptop@tuxmobil.org</it> mailing list visit the subsription page at <url url="http://tuxmobil.org/mobilix_ml.html" name="http://tuxmobil.org/mobilix_ml.html">. There you may also find the list archiv. -<p> -To join the other <it>Linux-Laptop-Mailing-List</it> write a mail to <majordomo@vger.kernel.org> with <tt>subscribe linux-laptop</tt> in the subject. You will get a confirmation message than, which you have to reply accordingly. As far as I know there is no list archiv. -<p> -There is now a <it>debian-laptop mailing list</it>. 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 <tt>subscribe</tt>. Or visit the<url url="http://www.debian.org" name="http://www.debian.org"> site and use the online form. -<p> -Also recently founded was <it>Running Linux on IBM ThinkPads</it>, to join send an email to <tt>linux-thinkpad-subscribe@topica.com</tt>, to post send mail to <tt>linux-thinkpad@topica.com</tt> . See <url url="http://www.topica.com/lists/linux-thinkpad/" name="http://www.topica.com/lists/linux-thinkpad/">. -<p> -Lionel, &dquot;trollhunter&dquot; Bouchpan-Lerust-Juery, <trollhunter@linuxfr.org> has written a similar HOWTO, please look at his laptop pages <url url="http://infonomade.linuxfr.org/index.html" name=" http://infonomade.linuxfr.org/index.html "> (French version) <url url="http://infonomade.linuxfr.org/indexen.html" name=" http://infonomade.linuxfr.org/indexen.html "> (English version). -<p> -Newsgroups are comp.os.linux.portable, comp.sys.laptops . - -<sect>Repairing the Hardware -<p> -There are several different reasons that could make it necessary to open the case of a laptop. - -<enum> - -<item> -repairing broken hardware</item> - -<item> -get some hardware info, which isn't available otherwise</item> - -<item> -remove the speakers (speakerrektomie, as described in Visual-Bell-mini-HOWTO)</item> - -<item> -install overdrive for CPU</item> - -<item> -change BIOS battery</item> - -<item> -upgrade harddisk</item> - -<item> -upgrade memory</item> - -</enum> - -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. - -<sect>Solutions with Laptops -<p> -<sect1>Introduction -<p> -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. - -<sect1>Mobile Network Analyzer -<p> -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 <tt>tcpdump</tt>, <tt>netcat</tt>, there are two applications I prefer, which may be used to analyze network traffic: - -The <it>Multi Router Traffic Grapher (MRTG)</it> 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 <url url="http://www.ee.ethz.ch/stats/mrtg/" name=" 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 - <tt>ntop</tt> <url url="http://www-serra.unipi.it/~ntop/" name="http://www-serra.unipi.it/~ntop/"> is a Unix tool that shows the network usage, similar to what the popular top Unix command does. <tt>ntop</tt> is based on <tt>libpcap</tt> and it has been written in a portable way in order to virtually run on every Unix platform and on Win32 as well. <tt>ntop</tt> can be used in both interactive or web mode. In the first case, <tt>ntop</tt> displays the network status on the user's terminal. In web mode a web browser (e.g. netscape) can attach to <tt>ntop</tt> (that acts as a web server) and get a dump of the network status. In the latter case, <tt>ntop</tt> can be seen as a simple RMON-like agent with an embedded web interface. - -<sect1>Mobile Router -<p> -Though designed to work from a single floppy, the <it>Linux Router Project (LRP) </it>, seems useful in combination with a laptop, too. - -<sect1>Hacking and Cracking Networks -<p> -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. - -<sect1>Lectures -<p> -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. -<p> -Though Microsoft's PowerPoint is often used for such things, there are also Linux solutions: - -<itemize> - -<item> -<url url="http://www.tug.org/applications/pdftex/" name="pdftex"> creates PDF files from Tex files, which can be used toghether with certain LaTeX pakcages for presentations, see the example <it>screen designed users manual</it>. - -<item> -<url url="http://www.math.uakron.edu/~dpstory/webeq.html" name="The Web and Exerquiz Packages"> also a sophisticated method to create presentations with LaTex. - -<item> -<url url="http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/" name="PPower"> - -<item> -<url url="http://www.lysator.liu.se/~alla/dia/" name="Dia"> -is a program for creating diagrams of all kinds. The current -version can do UML class diagrams, Entity-Relationship modeling, -network diagrams, and much more. The engine is very flexible and -dynamically loads diagram-types from disk. It can currently export to -postscript and load/save in an xml format. - -<item> -See also the software maps at KDE (K-Office) <url url="http://www.kde.org" name="http://www.kde.org"> for the program <tt>KPresenter</tt> and others. And GNOME <url url="http://www.gnome.org/" name="http://www.gnome.org/"> . - -<item> -<it>MagicPoint</it> or <tt>mgp</tt>, is an X11-based presentation tool. The home page is <url url="http://www.Mew.org/mgp" name="http://www.Mew.org/mgp"> or <url url="ftp://ftp.Mw.org/pub/MagicPoint/" name="ftp://ftp.Mew.org/pub/MagicPoint/"> or <url url="http://jiji.mew.org/mgp/" name="http://jiji.mew.org/mgp/"> . - -<item> -Commercial packages are: <it>Applixware</it> <url url="http://www.applix.com/appware/linux/slideshow/gfx011.html" name="http://www.applix.com/appware/linux/slideshow/gfx011.html"> and Staroffice, see article 15 in LinuxFocus <url url="http://vesta.astro.amu.edu.pl/Library/Linux/LinFocus/May1998/" name="http://vesta.astro.amu.edu.pl/Library/Linux/LinFocus/May1998/">. -</itemize> - - -<sect1>Mobile Data Collecting -<p> -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -Coffee-mini-HOWTO - -<item> -AX-25-HOWTO - -<item> -HAM-HOWTO - -<item> -Serial-HOWTO - -<item> -Serial-Programming-HOWTO - -</enum> - -<sect2>Applications -<p> -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 <url url="http://www.aironet.com/" name=" http://www.aironet.com/">. - -<sect2>Specific Environments -<p> -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-Compatibility 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. - -<sect1>Mobile Office -<p> -With KDE <url url="http://www.kde.org" name="http://www.kde.org"> (K-Office), GNOME, <url url="http://www.gnome.org/" name="http://www.gnome.org/"> and the commercial products WordPerfect, Staroffice and Applixware <url url="http://www.applix.com/" name=" 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. - -<sect1>Connection to Digital Camera -<p> -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. -<p> -Eric <dago@tkg.att.ne.jp> wrote: &dquot;I finally succeeded in downloading pictures from my digital camera, but not exactly the way I expected, i.e. not through USB port but using pcmcia card port and memory stick device, part of digital camera hardware. Anyway, some interesting things to mention: -<p> -Sony (pretending using a standard) uses the msdos format to store images as JPEG files ; so the best way to have your OS recognizing them is to mount the raw device like a msdos filesystem; using mount directly doesn't work (don't know why) but an entry in the /etc/fstab file allows you to mount the device correctly. i.e.: -<code> - /dev/hde1 /mnt/camera msdos user,noauto,ro 0 0 -</code> -Of course, <tt>newfs</tt> before <tt>mount</tt> works too, but there is nothing to see at all ;-) I think both <tt>noauto</tt> and <tt>ro</tt> are important flags; I tried without it and it didn't work. Somehow the mount I got seems buggy . And if <tt>ro</tt> is missing, the camera doesn't recognize back the memory stick and it needs to be msdos-formatted. -<p> -According to the camera documentation , both pcmcia and USB port behave the same (for Mac and Windoze - i.e. you see a file system auto mounted) - I deduce for Linux it should be the same thing too, as long as the USB driver is installed. I think now that mounting USB raw device the way I did with pcmcia should work, but I still couldn't find which device to use.&dquot; -<p> -<url url="http://digitalux.netpedia.net/" name="OpenDiS (Open Digita Support)"> 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 <tt>gPhoto</tt>. The utility is a simple command-line program for standalone downloading of photos from the cameras. -<p> -<url url="http://www.gphoto.org/" name="gPhoto"> 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. <tt>gPhoto</tt> 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. -<p> -<url url="http://www.lightner.net/lightner/bruce/ppc_use.html" name="photopc"> is is a library and a command-line frontend to manipulate digital still cameras based on Fujitsu chipset and Siarra Imaging firmware. The program is known to work with Agfa, Epson and Olympus cameras. Should also work with Sanyo, but this is untested. The cameras typically come with software for Windows and for Mac, and no description of the protocol. With this tool, they are manageable from a UNIX box. Bruce D. Lightner <lightner@metaflow.com> has added support for Win32 and DOS platforms. Note that the program does not have any GUI, it is plain command-line even on Windows. For a GUI, check out the <tt>phototk</tt> program. - -<sect1>Connection to QuickCam (Video) -<p> -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 <url url="http://worldvisions.ca/~apenwarr/" name="http://worldvisions.ca/~apenwarr/"> . I have heard rumors about a Linux-QuickCam-mini-HOWTO, but couldn't find a reliable URL yet. Check the <tt>sane</tt> package which is build for scanner support, this should contain support for still-grabbers as well. -<p> -<url url="http://rainbow.uchicago.edu/~muet/linux/kmc/kmc_utils.html" name="kmc_remote"> 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. -<p> -<url url=" http://www.intel.com/PCcamera/" name="Intel PC Camera Pro Pack"> -is one of the first webcams with USB ports. Also SONY has announced a webcam with USB port. See a survey at <url url="http://www.steves-digicams.com/text_navigator.html" name="Steve's Digicams">. - -<sect1>Connection to Television Set -<p> -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. - -<sect1>Connection to Cellular Phone -<p> -AFAIK there are two methods to connect a cellular phone to a laptop: via the <it>infrared port</it> (IrDA) or via the <it>serial port</it>. See the Linux/IrDA project for the current status of IrDA connections. AFAIK only the Ericsson SH888, the Nokia 8110 and the Siemens S25 provide infrared support. - -<sect1>Connection to Global Positioning System (GPS) -<p> -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. - -<itemize> - -<item> -<tt>dgpsip</tt> provides correct GPS location with DGPS signal from internet. - -<item> -<url url="http://www.mayko.com/gpsd.html" name="gpsd"> -is a daemon that listens to a GPS or Loran receiver and translates the positional data to simplified format that can be more easily used by other programs, like chart plotters. The package comes with a sample client that plots the location of the currently visible GPS satellites (if available) and a speedometer. Added support for the DeLame EarthMate as well as a new 'speedometer' mini client. - -<item> -The <url url="http://www.gbdirect.co.uk/" name="QtGPS"> -package contains a piece of software for Unix/Linux/X and a -GPS receiver. It performs logging and replaying of a journey, -supporting a moving-map display. QtGPS works with Lat/Long and British -OSGB (Ornance Survey) co-ordinate systems. - -<item> -<url url="http://www.geog.uni-hannover.de/grass/welcome.html" name="GRASS"> (Geographic Resources Analysis Support System) is a free software -raster and vector based GIS, image processing system, graphics -production system, and spatial modeling system. - -</itemize> - -<sect1>Connection via Amateur Radio (HAM) -<p> -AFAIK laptops are used in HAM contests. Please see <url url="http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html" name="HAM-HOWTO"> by Terry Dawson, <it>VK2KTJ</it>, <terry@perf.no.itg.telstra.com.au> . - -<sect1>Satellite Watching -<p> -Together with an antenna and software like <tt>seesat</tt> or <tt>sattrack</tt> you can use a laptop to locate a satellite for visual observation. You could also use <tt>xephem</tt> on a laptop when stargazing. - -<sect1>Aviation -<p> -Many people are using laptops for aviation related topics. The <url url="http://metalab.unc.edu/fplan/Aviation-HOWTO/" name="Aviation HOWTO"> is an FAQ, HOWTO <it>like</it> 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. - -<sect1>Blind or Visually Impaired Users -<p> -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 <url url="http://leb.net/blinux/" name="Blinux - Linux for blind people"> for more information. <tt>BRLTTY</tt> is a program which supports different braille terminals. <tt>Festival</tt> is a speech synthesis system. Screen and cursor magnifiers are available. - -<sect>Other Operating Systems -<p> -<sect1>DOS/Windows9x/NT -<p> -<sect2>Introduction -<p> -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. - -<sect2><label id="dostools">DOS Tools to Repartition a Hard Disk -<p> -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 <url url="http://libweb.sonoma.edu/mike/fujitsu/" name=" http://libweb.sonoma.edu/mike/fujitsu/"> . - -A well known and reliable, but commercial product is <it>Partition Magic</it> <url url="http://www.powerquest.com/product/pm/index.html" name="http://www.powerquest.com/product/pm/index.html"> from Power Quest. - -Many people have used <it>FIPS 15c</it> (which may support FAT-32) <url url="http://bmrc.berkeley.edu/people/chaffee/fips/fips.html" name="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) <url url="http://www.igd.fhg.de/~aschaefe/fips/" name="http://www.igd.fhg.de/~aschaefe/fips/"> for repartitioning FAT partition sizes.) - -One more &dquot;newer&dquot; utility for repartitioning and resizing FAT partitions is <it>Ranish Partition Manager/Utility</it> (FAT-32 support is claimed for this as well, Linux support is taken into account.) <url url="http://www.users.intercom.com/~ranish/part/" name="http://www.users.intercom.com/~ranish/part/"> . - -<sect2>Partition Sharing -<p> -You may share your swap space between Linux and Windows. Please see &dquot;Dealing with Limited Resources&dquot; 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 <url url="http://uranus.it.swin.edu.au/~jn/linux/" name=" 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 <tt>msdos</tt>, <tt>vfat</tt> and even compressed drives (Drivespace, etc.). For long file names use <tt>vfat</tt> and if you like autoconversion ( a nice feature for text files), you may do so by using the <tt>conv=auto</tt> option. I have used this in my <file>/etc/fstab</file>, but be aware this might cause some strange behaviour sometimes, look at the kernel docs for further details. - -<code> -/dev/hda8 /dos/d vfat user,exec,nosuid,nodev,conv=auto 0 2 -</code> - -<sect2>Installation without CD Drive -<p> -You may use the CD drive of a desktop (or copy the content of the CD to the hard disk) and connect both machines with a nullmodem cable. Than use a DOS boot floppy and the program <tt>INTERLNK.EXE</tt> to connect both machines. - -<sect2>Miscellaneous -<p> -<htmlurl url="http://www.travsoft.com" name="http://www.travsoft.com"> -<p> -Windows/NT offers: RAS - Remote Access Service -<p> -Windows/9x/NT offers the PPTP protocol to connect to remote sites via -a TCP/IP tunnel. This protocol is also supported by Linux. -<url url="http://www.moretonbay.com/vpn/pptp.html" name="PoPToP"> -is the PPTP server solution for Linux allowing Linux servers to function seamlessly in the PPTP VPN environment. This enables administrators to leverage the considerable benefits of both Microsoft clients and Linux servers. The current pre-release version supports Windows 95/98/NT PPTP clients and PPTP Linux clients. The PoPToP pre-release server is not yet fully optimised. On release, PoPToP will be fully compliant with IETF PPTP Internet Draft and it will seamlessly support Windows PPTP clients with the full range of encryption and authentication features. - -<sect1>BSD Unix -<p> - -<enum> - -<item> 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 <url url="http://www.freebsd.org/~picobsd/" name=" http://www.freebsd.org/~picobsd/"> - -<item> -<url url="http://www.jp.FreeBSD.org/PAO/" name="PAO: FreeBSD Mobile Computing Package"> 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. - -<item> -<url url="http://www.monarch.cs.cmu.edu/" name="The CMU Monarch Project"> Implementations of Mobile-IPv4 and Mobile-IPv6 for FreeBSD - -<item> -<url url="http://www.yy.cs.keio.ac.jp/~sanpei/note-list.html" name="XF86Config Archive">. 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.) - -<item> -AFAIK there is no IrDA support yet. - -</enum> - -<sect1>OS/2 -<p> -At <url url="http://o2ss.com/users/DrMartinus/" name="The Notebook/2 Site"> by Dr. Martinus you may find information about different notebooks and PCMCIA cards working with OS/2. - -<sect1>NOVELL Netware -<p> -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 <tt>mars_nwe</tt> package. Also the Caldera Linux distribtion is well known for its Novell support. -<p> -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). - -<sect1>Debian GNU/Hurd (hurd-i386) -<p> -The GNU Hurd is a totally new operating system being put together by the GNU group. In fact, the GNU Hurd is the final component which makes it possible to built an entirely GNU OS -- and Debian GNU/Hurd is going to be one such (possibly even the first) GNU OS. The current project is founded on the i386 architecture, but expect the others to follow soon. -<p> -The <url url="http://www.urbanophile.com/arenn/hacking/hurd/hurd-hardware.html" name="GNU Hurd Hardware Compatibility Guide"> states that Hurd should work on laptops, but PCMCIA support isn't ready yet. - -<sect>ToDo -<p> - -<enum> - -<item> -mention the corresponding kernel options in the Linux Compatibility Check sections</item> - -<item> -write more Hardware sections</item> - -</enum> - -<sect>Revision History -<p> -v0.1 13 January 1999, first draft -<p> -v0.2 15 January 1999, minor changes -<p> -v0.3 28 January 1999, APM chapter started, minor changes -<p> -v0.4 8 February, APM chapter rewritten, removed some lint -<p> -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 -<p> -v1.0 19 February 1999, added Sound and Keyboard chapter, minor changes, release to the LDP -<p> -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 -<p> -v1.2 5 March 1999, added Debian-Laptop-Mailing-List, added information about <tt>apmcd</tt> and <tt>suspendd</tt> to APM chapter, changed some URLs, minor changes -<p> -v1.3 8 March 1999, minor changes -<p> -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 -<p> -v1.5 4 April 1999, added chapters about setting up E-Mail by Peter Englmaier and Noise Reduction, minor changes -<p> -v1.6 26 June 1999, rewrite of APM chapter, added install method via LapLink cable, URLs changed or added, spell checking, minor changes -<p> -v1.7 28 September 1999, changed <htmlurl ..> SGML tags to <url ..>, ACPI chapter separated, touchpad chapter separated and improved, preface rewritten, added information about <tt>divine</tt>, <tt>noflushd</tt> and <tt>parted</tt>, new chapter Linux Tools to Repartition a Hard Disk, added appendix E about specific laptops, some URLs updated, minor changes -<p> -v2.0 2 October 1999, added information about <tt>gphoto</tt>, <tt>kmc_utils</tt>, 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 -<p> -v2.1 2 November 1999, added information about email with UUCP, the use of CVS and other tools to synchronize two machines, the <tt>noatime</tt> mount option, GPS systems, presentation tools, and hard disk form factors, started chapter about the Hurd, changed URL of PCMCIA-CS package and LDP, reworked credits chapter, reworked APM chapter, minor changes -<p> -v2.2 2 December 1999, reorganized the chapters about Cellular Phones, Pagers, Calculators, Digital Cameras, Wearable Computing and Noise Reduction, many minor changes and bug fixes - -<p> -v2.2a 3 November 2000, links updated - -<p> -v2.2b 27 February 2003, links updated (TuxMobil.org, tldp.org, -linux-on-laptops.com) - -<sect>Credits -<p> -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, in order of appearance: - -<itemize> - -<item> -First of all Kenneth E. Harker <kharker at cs.utexas.edu>, from his page <url url="http://www.linux-on-laptops.com/" name="Linux on Laptops"> I have included much material into this HOWTO, but didn't always quote him verbatim. - -<item> -The other HOWTO authors from the <url url="http://tldp.org/" name="LINUX DOCUMENTATION PROJECT - LDP">. - -<item> -The members of the <url url="http://irda.sourceforge.net" name="Linux/IrDA Project">. - -<item> -The members of the Linux-Laptop Mailing List. - -<item> -The members of the Debian-Laptop Mailing List. - -<item> -The visitors and contributors of my <url url="http://tuxmobil.org/" name="TuxMobil"> pages. - -<item> -David Hinds, the maintainer of the <url url="http://pcmcia.sourceforge.org" name="PCMCIA-CS"> package. - -<item> -Frank Schneider <SPATZ1 at T-ONLINE.DE>. - -<item> -Stefan Martig <martig at iamexwi.unibe.ch>. - -<item> -Michele Andreoli, maintainer of <url url="http://mulinux.firenze.linux.it/" name="muLinux">. - -<item> -Klaus Franken <kfr at klaus.franken.de>. - -<item> -W. Wade, Hampton <whampton at staffnet.com>, did much of spell, grammar and style checking and added many valuable information. - -<item> -Anderson MacKay <mackay at rice.edu>, <url url="http://linux.rice.edu" name="RLUG - Rice University Linux User Group ">, gave many different detailed recommendations. - -<item> -Sean 'Shaleh' Perry, <shaleh at livenet.net>, Debian maintainer of <tt>anacron</tt> and other packages, for Debian support. - -<item> -Bob Toxen <bob at cavu.com>. - -<item> -Peter Sprenger <spre at lugs.ch>. - -<item> -Felix Braun <fbraun at atdot.org>. - -<item> -Steve Rader <rader at wiscnet.net>. - -<item> -<url url="http://www.felch01.demon.co.uk/laptop-howto.html" name="Richard Worwood"> <richard at felch01.demon.co.uk>, for mirroring of the HOWTO. - -<item> -Marcel Ovidiu Vlad <marceluc at leland.Stanford.EDU>. - -<item> -Ludger Berse <lberse01 at cityweb.de>. - -<item> -Cedric Adjih <cedric.adjih at inria.fr>, wrote the chapter about the NeoMagic chipset. - -<item> -Peter Englmaier <ppe at pa.uky.edu>, provided the chapter about a sophisticated email setup. - -<item> -Michael Wiedmann <mw at miwie.in-berlin.de>, <url url="http://www.in-berlin.de/User/miwie/pia/" name="PIA - X11 based PalmPilot Address Manager"> , found many spelling errors and more. - -<item> -Adam Spiers <adam at thelonious.new.ox.ac.uk>. - -<item> -Lionel, &dquot;trollhunter&dquot; Bouchpan-Lerust-Juery, <trollhunter at linuxfr.org>, for providing the <url url="http://infonomade.linuxfr.org/portables/ressourcesfr.html#howto" name="French translation"> and <url url="http://infonomade.linuxfr.org/indexen.html" name="information about wearables"> . - -<item> -Nathan Myers <ncm at linuxlaptops.com>, from <url url="http://www.linuxlaptops.com" name="LL - LinuxLaptops"> for numerous additions. - -<item> -Ben Attias <hfspc002 at csun.edu>. - -<item> -Igor Pesando <ipesando at to.infn.it>. - -<item> -Geert Van der Plas <Geert.VanderPlas at esat.kuleuven.ac.be>, provided information about the touchpad driver included in the GPM. - -<item> -Chandran Shukla <chandran at xmission.com>. - -<item> -Harald Milz <hm at suse.de>, from <url url="http://www.suse.de" name="SuSE"> provided numerous additions. - -<item> -<url url="http://www.snafu.de/~ingo.dietzel/" name="Ingo Dietzel"> <ingo.dietzel at berlin.snafu.de>, for his patience with the project. - -<item> -Emerson, Tom # El Monte <TOMEMERSON at ms.globalpay.com>, for his idea about laptop bags. - -<item> -Thomas Traber <traber at inetmail.de>. - -<item> -Bill Gjestvang <datawolf at ibm.net>. - -<item> -Leandro Noferin <lnoferin at cybervalley.org>, for proofreading the <it>italian</it> parts. - -<item> -Stephane Bortzmeyer <stephane at sources.org> for his suggestions about email with UUCP, the use of CVS or related tools to synchronize two machines, and the <tt>noatime</tt> mount option. - -<item> -Peter Teuben <teuben at astro.umd.edu>, for some suggestions about hard disks. - -<item> -<url url="http://www.guido.germano.com" name="Guido Germano"> <guido at germano.com>, for information about the Macintosh Powerbook 145B. - -<item> -Joel Eriksson <joel.eriksson at alfa.telenordia.se>, for information about Atari laptops. - -<item> -Gilles Lamiral <lamiral at mail.dotcom.fr> for providing the PLIP Install-HOWTO. - -<item> -Alessandro Grillo <Alessandro_Grillo at tivoli.com>, started the Italian translation. - -<item> -Gledson Evers <pulga_linux at bol.com.br>, started the Portuguese translation. - -<item> -Dan Kegel <dank at alumni.caltech.edu>, pointed me to the Toshiba Linux page. - -<item> -<url url="http://www.geocities.com/SiliconValley/5161" name="Jaime Robles"> <ea4abw at amsat.org>, gave me some information about the HAM-HOWTO. - -<item> -<url url="http://home.pages.de/~lufthans/" name="LuftHans"> <LuftHans at asu.edu>, announced this HOWTO to the maintainer of the Hardware-HOWTO. - -<item> -<url url="http://www.cs.hut.fi/~jtm" name="Jari Malinen"> <jtm at mart2.cs.hut.fi>, for support with HUT Mobile IP. - -<item> -John Beimler <john at radiomind.com>, provided the URL of <tt>photopc</tt>. - -<item> -Steven G. Johnson <stevenj at MIT.EDU>, provided the information about Apple/Macintosh m86k machines. - -<item> -Ulrich Oelmann <ulrich.oelmann at tu-clausthal.de>, gave valuable additions about the installation with <tt>muLinux</tt>. - -<item> -Lucio Pileggi <lucio at ing.unipi.it>, provided information about the Siemens S25 cellular phone. - -<item> -Eric <dago at tkg.att.ne.jp> wrote how to transfer pictures from a digital camera. - -<item> -Sorry, but probably I have forgotten to mention everybody who helped. - -</itemize> - -<sect>Appendix A - Survey about Micro Linuxes -<p> -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 <it>micro</it> Linux distributions out there that boot from one or two floppies and run off a ramdisk. - -See <url url="http://www.linuxhq.com" name=" http://www.linuxhq.com "> or <url url="http://www.txdirect.net/users/mdfranz/tinux.html" name=" http://www.txdirect.net/users/mdfranz/tinux.html "> for details. You may find a FAQ and a mailing list about boot-floppies at <url url="http://os.inf.tu-dresden.de/~sr1/boot-floppies/faq.html" name=" http://os.inf.tu-dresden.de/~sr1/boot-floppies/faq.html ">. Also a BootDisk-HOWTO is available. Thanks to Matthew D. Franz maintainer of <it>Trinux</it> for this tips and collecting most of the following URLs. See also the content of Console/Mini Distributions at <url url="http://ma.us.mirrors.freshmeat.net/appindex/console/mini-distributions.html" name="FreshMeat">. - -<enum> - -<item> -<url url=" http://mulinux.firenze.linux.it/" name="MuLinux"> by Michele Andreoli</item> - -<item> -tomsrtbt <url url="http://www.toms.net/~toehser/rb/" name=" http://www.toms.net/~toehser/rb/"> &dquot;The most Linux on one floppy. (distribution or panic disk).&dquot; by Tom Oehser</item> - -<item> -Trinux <url url="http://www.trinux.org" name=" http://www.trinux.org "> &dquot;A Linux Security Toolkit&dquot; by Matthew D. Franz</item> - -<item> -LRP &dquot;Linux Router Project&dquot; <url url="http://www.psychosis.com/linux-router/" name="http://www.psychosis.com/linux-router/"></item> - -<item> -hal91 <url url="http://home.sol.no/~okolaas/hal91.html" name="http://home.sol.no/~okolaas/hal91.html "></item> - -<item> -floppyfw <url url="http://www.zelow.no/floppyfw/" name="http://www.zelow.no/floppyfw/"> by Thomas Lundquist</item> - -<item> -minilinux <url url="http://alberti.crs4.it/softw are/mini-linux/" name=" http://alberti.crs4.it/softw are/mini-linux/"> (seems no more valid) or <url url="http://www.kiarchive.ru/pub/linux/mini-linux/" name=" http://www.kiarchive.ru/pub/linux/mini-linux/"> </item> - -<item> -monkey <url url="http://www.spsselib.hiedu.cz/monkey/docs/english.htm" name=" http://www.spsselib.hiedu.cz/monkey/docs/english.htm "> </item> - -<item> -DLX <url url="http://www.wu-wien.ac.at/usr/h93/h9301726/dlx.html" name="http://www.wu-wien.ac.at/usr/h93/h9301726/dlx.html"> by Erich Boem</item> - -<item> -C-RAMDISK <url url="http://metalab.unc.edu/pub/Linux/kernel/images/" name=" http://metalab.unc.edu/pub/Linux/kernel/images/"> </item> - -<item> -BABEL <url url="http://celsius-software.hypermart.net/babel/" name=" http://celsius-software.hypermart.net/babel/"> &dquot;A mini-distribution to run games&dquot;</item> - -<item> -Xdenu <url url="http://xdenu.tcm.hut.fi/" name=" http://xdenu.tcm.hut.fi/"> , quotating Alan Cox: &dquot;<tt>Xdenu</tt> 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.&dquot;</item> - -<item> -LOAF <url url="http://www.ecks.org/loaf/" name=" http://www.ecks.org/loaf/"> </item> - -<item> -pocket-linux <url url="http://pocket-linux.coven.vmh.net/" name=" http://pocket-linux.coven.vmh.net/"></item> - -<item> -FLUF <url url="http://www.upce.cz/~kolo/fluf.htm" name=" http://www.upce.cz/~kolo/fluf.htm "></item> - -<item> -YARD <url url="http://www.croftj.net/~fawcett/yard/" name=" http://www.croftj.net/~fawcett/yard/"> </item> - -<item> -TLinux <url url="http://members.xoom.com/ror4/tlinux/" name=" http://members.xoom.com/ror4/tlinux/"> </item> - -<item> -ODL <url url="http://linux.apostols.org/guru/wen/" name=" http://linux.apostols.org/guru/wen/"></item> - -<item> -SmallLinux by Steven Gibson <url url ="http://smalllinux.netpedia.net/" name=" 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 <tt>fdisk</tt> and <tt>mkfs.ext2</tt> so that a harddisk install can be done. Useful to boot up on old machines with less than 4MB of RAM.</item> - -<item> -cLIeNUX by Rick Hohensee client-use-oriented Linux distribution <url url="ftp://ftp.blueznet.com /pub/colorg" name="ftp://ftp.blueznet.com /pub/colorg"> </item> - -<item> -linux-lite by Paul Gortmaker for very small systems with less than 2MB RAM and 10MB harddisk space (1.x.x kernel) <url url="http://metalab.unc.edu/pub/Linux/kernel" name=" http://metalab.unc.edu/pub/Linux/kernel "></item> - -<item> -See also the packages at MetaLab formerly known as SunSite <url url="http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html" name=" http://metalab.unc.edu/pub/Linux/system/recovery/!INDEX.html "> and the Boot-Disk-HOWTO</item> - -<item> -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. </item> - -<item> -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 <tt>mkrboot</tt> (provided at least as a Debian/GNU Linux package) or <tt>pcinitrd</tt>, which is part of the PCMCIA-CS package by David Hinds. - -<item> -Also you might try to build your Linux system on a ZIP drive. This is described in the ZIP-Install-mini-HOWTO. - -</enum> - -<sect>Appendix B - Dealing with Limited Resources or Tuning the System -<p> -<sect1>Related HOWTOs -<p> - -<enum> - -<item> -LBX-HOWTO - -<item> -Small-Memory-HOWTO - -</enum> - -<sect1>Introduction -<p> -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. - -<sect1>Small Space -<p> -<sect2>Introduction -<p> -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. - -<sect2>Techniques -<p> - -<enum> - -<item> -Stripping: Though many distributions come with stripped binaries today it is useful to check this. For details see <tt>man strip</tt>. To find every unstripped file you can use the <tt>file</tt> command or more convenient the tool <tt>findstrip</tt>. Attention: don't strip libraries, sometimes the wrong symbols are removed due to a bad programming technique. Or use the <tt>--strip-unneeded</tt> option.</item> - -<item> -Perforation: <tt>zum(1)</tt>reads a file list on stdin and attempts to perforate these files. Perforation means, that series of null bytes are replaced by <tt>lseek</tt>, thus giving the file system a chance of not allocating real disk space for those bytes. Example: <tt>find . -type f | xargs zum</tt> </item> - -<item> -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 <tt>patch</tt> recovery files. Find duplicates, you may try <tt>finddup</tt>. Choose a system to name your backup, temporary and test files, e.g. with a signature at the end. - -<item>Clean Temporary Files: , e.g. <file>/tmp</file>, there is even a tool <tt>tmpwatch</tt>. - -<item>Shorten the Log Files: usually the files in <file>/var/log</file>. </item> - -<item> -Remove Files: Remove files which are not &dquot;necessary&dquot; under all circumstances such as man pages, documentation <file>/usr/doc</file> and sources e.g. <file>/usr/src</file> . - -<item> -Unnecessary Libraries: You may use the <tt>binstats</tt> package to find unused libraries (Thanks to Tom Ed White). - -<item> -Filesystem: Choose a filesystem which treats disk space economically e.g. <tt>rsfs</tt>. Tune your filesystem e.g. <tt>tune2fs</tt>. Choose an appropriate partition and block size. </item> - -<item> -Reduce Kernel Size: Either by using only the necessary kernel features and/or making a compressed kernel image <tt>bzImage</tt>. </item> - -<item> -Compression: I didn't check this but AFAIK you may compress your filesystem with <tt>gzip</tt> and decompress it on the fly. Alternatively you may choose to compress only certain files. You can even execute compressed files with <tt>zexec</tt></item> - -<item> -Compressed Filesystems: -<p> -- For e2fs filesystems there is a compression version available <tt>e2compr</tt> , see <url url="http://debs.fuller.edu/e2compr/" name="http://debs.fuller.edu/e2compr/"> . -<p> -- 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 <url url="http://fb9nt-ln.uni-duisburg.de/mitarbeiter/gockel/software/dmsdos/" name="http://fb9nt-ln.uni-duisburg.de/mitarbeiter/gockel/software/dmsdos/"> .</item> - -<item> -Partition Sharing: You may share swap-space (see Swap-Space-HOWTO) or data partitions between different OS (see <tt>mount</tt>). For mounting MS-DOS Windows95 compressed drives (doublespace, drivespace) you may use <tt>dmsdos</tt> <url url="http://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/" name=" http://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/">.</item> - -<item> -Libraries: Take another (older) library, for instance <tt>libc5</tt> , this library seems to be smaller than <tt>libc6</tt> aka <tt>glibc2</tt> . - -<item> -Kernel: If your needs are fitted with an older kernel version, you can save some space. - -<item> -GUI: Avoid as much Graphical User Interface (GUI) as possible. - -<item>Tiny Distributions: There are some distributions available which fit from one 3.5&dquot; floppy to 10MB disk space and fit for small memories, too. See appendix A and below. - -<item>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. - -</enum> - -<sect1>Harddisk Speed -<p> -Use the tool <tt>hdparm</tt> to set up better harddisk performance. Though I have seen laptop disk enabled with <it>striping</it>, I can't see a reason to do so, because IMHO aka RAID0 striping needs at least two different disks to increase performance. -<p> -See UNIX and LINUX Computing Journal: <url url="http://www.diverge.org/ulcj/199910tfsp.shtml" name="Tunable Filesystem Parameters in /proc"> How to increase, decrease and reconfigure filsystem behavior from within /proc. - -<sect1>Small Memory -<p> -<sect2>Related HOWTOs -<p> - -<enum> - -<item> -Small-Memory-mini-HOWTO by Todd Burgess <tburgess@uoguelph.ca > <url url="http://eddie.cis.uoguelph.ca/~tburgess" name=" http://eddie.cis.uoguelph.ca/~tburgess"> - -<item> -Modules-mini-HOWTO - -<item> -Kerneld-mini-HOWTO - -</enum> - -<sect2>Techniques -<p> -Check the memory usage with <tt>free</tt> and <tt>top</tt>. - -<url url="http://www.complang.tuwien.ac.at/ulrich/mergemem/" name="Mergemem Project ">. Many programs contain <it>memory areas of the same content</it> 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 <tt>mergemem</tt> such areas are detected and shared. The sharing is performed on the operating system level and is invisible to the user level programs. <tt>mergemem</tt> 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 <it>kernel size</it> 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 <it>daemon</it> which is not needed, e.g. <tt>lpd</tt>, <tt>mountd</tt>, <tt>nfsd</tt> and close some <it>virtual consoles</it>. Please see Small-Memory-mini-HOWTO for details. - -And of coarse use <it>swap space</it>, when possible. - -If possible you use the resources of another machine, for instance with X, VNC or even <tt>telnet</tt>. For more information on Virtual Network Computing (VNC), see <url url="http://www.uk.research.att.com/vnc" name="http://http://www.uk.research.att.com/vnc/"> . - -<sect1>Low CPU Speed -<p> -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 <url url="http://www.cerfnet.com/~adorable/libretto.html" name="http://www.cerfnet.com/~adorable/libretto.html">. - -<sect1>Power Saving Techniques -<p> - -<enum> - -<item> -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. - -<item> -PCMCIA services consume much power, so shut them down if you don't need them. - -<item> -I'm not sure to which extend the <it>backlight</it> consumes power. WARNING: AFAIK this device can only bear a limited number of uptime circles. So avoid using screensavers. - -<item> -For some examples to build batteries with increased uptime up to 8 hours look at Adorable Toshiba Libretto <url url="http://www.cerfnet.com/~adorable/libretto.html" name="http://www.cerfnet.com/~adorable/libretto.html">. - -<item> -For information about APM look at the APM chapter above. - -<item> -<url url="http://www-leland.stanford.edu/~bbense/toys/" name="A hacked rclock ">. Booker C. Bense has hacked the <it>rclock</it> program to include a simple battery power meter on the clock face. - -<item> -<url url="http://www.jaist.ac.jp/~daisuke/Linux/xbatstat.html" name="xbatstat">. A battery level status checker for Linux and X. - -<item> -The &dquot;noatime&dquot; option when mouting filesystems tells the kernel -to <em>not</em> update the <it>access time</it> information of the file. This -information, although sometimes useful, is not used by most people (do -you know that <tt>ls -lu</tt> gives you the access time?). Therefore, -you can safely disable it, then preventing disk access each time you -<tt>cat</tt> a file. Here is an example of a <file>/etc/fstab</file> -with this power-saving option: -<tscreen> -<verb> -/dev/hda7 /var ext2 defaults,noatime 0 2 -</verb> -</tscreen> - -<item> -<url url="ftp://tsx-11.mit.edu/pub/linux/sources/sbin/hdparm-3.0.tar.gz" name="hdparm"> <it>hdparm</it> is a Linux IDE disk utility that lets you set spin-down timeouts and other disk parameters. It works also for some SCSI features. - -<item> -<url url="http://www.complang.tuwien.ac.at/ulrich/linux/tips.html" name="Mobile Update Daemon "> This is a drop-in replacement for the standard <tt>update</tt> daemon, <tt>mobile-update</tt> 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 <tt>sync</tt> manually. Otherwise files may be lost on power failure. <tt>mobile-update</tt> does not use APM. So it works also on older systems. - -<item> -<url url="http://www.tuebingen.linux.de/kobras/noflushd/" name="noflushd">: <tt>noflushd</tt> 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 <tt>hdparm</tt> and <tt>mount</tt> with <it>noatime</it> option to bring down disk activity. - -<item> -<url url="http://www2.prestel.co.uk/hex/toshiba.html" name="Toshiba Linux Utilities "> 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 <it>Klibreta</it>, too. - -<item> -At Kenneth E. Harker's page there is a recommendation for LCDproc <url url="http://lcdproc.omnipotent.net/" name="LCDProc"> . &dquot;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.&dquot; I tried this package and found that it connects only to the external Matrix-Orbital 20x4 LCD display <url url="http://www.matrix-orbital.com/" name="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. - -<item> -<url url="http://www.loonie.net/~eschenk/diald.html" name="Diald: Dial Daemon "> . The Diald daemon provides 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. - -<item> -KDE <url url="http://www.kde.org" name="http://www.kde.org"> provides <it>KAPM</it>, <it>Kbatmon</it> and <it>Kcmlaptop</it>. Written by Paul Campbell <it>kcmlaptop</it> 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 <url url="http://www.gnome.org/" name=" http://www.gnome.org/"> . See the software maps at both sites. - -<item> -Please see Battery Powered Linux Mini-HOWTO by Hanno Mueller, hanno@lava.de <url url="http://www.lava.de/~hanno/" name="http://www.lava.de/~hanno/"> for more information. - -</enum> - -<sect1>Kernel -<p> -<sect2>Related HOWTOs -<p> -<itemize> - -<item> -Kernel-HOWTO - -<item> -BootPrompt-HOWTO - -</itemize> - -<p> -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. - -<sect1>Tiny Applications and Distributions -<p> -A small collection yet, but I'm looking for more information. - -<enum> - -<item> -BOA - &dquot;Lightweight and High Performance WebServer. <tt>boa</tt> 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.&dquot; - -<item> -MGR - a graphical windows system, which uses much less resources than X. - -<item> -Low Bandwidth X: -<p> -Alan Cox in LINUX REDUX February 1998 &dquot; .. there are two that handle <it>normal</it> applications very nicely. LBX (Low Bandwidth X) is the <it>official</it> application of the X Consortium (now OpenGroup www.opengroup.org). Dxpc <url url="http://ccwf.cc.utexas.edu/~zvonler/dxpc" name="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.&dquot; - -<item> -blackbox - &dquot;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.&dquot; - -<item> -xfce - <url url="http://www.xfce.org" name="xfce"> is a lightweight and stable desktop environment for various UNIX systems. - -<item> -linux-lite - distribution based on a 1.x.x kernel for systems with only 2MB memory and 10MB harddisk. URL see above. - -<item> -smallLinux - <url url ="http://smalllinux.netpedia.net/" name=" 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 <tt>fdisk</tt> and <tt>mkfs.ext2</tt> so that a harddisk install can be done. Useful to boot up on old machines with less than 4MB of RAM. - -<item> -cLIeNUX - client-use-oriented Linux distribution. - -<item> -minix - not a Linux but a UNIX useful for very small systems, such as 286 CPU and 640K RAM <url url="http://www.cs.vu.nl/~ast/minix.html" name="http://www.cs.vu.nl/~ast/minix.html"> . There is even X support named mini-x by David I. Bell <url url="ftp://ftp.linux.org.uk/pub/linux/alan/" name="ftp://ftp.linux.org.uk/pub/linux/alan/"> . - -<item> -<tt>screen</tt> - tiny but powerful console manager. John M. Fisk <fiskjm@ctrvax.vanderbilt.edu> in LINUX GAZETTE July 1, 1996 :&dquot;It's a GUI, GUI, GUI, GUI world! &dquot; -- 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 <it>at the console</it>.&dquot; - -<item> -tinyirc - &dquot;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.&dquot; - -</enum> - -<sect1>Hardware Upgrade -<p> -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 <url url="http://www.upgrade.de" name="http://www.upgrade.de">, this page is also available in French and English. - -<sect>Appendix C - NeoMagic Chip NM20xx -<p> -<sect1>Introduction -<p> -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. - -<sect1>Textmode 100x37 -<p> -This chapter is a courtesy of Cedric Adjih <htmlurl url="mailto:cedric.adjih@inria.fr" name="< cedric.adjih@inria.fr >">. I changed some minor parts. -<p> -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 SVGATextMode/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. - -<sect2>Survey -<p> -You need to do <it>three</it> main steps: -<enum> -<item> -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.</item> - -<item> -Automatically run <tt>restoretextmode</tt> with correct register data.</item> - -<item> -Automatically run <tt>SVGATextMode</tt>.</item> -</enum> - - -<sect2>More Details -<p> -All the files I have modified, are available for now at <url url="http://starship.python.net/crew/adjih/data/cda-omni-trick.tar.gz" name="http://starship.python.net/crew/adjih/data/cda-omni-trick.tar.gz"> - -<sect3>Enabling Linux to Boot in 800x600 -<p> -Recent kernels (2.2.x) need to be compiled with CONFIG_VIDEO_GFX_HACK defined. Default is off. (look in <file>/usr/src/linux-2.2.x/arch/i386/boot/video.S</file>) - -This is done by passing the parameter <tt>vga=770</tt> to older kernels or <tt>vga=7</tt> to 2.2.x kernels. Example with <file>lilo.conf</file>: - -<code> -image=/boot/bzImage-modif -label=22 -append=&dquot;svgatextmode=100x37x8_SVGA&dquot; #explained later -vga=7 -read-only -</code> - -<sect3>Running <tt>restoretextmode</tt> and <tt>SVGATextMode</tt> at Boot Time -<p> -You must arrange to run <tt>restoretextmode <name of some textreg.dat file></tt> and <tt>SVGATextMode 100x37x8_SVGA</tt> at boot time. - -An example <file>textreg.dat</file> for restoretextmode (obtained using <tt>savetextmode</tt>) is in my tar archive in <file>tmp/</file>, and an example <file>/etc/TextConfig</file>. - -Since I'm lazy, I've simply put <tt>SVGATextMode</tt> and <tt>restoretextmode</tt> in the <file>/etc/rc.boot/kbd</file> file from my Debian/GNU Linux which get executed at boot time (also available in the tar archive). - -<sect3>Now the Key Point -<p> -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 <tt>&dquot;svgatextmode=100x37x8_SVGA&dquot;</tt> (arbitrary name) to the kernel (using append=xxx in lilo.conf) when I also set <tt>vga=7</tt>: the script <file>/etc/rc.boot/kbd</file> tests this variable and calls <tt>restoretextmode</tt> and <tt>SVGATextMode</tt> IF AND ONLY IF. - -<sect2>Road Map -<p> -<enum> -<item> -Recompile the kernel 2.2.x with CONFIG_VIDEO_GFX_HACK</item> - -<item> -Insert the restoretextmode with the correct parameter in the initialisation script, with no other changes.</item> - -<item> -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.</item> - -<item> -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).</item> - -<item> -Boot with 100x37 text mode using parameter <tt>vga=7</tt> (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.</item> - -<item> -Insert the <path>/SVGATextMode 100x37x8_SVGA after the restoretextmode in initialization scripts.</item> - -<item> -Reboot with <tt>vga=7</tt> (lilo.conf)</item> - -<item> -Should be OK now. Enjoy.</item> -</enum> - -<sect>Appendix D - Annotated Bibliography -<p> -<itemize> - -<item> -Linux guides and HOWTOs, available at the Linux Documentation Project (LDP) <url url="http://metalab.unc.edu/LDP" name="http://metalab.unc.edu/LDP"> . These sources of information are highly recommended. - -<item> -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. - -<item> -Authors: Alessandro Rubini, Andy Oram -Title: Linux Device Drivers - -<item> -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. - -<item> -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 <it>raw</it> data required to program something, but it has lot's of explanations, how-to's and example programs. - -<item> -Authors: <url url="http://www.reischl.com" name="Gerald Reischl"> / Heinz Sundt - -Title: Die mobile Revolution - -Publisher: Frankfurt: Ueberreuter 1999 - -Some speculations about the future of mobile communication. - -</itemize> - -<sect>Appendix E - Resources for Specific Laptops -<p> -Certain laptops have found some more enthusiastic Linux users, than other models. This list is probably not comprehensive: - -<sect1>IBM ThinkPad -<p> -ThinkPad Configuration Tool for Linux <url url="http://jhunix.hcf.jhu.edu/~thood/tpctlhome.htm" name="tpctl"> -<p> -Mailing list <url url="http://www.topica.com/lists/linux-thinkpad/" name="linux-thinkpad">. - -<sect1>Toshiba Laptops -<p> -<url url="http://www2.prestel.co.uk/hex/toshiba.html" name="Toshiba Linux Utilities "> 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 <it>Klibreta</it>, too. -<p> -See also <url url="http://www.buzzard.org.uk/toshiba/" name="Toshiba Linux Utilities"> -<p> -Mailing lists: <url url="http://www.onelist.com/subscribe.cgi/linux-on-portege" name="linux-on-portege"> , Linux on Toshiba Satellite 40xx linux-tosh-40xx <majordomo@geekstuff.co.uk>. -<p> -Toshiba itself offers now <url url="http://www.tce.co.jp/linux/" name=" Toshiba Linux Support">. - -<sect1>COMPAQ Concerto Aero -<p> -<url url="http://www.inetdirect.net/stg/pen/chris/concerto.html" name="COMPAQ Concerto Fan's Home Page"> and <url url="http://www.reed.edu/~pwilk/aero/aero.faq" name="Aero-FAQ">. -<p> -The latest version of the <url url="http://www.cs.nmsu.edu/~pfeiffer/#pen" name="Linux Compaq Concerto Pen Driver"> is available from Joe Pfeiffer's home page. - -<sect1>DELL Laptops -<p> -Mailing list at <url url="http://www.egroups.com/group/linux-dell-laptops" name="linux-dell-laptops"> - -</article> - diff --git a/LDP/howto/linuxdoc/archived/Loopback-Encrypted-Filesystem-HOWTO.sgml b/LDP/howto/linuxdoc/archived/Loopback-Encrypted-Filesystem-HOWTO.sgml deleted file mode 100644 index 65d54277..00000000 --- a/LDP/howto/linuxdoc/archived/Loopback-Encrypted-Filesystem-HOWTO.sgml +++ /dev/null @@ -1,400 +0,0 @@ -<!doctype linuxdoc system> - -<!-- Loopback Encrypted Filesystem HOWTO by Ryan T. Rhea --> - -<article> - -<!-- Title information --> - -<title>Loopback Encrypted Filesystem HOWTO -<author>Copyright by Ryan T. Rhea, -<tt/rhear@cs.winthrop.edu/ -<date>v1.1, 29 November 1999 - -<abstract> -This document explains how to setup and then use a filesystem -that, when mounted by a user, dynamically and transparently -encrypts its contents. The filesystem is stored in a regular -file, which can be hidden or named non-conspicuously such that it -would most likely be overlooked. This allows for a high level of -secure storage of data. -<p> -<bf>Archived Document Notice:</bf> This document has been archived by the LDP -because it does not apply to modern Linux systems. It is no longer -being actively maintained. -</p> -</abstract> - -<!-- Table of contents --> -<toc> - -<!-- Begin the document --> - -<sect>Before you begin - -<p> -This process requires the kernel source code, knowledge of -compiling this -code, and a lot of patience. I highly recommend having a boot -disk ready. -Also, be sure to have a backup before you permanently store your -important -data on the encrypted filesystem - it can be corrupted like any -other -filesystem. - -As a minimum, you will have to patch to at least version 2.2.9 of -the linux -kernel before continuing. There are further instructions on -applying patches -in the <ref id="Details"> section later in this document. - -Kernel source can be found at: - -<tscreen> -<url url="ftp://ftp.kerneli.org/"> -</tscreen> - -There is a HOWTO on the process of recompiling kernels at: - -<tscreen> -<url url="http://metalab.unc.edu/LDP/HOWTO/"> -</tscreen> - -This document may be reproduced and distributed in whole or in -part, without fee, subject to the following conditions: - -<itemize> -<item>The copyright notice and this permission notice must be -preserved complete on all complete or partial copies. - -<item>Any translation or derived work must be approved by the -author -in writing before distribution. - -<item>If you distribute this work in part, instructions for -obtaining -he complete version of this manual must be included, and a means -for obtaining a complete version provided. - -<item>All source code in this document is placed under the GNU -General Public License, available via anonymous FTP from: -</itemize> - -<tscreen> -<url url="ftp://prep.ai.mit.edu/pub/gnu/COPYING/"> -</tscreen> - -<sect>Introduction - -<p> -The process uses the device '/dev/loop*' (where * can be 0-7 on -most installations) to mount a loopback filesystem. The same -process can be used without encryption to store a linux -filesystem on a non-linux partition. There is a HOWTO on this at -the LDP site mentioned previously. - -Different types of encryption can be used, including XOR, DES, -twofish, blowfish, cast128, serpent, MARS, RC6, DFC, and IDEA. -The program 'losetup' (loopback setup) is what associates your -encrypted file with a filesystem and it's cipher type. According -to Alexander -Kjeldaas, who maintains kerneli.org and the international crypto -patches, DES -and losetup are currently incompatible. This is due to -differences in the way -the two handle parity bits. There are no plans to support DES as -it is much -more insecure than the other ciphers. - -Twofish, blowfish, cast128, and serpent are all licensed free for -any use. -The others may or may not have licensing restrictions. Several -of them are -candidates for the AES standard. The finalists will provide -royalty free use -of their ciphers worldwide. - -This document uses the serpent algorithm because it is strong yet -remarkably fast, and it's freely distributable under the GPL. -According to -it's documentation, serpent uses a 128-bit block cipher designed -by Ross -Anderson, Eli Biham and Lars Knudsen. It provides users with the -highest -practical level of assurance that no shortcut attacks will be -found. The -documentation on serpent as well as the source code can be found -at: - -<tscreen> -<url url="http://www.cl.cam.ac.uk/~rja14/serpent.html"> -</tscreen> - -Also, this document assumes that the ciphers are compiled -directly into the -kernel. You may install them as modules, but the technique is -not discussed -in this document. You will have to edit the file -'/etc/conf.module'; the -process is discussed in detail in the kernel compilation HOWTO -referenced previously. - -<sect>Summary - -<p> -There are many steps involved in the process. I will provide -<ref id="Details"> for these steps in the next section. I thought -it would -be nice to provide a summary first to provide reference (if you -are experienced with unix/linux you probably don't need the -details anyway). Here they are summarized as follows: - -<enum> -<item>Download the newest international crypto patch (I used -'patch-int-2.2.10.4' at the time this document was written) from: - -<p><tscreen> -<url url="http://ftp.kerneli.org/pub/kerneli/"> -</tscreen> - -<p><item>Patch the kernel - -<p><item>Run 'config' (or 'menuconfig' or 'xconfig') to configure -your -'MakeFile' for the new kernel. The options to enable encryption -are -scattered. First of all, before you will see any other options -you must -enable 'Prompt for development and/or incomplete code/drivers' -under 'Code -Maturity level options'. Under 'Crypto options' enable 'crypto -ciphers' and -'serpent'. Once again, this document assumes you are using -serpent, but try -whatever you want. Remember that DES is known to be incompatible -as of -2.2.10.4 - it may never be supported at all. There are several -important options to select under 'Block Devices'. These include -'Loopback -device support', 'Use relative block numbers as basis for -transfer functions -(RECOMMENDED)', and 'General encryption support'. DO NOT select -'cast 128' or -'twofish' encryption here. Also note that you don't need any of -the crypto -options under the various network categories. I will not go any -further into -configuration of the kernel, it is out of the scope of this -document and can -be found at the LDP site. - -<p><item>Compile the new kernel. - -<p><item>Edit '/etc/lilo.conf' to add the new kernel image. Run -'lilo -v' to -add the kernel to the boot loader. - -<p><item>Download the source for the newest 'util-linux' (I used -'util-linux-2.9v') package from: - -<p><tscreen> -<url url="ftp://ftp.kernel.org/pub/linux/utils/util-linux/"> -</tscreen> - -<p><item>Extract the 'util-linux' source. - -<p><item>Apply the corresponding patch found in your -'/usr/src/linux/Documentation/crypto/' directory. - -<p><item>CAREFULLY read the 'INSTALL' file! This package -contains the -sources for many system dependent files (important tools such as -'login', 'passwd', and 'init'). If you don't carefully edit the -MCONFIG -file before compiling these sources have a boot disk and/or -shotgun ready -because your system will be quite confused. Basically you want -to set almost -all of the 'HAVE_*' fields equal to yes so that the important -authentication -tools are not compiled and written over. The tools you do want -rebuilt -are 'mount' and 'losetup' to accommodate the new encryption -schemes. I -suggest that you refer to the <ref id="Details"> section below -for this step. - -<p><item>Compile and install the 'util-linux' source - -<p><item>Reboot the machine with the new kernel. - -<p><item>Edit '/etc/fstab', adding an entry for your mount point -as follows: - -<p><tscreen><code> -/dev/loop0 /mnt/crypt ext2 user,noauto,rw,loop 0 0 -</code></tscreen> - -<p><item>Create the directory that will hold your filesystem, as -in -'/mnt/crypt' above. - -<p><item>As the user, create your encrypted file as follows: - -<p><tscreen><verb> -dd if=/dev/urandom of=/etc/cryptfile bs=1M count=10 -</verb></tscreen> - -<p><item>Run losetup as follows: - -<p><tscreen><verb> -losetup -e serpent /dev/loop0 /etc/cryptfile -</verb></tscreen> - -You only have one chance to enter the password, be careful. If -you want to -double-check your password, you can use the command: - -<p><tscreen><verb> -losetup -d /dev/loop0 -</verb></tscreen> - -This will deactivate your loop device. Next you will run losetup -again to -test your password, as follows: - -<p><tscreen><verb> -losetup -e serpent /dev/loop0 /etc/cryptfile -</verb></tscreen> - -<p><item>Make your ext2 filesystem as follows: - -<p><tscreen><verb> -mkfs -t ext2 /dev/loop0 -</verb></tscreen> - -<p><item>Now you can mount the encrypted filesystem with: - -<p><tscreen><verb> -mount -t ext2 /dev/loop0 /mnt/crypt -</verb></tscreen> - -<p><item>When your done, you want to unmount and protect your -filesystem as -follows: - -<p><tscreen><verb> -umount /dev/loop0 -losetup -d /dev/loop0 -</verb></tscreen> - -</enum> - - -<sect>Details<label id="Details"> - -<p><bf/Kernel Patches:/ - -You can upgrade from '2.2.x' releases by patching. Each patch -that is released for '2.2.x' contains bugfixes. New features -will be added to the Linux '2.3.x' development kernel. To -install by patching, get all the newer patch files and do the -following: - -<tscreen><verb> -cd /usr/src -gzip -cd patchXX.gz | patch -p0 -</verb></tscreen> - -Repeat xx for all versions bigger than the version of your -current source tree, IN ORDER. - -The default directory for the kernel source is '/usr/src/linux'. -If your source is installed somewhere else, I would suggest using -a symbolic link from '/usr/src/linux'. - - -<p><bf/Editing 'MCONFIG' for the 'util-linux' package -compilation:/ - -The following are excerpts from the 'MCONFIG' file I used to -compile the 'util-linux' package. Note that this is fairly -specific for my setup, which is loosely based on RedHat 5.2. The -point is to make sure you don't overwrite any important system -tools such as 'login', 'getty', or 'passwd'. Anyway, here are -the -important lines as follows: - -<tscreen><code> -CPU=$(shell uname -m | sed s/I.86/intel/) - -LOCALEDIR=/usr/share/locale - -HAVE_PAM=no - -HAVE_SHADOW=yes - -HAVE_PASSWD=yes - -REQUIRE_PASSWORD=yes - -ONLY_LISTED_SHELLS=yes - -HAVE_SYSVINIT=yes - -HAVE_SYSVINIT_UTILS=yes - -HAVE_GETTY=yes - -USE_TTY_GROUP=yes - -HAVE_RESET=yes - -HAVE_SLN=yes - -CC=gcc -</code></tscreen> - -<p><bf/Suggestions:/ - -Note that you could use any of the eight loopback devices, from -'dev/loop0' -to '/dev/loop7'. Use an inconspicuous directory for the mount -point. I would -suggest creating a folder with 700 permissions inside your home -folder. The -same goes for the file that holds the data. I use a filename -like 'sysfile' -or 'config.data' inside the '/etc' folder. This will usually get -overlooked. - -I created very simple Perl scripts to mount and unmount the -filesystem with one command. Write these, make them executable -(chmod u+x), and store them somewhere in your path. - -<tscreen><code> -#!/usr/bin/perl -w -# -#minimal utility to setup loopback encryption filesystem -#Copyright 1999 by Ryan T. Rhea -`losetup -e serpent /dev/loop0 /etc/cryptfile`; -`mount /mnt/crypt`; -</code></tscreen> - -Name the above script 'loop', and then you can be on your way -with one command ('loop') and a password. - -<tscreen><code> -#!/usr/bin/perl -w -# -#minimal utility to deactivate loopback encryption filesystem -#Copyright 1999 by Ryan T. Rhea -`umount /mount/crypt`; -`losetup -d /dev/loop0`; -</code></tscreen> - -Name the second one 'unloop', and then typing 'unloop' will -quickly deactivate your filesystem. - -</article> diff --git a/LDP/howto/linuxdoc/archived/MGR-HOWTO.sgml b/LDP/howto/linuxdoc/archived/MGR-HOWTO.sgml deleted file mode 100644 index 73783b00..00000000 --- a/LDP/howto/linuxdoc/archived/MGR-HOWTO.sgml +++ /dev/null @@ -1,601 +0,0 @@ -<!doctype linuxdoc system> -<article> -<title>The MGR Window System HOWTO -<author>Vincent Broman -</author> -<date>v0.1, 1996-05-30 -<abstract> -Information on the installation, configuration and running of the MGR Window -System. -<p> -<bf>Archived Document Notice:</bf> This document has been archived by the LDP -because it does not apply to modern Linux systems. It is no longer -being actively maintained. -</p> -</abstract> - -<toc> - -<sect>This HOWTO -<p><verb> - Copyright Vincent Broman 1995. - Permission granted to make and distribute copies of this HOWTO - under the conditions of the GNU General Public License.</verb> - <sect1>Archiving -<p> - This HOWTO is archived in - <tt>ftp://archimedes.nosc.mil/pub/Mgr/MGR-HOWTO.sgml</tt>, - and also distributed from - <tt>ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/MGR-HOWTO</tt>. - In nearby directories the same document may appear in - alternate formats like <tt>MGR-HOWTO.txt</tt>. - <sect1>Authentication -<p> - Copies of the MGR distribution due to Broman should be accompanied - by PGP signature files, signed by "Vincent Broman <broman@nosc.mil>". - <sect1>Credit for the HOWTO -<p> - While Vincent Broman first put together this HOWTO, - much of the information and text was obtained from FAQs, - READMEs, etc. written by Stephen Uhler, Michael Haardt, - and other public-spirited net-persons. - Email corrections and suggested changes to <tt>broman@nosc.mil</tt>. - - Uhler was the main architect of <bf>MGR</bf> -- see the Credit section below. - -<sect>What is the MGR window system? -<p> - <sect1>Function -<p> - <bf>MGR</bf> (ManaGeR) is a graphical window system. - The <bf>MGR</bf> server - provides a builtin window manager and windowed graphics terminal - emulation on color and monochrome bitmap displays. <bf>MGR</bf> is - controlled by mousing pop-up menus, by keyboard interaction, and by - escape sequences written on pseudo-terminals by client software. -<p> - <bf>MGR</bf> provides each client window with: termcap-style terminal - control functions, graphics primitives such as line and circle - drawing; facilities for manipulating bitmaps, fonts, icons, and - pop-up menus; commands to reshape and position windows; and a - message passing facility enabling client programs to rendezvous - and exchange messages. Client programs may ask to be informed - when a change in the window system occurs, such as a reshaped - window, a pushed mouse button, or a message sent from another - client program. These changes are called events. - <bf>MGR</bf> notifies a - client program of an event by sending it an ASCII character string - in a format specified by the client program. Existing - applications can be integrated into the windowing environment - without modification by having <bf>MGR</bf> imitate keystrokes in response - to user defined menu selections or other events. - - <sect1>Requirements -<p> - <bf>MGR</bf> currently runs on Linux, FreeBSD, - Sun 3/4 workstations with SunOS, and - Coherent. Various older versions of <bf>MGR</bf> run on the Macintosh, - Atari ST MiNT, Xenix, 386-Minix, DEC 3100, and the 3b1 Unix-pc. - Many small, industrial, real-time systems under OS9 or Lynx in Europe - use (another variant of) Mgr for their user interface. - The programming interface is implemented in C and in ELisp, - although supporting clients written in other languages is quite - easy. - - Running <bf>MGR</bf> requires much less in resources than X, or even gcc. - It does not have the user-base, software repertory, or high-level - libraries of X or MS-Windows, say, but it is quite elegant - and approachable. - - It has been said that <bf>MGR</bf> is to X as Unix was to Multics. - - <sect1>How do MGR, X11, and 8.5 compare? -<p> - <bf>MGR</bf> consists of a server with builtin window manager and terminal - emulator, and clients which run in this terminal emulator and use it - to communicate with the server. No resource multiplexing is done. - - X11 consists of a server and clients, which usually connect to the - server using a socket. All user visible things like terminal - emulators, window managers etc are done using clients. No resource - multiplexing is done. - - 8.5, the Plan 9 window system, is a resource multiplexer, as each - process running in a window can access <tt>/dev/bitblt</tt>, - <tt>/dev/mouse</tt> and - <tt>/dev/kbd</tt> in its own namespace. These are multiplexed to the - <tt>/dev/bitblit</tt>, <tt>/dev/mouse</tt> and <tt>/dev/kbd</tt> - in the namespace of 8.5. - This approach allows one to run 8.5 in an 8.5 window, - a very clean design. 8.5 further has an integrated window manager - and terminal emulator. - -<sect>Installing MGR -<p> - The latest source distribution can be FTPed from the directory - <tt>ftp://archimedes.nosc.mil/pub/Mgr/69</tt> - or Mosaiced from <tt>http://archimedes.nosc.mil/Mgr/69</tt>. - The same should be found at - <tt>ftp://sunsite.unc.edu/pub/Linux/apps/MGR</tt> and its mirrors. - Older versions of this distribution - from Haardt can be found on <tt>tsx-11.mit.edu</tt> and perhaps elsewhere. - Pre-Linux versions of <bf>MGR</bf> from Uhler and others have been found at - <tt>ftp://bellcore.com/pub/mgr</tt>, but I think they are gone now. - I have saved a copy of everything about <bf>MGR</bf> seen on the Internet, - but I am not aware of anything weighty - that is missing from this Linux/Sun distribution. - <bf>MGR</bf> has been through a lot of versions and releases, - but the current *Linux* version number is 0.69. This version number - could jump to 1.0 when stable 256-color VGA code for Linux appears - (for more than one video card type). - RCS version numbers have increased from Bellcore's 4.3 up to our 4.13 now. - - Required tools to build this distribution of <bf>MGR</bf> are m4 (GNU, or - perhaps another supporting the -D option), make (GNU, or perhaps - another supporting include) and *roff for the docs. Also sh, - awk, and POSIX install. Binary distributions are not assembled often - so you need an ANSI C compiler environment, e.g. gcc. - - A Linux installation requires Linux 0.99.10 or better - (1.2.13 is what I actually test on now), - an HGC, EGA, VGA, or SVGA graphics card, and a mouse. Mouses supported - are: serial Microsoft mouse, serial MouseSystems 3 and 5 byte - mouse, serial MMSeries mouse, serial Logitech mouse, PS/2 mouse, - or a bus mouse. - With Buckey (Meta) hot keys enabled, even a mouseless system could - do a certain amount of useful work under <bf>MGR</bf>. - The VGA 640x480 monochrome graphics mode is - supported out of the box, as is 640x350 and 640x200. To run - 800x600, or other modes that your BIOS can initialize and which - do not require bank-switching, you need to run a small program - (supplied as <tt>src/vgamisc/regs.exe</tt>) - under DOS or an emulator to read the VGA registers - and write a header file which you place in the - directory <tt>src/libbitblit/linux</tt>, - so that it can be <tt>#include</tt>'d - by the <tt>vga.c</tt> file there. - Samples of these files are supplied, but please create your own. - Some VGA cards can use 128k - windows, and these might run higher monochrome resolutions. - - The Linux-colorport code also runs in the standard - 320x200x256 color VGA mode without difficulty, because no bank switching - is required. If you think of how few 64000 pixels is, you would - realize this color mode is quite limited. - Non-fast, but simple, bank-switching code has - been added in version 0.65, and it works with a Tseng ET4000 card - in 640x480x256 and 800x600x256 modes. The S3 code does not - work in super VGA resolutions, yet. Supporting new super VGA cards - requires writing one function to switch banks and then making sure that - the desired screen mode can be initialized from a register dump, - possibly with hand-tweaking. The Linux color servers generally - mangle the screen fonts, necessitating use of restorefont as in runx. - If someone were to extract the VGA initialization code out of X, - this might make MGR work on a lot more color systems. - - Suns with SunOS 4.1.2+ and <tt>bwtwo</tt>, <tt>cgthree</tt>, or - <tt>cgsix</tt> frame buffers are supported. - Their speed handling color is good. - Coherent installations should refer to the - <tt>Versions/README.Coh</tt> file in the source distribution. - Porting the - latest-and-greatest <bf>MGR</bf> to another POSIX-like system which - provides <tt>select()</tt> and pty's and direct access to a bitmapped - frame-buffer ought to be straightforward, just implementing the - <tt>libbitblit</tt> library based on the <tt>sunmono</tt> or - <tt>colorport</tt> code, say. - - If you want to install everything, you need 7 MB disk space for - binaries, fonts, manual pages etc. The sources are about 4.5 MB, - plus object files during compilation. - - Normally, <tt>/usr/mgr</tt> should be either the directory or a link to the - directory where you install <bf>MGR</bf> stuff for runtime use. Typing -<tscreen><verb> -cd /usr/mgr; tar xvfz whereveryouputit/mgrusr-0.69.tgz -</verb></tscreen> - and optionally -<tscreen><verb> -cd /usr/mgr; tar xvfz wherever/morefonts-0.69.tgz -</verb></tscreen> - will unpack these. The source can be put anywhere, e.g. typing -<tscreen><verb> -cd /usr/src/local/mgr; tar xvfz wherever/mgrsrc-0.69.tgz -</verb></tscreen> - to unpack the sources from <tt>archimedes.nosc.mil</tt>. - - The source tree can be compiled from one top-level Makefile which - invokes lower-level Makefiles, all of which &dquot;include&dquot; - a <tt>&dquot;Configfile&dquot;</tt> - at the top level. The <tt>Configfile</tt> is created by an interactive sh - script named <tt>Configure</tt>, which asks you questions, - then runs m4 on a <tt>Configfile.m4</tt>. - So you type something like this: - -<tscreen><verb> -chdir /usr/src/local/mgr -sh ./Configure -make first -make depend -make install -make clean -</verb></tscreen> - - It might be wise, before running make, to eyeball the <tt>Configfile</tt> - generated by the <tt>Configure</tt> script, checking that it looks reasonable. - (At least one m4 poops out (Sun <tt>/usr/bin/m4</tt>), - creating a very short <tt>Configfile</tt>. - If this happens, try hand editing a copy of <tt>Configfile.sun</tt> or - <tt>Configfile.lx</tt>) - One can also <tt>make all</tt> in any directory with a Makefile - as soon as the libraries have been compiled and installed. - The server, libraries, and some clients have been linted, but several - clients are K&R C code that generates many compiler warnings. -<p> - Several flags in MGRFLAGS can be added/omitted in the Configfile - to change some - optional features in the server, viz: -<descrip> -<tag/-DWHO/ muck utmp file so &dquot;who&dquot; works -<tag/-DVI/ code for clicking the mouse in vi moving the cursor -<tag/-DDEBUG/ enable debugging output selectable with -d options. -<tag/-DFASTMOUSE/ XOR the mouse track -<tag/-DBUCKEY/ for hot-key server commands without mousing -<tag/-DPRIORITY/ for priority window scheduling instead of - round-robin; the active window gets higher priority -<tag/-DCUT/ for cut/paste between windows and a global snarf buffer -<tag/-DMGR_ALIGN/ forces window alignment for fast scrolling (monochrome) -<tag/-DKILL/ kills windows upon tty i/o errors -<tag/-DSHRINK/ use only some of the screen ($MGRSIZE in environment) -<tag/-DNOSTACK/ don't permit event stacking -<tag/-DBELL/ audibly ring the bell -<tag/-DKBD/ read <tt>mgr</tt> input from the sun kbd, instead of stdin. - This permits redirection of console msgs to a window. -<tag/-DFRACCHAR/ fractional character movement for proportional fonts -<tag/-DXMENU/ extended menu stuff (experimental) -<tag/-DMOVIE/ movie making extension which logs all operations to a - file for later replay -- not quite working under Linux -<tag/-DEMUMIDMSBUT/ Emulate a missing middle mouse button by chording -</descrip> - Not all combinations of these options have been tested on all systems. - - The BITBLITFLAGS macro should contain <tt>-DBANKED</tt> if you're trying - out the super VGA color. -<p> - C code for the static variables in the server containing icons and fonts - is generated by a translator from icon and font files. - - Not all the clients are compiled and installed by the Makefiles. - Clients found under <tt>src/clients</tt> having capitalized names or - not compiled by the supplied Makefiles may have problems compiling - and/or running, but they may be interesting to hack on. - Most of the screen drivers found under the <tt>libbitblit</tt> directory are - of mainly archeological interest. Grave robbing can be profitable. -<p> - At some point check that your <tt>/etc/termcap</tt> and/or - <tt>terminfo</tt> file - contain entries for <bf>MGR</bf> terminals such as found in the <tt>misc</tt> - directory. If all your software checks $TERMCAP in the environment, - this is not needed, as long as you run <tt>eval `set_termcap`</tt> - in each window. -<p> - <bf>MGR</bf> works better if run setuid root, because it wants to chown - ptys and write in the utmp file. This helps the ify iconifier - client work better and the event passing mechanism be more secure. - On Linux, root permissions are <em>required</em> in order to do in/out on the - screen device. Otherwise, you decide whether to trust it. -<p> - In versions around 0.62 there are troubles on the Sun with using - the csh as the default shell. Programs seem to run in a different - process group than the foreground process group of the window's pty, - in contradiction to man pages and posix specs. - There is no trouble with bash, sh, or rc. Ideas why? - -<sect>Running MGR -<p> - The only file <em>required</em> in an <bf>MGR</bf> installation is the server - itself. That would give you terminal emulator windows with shells - running in them and cutting and pasting with the mouse, - but no nice clocks, extra fonts, fancy graphics, - etc. Depending on options, a monochrome server needs about 200K of RAM - plus dynamic space for windows, bitmaps, etc. -<p> - If <tt>/usr/mgr/bin</tt> is in your PATH, - then just type &dquot;<tt>mgr</tt>&dquot; to start up. - After enjoying the animated startup screen, press any key. - When the hatched background and mouse pointer appear, hold down - the left mouse button, highlight the &dquot;new window&dquot; menu item, and - release the button. Then drag the mouse from corner to corner - where you want a window to appear. The window will have your - default shell running in it. Hold down the left mouse button over - an existing window to see another menu for doing things to that - window. Left-clicking on an obscured window raises it to the top. - The menu you saw that pops-up over the empty background - includes the quit command. - For people with a two button mouse: - press both buttons together to emulate the missing middle button - used by some clients. -<p> - The quit submenu includes the &dquot;really quit&dquot; option, - a suspend option which should only be used if you run a - job-control shell, and a screen saver and locker option, which - waits for you to type your login password when you come back - to your machine. -<p> - When trying to run <bf>MGR</bf>, if you get: -<descrip> -<tag/can't find the screen/ - make sure you have a <tt>/dev</tt> entry for your display device, - e.g. on - a Sun <tt>/dev/bwtwo0</tt>. If not, as root cd to <tt>/dev</tt>, and type - &dquot;MAKEDEV bwtwo0&dquot;. Otherwise, you might need the - <tt>-S/dev/bwtwo0</tt> - or (on Linux) the <tt>-S640x480</tt> command line option when starting <tt>mgr</tt>. - On Linux, you might also make sure that <tt>/usr/mgr/bin/mgr</tt> was - installed setuid root. - -<tag/can't find the mouse/ - make sure <tt>/dev/mouse</tt> exists, usually as a symbolic link to the - real device name for your mouse. If you haven't permission to - write in <tt>/dev</tt>, then something like a <tt>-m/dev/cua0</tt> - option can be - given when starting <tt>mgr</tt>. Also, make sure you've supplied the - right mouse protocol choice when you configured <tt>mgr</tt>. The mouse - may speak Microsoft, even if that is not the brand name. - -<tag/can't get a pty/ - make sure all of <tt>/dev/[tp]ty[pq]?</tt> - are owned by root, mode 666, - and all programs referenced with the &dquot;shell&dquot; option in - your <tt>.mgrc</tt> startup file (if any) exist and are executable. - -<tag/none but the default font/ - make sure <bf>MGR</bf> is looking in the right - place for its fonts. Check the <tt>Configfile</tt> in the source or - see whether a <tt>-f/usr/mgr/font</tt> option to <tt>mgr</tt> fixes the problem. - -<tag/completely hung (not even the mouse track moves)/ - login to your machine from another terminal (or rlogin) and kill the - <tt>mgr</tt> process. - A buckey-Q key can quit <bf>MGR</bf> if the keyboard still works. -</descrip> - - <sect1>Applications not aware of MGR -<p> - Any tty-oriented application can be run in an <bf>MGR</bf> window - without further ado. Screen-oriented applications using - termcap or curses can get the correct number of lines and - columns in the window by your using <tt>shape(1)</tt> - to reshape the window or using - <tt>set_termcap(1)</tt> to obtain the correct termcap entry. - - <sect1>MGR Applications (clients) distributed with the server -<p> -<descrip> -<tag/bdftomgr/ converts some BDF fonts to MGR fonts -<tag/browse/ an icon browser -<tag/bury/ bury this window -<tag/c_menu/ vi menus from C compiler errors -<tag/clock/ digital display of time of day -<tag/clock2/ analog display of time of day -<tag/close/ close this window, iconify -<tag/color/ set the foreground and background color for text in this window -<tag/colormap/ read or write in the color lookup table -<tag/cursor/ change appearance of the character cursor -<tag/cut/ cut text from this window into the cut buffer -<tag/cycle/ display a sequence of icons -<tag/dmgr/ crude ditroff previewer -<tag/fade/ fade a home movie script from one scene to another -<tag/font/ change to a new font in this window -<tag/gropbm/ a groff to PBM driver using Hershey fonts -<tag/hpmgr/ hp 2621 terminal emulator -<tag/ico/ animate an icosahedron or other polyhedron -<tag/iconmail/ notification of mail arrival -<tag/iconmsgs/ message arrival notification -<tag/ify/ iconify and deiconify windows -<tag/loadfont/ load a font from the file system -<tag/maze/ a maze game -<tag/mclock/ micky mouse clock -<tag/menu/ create or select a pop-up menu -<tag/mgr/ bellcore window system server and window manager -<tag/mgrbd/ boulder-dash game -<tag/mgrbiff/ watch mailbox for mail and notify -<tag/mgrload/ graph of system load average -<tag/mgrlock/ lock the console -<tag/mgrlogin/ graphical login controller -<tag/mgrmag/ magnify a part of the screen, optionally dump to file -<tag/mgrmail/ notification of mail arrival -<tag/mgrmode/ set or clear window modes -<tag/mgrmsgs/ message arrival notification -<tag/mgrplot/ Unix &dquot;plot&dquot; graphics filter -<tag/mgrsclock/ sandclock -<tag/mgrshowfont/ browse through mgr fonts -<tag/mgrsketch/ a sketching/drawing program -<tag/mgrview/ view mgr bitmap images -<tag/mless/ start up less/more in separate window, menu added for less -<tag/mnew/ startup up any program in a separate, independent window -<tag/mphoon/ display the current phase of the moon -<tag/mvi/ start up vi in a separate window, with mouse pointing -<tag/oclose/ (old) close a window -<tag/omgrmail/ (old) notification of mail arrival -<tag/pbmrawtomgr, pgmrawtomgr, ppmrawtomgr/ convert raw PBM/PGM/PPM image files to mgr bitmap format -<tag/pbmstream/ split out a stream of bitmaps -<tag/pbmtoprt/ printer output from PBM -<tag/pgs/ ghostscript patch and front end, a PS viewer -<tag/pilot/ a bitmap browser, or image viewer -<tag/resetwin/ cleanup window state after client crashes messily -<tag/rotate/ rotate a bitmap 90 degrees. -<tag/screendump/ write graphics screen dump to a bitmap file -<tag/set_console/ redirect console messages to this window -<tag/set_termcap/ output an appropriate TERM and TERMCAP setting -<tag/setname/ name a window, for messages and iconifying -<tag/shape/ reshape this window -<tag/square/ square this window -<tag/squeeze/ compress mgr bitmap using run-length encoding -<tag/startup/ produce a skeleton startup file for current window layout -<tag/texmgr/ TeX dvi file previewer -<tag/text2font, font2text/ convert between mgr font format and text dump -<tag/unsqueeze/ uncompress mgr bitmap using run length encoding -<tag/vgafont2mgr, mgrfont2vga/ convert between mgr font format and VGA -<tag/window_print/ print an image of a window -<tag/zoom/ an icon editor -<tag/bounce, grav, grid, hilbert, mgreyes, stringart, walk/ graphics demos -</descrip> - - <sect1>MGR-aware clients distributed separately, see &dquot;SUPPORT&dquot; file -<p> -<descrip> -<tag/calctool/ on-screen calculator -<tag/chess/ frontend to <tt>/usr/games/chess</tt> -<tag/gnu emacs/ editor with <tt>lisp/term/mgr.el</tt> mouse & menu support -<tag/gnuplot/ universal scientific data plotting -<tag/metafont/ font design and creation -<tag/origami/ folding editor -<tag/pbmplus/ portable bitmap format conversions, manipulations -<tag/plplot/ slick scientific data plotting -</descrip> -<p> - The Emacs support in <tt>misc/mgr.el</tt> and <tt>misc/mailcap</tt> -includes very usable MIME support, via Rmail and metamail. -<p> - A general image viewer could be cobbled together from <tt>pilot</tt> -and the netPBM filters, but I have not taken the time to do it. - -<sect>Programming for MGR -<p> - The <bf>MGR</bf> programmers manual, the C language applications interface, - is found in the doc directory in troff/nroff form. It covers - general concepts, the function/macro calls controlling the server, - a sample application, with an index and glossary. - - Porting client code used with older versions of <bf>MGR</bf> sometimes - requires the substitution of -<tscreen><verb> - #include <mgr/mgr.h> -</verb></tscreen> - for -<tscreen><verb> - #include <term.h> - #include <dump.h> -</verb></tscreen> - and clients using old-style B_XOR, B_CLEAR, et al instead of - BIT_XOR, BIT_CLR, et al can be accommodated by writing -<tscreen><verb> - #define OLDMGRBITOPS - #include <mgr/mgr.h> -</verb></tscreen> - - Compiling client code generally requires compiler options like - the following. -<tscreen><verb> - -I/usr/mgr/include -L/usr/mgr/lib -lmgr -</verb></tscreen> - - One can get some interactive feel for the <bf>MGR</bf> server functions by - reading and experimenting with the <tt>mgr.el</tt> terminal driver for GNU - Emacs which implements the <bf>MGR</bf> interface library in ELisp. - - The usual method of inquiring state from the server has the - potential of stumbling on a race condition if the client also - expects a large volume of event notifications. The problem arises - if an (asynchronous) event notification arrives when a - (synchronous) inquiry response was expected. If this arises in - practice (unusual) then the <bf>MGR</bf> state inquiry functions would have - to be integrated with your event handling loop. - - The only major drawing function missing from the <bf>MGR</bf> protocol, it - seems, is an area fill for areas other than upright rectangles. - There is new code for manipulating the global colormap, as well as - (advisory) allocation and freeing of color indices owned by windows. - - If you are thinking of hacking on the server, you can find the mouse - driver in <tt>mouse.*</tt> and <tt>mouse_get.*</tt>, - the grotty parts of the keyboard - interface in <tt>kbd.c</tt>, and the interface to the display in the - <tt>src/libbitblit/*</tt> directories. The main procedure, much - initialization, and the top level input loop are in <tt>mgr.c</tt>, and the - interpretation of escape sequences is in <tt>put_window.c</tt>. - -<sect>More documentation -<p> - The programmer's manual is essential for concepts. - - Nearly all the clients supplied come with a man page which is installed - into <tt>/usr/mgr/man/man1</tt> or <tt>man6</tt>. - Other useful man pages are <tt>bitblit.3</tt>, <tt>font.5</tt>, and - <tt>bitmap.5</tt>. - There is some ambiguity in the docs in distinguishing the - internal bitmap format found in your frame-buffer and the external - bitmap format found in files, e.g. icons. - - The <tt>mgr.1</tt> man page covers command line options, commands in - the <tt>~/.mgrc</tt> startup file, mouse and menu interaction with the server, - and hot-key shortcuts available on systems with such hot-keys. - - Many of the fonts in <tt>/usr/mgr/font/*</tt> are described to some - extent in <tt>/usr/mgr/font/*.txt</tt>, e.g. <tt>/usr/mgr/font/FONTDIR.txt</tt> - gives X-style font descriptions for the fonts obtained - in .bdf format. Font names end in <tt>WxH</tt>, where <tt/W/ and <tt/H/ - are the - decimal width and height in pixels of each character box. - -<sect>Credit for MGR -<p> - Stephen Uhler, with others working at Bellcore, was the original - designer and implementer of <bf>MGR</bf>, so Bellcore has copyrighted much - of the code and documentation for <bf>MGR</bf> under the following conditions. - -<verb> - * Permission is granted to copy or use this program, EXCEPT that it - * may not be sold for profit, the copyright notice must be reproduced - * on copies, and credit should be given to Bellcore where it is due. -</verb> - - One required showing of the copyright notice is the startup title screen. - - Other credits to: -<itemize> -<item> Stephen Hawley for his wonderful icons. -<item> Tommy Frandsen for the VGA linux library. -<item> Tom Heller for his Gasblit library. -<item> Andrew Haylett for the Mouse driver code. -<item> Dan McCrackin for his gasblit->linux patches. -<item> Dave Gymer, dgymer@gdcarc.co.uk, for the Startrek effect fix. -<item> Alex Liu for first releasing a working Linux version of <bf>MGR</bf>. -<item> Lars Aronsson (aronsson@lysator.liu.se) for text2font and - an ISO8859-1 8-bit font. -<item> Harry Pulley (hcpiv@grumpy.cis.uoguelph.ca, - hcpiv@snowhite.cis.uoguelph.ca) for the Coherent port. -<item> Vance Petree & Grant Edwards & Udo Munk for their work on Hercules. -<item> Udo Munk for his work on serial mouse initialization & select. -<item> Norman Bartek & Hal Snyder at Mark Williams Co. for their help - with some bugs & with Coherent device drivers. -<item> Extra thanks to Zeyd Ben Halim for lots of helpful patches, - especially the adaptation of selection. -<item> Bradley Bosch, brad@lachman.com, for lots of patches from his 3b1 - port, which fix bugs and implement new and desirable features. -<item> Andrew Morton, applix@runxtsa.runx.oz.au, who first wrote the - cut-word code. -<item> Kapil Paranjape, kapil@motive.math.tifr.res.in, for the EGA - support. -<item> Michael Haardt for MOVIE support fixes, bug fixes, separation of the - libbitblit code into output drivers, expansion of the libmgr, and - origami folding of the code. -<item> Yossi Gil for many fonts. -<item> Carsten Emde, carsten@thlmak.pr.net.ch, for mphoon. -<item> Vincent Broman for middle mouse-button emulation, linting, Sun cgsix - support, VGA colormap acess, integration of the sunport code - into Haardt's layering scheme, font gathering, the screen saver, - and continued maintenance. -<item> Kenneth Almquist, ka@socrates.hr.att.com, for helpful bug reports. -<item> Tim Pierce, twpierce@midway.uchicago.edu, for the port to FreeBSD - 2.0R with Trident VGA. -</itemize> - - All bitmap fonts from any source are strictly public domain in the - USA. The 583 fixed-width fonts supplied with <bf>MGR</bf> were obtained - from Uhler, the X distribution, Yossi Gil, and elsewhere. - The Hershey vector fonts and the code for rendering them - are probably freely redistributable. - -</article> diff --git a/LDP/howto/linuxdoc/archived/MIPS-HOWTO.sgml b/LDP/howto/linuxdoc/archived/MIPS-HOWTO.sgml deleted file mode 100644 index ac065876..00000000 --- a/LDP/howto/linuxdoc/archived/MIPS-HOWTO.sgml +++ /dev/null @@ -1,1651 +0,0 @@ -<!doctype linuxdoc system> -<!-- $Id$ --> - -<article> - -<title>Linux/MIPS HOWTO -<author>Ralf Bächle, <tt/ralf@gnu.org/ -<date>May 12, 2004 -<abstract> -This FAQ describes the MIPS port of the Linux operating system, common -problems and their solutions, availability and more. It also tries to -be helpful to other people who might read this FAQ in an attempt to -find information that actually should be covered elsewhere. -</abstract> -<toc> -<sect>The home of the Linux MIPS port<p> - Linux/MIPS is a port of the widespread UNIX clone Linux to the MIPS - architecture. Linux/MIPS runs on a large number of technically very - different systems ranging from small embedded systems to large - desktop machines and servers from SGI and DEC.<p> - - Here you will find links to all the resources you need - to work with Linux on MIPS, whether you are starting out getting - Linux running on your own platform, or developing an end user - application or product based on a Linux/MIPS system. - - If you are looking for a commercial Linux product with associated - support, take a look at the <ref id="commercial" name="Commercial Linux"> page. - If you have input regarding the contents of these pages, see the - <ref id=documentation name="Documentation"> page for contact info. Webserver - contact is <htmlurl url="mailto:webmaster@linux-mips.org" - name="webmaster@linux-mips.org">. - -<p> - -<sect>Mailing lists and other net resources<p> - <sect1>Mailing lists<p> - There are two Linux/MIPS-oriented mailing lists: - - <descrip> - <tag><em>linux-mips@linux-mips.org</em><p> - This mailing list currently has the most traffic. It is especially of - interest as a good number of active developers are subscribed to this list. - - <tag><em>linux-cvs@linux-mips.org</em><p> - This is an announcement only mailing list to which a message for every CVS - commit into linux-mips.org's, CVS archive of the Linux/MIPS community, is - being sent. This allows following the development as it happens. - </descrip> - - Subscription to this lists is handled via <htmlurl - url="mailto:ecartis@linux-mips.org" name="Ecartis (ecartis@linux-mips.org)">, - just send an email with the words <em>subscribe <list-name></em>. In - order to unsubscribe, send <em>unsubscribe linux-mips</em>. - Sending the word help will reveal further secrets about the advanced use of - Ecartis. At <url url="http://www.linux-mips.org/ecartis"> you'll also find - a web-based interface to Ecartis. - - Note linux-mips.org is using the ECN TCP extension as described in - RFC 3168. The bug is known for years yet still defective firewalls - that are dropping TCP SYN packets with ECN bits set are in use. If you - can reach linux-mips.org yet don't receive any email from any of the - linux-mips.org mailing lists you may have this problem.<p> - - <p>The archives for these two lists in UNIX mbox format are located on - ftp.linux-mips.org in /pub/linux/mips/archives. A fully searchable archive - in HTML format of the above lists and some Linux/MIPS related historic - lists can be found at <url url="http://www.linux-mips.org/archives/">. - - <sect1>IRC channel.<p> - There is an IRC channel named #mipslinux for Linux/MIPS which may be found on - irc.freenode.net. - -<sect>Kernel<p> - The current version of the Linux kernel can be found on - <url url="http://www.kernel.org" name="kernel.org"> and will tend to be - somewhat ahead of the MIPS/Linux version (see CVS below) but behind in some - MIPS-specific regards. Older and more stable versions of the kernel for MIPS - are available for download - see the section on <ref id="distributions" - name="Distributions"> for locations. - - <sect1>Anonymous CVS servers.<p> - For those who always want to stay on the bleeding edge, and want to avoid - having to download patch files or full tarballs, we also have an anonymous - CVS server. Using CVS, you can checkout the Linux/MIPS source tree with - the following commands:<p> - - <verb> - cvs -d :pserver:cvs@ftp.linux-mips.org:/home/cvs login - (Only needed the first time you use anonymous CVS, the password is "cvs") - cvs -d :pserver:cvs@ftp.linux-mips.org:/home/cvs co <repository> - </verb> - where you insert linux, libc, gdb or faq for <repository>. - - There is a mailing list for information on what gets committed to this - repository. - - <sect1>Web CVS server.<p> - Via <url url="http://www.linux-mips.org/cvsweb">, you have - direct access to the new Linux/MIPS kernel sources, and a few other projects - hosted in the same CVS archive. The intuitive interface allows you to - follow the development at the click of your mouse. - -<sect><label id="distributions">Distributions.<p> - A distribution is a complete collection of kernel, user programs, toolchain - and libraries necessary to get a system up and running. It may include an - install procedure to get the files copied correctly onto the target storage - device. See the READMEs on the links below for more information. - - <sect1>Commercial Embedded<p> See the section on <ref id="commercial" - name="commercial"> distributions. - - <sect1>RedHat 7.1 based<p> A complete distribution based on RedHat's 7.1, - ported by H.J. Lu, can be found at <url - url="ftp://ftp.linux-mips.org/pub/linux/mips/redhat/7.1/">. - - <sect1>Maciej W. Rozycki<p> A little-endian only distribution is maintained - by <htmlurl url="mailto:macro@ds2.pg.gda.pl" name="Maciej"> at <url - url="ftp://ftp.ds2.pg.gda.pl/pub/macro/"> or the <url - url="ftp://ftp.rfc822.org/pub/mirror/ftp.ds2.pg.gda.pl/pub/macro/" - name="mirror">. - - <sect1>MIPS Technologies<p> - MIPS maintain a version of the above, including complete installable CD-ROM - images, at <url - url="ftp://ftp.mips.com/pub/linux/mips/installation/redhat7.1/">. - - <sect1>Debian<p> - A Debian distribution for both little and big endian machines can be found at - <url url="http://www.debian.org/ports/mips/">. - At the time of writing (January 2002) we are using a 2.4 kernel; kernel - code is shared with the ports being done by people from <htmlurl - url="http://www.mips.com" name="MIPS Technologies, Inc.">). - - <sect1>MIPS Technologies UK (formerly Algorithmics)<p> - Algorithmics is now part of MIPS Technologies and their Linux work is - now merged with MIPS Technologies (above). The group - wrote the floating point trap handler and emulator used in this - kernel - essential for MIPS CPUs to run floating point operations - reliably and correctly.<p> - - MIPS Technologies UK also maintain a GNU <ref id="algorithmics-gcc" - name="toolchain"> and provide both free snapshots and a commercially - supported version - worth thinking about for commercial Linux - developments. You can download the free subset (subject to - registration) from <url - url="http://www.mips.com/products/software_products.html">. - <p> - You can contact the compiler group at <url url="mailto:sde@mips.com">. - -<sect>Toolchains<p> - A toolchain is a complete collection of compiler and binutils programs and - can be run either as a cross-compiler, or native on the target (if - performance allows). - - <sect1><label id="algorithmics-gcc">MIPS SDE<p> - Not a complete distribution, just a Linux toolchain. But it's a toolchain - built and maintained for MIPS with commercial support available, and free - snapshots.<p> - - MIPS Technologies UK maintain their own source tree for the - toolchain components. They resynchronize infrequently with - mainstream GNU releases (which inevitably have bugs for minor - architectures such as MIPS) and focus on providing the most - reliable, best-performing compiler for the largest range of MIPS - CPUs.<p> - This is the same compiler which is at the heart of our - MIPS SDE embedded toolkit. You can now get it in RPM format: - <p> - Native big-endian <url -url="ftp://ftp.mips.com/pub/tools/software/sde-for-linux/sdelinux-5.01-1.mips.rpm">; - native little-endian <url url="ftp://ftp.mips.com/pub/tools/software/sde-for-linux/sdelinux-5.01-1.mipsel.rpm">; - Linux/386 cross for big-endian target <url url="ftp://ftp.mips.com/pub/tools/software/sde-for-linux/sdelinux-5.01-4eb.i386.rpm">; - and Linux/386 cross for little-endian target <url url="ftp://ftp.mips.com/pub/tools/software/sde-for-linux/sdelinux-5.01-4.i386.rpm">. - <p> - MTUK would like to hear how well it worked, so contact them on <htmlurl url="mailto:sde@mips.com">. - - <sect1>Commercial Embedded<p> - - See the section on <ref id="commercial" name="commercial"> distributions - - these all include appropriate toolchain deliverables. - - <sect1>H.J. Lu<p> - - <htmlurl url="mailto:hjl@lucon.org" name ="H.J. Lu"> distributes a toolchain - as part of his Red Hat 7.1 port. It can be found at <url - url="ftp://ftp.linux-mips.org/linux/mips/redhat/7.1/">. - - <sect1>Maciej W. Rozycki<p> - - A stable set of toolchain components provided by <htmlurl - url="mailto:macro@ds2.pg.gda.pl" name="Maciej"> can be downloaded from <url - url="ftp://ftp.ds2.pg.gda.pl/pub/macro/"> or the <url - url="ftp://ftp.rfc822.org/pub/mirror/ftp.ds2.pg.gda.pl/pub/macro/" - name="mirror">. This is based on gcc 2.95.3 (patched) and up-to-date - binutils. - - <sect1>Dan Kegel<p> - Dan Kegel has a page at <url url="http://kegel.com/crosstool/"> with a - nice script to automatize the build procedure. - -<sect>Commercial Linux<p> - - <label id="commercial">The following companies provide commercial, supported - Linux/MIPS solutions for the embedded market, on a number of different - platforms. - <itemize> - <item><url url="http://www.mvista.com/" name="MontaVista"> - <item><url url="http://www.redhat.com/" name="Red Hat"> - <item><url url="http://www.lineo.com/" name="Lineo"> - <item><url url="http://www.lynuxworks.com/" name="LynuxWorks"> - <item><url url="http://www.timesys.com/" name="TimeSys"> - <item><url url="http://www.elinos.com/" name="ELinOS"> - </itemize> - -<sect>Web resources<p> - <sect1>Webservers<p> - The following webservers are relevant for Linux/MIPS developers. - <descrip> - <tag><url url="http://www.linux-mips.org/"><p> - This server covers most of Linux/MIPS. If you need something chances are - it's already there.<p> - - <tag><url url="http://www.mips.com/content/Products/SoftwareTools/"><p> - This sites has MIPS own version of Linux/MIPS based distributions and tools - for their processors and evaluation boards.<p> - - <tag><url url="http://www.debian.org/ports/mips/"><p> - This is Debian's MIPS/Linux site.<p> - - <tag><url url="http://www.playstation2-linux.com"><p> - This is Sony's Linux/MIPS server for the Playstation 2. - Also in <url url="http://www.ps2linux.com/" name="Japanese">.<p> - - <tag><url url="http://www.ltc.com/~brad/mips/mips-cross-toolchain/"><p> - Bradley D. LaRonde's HowTo on building a cross toolchain for MIPS/Linux.<p> - - <tag><url url="http://linux.junsun.net/porting-howto/"><p> - Jun Sun's porting guide has some useful information and tips for porting to - new platforms.<p> - </descrip> - - <sect1>Anonymous FTP servers.<p> - The primary anonymous FTP servers for Linux/MIPS are - <descrip> - <tag><url url="ftp://ftp.linux-mips.org"><p> - This server should satisfy almost all of your Linux/MIPS related ftp - desires. Really.<p> - <tag><url url="ftp://ftp.mips.com/pub/linux"><p> - This is the server of MIPS, Inc. itself. Among other things it offers a - recent Redhat-based distribution and a support area for MIPS' evaluation - boards.<p> - <tag><url url="ftp://ftp.ds2.pg.gda.pl/pub/macro/"><p> - Maciej W. Rozycki's FTP server.<p> - </descrip> - - <sect1>The Linux-VR project<p> - <label id="linux-vr"> - The Linux VR project has worked on support for a variety of NEC VR41xx, - Toshiba TMPR39xx and Philips PR3170-based systems. Most of this code has - been merged into the Linux/MIPS CVS tree. The projects web pages which - used to be at <em>www.linux-vr.org</em> are now archived at - <url url="http://www.linux-mips.org/linux-vr/">.<p> - The Linux-VR CVS archive is at - <url url="http://www.linux-mips.org/cvsweb/linux-vr">; it can also be - checked out by CVS. - -<sect>Supported Hardware platforms - <label id="hardware-platforms"> - <p>Check also the section on <ref id="cpus" name="Supported CPUs"> for which - processor types are supported, - if you are using a platform for which multiple CPU options exist. - - <p>See below for the following categories of platforms - <itemize> - <item><ref id="activedev" name="Actively supported development boards"> - <item><ref id="active" name="Actively supported workstations"> - <item><ref id="legacy" name="Legacy only / unsupported"> - <item><ref id="never" name="Never to be supported"> - </itemize> - - <sect1><label id="activedev">Actively supported development boards<p> - - The following list covers development boards for which there is active - support for the port, and which are maintained continuously. Expect these - ports to work reliably. Refer also the the section on <ref id="commercial" - name="commercial Linux ports"> - these companies may provide additional - hardware support. - - <sect2>Broadcom BCM91250A - <p>An evaluation board for the SiByteTM BCM1250 dual processor SOC (system on - chip) and is implemented in the standard ATX form factor. A high performance - board. See <url url="http://www.broadcom.com/"> for details. - - <sect2>MIPS Malta<p> - - The MIPS Technologies Malta board and all its CPU options are supported. See - the Developers pages under <url url="http://www.mips.com/" - name="www.mips.com">. - - <sect1><label id="active">Actively supported workstations<p> - - <p> - The following list covers machines for which there is active support for - the port, and which are maintained continuously. Expect these ports to work - reliably. - - <sect2>Cobalt Qube and Raq<p> - - The Cobalt Qube product series are low cost headless server systems - based on a IDT R5230. Sun has announced the end of life for the MIPS - based Qube and Raq systems but other Linux distributions are supported. - Biggest problem with this port is a limit of about 700kB for the size of - the boot image. This is a limitation of the firmware and is beginning to - seriously bite until somebody develops a workaround. - - <sect2>DECstation series<p> - The following DECstation models are actively supported: - <itemize> - <item>2100, codename PMAX - <item>5000/xx (Personal DECstation), codename MAXine - <item>5000/1xx, codename 3MIN - <item>5000/200, codename 3MAX - <item>5000/2x0, codename 3MAX+ - <item>5900/2x0 (identical to the 3MAX+). - </itemize> - These days, most of the work is done by - <htmlurl url="mailto:hkoerfg@web.de" - name="Harald Koerfgen (hkoerfg@web.de)"> and others. On the - Internet, DECstation-related information can be found at - <url url="http://decstation.unix-ag.org/">. - - The DECstation family ranges from the DECstation 2100 with an R2000/R2010 - chipset at 12 MHz, to the DECstation 5000/260 with a 60 MHz R4400SC. See the - section on Legacy Platforms below for other DEC machines. Note: Other x86 and - Alpha-based machines were also sold under the name DECstation. - - <sect2>Silicon Graphics Indy<p> - - The Indy is currently the best supported Silicon Graphics machine. - - <sect2>Silicon Graphics Origin 200 and 2000<p> - - <htmlurl url="mailto:ralf@gnu.org" name="Ralf Bächle (ralf@gnu.org)"> - and a team of SGI employees are currently working on a port to the - Origin 200. While still in it's early stages, it's running in - uniprocessor and multiprocessor mode and has drivers for the built-in IOC3 - Ethernet and SCSI hostadapters.<p> - - <sect2>Sony Playstation and Playstation 2<p> - - Sony Computer Entertainment have produced a port of Linux for the - PlayStation 2 which was released in 2002. For further details and - information about obtaining Linux for PlayStation 2, please visit - <url url="http://playstation2-linux.com">. - - Another site in Japanese can be found at <url url="http://www.ps2linux.com">. - - The older Sony Playstation is based on an R3000 derivative and uses a set of - graphics chips developed by Sony themselves. Sony doesn't support Linux for - this system but apparently a Russian group has released a Linux port on - www.runix.ru, now <url url="http://www.runix.biz/">. - -<sect1><label id="legacy">Unsupported / Legacy support only<p> - - The platforms listed here may once have been supported, but there may not have - been active maintenance for them. Expect problems with these platforms, and - consult the mailing list for information on them. - - <sect2>Acer PICA<p> - The <em>Acer PICA</em> is derived from the <em>Mips Magnum 4000</em> design. - It has a R4400PC CPU running at 133MHz or optionally 150MHz plus a 512KB - (optionally 2MB) second level cache; the Magnum's G364 gfx card was replaced - with a S3 968 based one. The system is supported with the exception of the - X server. - - <sect2>Baget/MIPS series<p> - The Baget series includes several boxes which have R3000 processors: Baget - 23, Baget 63, and Baget 83. Baget 23 and 63 have BT23-201 or BT23-202 - motherboards with R3500A (which is basically a R3000A chip) at 25 MHz and - R3081E at 50 MHz respectively. The BT23-201 board has VME bus and VIC068, - VAC068 chips as system controllers. The BT23-202 board has PCI as internal - bus and VME as internal. Support for BT23-201 board has been done by - <htmlurl url="mailto:rajko@mech.math.msu.su" name="Gleb Raiko - (rajko@mech.math.msu.su)"> and - <htmlurl url="mailto:vroganov@msiu.ru" - name="Vladimir Roganov (vroganov@msiu.ru)"> - with a bit of help from <htmlurl url="mailto:zimin@msiu.ru" - name="Serguei Zimin (zimin@msiu.ru)">. Support for BT23-202 is under - development along with Baget 23B which consists of 3 BT23-201 boards - with shared VME bus.<p> - - Baget 83 is mentioned here for completeness only. It has only 2MB RAM and - it's too small to run Linux. The Baget/MIPS code has been merged with the - DECstation port. The source for both is available at <url - url="http://decstation.unix-ag.org/">. - - <sect2>DECstation - <p>These DECstation models are orphaned because nobody is working on them, - but support for them should be relatively easy to achieve. - <itemize> - <item>3100, identical to the 2100 except the R2000A/R2010A @ 16 MHz - <item>5100, codename MIPSMATE, almost identical to the 2100 but with an - R3000/R3010 chipset. - </itemize> - - The other members of the DECstation family, besides the x86 based ones, - should be considered as VAXen with the CPU replaced by a MIPS CPU. - There is absolutely no information available about these machines and support - for them is unlikely to ever happen unless the VAXLinux port comes back to - life. These are: - <itemize> - <item>5400, codename MIPSFAIR - <item>5500, codename MIPSFAIR2 - <item>5800, codename ISIS - </itemize> - - <sect2>MIPS Magnum 4000 / Olivetti M700-10<p> - These two machines are almost completely identical. Back during the - ACE initiative, Olivetti licensed the Jazz design and marketed the machine - with Windows NT as the OS. MIPS Computer Systems, Inc. bought the - Jazz design and marketed it as the MIPS Magnum 4000 series of machines. - Magnum 4000 systems were marketed with Windows NT and RISC/os as the - operating systems.<p> - - The firmware on the machine depended on the operating system which was - installed. Linux/MIPS supports only - the little endian firmware on these two types of machines. Since the - M700-10 was only marketed as an NT machine, all M700-10 machines have this - firmware installed. The MIPS Magnum case is somewhat more complex. If - your machine has been configured big endian for RISC/os, then you need - to reload the little endian firmware. This firmware was originally - included on a floppy with the delivery of every Magnum. If you don't - have the floppy anymore you can download it via anonymous ftp from - <url url="ftp://ftp.linux-mips.org/pub/linux/mips/misc/magnum-4000">.<p> - - It is possible to reconfigure the M700 for headless operation by setting - the firmware environment variables ConsoleIn and ConsoleOut to - multi()serial(0)term(). Also, try the command <sl>listdev</sl> which will - show the available ARC devices. - - In some cases, like where the G364 graphics card is missing but the console - is still configured to use normal graphics, it will be necessary to set - the configuration jumper JP2 on the board. After the next reset, the machine - will reboot with the console on COM2. - - <sect2>MIPS Magnum 4000SC<p> - The MIPS Magnum 4000SC is the same as a Magnum 4000 (see above) with - the exception that it uses an R4000SC CPU. - - <sect2>NEC machines<p> - The NEC uniprocessor machines are OEM <em>Acer PICA</em> systems, see - that section for details. The SMP systems are different from that. The - Linux/MIPS developers have no technical documentation as necessary to write - an OS. As long as that does not change, this will pretty much stay a show- - stopper, preventing a port to NEC's SMP systems. - - <sect2>Netpower 100<p> - The <em>Netpower 100</em> is apparently an <em>Acer PICA</em> in disguise. - It should therefore be supported but this is untested. If there is a - problem then it is probably the machine detection. - - <sect2>Nintendo 64<p> - The <em>Nintendo 64</em> is R4300-based game console with 4MB RAM. Its - graphics chips were developed by Silicon Graphics for Nintendo. Right now - this port has pipe dream status and will continue to be in that state until - Nintendo decides to publish the necessary technical information. The - question remains as to whether porting the Linux/MIPS code to this platform - is a good idea. - - <sect2>Phillips Nino<p> - Linux 2.4 supports the Nino. Support was removed from 2.5 at the request - of it's maintainer who does not want to maintain it anymore. - - <sect2>Silicon Graphics Challenge S<p> - This machine is very similar to the Indy, the differences are that it doesn't - have a keyboard or graphics card, but has an additional SCSI WD33C95-based - adapter. This WD33C95 hostadapter is currently not supported. - - <sect2>Silicon Graphics Indigo<p> - This machine is only being mentioned here because people have occasionally - confused it with Indys or the Indigo 2. The Indigo is a different - R3000-based architecture however, and is yet unsupported. - - <sect2>Silicon Graphics Indigo2<p> - This machine is the successor to the Indigo and is very similar to the Indy. - It is now supported, but is lacking in several areas. You will have - to use serial console. If you have an Indigo2 and still want to run Linux on - it, contact either <htmlurl url="mailto:flo@rfc822.org" - name="Florian Lohoff (flo@rfc822.org)">. - - <sect2>Silicon Graphics Onyx 2<p> - The Onyx 2 is basically an Origin 2000 with additional graphics - hardware. As of now, writing Linux support for the graphics hardware has - not yet been done. Aside from that, Linux should run just as well as - on a normal, headless Origin 2000 configuration.<p> - - <sect2>Silicon Graphics Power Series<p> - This is a very old series of R3000 SMP systems. There is no hardware - documentation for these machines, few of them even exist anymore, and the - hardware is weird. In short, the chances that Linux will ever run on them - are approximating zero. Not that we want to discourage any takers ... - - <sect2>SNI RM200<p> - If your machine has both EISA and PCI slots, then it is an RM200C (please - see below). Due to the slight architectural differences of the RM200 and - the RM200C, this machine isn't currently supported in the official sources. - <htmlurl url="mailto:engel@numerik.math.uni-siegen.de" - name="Michael Engel (engel@numerik.math.uni-siegen.de)"> has managed to get - his RM200 working partially, but the patches haven't yet been included in the - official Linux/MIPS sources. - - <sect2>SNI RM200C<p> - In contrast to the RM200 (see above), this machine has EISA and PCI slots. - This machine was somewhat supported in 2.0 and 2.1, then nobody took care of - this port for a long time until recently. So it's not usable in 2.2 and - 2.4 but works again in 2.6. - - <sect2>SNI RM300C<p> - The RM300 is technically very similar to the RM200C. It should be supported - by the current Linux kernel, but we haven't yet received any reports. - - <sect2>SNI RM400<p> - The RM400 isn't supported. - - <sect2>SNI RW320<p> - This machine is a OEM variant of the SGI Indigo and therefore also - unsupported. - - <sect2>NEC VR41xx-based platforms<p> - The Linux VR project is porting Linux to devices based on the NEC VR41xx - microprocessors. Many of these devices were originally designed to run - Windows CE. The project has produced working kernels with basic drivers - for the Vadem Clio, Casio E-105, Everex Freestyle, and more. The - <ref id="linux-vr" name="Linux-VR"> has developped support for these - systems. - - <sect2>Toshiba TMPR39xx/Philips PR31700 platforms<p> - - Similar to the VR41xx, devices with these processors were originally - intended for running Windows CE. However, there are working kernels - with basic drivers for <em>Sharp Mobilon</em> and the <em>Compaq - C-Series</em>. The <ref id="linux-vr" name="Linux-VR"> has developped - support for these systems. - - <sect1><label id="never">Hardware we're never going to support<p> - <sect2>IBM RS6000<p> - - As the name says, these are IBM machines which are based on the RS6000 - processor series, and, as such, they're not the subject of the Linux/MIPS - project. People frequently confuse the IBM RS6000 with the MIPS R6000 - architecture. However, the Linux/PPC project might support these machines. - Checkout <url url="http://www.penguinppc.org/"> for further information. - - <sect2>VaxStation<p> - As the name already implies, this machine is a member of Digital Equipment's - VAX family. It's mentioned here because people often confuse it with - Digital's MIPS-based DECstation family due to the similar type numbers. These - two families of architectures share little technical similarities. These - systems are subject of the Linux/VAX project at - <url url="http://www.linux-vax.org/">. - - <sect2>SGI VisPC<p> - This is actually an x86-based system, therefore not covered by this FAQ. - There is some limited Linux support available for the older Visual - Workstations. The current series of Visual Workstations is an officially - supported SGI product. Please see <url url="http://oss.sgi.com"> and - <url url="http://www.sgi.com"> for more information. - - <sect2>Motorola 68k-based machines<p> - Examples are the SGI Iris 1000, Iris 2000 and Iris 3000 - series. As these machines are not based on MIPS processors, and therefore - not subject of the Linux/MIPS project. In other words if you're looking into - this document for more information you're lookin at the wrong place. Also - these are <sl>very</sl> old machines, much more than ten years old by now. - As such chances for the to ever be supported a small. For more on Linux on - Motorola 68000 based systems see <url url="http://www.linux-m68k.org">. - - <sect><label id="cpus">Supported CPUs<p> - <label id="supported-cpus"> - <sect1>MIPS32 architecture<p> - All CPUs and cores that conform to the MIPS32 specification, including the - MIPS 4K series, Alchemy Au1000/1500. - - <sect1>MIPS64 architecture<p> - All CPUs and cores that conform to the MIPS64 specification, including the - MIPS 5K and 10K series, Sibyte SB1 core / SB1250 SOC. - - <sect1>R2000, R3000 family<p> - Linux supports the R2000, R3000 family and many processors that were derived - from these the two original MIPS processors such as the R3081. - - <sect1>R4000 family<p> - Linux supports many of the members of the R4000 family. Currently, these - are: R4000PC, R4400PC, R4300, R4600, R4700.<p> - - Not supported are the R4000MC and R4400MC CPUs (that is multiprocessor - systems), as well as R5000 systems with a CPU-controlled second level cache. - This means that the cache is controlled by the R5000 itself, in contrast to - some external cache controller. The difference is important because, - unlike other systems, especially PCs, on MIPS the cache is architecturally - visible and needs to be controlled by software.<p> - Special credit goes to <htmlurl url="mailto:grim@zigzegv.ml.org" - name="Ulf Carlsson (ulfc@engr.sgi.com)"> who provided the CPU module for - debugging the R4000SC / R4400SC support. - - There is some confusion about version numbering of R4000 and R4400 CPUs - on SGI systems. These two processor types are basically identical with the - main difference being the R4000 only having primary caches of each 8kb - while the R4400 has twice that. Consequently these two processors do - identify themselves both as type 4 in the c0_PrId register but a different - version number while marketing decieded to market the somewhat improved - R4400 as a great and new product. R4000 processors have version numbers upto - 3.0; R4400 processors do identify themselves as version 4.0 and newer. - As a consequence of the R4400 being sold as new product they also started - counting the marketing version numbers again at 1.0. The IRIX <em>hinv</em> - command uses the hardware version numbers while Linux in the hope to minimize - the confusion is using marketing's version numbers that is the Linux version - numbers are consistent with those used by the the MIPS literature such as - processor errata. - - <sect1>R5000 family<p> - The R5000 and many similar family members such R5230 and R5260 are supported - by Linux. Support include support for the internal second level cache - controller as well as the external cache controllers used by the SGI IP22. - - <sect1>R6000<p> - Sometimes people confuse the R6000, a MIPS processor, with RS6000, a series - of workstations made by IBM. So, if you're reading this in hope of finding - out more about Linux on IBM machines, then you're reading the wrong - document.<p> - - The R6000 is currently not supported. It is a 32-bit MIPS ISA 2 processor; - apretty interesting and weird piece of silicon. It was developed and - produced by a company named <sl>BIT Technology</sl>. Later, NEC took over - the semiconductor production. It was built using ECL technology, the same - technology that was, and still is, being used to build extremely fast chips - like those used in some Cray computers. The processor had its TLB - implemented as part of the last couple of lines of the external primary - cache, a technology called <sl>TLB slice</sl>. That means its MMU is - substantially different from those of the R3000 or R4000 series, which is - also one of the reasons why the processor isn't supported. - - <sect1>RM7000 family<p> - The RM7000 and some similar family members are supported by Linux - including support for tertiary caches. - - <sect1>R8000<p> - The R8000 is currently unsupported partly because this processor is - relatively rare and has only been used in a few SGI machines, and partly - because the Linux/MIPS developers don't have such a machine.<p> - - The R8000 is a pretty interesting piece of silicon. Unlike the other - members of the MIPS family it is a set of seven chips. It's cache and TLB - architecture are pretty different from the other members of the MIPS family. - It was born as a quick hack to get the floating point crown back to - Silicon Graphics before the R10000 is finished. - - <sect1>R10000<p> - The R10000 is supported as part of the mips64 kernel which currently is - supported on the IP22 (SGI Indy, Challenge S and Indigo 2) and - Origin.<p> - - Due to the very hard-to-handle way this processor works in non-cachecoherent - systems, it will probably be some time until we support this processor - in such systems. As of today, these systems are the SGI O2 and - Indigo <p> - - <sect1>Processors without TLB<p> - For embedded purposes, there are special derivates of the above CPU - available which often lack a full TLB. We don't support those types nor - should you ever expect such support to be added.<p> - - Hackers may want to take a look at a Linux subset named Microcontroller - Linux, or short, ucLinux. This would be supportable on TLB-less processors. - Given the little difference between CPU types with and without TLB, we still - recommend that you choose a processor with TLB. It's going to save you a lot - of engineering. - - <sect1>Processors with partial or no FPU<p> - Linux/MIPS version 2.4 and later feature a full FPU emulation and therefore - can support these processors while maintaining the full binary compatibility - to fpu-full versions. - -<sect>Technical FAQ - <sect1>Reporting bugs<p> - Before reporting a bug please make sure the answer to your problem isn't - already in this document. You may also want to use the search engine at - <url url="http://www.linux-mips.org/archives/linux-mips"> to search the - mailing list archives for references to your problem.<p> - - If this all didn't turn up anything, it seems time to write a bug report. - Inexperienced kernel bug reporters should read - <htmlurl name="REPORTING-BUGS" - url="http://www.linux-mips.org/cvsweb/~checkout~/linux/REPORTING-BUGS"> - (since Linux 2.1 this file ships as part of the kernel) to ensure the bug - report contains all the information needed. In particular the step of - decoding Ooops messages is important; without it's hard if possible at all to - make sense from the numbers in the register dump. For most problems it's - important to know exactly what system you're using. Remember a system - consists of more than just a processor and MIPS systems tend to differ much - more than Intel systems. In general you should not post large files such - as System.map or others until you've been explicitly asked to. Even - if you think you've discovered a generic kernel bug you may still want to - cc linux-mips@linux-mips.org, just in case. - - <sect1>Installation of Linux/MIPS and common problems.<p> - <sect2>NFS booting fails.<p> - - Usually, the reason for this is that people have unpacked the tar archive - under IRIX, not Linux. Since the representation of device files over NFS is - not standardized between various Unices, this fails. The symptom is that - the system dies with the error message ``Warning: unable to open an initial - console.'' right after mounting the NFS filesystem.<p> - - For now, the workaround is to use a Linux system (doesn't need to be MIPS) - to unpack the installation archive onto the NFS server. The NFS server - itself may be any type of UNIX.<p> - - <sect2>Kernel doesn't compile.<p> - Not all machines supported by Linux/MIPS are equally well maintained; in - general those that are used by more users experience more scrutiny and - therefore are better maintained.<p> - - Kernels downloaded from kernel.org in general don't have uptodate MIPS - support so they may not compile at all or work as well as those from - linux-mips.org - where optimal MIPS support is the only focus.<p> - - <sect2>Self-compiled kernels crash when booting.<p> - - When I build my own kernel, it crashes. On an Indy the crash message looks - like the following (the same problem hits other machines as well but may - look completely different): - - <verb> - Exception: <vector=UTLB Miss> - Status register: 0x300004803<CU1,CU0,IM4,IPL=???,MODE=KERNEL,EXL,IE> - Cause register: 0x8008<CE=0,IP8,EXC=RMISS> - Exception PC: 0x881385cc, Exception RA: 0x88002614 - exception, bad address: 0x47c4 - Local I/O interrupt register 1: 0x80 <VR/GIO2> - Saved user regs in hex (&gpda 0xa8740e48, &_regs 0xa8741048): - arg: 7 8bfff938 8bfffc4d 880025dc - tmp: 8818c14c 8818c14c 10 881510c4 14 8bfad9e0 0 48 - sve: 8bfdf3e8 8bfffc40 8bfb2720 8bfff938 a8747420 9fc56394 0 9fc56394 - t8 48 t9 8bfffee66 at 1 v0 0 v1 8bfff890 k1 bad11bad - gp 881dfd90 fp 9fc4be88 sp 8bfff8b8 ra 88002614 - - PANIC: Unexpected exception - </verb> - - This problem is caused by a still unfixed bug in Binutils newer than - version 2.7. As a workaround, change the following line in - arch/mips/Makefile from: - - <verb> - LINKFLAGS = -static -N - </verb> - - to: - - <verb> - LINKFLAGS = -static - </verb> - - <sect2>Booting the kernel on the Indy fails with PROM error messages<p> - <verb> - >> boot bootp()/vmlinux - 73264+592+11520+331680+27848d+3628+5792 entry: 0x8df9a960 - Setting $netaddres to 192.168.1.5 (from server deadmoon) - Obtaining /vmlinux from server deadmoon - - Cannot load bootp()/vmlinux - Illegal f_magic number 0x7f45, expected MIPSELMAGIC or MIPSEBMAGIC. - </verb> - - This problem only happens for Indys with very old PROM versions which cannot - handle the ELF binary format which Linux uses. A solution for this problem - is in the works. - - <sect2>IP22 has forgotten it's ethernet address<p> - IP22 uses the Dallas DS1286 RTC chip to store time and firmware variables. - This chip contains a builtin battery for ten years but by now this decade - is almost over and experience has shown that some of these RTC batteries - have a much shorter battery life, so the RTCs start becoming forgetful. - Software may also accidentally have overwritten the RTC's content. - - If you have determined that a defective RTC chip is the cause of the - problem you can get a new RTC from <url url="http://www.maxim-ic.com/"> or - other sources. Be paranoid, make sure you don't get a part that has been - sitting on a shelf for long years. - - This is how to reprogram the RTC chip. Assuming your ethernet address is - aa:bb:cc:dd:ee:ff - - <verb> - fill -w -v 0xaa 0xbfbe04e8 - fill -w -v 0xbb 0xbfbe04ec - fill -w -v 0xcc 0xbfbe04f0 - fill -w -v 0xdd 0xbfbe04f4 - fill -w -v 0xee 0xbfbe04f8 - fill -w -v 0xff 0xbfbe04fc - </verb> - - With this command you can verify the content of the chip's NVRAM: - - <verb> - dump -w -x 0xbfbe04e8 - </verb> - - Note this will print each byte of the MAC address repeated four times; this - is normal an due to the way the chip is used in the Indy. - - The MAC address is also the system's serial number, so software licenses - under IRIX might be bound to it. Also the ethernet standards specify - certain meanings for certain values of the 48-bit address. Therefore you - should reprogramm the old ethernet address. You may find the MAC address - on the sticker on the machine. Below a bar code this sticker only contains - a 12 digit hexadecimal number; it's typically located on the backside - between the parallel port and and SCSI connectors on the left side and the - power supply on the right side. In case this sticker has been lost, you - probably also have the number somewhere in the bootmessages of Linux - archived by syslogd or maybe a bootpd or dhcpd config file. - - If you need to reprogram the ethernet address you will almost certainly - have lost all other NVRAM settings, use the PROM shell's setenv -p command - for that. - - <sect2>Where can I get the little endian firmware for my RM200 C?<p> - - SNI's system can be operated in both big and little endian modes. At this - time, Linux/MIPS only supports the little endian firmware. This is somewhat - unlucky since SNI hasn't shipped that firmware for quite some time, since - they dropped Windows NT. - - When running in big endian mode, the firmware looks similar to an SGI Indy - which is already supported, therefore fixing the SNI support will be - relatively easy. Interested hackers should contact <htmlurl - url="mailto:ralf@gnu.org" name="Ralf Bächle (ralf@gnu.org)">. - - <sect2>ld dies with signal 6<p> - <verb> - collect2: ld terminated with signal 6 [Aborted] - </verb> - This is a known bug in older binutils versions. You will have to upgrade to - at least binutils 2.8.1 plus very current patches. - - <sect2>Missing ELF support in some PROM versions<p> - - Old IP22 PROM versions don't know about the ELF binary format which the Linux - kernel normally uses, so Linux cannot boot directly. This results in error - messages similar to this one: - <verb> - >> boot -f linux root=/dev/sda1 - - Cannot load scsi(0)disk(1)rdisk(0)partition(8)/linux. - Illegal f_magic number 0x7f45, expected MIPSELMAGIC or MIPSEBMAGIC. - Unable to load linux: ``linux'' is not a valid file to boot. - >> - </verb> - - The preferable solution for this is of course a PROM upgrade but that isn't - available for all systems.<p> - - For systems which still have the sash of IRIX 5 installed it is alternativly - possible use Sash to boot the kernel. Sash knows how to load ELF binaries - and doesn't care if it's an IRIX or Linux kernel. Simply type ``Sash'' to - the PROM monitor. You'll get another shell prompt, this time from Sash. - Now launch Linux as usual.<p> Sash can read EFS or XFS filesystems or read - the kernel from BOOTP / TFTP.<p> - - Using the elf2ecoff tool that is shipping with the kernel source you can - convert an ELF binary into ECOFF. Or when building a kernel just run the - ``make vmlinux.ecoff'' which will produce an ECOFF kernel. - - <sect2>My machine doesn't download the kernel when I try to netboot<p> - - This problem affects the ARC firmware on SNI RM200 and SGI IP22.<p> - - The boot client is replying to the BOOTP packets (may be verified using a - packet sniffer like tcpdump or ethereal), but doesn't download the kernel - from your BOOTP server. This happens if your boot server is running a kernel - of the 2.3 series or higher. The problem may be circumvented by doing a - "echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc" as root on the boot server. - - <sect2>The kernel download from the TFTP server stops and times out<p> - - This may happen if the TFTP server is using a local port number of 32768 or - higher which usually happens if the TFTP server is running Linux 2.3 or - higher. This problem may be circumvented by doing a "echo 2048 32767 > - /proc/sys/net/ipv4/ip_local_port_range" on the server. - - <sect2>Bug in DHCP version 2<p> - - When using DHCP version 2 you might see the following problem: Your machines - receives it's BOOTP reply 3 times but refuses to start TFTP. You can fix - this by doing a "unsetenv netaddr" in the PROM command monitor before you - boot your system. DHCP version 3 fixes that problem. - - <sect2>When booting I get: Warning: unable to open an initial console.<p> - - This problem has two possible solutions. First make sure you actually have - a driver for the console of your system configured. If this is the case and - the problem persists you probably got victim of a widespread bug in Linux - distributions and root filesystems out there. The console of a Linux - systems should be a character device of major id 5, minor 1 with permissions - of 622 and owned by user and group root. If that's not the case, cd to the - root of the filesystem and execute the following commands as root: - <verb> - rm -f dev/console - mknod --mode=622 dev/console - </verb> - You can also do this on a NFS root filesystem, even on the NFS server - itself. However note that the major and minor ids are changed by NFS, - therefore you must do this from a Linux system even if it's only a NFS - client or the major / minor ID might be wrong when your Linux client boots - from it. - - <sect2>Is IRIX required for installation on SGI systems?<p> - - Various descriptions of the installation procedure use IRIX in order to - partition disks. This was required at the time of their writing as there - were no native partiting tools available. Now disks can be partitioned - using the IRIX disklabel mode which can be selected in the expert menu of - newer fdisk versions or GNU Parted. The volume header can be manipulated - using dvhtool. Note dvhtool usage is different from IRIX.<p> - - IRIX as secondary operating systems can still be handy as it may reduce the - need to fiddle with ramdisks or nfs-root during installation. Just one word - of warning though: Be careful to not point IRIX fx(8) to disks that don't - don't contain an IRIX disklabel if you want to retain the content - IRIX may - <em>damage</em> the content of that disk without asking! - - <sect2>Can IRIX and Linux be installed on the same system<p> - - Yes. Just make sure you read the warning about IRIX's fx(8) in above - paragraph. - - <sect2>Insmod complains about the _gp_disp symbol being undefined<p> - - _gp_disp is a magic symbol used with PIC code on MIPS. Be happy, this error - message saved you from crashing your system. You should use the same - compiler options to compile a kernel module as the kernel makefiles do. In - particular the options <em>-mno-pic -mno-abicalls -G 0</em> are important. - - <sect2>Serial console on SGI machines<p> - - Make sure that the kernel you're using includes the appropriate driver for a - serial interface and serial console. Set the <em>console</em> ARC - environment variable to either the value <em>d1</em>, or <em>d2</em> for - Indy and Challenge S depending on which serial interface you're going - to use as the console.<p> - - If you have the problem that all kernel messages appear on the serial - console on boot-up, but everything is missing from the point when init - starts, then you probably have the wrong setup for your /dev/console. You - can find more information about this in the Linux kernel source - documentation which is in /usr/src/linux/Documentation/serial-console.txt if - you have the kernel source installed. - - <sect2>Strange amounts of available memory on SGI<p> - - On bootup, the kernel on the Indy will report available memory with a - message like: - <verb> - Memory: 27976k/163372k available (1220k kernel code, 2324k data) - </verb> - The large difference between the first pair of numbers is caused by a 128MB - area in the Indy's memory address space which mirrors up to the first 128MB - of memory. The difference between the two numbers will always be about - 128MB and does not indicate a problem of any kind. Kernels since 2.3.23 - don't count this 128MB gap any more. - - <sect2>Indy PROM related problems<p> - - Several people have reported these problems with their machines after - upgrading them typically from surplus parts. There are several PROM - versions for the Indy available. Machines with old PROM versions which have - been upgraded to newer CPU variants, like a R4600SC or R5000SC module, can - crash during the self test with an error message like: - <verb> - Exception: <vector=Normal> - Status register: 0x30004803<CU1,CU0,IM7,IM4,IPL=???,MODE=KERNEL,EXL,IE> - Cause register: 0x4000<CE=0,IP7,EXC=INT> - Exception PC: 0xbfc0b598 - Interrupt exception - CPU Parity Error Interrupt - Local I/O interrupt register 1: 0x80 <VR/GIO2> - CPU parity error register: 0x80b<B0,B1,B3,SYSAD_PAR> - CPU parity error: address: 0x1fc0b598 - NESTED EXCEPTION #1 at EPC: 9fc3df00; first exception at PC: bfc0b598 - </verb> - In that case, you'll have to upgrade your machine's PROM to a newer version, - or go back to an older CPU version (usually R4000SC or R4400SC modules - should work). Just to be clear, this is a problem which is unrelated to - Linux, it is only mentioned here because several Linux users have asked - about it.<p> - - <sect2>Why is so much memory reserved on my Indy?<p> - On bootup, the `Memory: ...' message on an Indy says that there is - 128MB of RAM reserved. That is ok. Just like the PC architecture has - a gap in its memory address space between 640KB and 1024KB, the Indy - has a 128MB-sized area in its memory map where the first 128MB of - its memory is mirrored. Linux knows about it and just ignores - that memory, and thus this message.<p> - - <sect1>Milo<p> - - Milo is the boot loader used to boot the little endian MIPS systems with ARC - firmware, currently the Jazz family and the SNI RM 200. While Milo uses - the same name and has a similar purpose to the Alpha version of Milo, these - two Milos have nothing else in common. They were developed by different - people, don't share any code, and work on different hardware platforms. The - fact that both have the same name is just a kind of historic ``accident''.<p> - - The need for Milo has been eliminated for all ARC platforms except the RM200C - due to it's unusual firmware behavior. On all other platforms an ECOFF or - often on more modern firmware also an ELF kernel can be started directly - without the need for Milo or an equivalent. On the RM200C Milo 0.27.1 is - still required to boot the kernel.<p> - - <sect2>Building Milo<p> - - The building procedure of Milo is described, in detail, in the README files - in the Milo package. Since Milo has some dependencies to kernel header - files which have changed over time, Milo often cannot be built easily. - However, the Milo distribution includes binaries for both Milo and Pandora. - Building Milo is not trivial; unless you want to modify Milo yourself the - urgent recommendation is to use the binaries shipping in the Milo - tarball.<p> - - <sect2>Pandora<p> - - Pandora is a simple debugger which was primarily developed in order to - analyze undocumented systems. Pandora includes a disassembler, memory dump - functions, and more. If you only want to use Linux, then there is no need - to install Pandora, despite its small size. - - <sect1>Loadable Modules<p> - - Using modules on Linux/MIPS is quite easy. It should work as expected for - people who have used the feature on other Linux systems. If you want to run - a module-based system, then you should have at least kernel version 980919, - and modutils newer than version 2.1.121 installed. Older versions won't - work. - - <sect1>How do I set up a cross-compiler?<p> - <sect2>Available binaries<p> - - The easiest way to setup a cross-compiler is to just download the binaries - from <url url="ftp://ftp.linux-mips.org/pub/linux/mips/crossdev/">. - Serious, over the 8 years of Linux/MIPS history this has been shown to be - biggest problem many users have been facing with Linux/MIPS. - For Linux/i386 hosts and big endian targets, these are the packages: - <verb> - binutils-mips-linux-2.13.2.1-1.i386.rpm - egcs-c++-mips-linux-1.1.2-4.i386.rpm - egcs-g77-mips-linux-1.1.2-4.i386.rpm - egcs-libstdc++-mips-linux-2.9.0-4.i386.rpm - egcs-mips-linux-1.1.2-4.i386.rpm - egcs-objc-mips-linux-1.1.2-4.i386.rpm - </verb> - - And this is the list of packages for little endian targets: - <verb> - binutils-mipsel-linux-2.13.2.1-1.i386.rpm - egcs-c++-mipsel-linux-1.1.2-4.i386.rpm - egcs-g77-mipsel-linux-1.1.2-4.i386.rpm - egcs-libstdc++-mipsel-linux-2.9.0-4.i386.rpm - egcs-mipsel-linux-1.1.2-4.i386.rpm - egcs-objc-mipsel-linux-1.1.2-4.i386.rpm - </verb> - - For 64-bit MIPS kernels, there are only two packages available right now: - <verb> - egcs-mips64-linux-1.1.2-4.i386.rpm - </verb> - and for little endian 64-bit systems: - <verb> - egcs-mips64el-linux-1.1.2-4.i386.rpm - </verb> - - It's not necessary that you install all of these packages as most people can - just omit the C++, Objective C and Fortran 77 compilers. The - Intel binaries have been linked against GNU libc 2.2, so you may have to - install that as well when upgrading. - - <sect2>Recommended compiler versions<p> - <sect3>Binutils<p> - The recommended version is binutils 2.13.2.1. - - <sect3>gcc<p> - For Linux 2.4 kernels before 2003-05-16 the minimum gcc version required is - egcs 1.1.2; later 2.4, 2.5 and 2.6 require gcc 2.95.3 or newer. Using a - too old compiler may result in compiler core dumps or silently misscompiled - kernels. The better code generation of later tools has little impact on - performance of the generated kernel however more recent tools tend to be - dramatically slower at generating code, so some people like the maintainer - of the MIPS port tend to continue using old compilers in spite of their age. - - For compilation of userspace applications and libraries you probably want a - much newer compiler; generally 2.95.3 is considered very stable and at the - same time reasonably fast. Due to the evolution of the C++ language and - ABI C++ users probably may have special constraints in selection of their - compiler version; a very recent compiler such as gcc 3.2 is probably a good - choice. - - Note there is no need to use the same compilers for kernel and userspace - libraries and applications. You only want to use the same compiler version - for all C++ code. - - <sect3>glibc<p> - This document still documents how to build glibc 2.0.6 however this version - is no longer recommended for new projects. Users who are looking into - glibc 2.0.6 due to binary size considerations may want to ucLibc instead. - Installing glibc into a crosscompiler environment is not necessary if you - only want to build compilers. - - <sect3>uClibc<p> - uClibc is a very small libc replacement available at - <url url="http://www.uclibc.org">. The MIPS bits can be found at - <url url="ftp://ftp.realitydiluted.com/linux/MIPS/toolchains">. - - <sect2>Building your own cross-compiler<p> - - First of all, go and download the following source packages: - <itemize> - <item>binutils-2.13.2.1.tar.gz - <item>egcs-1.1.2.tar.gz - <item>glibc-2.0.6.tar.gz - <item>glibc-crypt-2.0.6.tar.gz - <item>glibc-localedata-2.0.6.tar.gz - <item>glibc-linuxthreads-2.0.6.tar.gz - </itemize> - You can obtain these files from your favorite GNU archive or <htmlurl - url="ftp://ftp.linux-mips.org" name="ftp.linux-mips.org">. Furthermore, - you'll need patches. The unbundled patch files aren't always up-to-date and - additional, not MIPS-specific, patches may be required for building. Note - that the unbundled patch files also use a different revision numbering and - it is therefore recommended that you obtain the source and patches from the - RPM packages distributed on <htmlurl url="ftp://ftp.linux-mips.org" - name="ftp.linux-mips.org">. - - Those are the currently recommended versions. Older versions may or may not - be working. If you're trying to use older versions, please don't send bug - reports because we don't care. When installing, please install things in - the order of binutils, egcs, then glibc. Unless you have older versions - already installed, changing the order <sl>will</sl> fail. - - <sect2>Disk space requirements<p> - - For the installation, you'll have to choose a directory where the files will - be installed. I'll refer to that directory below with <prefix>. To avoid - a particular problem, it's best to use the same value for <prefix> as - your native gcc. For example, if your gcc is installed in /usr/bin/gcc, - then choose /usr for <prefix>. You must use the same <prefix> value - for all the packages that you're going to install.<p> During compilation, - you'll need about 31MB disk space for binutils. For installation, you'll - need 7MB disk space on <prefix>'s partition. Building egcs requires - 71MB, and installation 14MB. GNU libc requires 149MB disk space during - compilation, and 33MB for installation. Note, these numbers are just a - guideline and may differ significantly for different processor and operating - system architectures or compiler options. - - <sect2>Byte order<p> - - One of the special features of the MIPS architecture is that all processors - except the R8000 can be configured to run either in big or in little endian - mode. Byte order means the way the processor stores multibyte numbers in - memory. Big endian machines store the byte with the highest value digits at - the lowest address while little endian machines store it at the highest - address. Think of it as writing multi-digit numbers from left to right or - vice versa.<p> In order to setup your cross-compiler correctly, you have to - know the byte order of the cross-compiler target. If you don't already - know, check the section <ref id="hardware-platforms" name="Hardware - Platforms"> for your machine's byte order. - - <sect2>Configuration names<p> - - Many of the packages based on autoconf support many different architectures - and operating systems. In order to differentiate between these many - configurations, names are constructed with <cpu>-<company>-<os>, or - even <cpu>-<company>-<kernel>-<os>. Expressed this way, the - configuration names of Linux/MIPS are: mips-unknown-linux-gnu for big endian - targets, or mipsel-unknown-linux-gnu for little endian targets. These names - are a bit long and are allowed to be abbreviated to mips-linux or - mipsel-linux. You <sl>must</sl> use the same configuration name for all - packages that comprise your cross-compilation environment. Also, while - other names, like mips-sni-linux or mipsel-sni-linux, are legal - configuration names, use mips-linux or mipsel-linux instead. These are the - configuration names known to other packages, like the Linux kernel sources, - and they would otherwise have to be changed for cross-compilation.<p> - - I'll refer to the target configuration name below with <target>. - - <sect2>Installation of GNU Binutils.<p> - - This is the first and simplest part (at least as long as you're trying to - install on any halfway-sane UNIX flavour). Just cd into a directory with - enough free space and do the following: - <verb> - gzip -cd binutils-<version>.tar.gz | tar xf - - cd binutils-<version> - patch -p1 < ../binutils-<version>-mips.patch - ./configure --prefix=<prefix> --target=<target> - make CFLAGS=-O2 - make install - </verb> - - This usually works correctly. However, certain machines using GCC 2.7.x as - compiler are known to dump core. This is a known bug in GCC and can be - fixed by upgrading the host compiler to GCC 2.13.2.1 or better. - - <sect2>Assert.h<p> - - Some people have an old assert.h header file installed, probably leftover - from an old cross-compiler installation. This file may cause autoconf - scripts to fail silently. Assert.h was never necessary and was only - installed because of a bug in older GCC versions. Check to see if the file - <prefix>/<target>/include/assert.h exists in your installation. If - so, just delete the it - it should never have been installed for any version - of the cross-compiler and will cause trouble. - - <sect2>Installing the kernel sources<p> - - Installing the kernel sources is simple. Just place them into some - directory of your choice and configure them. Configuring them is necessary - so that files which are generated by the procedure will be installed. Make - sure you enable CONFIG_CROSSCOMPILE near the end of the configuration - process. The only problem you may run into is that you may need to install - some required GNU programs like bash or have to override the - manufacturer-provided versions of programs by placing the GNU versions - earlier in the PATH variable. Now, go to the directory - <prefix>/<target>/include and create two symbolic links named asm and - linux pointing to include/asm rsp. include/linux within your just installed - and configured kernel sources. These are necessary such that the necessary - header files will be found during the next step. - - <sect2>First installation of egcs<p> - - Now the pain begins. There is a so-called bootstrap problem. In our case, - this means that the installation process of egcs needs an already installed - glibc, but we cannot compile glibc because we don't have a working - cross-compiler yet. Luckily, you'll only have to go through this once when - you install a cross-compiler for the first time. Later, when you already - have glibc installed, things will be much smoother. So now do: - <verb> - gzip -cd egcs-1.1.2.tar.gz | tar xf - - cd egcs-<version> - patch -p1 < ../egcs-1.1.2-mips.patch - ./configure --prefix=<prefix> --with-newlib --target=<target> - make SUBDIRS="libiberty texinfo gcc" ALL_TARGET_MODULES= \ - CONFIGURE_TARGET_MODULES= INSTALL_TARGET_MODULES= LANGUAGES="c" - </verb> - - Note that we deliberately don't build gcov, protoize, unprotoize, and the - libraries. Gcov doesn't make sense in a cross-compiler environment, and - protoize and unprotoize might even overwrite your native programs - this is - a bug in the gcc makefiles. Finally, we cannot build the libraries because - we don't have glibc installed yet. If everything went successfully, install - with: - <verb> - make SUBDIRS="libiberty texinfo gcc" INSTALL_TARGET_MODULES= \ - LANGUAGES="c" install - </verb> - - If you only want the cross-compiler for building the kernel, you're done. - Cross-compiling libc is only required to be able to compile user - applications. - - <sect2>Test what you've done so far<p> - - Just to make sure that what you've done so far is actually working, you may - now try to compile the kernel. Cd to the MIPS kernel's sources and type - ``make clean; make dep; make''. If everything went ok do ``make clean'' - once more to clean the sources. - - <sect2>Installing GNU libc<p> - - <sl>Note: Building glibc 2.0.6 using a compiler newer than egcs 1.0.3a is - not recommended due to binary compatibility problems which may hit certain - software. It's recommended that you either use egcs 1.0.3a or use the files - from a published binary package. Crosscompiling GNU libc is always only the - second best solution as certain parts of it will not be compiled when - crosscompiling. A proper solution will be documented here as soon as it is - available and believed to be stable.</sl> With this warning given, here's - the recipe: - <verb> - gzip -cd glibc-2.0.6.tar.gz | tar xf - - cd glibc-2.0.6 - gzip -cd glibc-crypt-2.0.6.tar.gz | tar xf - - gzip -cd glibc-localedata-2.0.6.tar.gz | tar xf - - gzip -cd glibc-linuxthreads-2.0.6.tar.gz | tar xf - - patch -p1 < ../glibc-2.0.6-mips.patch - mkdir build - cd build - CC=<target>-gcc BUILD_CC=gcc AR=<target>-ar RANLIB=<target>-ranlib \ - ../configure --prefix=/usr --host=<target> \ - --enable-add-ons=crypt,linuxthreads,localedata --enable-profile - make - </verb> - You now have a compiled GNU libc which still needs to be installed. Do - <sl>not</sl> just type make install. That would overwrite your host - system's files with Linux/MIPS-specific files with disastrous effects. - Instead, install GNU libc into some other arbitrary directory <somedir> - from which we'll move the parts we need for cross-compilation into the - actual target directory: - <verb> - make install_root=<somedir> install - </verb> - Now cd into <somedir> and finally install GNU libc manually: - <verb> - cd usr/include - find . -print | cpio -pumd <prefix>/<target>/include - cd ../../lib - find . -print | cpio -pumd <prefix>/<target>/lib - cd ../usr/lib - find . -print | cpio -pumd <prefix>/<target>/lib - </verb> - GNU libc also contains extensive online documentation. Your system might - already have a version of this documentation installed, so if you don't - want to install the info pages, which will save you a less than a - megabyte, or already have them installed, skip the next step: - <verb> - cd ../info - gzip -9 *.info* - find . -name \*.info\* -print | cpio -pumd <prefix>/info - </verb> - If you're not bootstrapping, your installation is now finished. - - <sect2>Building egcs again<p> - - The first attempt of building egcs was stopped by lack of a GNU libc. Since - we now have libc installed we can rebuild egcs but this time as complete as - a cross-compiler installation can be: - <verb> - gzip -cd egcs-<version>.tar.gz | tar xf - - cd egcs-<version> - patch -p1 < ../egcs-1.1.2-mips.patch - ./configure --prefix=<prefix> --target=<target> - make LANGUAGES="c c++ objective-c f77" - </verb> - As you can see, the procedure is the same as the first time, with the - exception that we dropped the --with-newlib option. This option was - necessary to avoid the libgcc build breaking due to the lack of libc. Now - install with: - <verb> - make LANGUAGES="c c++ objective-c f77" install - </verb> - You're almost finished. If you think you don't need the Objective C or - F77 compilers, you can omit them from above commands. Each will save you - about 3MB. Do not build gcov, protoize, or unprotoize. - - <sect2>Should I build the C++, Objective C or F77 compilers?<p> - - The answer to this question largely depends on your use of your - cross-compiler environment. If you only intend to rebuild the Linux kernel, - then you have no need for the full blown setup and can safely omit the - Objective C and F77 compilers. You must, however, build the C++ - compiler, because building the libraries included with the egcs distribution - requires C++. - - <sect2>Known problem when cross-compiling<p> - <sect3>IRIX crashes<p> - - Origin 200 running IRIX 6.5.1 may crash when running ``make depend'' - on the Linux kernel sources. IRIX 6.5 on Indy and IRIX 6.5.4 on - Origin 200 are known to work. - - <sect3>Resource limits on System V based hosts<p> - - Typical System V-based Unices, like IRIX or Solaris, have limits for - the maximum number of arguments to be passed to a child process which may - be exceeded when cross-compiling some software like the Linux kernel or GNU - libc. For IRIX systems, the maximum length of the argument list defaults - to 20KB, while Linux defaults to at least 128KB. This size can be modified - by the command ``systune ncargs 131072'' as root. - - <sect2>GDB<p> - - Building GDB as cross-debugger is only of interest to kernel developers. For - them, GDB may be a life saver. Such a remote debugging setup always consists - of two parts: the remote debugger GDB running on one machine, and the target - machine running the Linux/MIPS kernel being debugged. The machines are - typically interconnected with a serial line. The target machine's kernel - needs to be equipped with a ``debugging stub'' which communicates with the - GDB host machine using the remote serial protocol.<p> - - Depending on the target's architecture, you may have to implement the - debugging stub yourself. In general, you'll only have to write very simple - routines for the serial line. The task is further simplified by the fact - that most machines are using similar serial hardware, typically based on the - 8250, 16450 or derivatives.<p> - - <!-- Write something about building GDB --> - - <sect1>Compiling the kernel<p> - <sect2>Choosing a processor type<p> - <sect3>R2000, R3000 family<p> - - For these processors just select the R3000 option. A kernel built for this - option will not run on any other processors than R2000 and R3000 family - members.<p> - - <sect3>R4000, R5000 family<p> - - With the exception of the Nevada family these processors are all fully - compatible with rescpect to the kernel. Choose the option which matches - your processor best for optimal performance.<p> - - <sect3>R6000<p> - - Linux currently doesn't support the R6000 so this paragraph is entirely - theoretical. The R6000 has it's own, rather unique if not odd cache and - MMU architecture; it also requires alot of workarounds as it's a quite - broken piece of silicon. Therefore a R6000 kernel will not work on any - other processor nor will a kernel for another processor work on the - R6000.<p> - - <sect3>Nevada<p> - - The Nevada nickname stands for the QED 5230, 5231, R5260, R5261, R5270 etc. - family of CPUs. It enables the use of additional instructions which are - not supported on other processors therefore you only should choose this - opition if you indeed have one of these processors. If you're not sure - configure for R4x00 or R5000 (see above) which will result in a kernel - which will run on Navada family processors too but not use certain - optimizations specific to these processors.<p> - - <sect3>SB1<p> - - Choose this option only for the Sibyte SB1 processor. A kernel built for - this processor will not work on any other processor type nor vice versa. - - <sect3>R10000<p> - - Choose this option if you want to run Linux on a R10000, R12000 or R14000 - system. A kernel built with this option will not work on R4000 or R5000 - family processors. - - <sect3>MIPS32<p> - - Choose this option if you want to run Linux on a member of the MIPS32 - family.<p> - - <sect2>Compatible options<p> - - The kernel configuration process doesn't make a too strong attempt at making - wrong configuration impossible. So for example an SGI Indy may never have a - framebuffer, yet it's possible to enable it which later on will result in a - compile error. This situation will improve in the future when CML2 will be - the standard kernel configuration language; for 2.2 and 2.4 you still will - have to care of your steps yourself. - - <sect2>Crosscompilation<p> - The kernel has been carefully developped to ensure crosscompilation on a - non-MIPS system is possible. Once you've managed to get around the cliff of - setting up a crosscompiler crosscompiling is easy. To do so you have two - options. First you can pass CROSS_COMPILE=<target>- (note the trailing - dash) as an additional argument to your make invocations where you choose - one of mips-linux, mipsel-linux, mips64-linux or mips64el-linux depending if - your target is big or little endian, 32-bit or 64-bit.<p> - An alternate and probably easier way is setting the CONFIG_CROSSCOMPILE - configuration option. The kernel will then automatically choose the right - value for CROSS_COMPILE which will keep make command lines a bit simpler. - - <sect2>32-bit vs. 64-bit<p> - - By default the Linux/MIPS kernel source tree is configured to build a 32-bit - target. If you want to build a 64-bit 2.4.x kernel you'll have pass the - additional ARCH=mips64 argument to all you make invocations. In 2.6.x - this has become a normal config option. - -<sect>Documentation<p> - <label id=documentation> - <sect1>Getting this information as a single document<p> - - You can download this document in various formats: - <itemize> - <item>The HTML version - <url url="http://howto.linux-mips.org/mips-howto.html"> - <item>The text version - <url url="http://howto.linux-mips.org/mips-howto.txt"> - <item>The Postscript version - <url url="http://howto.linux-mips.org/mips-howto.ps"> - <item>The Linux-Doc SGML version. - <url url="http://howto.linux-mips.org/mips-howto.sgml"> - </itemize> - - This FAQ is also available as SGML source code via anonymous CVS from - ftp.linux-mips.org. The archive also has a Makefile which will translate it - into various formats. An ASCII version is regularly being posted via - <em>comp.os.linux.answers</em> and the other Linux HOWTO channels. - - Updates for this document should be sent as unified diffs against the - SGML version to <htmlurl url="mailto:ralf@gnu.org" - name="Ralf Bächle (ralf@gnu.org)">. Please don't updates in any - other form as that will make maintenance significantly more difficult. - - <sect1>See MIPS Run<p> - Author Dominic Sweetman, Publisher Morgan Kaufmann, ISBN 1-55860-410-3. - - This is intended as a pretty comprehensive guide to programming MIPS, - wherever it's different from programming any other 32-bit CPU. It's the - first time anyone has tried to write a readable, and comprehensive, - explanation and account of the wide range of MIPS CPUs available. It should - be very helpful for anyone programming MIPS who isn't insulated by someone - else's operating system. Also, the author is a free-unix enthusiast who - subscribes to the Linux/MIPS mailing list! - - John Hennessey, father of the MIPS architecture, was kind enough to write - in the foreword: ``... this book is the best combination of completeness - and readability of any book on the MIPS architecture ...''; - - It includes some context about RISC CPUs, a description of the - architecture and instruction set, including the "co-processor 0" - instructions used for CPU control; sections on caches, exceptions, memory - management, and floating point. There's a detailed assembly language - guide, some stuff about porting, and some fairly heavy-duty software - examples. - - Available from: - - <itemize> - <item><htmlurl - url="http://www.mkp.com/books_catalog/catalog.asp?ISBN=1-55860-410-3" - name="Morgan Kaufmann"> (US) - <item><htmlurl - url="http://www.amazon.com/exec/obidos/ASIN/1558604103/algorithmicsltd" - name="Amazon USA"> - <item><htmlurl - url="http://www.amazon.co.uk/exec/obidos/ASIN/1558604103/algorithmicsltd" - name="Amazon UK"> - </itemize> - - and from good bookshops anywhere. It's 512 pages and costs around - $50 in the US, £34 in the UK. - - I'd be inclined to list two other books too, both from Morgan Kaufmann and - available from www.mkp.com or any good bookshop: - - <sect1>The MIPS Programmer's Handbook<p> - Authors Farquhar and Bunce, Publisher Morgan Kaufmann, - ISBN 1-55860-297-6. - - A readable introduction to the practice of programming MIPS at the low - level, by the author of PMON. Strengths: lots of examples; weakness: - leaves out some big pieces of the architecture (such as memory management, - floating point and advanced caches) because they didn't feature in the LSI - ``embedded'' products this book was meant to partner. - - <sect1>Computer Architecture - A Quantitative Approach<p> - Authors Hennessy & Patterson, Publisher Morgan Kaufmann, - ISBN 1-55860-329-8. - - The bible of modern computer architecture and a must-read if you want - to understand what makes programs run slow or fast. Is it about MIPS? - Well, it's mostly about something very <em>like</em> MIPS... Its sole - defect is its size and weight - but unlike most big books it's worth - every page. - - <sect1>MIPS ABI documentation<p> - - The documentation to be found at <url - url="ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/"> defines many of the - MIPS specific technical standards like calling conventions, ELF properties, - and much more that is being used by Linux/MIPS, including the N32 standard. - - <sect1>The mips.com site<p> - - Under <url url="http://www.mips.com/publications"> there are various PDF - documents and data sheets about individual processors and cores. - - <sect1>The NEC site<p> - - NEC Electronics (<url url="http://www.necel.com"> includes complete manuals - about their VR41xx processors. - - <sect1>techpubs.sgi.com<p> - - While being very SGI centric <url url="http://techpubs.sgi.com"> has a number - of ABI related documents online that also apply to Linux/MIPS. - -<sect>Legal Notices - - <sect1>Copyright<p> - - Except where otherwise specified, the information in this documentation or - website is copyright (c) 1998,1999,2000,2001,2002 Ralf Bächle.<p> - - Permission is granted to copy, distribute and/or modify this document under - the terms of the GNU Free Documentation License, Version 1.1 or any later - version published by the Free Software Foundation; with the Invariant - Sections being Copyright, with no Front-Cover Texts and with no Back-Cover - Texts.<p> - - A copy of the GNU Free Documentation License is available on the World Wide - Web at <url url="http://www.gnu.org/copyleft/fdl.html"> You can also obtain - it by writing to the - <verb> - Free Software Foundation, Inc. - 59 Temple Place - Suite 330 - Boston, MA 02111-1307 - USA - </verb> - <sect1>Software Use<p> - - Any software contained in or linked to by this documentation (the "Software") - is copyrighted work. To use the Software you must comply with the terms of - the Software's license agreement. SOFTWARE IS WARRANTED, IF AT ALL, IN - ACCORDANCE WITH THE TERMS OF THE LICENSE AGREEMENT. EXCEPT AS SET FORTH IN - THE LICENSE AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND - WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT - THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. <sect1>Links to - websites <p> - - This documentation may contain links to websites which are not under our - control. We are not responsible for the content of those sites. The links are - available only as a convenience, and the inclusion of any link to such sites - does not imply endorsement of those sites. - - <sect1>Trademarks <p> - - Linux is a Registered Trademark of Linus Torvalds. <p> - MIPS is a Registered Trademark of MIPS Technologies, Inc. - - <sect1>Disclaimer<p> - - Note that, as provided in the License, the software on this website is - distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND - CONDITIONS DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES - AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - PARTICULAR PURPOSE, AND NON-INFRINGEMENT. <sect1>Limitation of liability<p> - - THE AUTHORS OF THIS WEB SITE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED AS - A RESULT OF USING, MODIFYING, CONTRIBUTING, COPYING, DISTRIBUTING, OR - DOWNLOADING THE MATERIALS ON THIS WEBSITE. IN NO EVENT SHALL WE BE LIABLE FOR - ANY INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGE - (INCLUDING LOSS OF BUSINESS, REVENUE, PROFITS, USE, DATA OR OTHER ECONOMIC - ADVANTAGE) HOWEVER IT ARISES, WHETHER FOR BREACH OR IN TORT, EVEN IF WE HAVE - BEEN PREVIOUSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - YOU HAVE SOLE RESPONSIBILITY FOR ADEQUATE PROTECTION AND BACKUP OF DATA - AND/OR EQUIPMENT USED IN CONNECTION WITH THE WEBSITE AND WILL NOT MAKE A - CLAIM AGAINST THIS WEB SITE OR ITS AUTHORS FOR LOST DATA, RE-RUN TIME, - INACCURATE OUTPUT, WORK DELAYS OR LOST PROFITS RESULTING FROM THE USE OF THE - MATERIALS. YOU AGREE TO HOLD US HARMLESS FROM, AND YOU COVENANT NOT TO SUE US - FOR, ANY CLAIMS BASED ON USING THE WEBSITE. - -</article> diff --git a/LDP/howto/linuxdoc/archived/SCSI-Programming-HOWTO.sgml b/LDP/howto/linuxdoc/archived/SCSI-Programming-HOWTO.sgml deleted file mode 100644 index 727bd1cb..00000000 --- a/LDP/howto/linuxdoc/archived/SCSI-Programming-HOWTO.sgml +++ /dev/null @@ -1,2430 +0,0 @@ -<!doctype linuxdoc system> - -<article> - -<title>The Linux SCSI programming HOWTO -<author>Heiko Eißfeldt <tt/heiko@colossus.escape.de/ -<date>v1.5, 7 May 1996 -<abstract> -This document deals with programming the Linux generic SCSI interface. -<p> -<bf>Archived Document Notice:</bf> This document has been archived by the LDP -because it does not apply to modern Linux systems. It is no longer -being actively maintained. -</p> -</abstract> - -<!-- \catcode`\_=12 --> - -<toc> - -<sect>What's New? - -<p> -Newer kernels have changed the interface a bit. This affects -a section formerly entitled 'rescanning the devices'. Now it is -possible to add/remove SCSI devices on the fly. - -Since kernel 1.3.98 some important header files have been -moved/split (sg.h and scsi.h). - -Some stupid bugs have been replaced by newer ones. - -<sect>Introduction - -<p> -This document is a guide to the installation and programming of the -Linux generic SCSI interface. - -It covers kernel prerequisites, device mappings, and basic interaction -with devices. Some simple C programming examples are included. -General knowledge of the SCSI command set is required; for more -information on the SCSI standard and related information, see the -appendix to this document. - -Note the plain text version of this document lacks cross references -(they show up as ``''). - -<sect>What Is The Generic SCSI Interface? - -<p> -The generic SCSI interface has been implemented to provide general -SCSI access to (possibly exotic) pieces of SCSI hardware. It was -developed by Lawrence Foard (<tt> entropy@world.std.com</tt>) and -sponsored by Killy Corporation (see the comments in <tt> -scsi/sg.h</tt>). - -The interface makes special device handling possible from user level -applications (i.e. outside the kernel). Thus, kernel driver -development, which is more risky and difficult to debug, is not -necessary. - -However, if you don't program the driver properly it is possible to -hang the SCSI bus, the driver, or the kernel. Therefore, it is -important to properly program the generic driver and to first back up -all files to avoid losing data. Another useful thing to do before -running your programs is to issue a <tt>sync</tt> command to ensure that -any buffers are flushed to disk, minimizing data loss if the system -hangs. - -Another advantage of the generic driver is that as long as the -interface itself does not change, all applications are independent of -new kernel development. In comparison, other low-level kernel drivers -have to be synchronized with other internal kernel changes. - -Typically, the generic driver is used to communicate with new SCSI -hardware devices that require special user applications to be written -to take advantage of their features (e.g. scanners, printers, CD-ROM -jukeboxes). The generic interface allows these to be written quickly. - -<sect>What Are The Requirements To Use It? - -<p> -<sect1>Kernel Configuration - -<p> -You must have a supported SCSI controller, obviously. Furthermore, -your kernel must have controller support as well as generic support -compiled in. Configuring the Linux kernel (via <tt/make config/ under -/usr/src/linux) typically looks like the following: - -<tscreen><verb> - ... -* -* SCSI support -* -SCSI support? (CONFIG_SCSI) [n] y -* -* SCSI support type (disk, tape, CDrom) -* - ... -Scsi generic support (CONFIG_CHR_DEV_SG) [n] y -* -* SCSI low-level drivers -* - ... -</verb></tscreen> - -If available, modules can of course be build instead. - -<sect1>Device Files - -<p> -The generic SCSI driver uses its own device files, separate from those -used by the other SCSI device drivers. They can be generated using -the <tt/MAKEDEV/ script, typically found in the <tt>/dev</tt> -directory. Running <tt/MAKEDEV sg/ produces these files: - -<tscreen><verb> -crw------- 1 root system 21, 0 Aug 20 20:09 /dev/sga -crw------- 1 root system 21, 1 Aug 20 20:09 /dev/sgb -crw------- 1 root system 21, 2 Aug 20 20:09 /dev/sgc -crw------- 1 root system 21, 3 Aug 20 20:09 /dev/sgd -crw------- 1 root system 21, 4 Aug 20 20:09 /dev/sge -crw------- 1 root system 21, 5 Aug 20 20:09 /dev/sgf -crw------- 1 root system 21, 6 Aug 20 20:09 /dev/sgg -crw------- 1 root system 21, 7 Aug 20 20:09 /dev/sgh - | | - major, minor device numbers -</verb></tscreen> - -Note that these are character devices for raw access. On some systems -these devices may be called <tt>/dev/{sg0,sg1,...}</tt>, depending on your -installation, so adjust the following examples accordingly. - -<sect1>Device Mapping - -<p> -These device files are dynamically mapped to SCSI id/LUNs on your SCSI -bus (LUN = logical unit). The mapping allocates devices consecutively -for each LUN of each device on each SCSI bus found at time of the SCSI -scan, beginning at the lower LUNs/ids/buses. It starts with the first SCSI -controller and continues without interruption with all following -controllers. This is currently done in the initialisation of the SCSI -driver. - -For example, assuming you had three SCSI devices hooked up with ids 1, -3, and 5 on the first SCSI bus (each having one LUN), then the -following mapping would be in effect: - -<tscreen><verb> -/dev/sga -> SCSI id 1 -/dev/sgb -> SCSI id 3 -/dev/sgc -> SCSI id 5 -</verb></tscreen> - -If you now add a new device with id 4, then the mapping (after the -next rescan) will be: - -<tscreen><verb> -/dev/sga -> SCSI id 1 -/dev/sgb -> SCSI id 3 -/dev/sgc -> SCSI id 4 -/dev/sgd -> SCSI id 5 -</verb></tscreen> - -Notice the change for id 5 -- the corresponding device is no longer -mapped to <tt>/dev/sgc</tt> but is now under <tt>/dev/sgd</tt>. - -Luckily newer kernels allow for changing this order. - -<sect2> Dynamically insert and remove SCSI devices - -<p> -If a newer kernel and the <tt>/proc</tt> file system is running, -a non-busy device can be removed and installed 'on the fly'. - -To remove a SCSI device: -<tscreen><verb> -echo "scsi remove-single-device a b c d" > /proc/scsi/scsi -</verb></tscreen> - -and similar, to add a SCSI device, do -<tscreen><verb> -echo "scsi add-single-device a b c d" > /proc/scsi/scsi -</verb></tscreen> - -where -<tscreen><verb> - a == hostadapter id (first one being 0) - b == SCSI channel on hostadapter (first one being 0) - c == ID - d == LUN (first one being 0) -</verb></tscreen> - -So in order to swap the <tt>/dev/sgc</tt> and <tt>/dev/sgd</tt> mappings from -the previous example, we could do - -<tscreen><verb> -echo "scsi remove-single-device 0 0 4 0" > /proc/scsi/scsi -echo "scsi remove-single-device 0 0 5 0" > /proc/scsi/scsi -echo "scsi add-single-device 0 0 5 0" > /proc/scsi/scsi -echo "scsi add-single-device 0 0 4 0" > /proc/scsi/scsi -</verb></tscreen> - -since generic devices are mapped in the order of their insertion. - -When adding more devices to the scsi bus keep in mind there are -limited spare entries for new devices. The memory has been allocated -at boot time and has room for 2 more devices. - -<sect>Programmers Guide <!-- FIXME: I don't want a section number here --> - -<p> -The following sections are for programmers who want to use the generic -SCSI interface in their own applications. An example will be given -showing how to access a SCSI device with the INQUIRY and the -TESTUNITREADY commands. - - -When using these code examples, note the following: -<itemize> -<item>the location of the header files <tt>sg.h</tt> and <tt>scsi.h</tt> has -changed in kernel version 1.3.98. Now these files are located at -<tt>/usr/src/linux/include/scsi</tt>, which is hopefully linked to -<tt>/usr/include/scsi</tt>. Previously they were in -<tt>/usr/src/linux/drivers/scsi</tt>. We assume a newer kernel in the following text. -<item>the generic SCSI interface was extended in kernel version 1.1.68; the -examples require at least this version. But please avoid kernel version -1.1.77 up to 1.1.89 and 1.3.52 upto 1.3.56 since they had a broken generic -scsi interface. -<item>the constant DEVICE in the header section describing the accessed -device should be set according to your available devices (see -section <ref id="sec-header">. -</itemize> - -<sect>Overview Of Device Programming - -<p> -The header file <tt>include/scsi/sg.h</tt> -contains a description of the interface (this is based on kernel -version 1.3.98): - -<tscreen><verb> -struct sg_header - { - int pack_len; - /* length of incoming packet (including header) */ - int reply_len; /* maximum length of expected reply */ - int pack_id; /* id number of packet */ - int result; /* 0==ok, otherwise refer to errno codes */ - unsigned int twelve_byte:1; - /* Force 12 byte command length for group 6 &ero 7 commands */ - unsigned int other_flags:31; /* for future use */ - unsigned char sense_buffer[16]; /* used only by reads */ - /* command follows then data for command */ - }; -</verb></tscreen> - - -This structure describes how a SCSI command is to be processed and has -room to hold the results of the execution of the command. The -individual structure components will be discussed later in -section <ref id="sec-header">. - -The general way of exchanging data with the generic driver is as -follows: to send a command to an opened generic device, <tt/write()/ a -block containing these three parts to it: - - - -<tscreen><verb> -struct sg_header -SCSI command -data to be sent with the command -</verb></tscreen> - - -To obtain the result of a command, <tt/read()/ a block with this -(similar) block structure: - -<tscreen><verb> -struct sg_header -data coming from the device -</verb></tscreen> - - -This is a general overview of the process. The following sections -describe each of the steps in more detail. - -NOTE: Up to recent kernel versions, it is necessary to block the -SIGINT signal between the <tt/write()/ and the corresponding -<tt/read()/ call (i.e. via <tt/sigprocmask()/). A return after the -<tt/write()/ part without any <tt/read()/ to fetch the results -will block on subsequent accesses. This signal blocking has not -yet been included in the example code. So better do not issue -SIGINT (a la ^C) when running these examples. - -<sect>Opening The Device - -<p> -A generic device has to be opened for read and write access: - -<tscreen><verb> - int fd = open (device_name, O_RDWR); -</verb></tscreen> - -(This is the case even for a read-only hardware device such as a cdrom -drive). - -We have to perform a <tt/write/ to send the command and a <tt/read/ -to get back any results. In the case of an error the return code is -negative (see section <ref id="sec-errorhandling"> for a complete list). - -<sect>The Header Structure - -<p> - -<label id="sec-header"> -The header structure <tt/struct sg_header/ serves as a controlling -layer between the application and the kernel driver. -We now discuss its components in detail. - - -<descrip> -<tag/int pack_len/ defines the size of the block written to the driver. -This is defined within the kernel for internal use. -<tag/int reply_len/ defines the size of the block to be accepted at reply. -This is defined from the application side. - -<tag/int pack_id/ This field helps to assign replies to requests. The application -can supply a unique id for each request. Suppose you have written several -commands (say 4) to one device. They may work in -parallel, one being the fastest. When getting replies via 4 reads, the replies -do not have to have the order of the requests. To identify the correct reply -for a given request one can use the <tt/pack_id/ field. Typically its value -is incremented after each request (and wraps eventually). The maximum -amount of outstanding requests is limited by the kernel to SG_MAX_QUEUE (eg 4). - -<tag/int result/ the result code of a <tt/read/ or <tt/write/ call. -This is (sometimes) defined from the generic driver (kernel) side. -It is safe to set it to null before the <tt>write</tt> call. -These codes are defined in <tt/errno.h/ (0 meaning no error). - -<tag/unsigned int twelve_byte:1/ This field is necessary only when -using non-standard vendor specific commands (in the range 0xc0 - 0xff). -When these commands have a command length of 12 bytes instead of 10, -this field has to be set to one before the write call. Other command -lengths are not supported. This is defined from the application side. - -<tag/unsigned char sense_buffer[16]/ This buffer is set after a -command is completed (after a <tt/read()/ call) and contains the -SCSI sense code. Some command results have to be read from here (e.g. for -<tt/TESTUNITREADY/). Usually it contains just zero bytes. -The value in this field is set by the generic driver (kernel) side. -</descrip> - - - -The following example function interfaces directly with the generic -kernel driver. It defines the header structure, sends the command via -<tt/write/, gets the result via <tt/read/ and does some (limited) -error checking. The sense buffer data is available in the output -buffer (unless a NULL pointer has been given, in which case it's in -the input buffer). We will use it in the examples which follow. - -Note: Set the value of <tt/DEVICE/ to your device descriptor. - - -<tscreen><verb> -#define DEVICE "/dev/sgc" - -/* Example program to demonstrate the generic SCSI interface */ -#include <stdio.h> -#include <unistd.h> -#include <string.h> -#include <fcntl.h> -#include <errno.h> -#include <scsi/sg.h> - - -#define SCSI_OFF sizeof(struct sg_header) -static unsigned char cmd[SCSI_OFF + 18]; /* SCSI command buffer */ -int fd; /* SCSI device/file descriptor */ - -/* process a complete SCSI cmd. Use the generic SCSI interface. */ -static int handle_SCSI_cmd(unsigned cmd_len, /* command length */ - unsigned in_size, /* input data size */ - unsigned char *i_buff, /* input buffer */ - unsigned out_size, /* output data size */ - unsigned char *o_buff /* output buffer */ - ) -{ - int status = 0; - struct sg_header *sg_hd; - - /* safety checks */ - if (!cmd_len) return -1; /* need a cmd_len != 0 */ - if (!i_buff) return -1; /* need an input buffer != NULL */ -#ifdef SG_BIG_BUFF - if (SCSI_OFF + cmd_len + in_size > SG_BIG_BUFF) return -1; - if (SCSI_OFF + out_size > SG_BIG_BUFF) return -1; -#else - if (SCSI_OFF + cmd_len + in_size > 4096) return -1; - if (SCSI_OFF + out_size > 4096) return -1; -#endif - - if (!o_buff) out_size = 0; /* no output buffer, no output size */ - - /* generic SCSI device header construction */ - sg_hd = (struct sg_header *) i_buff; - sg_hd->reply_len = SCSI_OFF + out_size; - sg_hd->twelve_byte = cmd_len == 12; - sg_hd->result = 0; -#if 0 - sg_hd->pack_len = SCSI_OFF + cmd_len + in_size; /* not necessary */ - sg_hd->pack_id; /* not used */ - sg_hd->other_flags; /* not used */ -#endif - - /* send command */ - status = write( fd, i_buff, SCSI_OFF + cmd_len + in_size ); - if ( status < 0 || status != SCSI_OFF + cmd_len + in_size || - sg_hd->result ) { - /* some error happened */ - fprintf( stderr, "write(generic) result = 0x%x cmd = 0x%x\n", - sg_hd->result, i_buff[SCSI_OFF] ); - perror(""); - return status; - } - - if (!o_buff) o_buff = i_buff; /* buffer pointer check */ - - /* retrieve result */ - status = read( fd, o_buff, SCSI_OFF + out_size); - if ( status < 0 || status != SCSI_OFF + out_size || sg_hd->result ) { - /* some error happened */ - fprintf( stderr, "read(generic) status = 0x%x, result = 0x%x, " - "cmd = 0x%x\n", - status, sg_hd->result, o_buff[SCSI_OFF] ); - fprintf( stderr, "read(generic) sense " - "%x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n", - sg_hd->sense_buffer[0], sg_hd->sense_buffer[1], - sg_hd->sense_buffer[2], sg_hd->sense_buffer[3], - sg_hd->sense_buffer[4], sg_hd->sense_buffer[5], - sg_hd->sense_buffer[6], sg_hd->sense_buffer[7], - sg_hd->sense_buffer[8], sg_hd->sense_buffer[9], - sg_hd->sense_buffer[10], sg_hd->sense_buffer[11], - sg_hd->sense_buffer[12], sg_hd->sense_buffer[13], - sg_hd->sense_buffer[14], sg_hd->sense_buffer[15]); - if (status < 0) - perror(""); - } - /* Look if we got what we expected to get */ - if (status == SCSI_OFF + out_size) status = 0; /* got them all */ - - return status; /* 0 means no error */ -} -</verb></tscreen> - -While this may look somewhat complex at first appearance, most of the -code is for error checking and reporting (which is useful even after -the code is working). - -<tt/Handle_SCSI_cmd/ has a generalized form for all SCSI commands -types, falling into each of these categories: - - -<tscreen><verb> - Data Mode | Example Command -=============================================== -neither input nor output data | test unit ready - no input data, output data | inquiry, read - input data, no output data | mode select, write - input data, output data | mode sense -</verb></tscreen> - - -<sect>Inquiry Command Example - -<p> -One of the most basic SCSI commands is the <tt/INQUIRY/ command, used -to identify the type and make of the device. Here is the definition -from the SCSI-2 specification (for details refer to the SCSI-2 -standard). - -<tscreen><verb> - Table 44: INQUIRY Command -+=====-========-========-========-========-========-========-========-========+ -| Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | -|Byte | | | | | | | | | -|=====+=======================================================================| -| 0 | Operation Code (12h) | -|-----+-----------------------------------------------------------------------| -| 1 | Logical Unit Number | Reserved | EVPD | -|-----+-----------------------------------------------------------------------| -| 2 | Page Code | -|-----+-----------------------------------------------------------------------| -| 3 | Reserved | -|-----+-----------------------------------------------------------------------| -| 4 | Allocation Length | -|-----+-----------------------------------------------------------------------| -| 5 | Control | -+=============================================================================+ -</verb></tscreen> - -The output data are as follows: -<tscreen><verb> - Table 45: Standard INQUIRY Data Format -+=====-========-========-========-========-========-========-========-========+ -| Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | -|Byte | | | | | | | | | -|=====+==========================+============================================| -| 0 | Peripheral Qualifier | Peripheral Device Type | -|-----+-----------------------------------------------------------------------| -| 1 | RMB | Device-Type Modifier | -|-----+-----------------------------------------------------------------------| -| 2 | ISO Version | ECMA Version | ANSI-Approved Version | -|-----+-----------------+-----------------------------------------------------| -| 3 | AENC | TrmIOP | Reserved | Response Data Format | -|-----+-----------------------------------------------------------------------| -| 4 | Additional Length (n-4) | -|-----+-----------------------------------------------------------------------| -| 5 | Reserved | -|-----+-----------------------------------------------------------------------| -| 6 | Reserved | -|-----+-----------------------------------------------------------------------| -| 7 | RelAdr | WBus32 | WBus16 | Sync | Linked |Reserved| CmdQue | SftRe | -|-----+-----------------------------------------------------------------------| -| 8 | (MSB) | -|- - -+--- Vendor Identification ---| -| 15 | (LSB) | -|-----+-----------------------------------------------------------------------| -| 16 | (MSB) | -|- - -+--- Product Identification ---| -| 31 | (LSB) | -|-----+-----------------------------------------------------------------------| -| 32 | (MSB) | -|- - -+--- Product Revision Level ---| -| 35 | (LSB) | -|-----+-----------------------------------------------------------------------| -| 36 | | -|- - -+--- Vendor Specific ---| -| 55 | | -|-----+-----------------------------------------------------------------------| -| 56 | | -|- - -+--- Reserved ---| -| 95 | | -|=====+=======================================================================| -| | Vendor-Specific Parameters | -|=====+=======================================================================| -| 96 | | -|- - -+--- Vendor Specific ---| -| n | | -+=============================================================================+ -</verb></tscreen> - - -The next example uses the low-level function <tt/handle_SCSI_cmd/ to -perform the Inquiry SCSI command. - -We first append the command block to the generic header, then call -<tt/handle_SCSI_cmd/. Note that the output buffer size argument for -the <tt/handle_SCSI_cmd/ call excludes the generic header size. -After command completion the output buffer contains the requested -data, unless an error occurred. - -<tscreen><verb> -#define INQUIRY_CMD 0x12 -#define INQUIRY_CMDLEN 6 -#define INQUIRY_REPLY_LEN 96 -#define INQUIRY_VENDOR 8 /* Offset in reply data to vendor name */ - -/* request vendor brand and model */ -static unsigned char *Inquiry ( void ) -{ - unsigned char Inqbuffer[ SCSI_OFF + INQUIRY_REPLY_LEN ]; - unsigned char cmdblk [ INQUIRY_CMDLEN ] = - { INQUIRY_CMD, /* command */ - 0, /* lun/reserved */ - 0, /* page code */ - 0, /* reserved */ - INQUIRY_REPLY_LEN, /* allocation length */ - 0 };/* reserved/flag/link */ - - memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) ); - - /* - * +------------------+ - * | struct sg_header | <- cmd - * +------------------+ - * | copy of cmdblk | <- cmd + SCSI_OFF - * +------------------+ - */ - - if (handle_SCSI_cmd(sizeof(cmdblk), 0, cmd, - sizeof(Inqbuffer) - SCSI_OFF, Inqbuffer )) { - fprintf( stderr, "Inquiry failed\n" ); - exit(2); - } - return (Inqbuffer + SCSI_OFF); -} -</verb></tscreen> - -The example above follows this structure. The Inquiry function copies -its command block behind the generic header (given by -<tt/SCSI_OFF/). Input data is not present for this command. -<tt/Handle_SCSI_cmd/ will define the header structure. We can now -implement the function <tt/main/ to complete this working example -program. - -<tscreen><verb> -void main( void ) -{ - fd = open(DEVICE, O_RDWR); - if (fd < 0) { - fprintf( stderr, "Need read/write permissions for "DEVICE".\n" ); - exit(1); - } - - /* print some fields of the Inquiry result */ - printf( "%s\n", Inquiry() + INQUIRY_VENDOR ); -} -</verb></tscreen> - -We first open the device, check for errors, and then call the higher -level subroutine. Then we print the results in human readable format -including the vendor, product, and revision. - -Note: There is more information in the Inquiry result than this little -program gives. You may want to extend the program to give device type, -ANSI version etc. The device type is of special importance, since it -determines the mandatory and optional command sets for this device. -If you don't want to program it yourself, you may want to use the -scsiinfo program from Eric Youngdale, which requests nearly all -information about an SCSI device. Look at tsx-11.mit.edu in -pub/Linux/ALPHA/scsi. - -<sect>The Sense Buffer - -<p> -<label id="sec-sensebuff"> -Commands with no output data can give status information via the sense -buffer (which is part of the header structure). Sense data is -available when the previous command has terminated with a CHECK -CONDITION status. In this case the kernel automatically retrieves the -sense data via a REQUEST SENSE command. Its structure is: - - -<tscreen><verb> -+=====-========-========-========-========-========-========-========-========+ -| Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | -|Byte | | | | | | | | | -|=====+========+==============================================================| -| 0 | Valid | Error Code (70h or 71h) | -|-----+-----------------------------------------------------------------------| -| 1 | Segment Number | -|-----+-----------------------------------------------------------------------| -| 2 |Filemark| EOM | ILI |Reserved| Sense Key | -|-----+-----------------------------------------------------------------------| -| 3 | (MSB) | -|- - -+--- Information ---| -| 6 | (LSB) | -|-----+-----------------------------------------------------------------------| -| 7 | Additional Sense Length (n-7) | -|-----+-----------------------------------------------------------------------| -| 8 | (MSB) | -|- - -+--- Command-Specific Information ---| -| 11 | (LSB) | -|-----+-----------------------------------------------------------------------| -| 12 | Additional Sense Code | -|-----+-----------------------------------------------------------------------| -| 13 | Additional Sense Code Qualifier | -|-----+-----------------------------------------------------------------------| -| 14 | Field Replaceable Unit Code | -|-----+-----------------------------------------------------------------------| -| 15 | SKSV | | -|- - -+------------ Sense-Key Specific ---| -| 17 | | -|-----+-----------------------------------------------------------------------| -| 18 | | -|- - -+--- Additional Sense Bytes ---| -| n | | -+=============================================================================+ -</verb></tscreen> - - -Note: The most useful fields are Sense Key (see section <ref id="sec-sensekeys">), -Additional Sense Code and Additional Sense Code Qualifier (see -section <ref id="sec-sensecodes">). The latter two are used combined as a pair. - - - -<sect>Example Using Sense Buffer - -<p> -Here we will use the TEST UNIT READY command to check whether media is -loaded into our device. The header declarations and function -<tt/handle_SCSI_cmd/ from the inquiry example will be needed as well. - - -<tscreen><verb> - Table 73: TEST UNIT READY Command -+=====-========-========-========-========-========-========-========-========+ -| Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | -|Byte | | | | | | | | | -|=====+=======================================================================| -| 0 | Operation Code (00h) | -|-----+-----------------------------------------------------------------------| -| 1 | Logical Unit Number | Reserved | -|-----+-----------------------------------------------------------------------| -| 2 | Reserved | -|-----+-----------------------------------------------------------------------| -| 3 | Reserved | -|-----+-----------------------------------------------------------------------| -| 4 | Reserved | -|-----+-----------------------------------------------------------------------| -| 5 | Control | -+=============================================================================+ -</verb></tscreen> - - - -Here is the function which implements it: - -<tscreen><verb> -#define TESTUNITREADY_CMD 0 -#define TESTUNITREADY_CMDLEN 6 - -#define ADD_SENSECODE 12 -#define ADD_SC_QUALIFIER 13 -#define NO_MEDIA_SC 0x3a -#define NO_MEDIA_SCQ 0x00 - -int TestForMedium ( void ) -{ - /* request READY status */ - static unsigned char cmdblk [TESTUNITREADY_CMDLEN] = { - TESTUNITREADY_CMD, /* command */ - 0, /* lun/reserved */ - 0, /* reserved */ - 0, /* reserved */ - 0, /* reserved */ - 0};/* control */ - - memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) ); - - /* - * +------------------+ - * | struct sg_header | <- cmd - * +------------------+ - * | copy of cmdblk | <- cmd + SCSI_OFF - * +------------------+ - */ - - if (handle_SCSI_cmd(sizeof(cmdblk), 0, cmd, - 0, NULL)) { - fprintf (stderr, "Test unit ready failed\n"); - exit(2); - } - - return - *(((struct sg_header*)cmd)->sense_buffer +ADD_SENSECODE) != - NO_MEDIA_SC || - *(((struct sg_header*)cmd)->sense_buffer +ADD_SC_QUALIFIER) != - NO_MEDIA_SCQ; -} -</verb></tscreen> - -Combined with this <tt/main/ function we can do the check. - -<tscreen><verb> -void main( void ) -{ - fd = open(DEVICE, O_RDWR); - if (fd < 0) { - fprintf( stderr, "Need read/write permissions for "DEVICE".\n" ); - exit(1); - } - - /* look if medium is loaded */ - - if (!TestForMedium()) { - printf("device is unloaded\n"); - } else { - printf("device is loaded\n"); - } -} -</verb></tscreen> - - -The file <tt/generic_demo.c/ from the appendix contains both examples. - -<sect>Ioctl Functions - -<p> -<label id="sec-ioctl"> -There are two ioctl functions available: -<itemize> -<item> <tt/ioctl(fd, SG_SET_TIMEOUT, &Timeout);/ sets the timeout value to -<tt/Timeout/ * 10 milliseconds. <tt/Timeout/ has to be declared as int. -<item> <tt/ioctl(fd, SG_GET_TIMEOUT, &Timeout);/ gets the current timeout value. -<tt/Timeout/ has to be declared as int. -</itemize> - -<sect>Driver Defaults - -<p> -<label id="sec-Defaults"> -<sect1>Transfer Lengths - -<p> -<label id="sec-length"> -Currently (at least up to kernel version 1.1.68) input and output -sizes have to be less than or equal than 4096 bytes unless the kernel -has been compiled with <tt/SG_BIG_BUFF/ defined, if which case it is -limited to <tt/SG_BIG_BUFF/ (e.g. 32768) bytes. These sizes include -the generic header as well as the command block on input. -<tt/SG_BIG_BUFF/ can be safely increased upto (131072 - 512). To take -advantage of this, a new kernel has to be compiled and booted, of course. - -<sect1>Timeout And Retry Values - -<p> -The default timeout value is set to one minute (<tt/Timeout/ = 6000). -It can be changed through an ioctl call (see section <ref id="sec-ioctl">). -The default number of retries is one. - -<sect>Obtaining The Scsi Specifications - -<p> -There are standards entitled SCSI-1 and SCSI-2 (and possibly soon -SCSI-3). The standards are mostly upward compatible. - -The SCSI-1 standard is (in the author's opinion) mostly obsolete, and -SCSI-2 is the most widely used. SCSI-3 is very new and very -expensive. These standardized command sets specify mandatory and -optional commands for SCSI manufacturers and should be preferred over -the vendor specific command extensions which are not standardized and -for which programming information is seldom available. Of course -sometimes there is no alternative to these extensions. - - -Electronic copies of the latest drafts are available via anonymous ftp from: -<itemize> -<item>ftp.cs.tulane.edu:pub/scsi -<item>ftp.symbios.com:/pub/standards -<item>ftp.cs.uni-sb.de:/pub/misc/doc/scsi -</itemize> - -(I got my SCSI specification from the Yggdrasil Linux CD-ROM in the -directory /usr/doc/scsi-2 and /usr/doc/scsi-1). - -The SCSI FAQ also lists the following sources of printed -information: - - The SCSI specification: Available from: - -<tscreen><verb> - Global Engineering Documents - 15 Inverness Way East - Englewood Co 80112-5704 - (800) 854-7179 - SCSI-1: X3.131-1986 - SCSI-2: X3.131-199x - SCSI-3 X3T9.2/91-010R4 Working Draft - -(Global Engineering Documentation in Irvine, CA (714)261-1455??) - -SCSI-1: Doc \# X3.131-1986 from ANSI, 1430 Broadway, NY, NY 10018 - -IN-DEPTH EXPLORATION OF SCSI can be obtained from -Solution Technology, Attn: SCSI Publications, POB 104, Boulder Creek, -CA 95006, (408)338-4285, FAX (408)338-4374 - -THE SCSI ENCYLOPEDIA and the SCSI BENCH REFERENCE can be obtained from -ENDL Publishing, 14426 Black Walnut Ct., Saratoga, CA 95090, -(408)867-6642, FAX (408)867-2115 - -SCSI: UNDERSTANDING THE SMALL COMPUTER SYSTEM INTERFACE was published -by Prentice-Hall, ISBN 0-13-796855-8 -</verb></tscreen> - -<sect>Related Information Sources - -<p> -<sect1>HOWTOs and FAQs - -<p> -The Linux <bf/SCSI-HOWTO/ by Drew Eckhardt covers all supported SCSI -controllers as well as device specific questions. A lot of -troubleshooting hints are given. It is available from sunsite.unc.edu -in /pub/Linux/docs/LDP and its mirror sites. - -General questions about SCSI are answered in the <bf/SCSI-FAQ/ from the -newsgroup Comp.Periphs.Scsi (available on tsx-11 in -pub/linux/ALPHA/scsi and mirror sites). - -<sect1>Mailing list - -<p> -There is a <bf/mailing list/ for bug reports and questions regarding SCSI -development under Linux. To join, send email to -<tt/majordomo@vger.rutgers.edu/ with the line -<tt/subscribe linux-scsi/ -in the body of the message. Messages should be posted to -<tt/linux-scsi@vger.rutgers.edu/. Help text can be requested by sending -the message line "help" to <tt/majordomo@vger.rutgers.edu/. - -<sect1>Example code - -<p> -<descrip> -<tag>sunsite.unc.edu: apps/graphics/hpscanpbm-0.3a.tar.gz</tag> -This package handles a HP scanjet scanner through the generic interface. -<tag>tsx-11.mit.edu: BETA/cdrom/private/mkisofs/cdwrite-1.3.tar.gz</tag> -The cdwrite package uses the generic interface to write a cd image -to a cd writer. -<tag>sunsite.unc.edu: apps/sound/cds/cdda2wav*.src.tar.gz</tag> -A shameless plug for my own application, which copies audio cd tracks -into wav files. -</descrip> - - -<sect>Other useful stuff - -<p> -Things that may come in handy. I don't have no idea if there are newer -or better versions around. Feedback is welcome. - -<sect1>Device driver writer helpers - -<p> -These documents can be found at the sunsite.unc.edu ftp server and -its mirrors. -<descrip> -<tag>/pub/Linux/docs/kernel/kernel-hackers-guide</tag> -The LDP kernel hackers guide. May be a bit outdated, but covers the -most fundamental things. -<tag>/pub/Linux/docs/kernel/drivers.doc.z</tag> -This document covers writing character drivers. -<tag>/pub/Linux/docs/kernel/tutorial.doc.z</tag> -Tutorial on writing a character device driver with code. -<tag>/pub/Linux/docs/kernel/scsi.paper.tar.gz</tag> -A Latex document describing howto write a SCSI driver. -<tag>/pub/Linux/docs/hardware/DEVICES</tag> -A list of device majors and minors used by Linux. -</descrip> - -<sect1>Utilities - -<p> -<descrip> -<tag>tsx-11.mit.edu: ALPHA/scsi/scsiinfo*.tar.gz</tag> -Program to query a scsi device for operating parameters, -defect lists, etc. An X-based interface is available which requires -you have Tk/Tcl/wish installed. With the X-based interface you -can easily alter the settings on the drive. -<tag>tsx-11.mit.edu: ALPHA/kdebug</tag> -A gdb extension for kernel debugging. -</descrip> - - - -<sect>Other SCSI Access Interfaces - -<p> -In Linux there is also another SCSI access method via -SCSI_IOCTL_SEND_COMMAND ioctl calls, which is deprecated. -Special tools like 'scsiinfo' utilize it. - - -There are some other similar interfaces in use in the un*x world, but -not available for Linux: -<enum> -<item>CAM (Common Access Method) developed by Future Domain and other -SCSI vendors. Linux has little support for a SCSI CAM system yet -(mainly for booting from hard disk). -CAM even supports target mode, so one could disguise ones computer -as a peripheral hardware device (e.g. for a small SCSI net). -<item>ASPI (Advanced SCSI Programming Interface) developed by Adaptec. -This is the de facto standard for MS-DOS machines. -<!-- FIXME find out more about the following interfaces -<item> ??? is available under NeXTStep. -<item> DSLIB is available under Silicon Graphics. -<item> SCSI... is available under SUN machines. -<item> SCO Unix has something too. -<item> HPUX uses ioctls ---> -</enum> - -There are other application interfaces from SCO(TM), NeXT(TM), Silicon -Graphics(TM) and SUN(TM) as well. - -<sect>Final Comments - -<p> -The generic SCSI interface bridges the gap between user applications -and specific devices. But rather than bloating a lot of programs with -similar sets of low-level functions, it would be more desirable to -have a shared library with a generalized set of low-level functions -for a particular purpose. The main goal should be to have independent -layers of interfaces. A good design would separate an application -into low-level and hardware independent routines. The low-level -routines could be put into a shared library and made available for all -applications. Here, standardized interfaces should be followed as much -as possible before making new ones. - -By now you should know more than I do about the Linux generic SCSI -interface. So you can start developing powerful applications -for the benefit of the global Linux community now... - -<sect>Acknowledgments - -<p> -Special thanks go to Jeff Tranter for proofreading and enhancing the -text considerably as well as to Carlos Puchol for useful comments. -Drew Eckhardt's and Eric Youngdale's help on my first (dumb) questions -about the use of this interface has been appreciated. - -<appendix> -<sect>Appendix - -<p> -<sect>Error handling - -<p> -<label id="sec-errorhandling"> -The functions <tt/open/, <tt/ioctl/, <tt/write/ and <tt/read/ -can report errors. In this case their return value is -1 and the -global variable errno is set to the error number. -The errno values are defined in <tt>/usr/include/errno.h</tt>. -Possible values are: - -<tscreen><verb> -Function | Error | Description -=========|==============|============================================= -open | ENXIO | not a valid device - | EACCES | access mode is not read/write (O_RDWR) - | EBUSY | device was requested for nonblocking access, - | | but is busy now. - | ERESTARTSYS | this indicates an internal error. Try to - | | make it reproducible and inform the SCSI - | | channel (for details on bug reporting - | | see Drew Eckhardts SCSI-HOWTO). -ioctl | ENXIO | not a valid device -read | EAGAIN | the device would block. Try again later. - | ERESTARTSYS | this indicates an internal error. Try to - | | make it reproducible and inform the SCSI - | | channel (for details on bug reporting - | | see Drew Eckhardts SCSI-HOWTO). -write | EIO | the length is too small (smaller than the - | | generic header struct). Caution: Currently - | | there is no overlength checking. - | EAGAIN | the device would block. Try again later. - | ENOMEM | memory required for this request could not be - | | allocated. Try later again unless you - | | exceeded the maximum transfer size (see above) -select | | none -close | | none -</verb></tscreen> - - -For read/write positive return values indicate as usual the amount of -bytes that have been successfully transferred. This should equal the -amount you requested. - -<sect1>Error status decoding - -<p> -<label id="sec-stat-decoding"> -Furthermore a detailed reporting is done via the kernels <tt/hd_status/ -and the devices <tt/sense_buffer/ (see section <ref id="sec-sensebuff">) -both from the generic header structure. - -The meaning of <tt/hd_status/ can be found in <tt>drivers/scsi/scsi.h</tt>: -This <tt/unsigned int/ is composed out of different parts: - - -<tscreen><verb> - lsb | ... | ... | msb -=======|===========|===========|============ -status | sense key | host code | driver byte -</verb></tscreen> - - -These macros from <tt>drivers/scsi/scsi.h</tt> are available, but -unfortunately cannot be easily used due to weird header file -interdependencies. This has to be cleaned. - -<tscreen><verb> - Macro | Description -=======================|================================================= -status_byte(hd_status) | The SCSI device status. See section Status codes -msg_byte(hd_status) | From the device. See section SCSI sense keys -host_byte(hd_status) | From the kernel. See section Hostcodes -driver_byte(hd_status) | From the kernel. See section midlevel codes -</verb></tscreen> - - - -<sect1>Status codes - -<p> -<label id="sec-statuscodes"> - -The following status codes from the SCSI device -(defined in <tt>scsi/scsi.h</tt>) -are available. - -<tscreen><verb> -Value | Symbol -======|===================== -0x00 | GOOD -0x01 | CHECK_CONDITION -0x02 | CONDITION_GOOD -0x04 | BUSY -0x08 | INTERMEDIATE_GOOD -0x0a | INTERMEDIATE_C_GOOD -0x0c | RESERVATION_CONFLICT -</verb></tscreen> - - -Note that these symbol values have been <bf/shifted right once/. -When the status is CHECK_CONDITION, the sense data in the sense -buffer is valid (check especially the additional sense code -and additional sense code qualifier). - -These values carry the meaning from the SCSI-2 specification: -<tscreen><verb> - - Table 27: Status Byte Code -+=================================-==============================+ -| Bits of Status Byte | Status | -| 7 6 5 4 3 2 1 0 | | -|---------------------------------+------------------------------| -| R R 0 0 0 0 0 R | GOOD | -| R R 0 0 0 0 1 R | CHECK CONDITION | -| R R 0 0 0 1 0 R | CONDITION MET | -| R R 0 0 1 0 0 R | BUSY | -| R R 0 1 0 0 0 R | INTERMEDIATE | -| R R 0 1 0 1 0 R | INTERMEDIATE-CONDITION MET | -| R R 0 1 1 0 0 R | RESERVATION CONFLICT | -| R R 1 0 0 0 1 R | COMMAND TERMINATED | -| R R 1 0 1 0 0 R | QUEUE FULL | -| | | -| All Other Codes | Reserved | -|----------------------------------------------------------------| -| Key: R = Reserved bit | -+================================================================+ - -A definition of the status byte codes is given below. - -GOOD. This status indicates that the target has successfully completed the -command. - -CHECK CONDITION. This status indicates that a contingent allegiance condition -has occurred (see 6.6). - -CONDITION MET. This status or INTERMEDIATE-CONDITION MET is returned whenever -the requested operation is satisfied (see the SEARCH DATA and PRE-FETCH -commands). - -BUSY. This status indicates that the target is busy. This status shall be -returned whenever a target is unable to accept a command from an otherwise -acceptable initiator (i.e., no reservation conflicts). The recommended -initiator recovery action is to issue the command again at a later time. - -INTERMEDIATE. This status or INTERMEDIATE-CONDITION MET shall be returned for -every successfully completed command in a series of linked commands (except -the last command), unless the command is terminated with CHECK CONDITION, -RESERVATION CONFLICT, or COMMAND TERMINATED status. If INTERMEDIATE or -INTERMEDIATE-CONDITION MET status is not returned, the series of linked -commands is terminated and the I/O process is ended. - -INTERMEDIATE-CONDITION MET. This status is the combination of the CONDITION -MET and INTERMEDIATE statuses. - -RESERVATION CONFLICT. This status shall be returned whenever an initiator -attempts to access a logical unit or an extent within a logical unit that is -reserved with a conflicting reservation type for another SCSI device (see the -RESERVE and RESERVE UNIT commands). The recommended initiator recovery action -is to issue the command again at a later time. - -COMMAND TERMINATED. This status shall be returned whenever the target -terminates the current I/O process after receiving a TERMINATE I/O PROCESS -message (see 5.6.22). This status also indicates that a contingent allegiance -condition has occurred (see 6.6). - -QUEUE FULL. This status shall be implemented if tagged queuing is -implemented. This status is returned when a SIMPLE QUEUE TAG, ORDERED QUEUE -TAG, or HEAD OF QUEUE TAG message is received and the command queue is full. -The I/O process is not placed in the command queue. -</verb></tscreen> - - -<sect1>SCSI Sense Keys - -<p> -<label id="sec-sensekeys"> -<!-- The sense key from the result should be retrieved with the -macro <tt/msg_byte/ (see section <ref id="sec-stat-decoding">). --> -These kernel symbols (from <tt>scsi/scsi.h</tt>) are predefined: - -<tscreen><verb> -Value | Symbol -======|================ -0x00 | NO_SENSE -0x01 | RECOVERED_ERROR -0x02 | NOT_READY -0x03 | MEDIUM_ERROR -0x04 | HARDWARE_ERROR -0x05 | ILLEGAL_REQUEST -0x06 | UNIT_ATTENTION -0x07 | DATA_PROTECT -0x08 | BLANK_CHECK -0x0a | COPY_ABORTED -0x0b | ABORTED_COMMAND -0x0d | VOLUME_OVERFLOW -0x0e | MISCOMPARE -</verb></tscreen> - - -A verbatim list from the SCSI-2 doc follows (from section 7.2.14.3): - -<tscreen><verb> - Table 69: Sense Key (0h-7h) Descriptions -+========-====================================================================+ -| Sense | Description | -| Key | | -|--------+--------------------------------------------------------------------| -| 0h | NO SENSE. Indicates that there is no specific sense key | -| | information to be reported for the designated logical unit. This | -| | would be the case for a successful command or a command that | -| | received CHECK CONDITION or COMMAND TERMINATED status because one | -| | of the filemark, EOM, or ILI bits is set to one. | -|--------+--------------------------------------------------------------------| -| 1h | RECOVERED ERROR. Indicates that the last command completed | -| | successfully with some recovery action performed by the target. | -| | Details may be determinable by examining the additional sense | -| | bytes and the information field. When multiple recovered errors | -| | occur during one command, the choice of which error to report | -| | (first, last, most severe, etc.) is device specific. | -|--------+--------------------------------------------------------------------| -| 2h | NOT READY. Indicates that the logical unit addressed cannot be | -| | accessed. Operator intervention may be required to correct this | -| | condition. | -|--------+--------------------------------------------------------------------| -| 3h | MEDIUM ERROR. Indicates that the command terminated with a non- | -| | recovered error condition that was probably caused by a flaw in | -| | the medium or an error in the recorded data. This sense key may | -| | also be returned if the target is unable to distinguish between a | -| | flaw in the medium and a specific hardware failure (sense key 4h).| -|--------+--------------------------------------------------------------------| -| 4h | HARDWARE ERROR. Indicates that the target detected a non- | -| | recoverable hardware failure (for example, controller failure, | -| | device failure, parity error, etc.) while performing the command | -| | or during a self test. | -|--------+--------------------------------------------------------------------| -| 5h | ILLEGAL REQUEST. Indicates that there was an illegal parameter in| -| | the command descriptor block or in the additional parameters | -| | supplied as data for some commands (FORMAT UNIT, SEARCH DATA, | -| | etc.). If the target detects an invalid parameter in the command | -| | descriptor block, then it shall terminate the command without | -| | altering the medium. If the target detects an invalid parameter | -| | in the additional parameters supplied as data, then the target may| -| | have already altered the medium. This sense key may also indicate| -| | that an invalid IDENTIFY message was received (5.6.7). | -|--------+--------------------------------------------------------------------| -| 6h | UNIT ATTENTION. Indicates that the removable medium may have been| -| | changed or the target has been reset. See 6.9 for more detailed | -| | information about the unit attention condition. | -|--------+--------------------------------------------------------------------| -| 7h | DATA PROTECT. Indicates that a command that reads or writes the | -| | medium was attempted on a block that is protected from this | -| | operation. The read or write operation is not performed. | -+=============================================================================+ - - Table 70: Sense Key (8h-Fh) Descriptions -+========-====================================================================+ -| Sense | Description | -| Key | | -|--------+--------------------------------------------------------------------| -| 8h | BLANK CHECK. Indicates that a write-once device or a sequential- | -| | access device encountered blank medium or format-defined end-of- | -| | data indication while reading or a write-once device encountered a| -| | non-blank medium while writing. | -|--------+--------------------------------------------------------------------| -| 9h | Vendor Specific. This sense key is available for reporting vendor| -| | specific conditions. | -|--------+--------------------------------------------------------------------| -| Ah | COPY ABORTED. Indicates a COPY, COMPARE, or COPY AND VERIFY | -| | command was aborted due to an error condition on the source | -| | device, the destination device, or both. (See 7.2.3.2 for | -| | additional information about this sense key.) | -|--------+--------------------------------------------------------------------| -| Bh | ABORTED COMMAND. Indicates that the target aborted the command. | -| | The initiator may be able to recover by trying the command again. | -|--------+--------------------------------------------------------------------| -| Ch | EQUAL. Indicates a SEARCH DATA command has satisfied an equal | -| | comparison. | -|--------+--------------------------------------------------------------------| -| Dh | VOLUME OVERFLOW. Indicates that a buffered peripheral device has | -| | reached the end-of-partition and data may remain in the buffer | -| | that has not been written to the medium. A RECOVER BUFFERED DATA | -| | command(s) may be issued to read the unwritten data from the | -| | buffer. | -|--------+--------------------------------------------------------------------| -| Eh | MISCOMPARE. Indicates that the source data did not match the data| -| | read from the medium. | -|--------+--------------------------------------------------------------------| -| Fh | RESERVED. | -+=============================================================================+ -</verb></tscreen> - - -<sect1>Host codes - -<p> -<label id="sec-hostcodes"> -The following host codes are defined in <tt>drivers/scsi/scsi.h</tt>. They -are set by the kernel driver. -<!-- and should be used with the macro -<tt/host_byte/ (see section <ref id="sec-stat-decoding">): --> - -<tscreen><verb> -Value | Symbol | Description -======|================|======================================== -0x00 | DID_OK | No error -0x01 | DID_NO_CONNECT | Couldn't connect before timeout period -0x02 | DID_BUS_BUSY | BUS stayed busy through time out period -0x03 | DID_TIME_OUT | TIMED OUT for other reason -0x04 | DID_BAD_TARGET | BAD target -0x05 | DID_ABORT | Told to abort for some other reason -0x06 | DID_PARITY | Parity error -0x07 | DID_ERROR | internal error -0x08 | DID_RESET | Reset by somebody -0x09 | DID_BAD_INTR | Got an interrupt we weren't expecting -</verb></tscreen> - -<sect1>Driver codes - -<p> -<label id="sec-drivercodes"> -The midlevel driver categorizes the returned status from the lowlevel -driver based on the sense key from the device. It suggests some actions -to be taken such as retry, abort or remap. The routine scsi_done from -scsi.c does a very differentiated handling based on host_byte(), -status_byte(), msg_byte() and the suggestion. It then sets the driver -byte to show what it has done. The driver byte is composed out of two -nibbles: the driver status and the suggestion. Each half is composed -from the below values being 'or'ed together (found in scsi.h). - -<tscreen><verb> -Value | Symbol | Description of Driver status -======|================|======================================== -0x00 | DRIVER_OK | No error -0x01 | DRIVER_BUSY | not used -0x02 | DRIVER_SOFT | not used -0x03 | DRIVER_MEDIA | not used -0x04 | DRIVER_ERROR | internal driver error -0x05 | DRIVER_INVALID | finished (DID_BAD_TARGET or DID_ABORT) -0x06 | DRIVER_TIMEOUT | finished with timeout -0x07 | DRIVER_HARD | finished with fatal error -0x08 | DRIVER_SENSE | had sense information available -</verb></tscreen> - -<tscreen><verb> -Value | Symbol | Description of suggestion -======|================|======================================== -0x10 | SUGGEST_RETRY | retry the SCSI request -0x20 | SUGGEST_ABORT | abort the request -0x30 | SUGGEST_REMAP | remap the block (not yet implemented) -0x40 | SUGGEST_DIE | let the kernel panic -0x80 | SUGGEST_SENSE | get sense information from the device -0xff | SUGGEST_IS_OK | nothing to be done -</verb></tscreen> - -<sect>Additional sense codes and additional sense code qualifiers - -<p> -<label id="sec-sensecodes"> -When the status of the executed SCSI command is CHECK_CONDITION, -sense data is available in the sense buffer. The additional sense -code and additional sense code qualifier are contained in that -buffer. - -From the SCSI-2 specification I include two tables. The first is in -lexical, the second in numerical order. - -<sect1>ASC and ASCQ in lexical order - -<p> -The following table list gives a list of descriptions and device types -they apply to. - -<tscreen><verb> -+=============================================================================+ -| D - DIRECT ACCESS DEVICE | -| .T - SEQUENTIAL ACCESS DEVICE | -| . L - PRINTER DEVICE | -| . P - PROCESSOR DEVICE | -| . .W - WRITE ONCE READ MULTIPLE DEVICE | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 13h 00h D W O ADDRESS MARK NOT FOUND FOR DATA FIELD | -| 12h 00h D W O ADDRESS MARK NOT FOUND FOR ID FIELD | -| 00h 11h R AUDIO PLAY OPERATION IN PROGRESS | -| 00h 12h R AUDIO PLAY OPERATION PAUSED | -| 00h 14h R AUDIO PLAY OPERATION STOPPED DUE TO ERROR | -| 00h 13h R AUDIO PLAY OPERATION SUCCESSFULLY COMPLETED | -| 00h 04h T S BEGINNING-OF-PARTITION/MEDIUM DETECTED | -| 14h 04h T BLOCK SEQUENCE ERROR | -| 30h 02h DT WR O CANNOT READ MEDIUM - INCOMPATIBLE FORMAT | -| 30h 01h DT WR O CANNOT READ MEDIUM - UNKNOWN FORMAT | -| 52h 00h T CARTRIDGE FAULT | -| 3Fh 02h DTLPWRSOMC CHANGED OPERATING DEFINITION | -| 11h 06h WR O CIRC UNRECOVERED ERROR | -| 30h 03h DT CLEANING CARTRIDGE INSTALLED | -| 4Ah 00h DTLPWRSOMC COMMAND PHASE ERROR | -| 2Ch 00h DTLPWRSOMC COMMAND SEQUENCE ERROR | -| 2Fh 00h DTLPWRSOMC COMMANDS CLEARED BY ANOTHER INITIATOR | -| 2Bh 00h DTLPWRSO C COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT | -| 41h 00h D DATA PATH FAILURE (SHOULD USE 40 NN) | -| 4Bh 00h DTLPWRSOMC DATA PHASE ERROR | -| 11h 07h W O DATA RESYCHRONIZATION ERROR | -| 16h 00h D W O DATA SYNCHRONIZATION MARK ERROR | -| 19h 00h D O DEFECT LIST ERROR | -| 19h 03h D O DEFECT LIST ERROR IN GROWN LIST | -| 19h 02h D O DEFECT LIST ERROR IN PRIMARY LIST | -| 19h 01h D O DEFECT LIST NOT AVAILABLE | -| 1Ch 00h D O DEFECT LIST NOT FOUND | -| 32h 01h D W O DEFECT LIST UPDATE FAILURE | -| 40h NNh DTLPWRSOMC DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH) | -| 63h 00h R END OF USER AREA ENCOUNTERED ON THIS TRACK | -| 00h 05h T S END-OF-DATA DETECTED | -| 14h 03h T END-OF-DATA NOT FOUND | -| 00h 02h T S END-OF-PARTITION/MEDIUM DETECTED | -| 51h 00h T O ERASE FAILURE | -| 0Ah 00h DTLPWRSOMC ERROR LOG OVERFLOW | -| 11h 02h DT W SO ERROR TOO LONG TO CORRECT | -| 03h 02h T EXCESSIVE WRITE ERRORS | -| 3Bh 07h L FAILED TO SENSE BOTTOM-OF-FORM | -| 3Bh 06h L FAILED TO SENSE TOP-OF-FORM | -| 00h 01h T FILEMARK DETECTED | -| 14h 02h T FILEMARK OR SETMARK NOT FOUND | -| 09h 02h WR O FOCUS SERVO FAILURE | -| 31h 01h D L O FORMAT COMMAND FAILED | -| 58h 00h O GENERATION DOES NOT EXIST | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 71: (continued) -+=============================================================================+ -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 1Ch 02h D O GROWN DEFECT LIST NOT FOUND | -| 00h 06h DTLPWRSOMC I/O PROCESS TERMINATED | -| 10h 00h D W O ID CRC OR ECC ERROR | -| 22h 00h D ILLEGAL FUNCTION (SHOULD USE 20 00, 24 00, OR 26 00) | -| 64h 00h R ILLEGAL MODE FOR THIS TRACK | -| 28h 01h M IMPORT OR EXPORT ELEMENT ACCESSED | -| 30h 00h DT WR OM INCOMPATIBLE MEDIUM INSTALLED | -| 11h 08h T INCOMPLETE BLOCK READ | -| 48h 00h DTLPWRSOMC INITIATOR DETECTED ERROR MESSAGE RECEIVED | -| 3Fh 03h DTLPWRSOMC INQUIRY DATA HAS CHANGED | -| 44h 00h DTLPWRSOMC INTERNAL TARGET FAILURE | -| 3Dh 00h DTLPWRSOMC INVALID BITS IN IDENTIFY MESSAGE | -| 2Ch 02h S INVALID COMBINATION OF WINDOWS SPECIFIED | -| 20h 00h DTLPWRSOMC INVALID COMMAND OPERATION CODE | -| 21h 01h M INVALID ELEMENT ADDRESS | -| 24h 00h DTLPWRSOMC INVALID FIELD IN CDB | -| 26h 00h DTLPWRSOMC INVALID FIELD IN PARAMETER LIST | -| 49h 00h DTLPWRSOMC INVALID MESSAGE ERROR | -| 11h 05h WR O L-EC UNCORRECTABLE ERROR | -| 60h 00h S LAMP FAILURE | -| 5Bh 02h DTLPWRSOM LOG COUNTER AT MAXIMUM | -| 5Bh 00h DTLPWRSOM LOG EXCEPTION | -| 5Bh 03h DTLPWRSOM LOG LIST CODES EXHAUSTED | -| 2Ah 02h DTL WRSOMC LOG PARAMETERS CHANGED | -| 21h 00h DT WR OM LOGICAL BLOCK ADDRESS OUT OF RANGE | -| 08h 00h DTL WRSOMC LOGICAL UNIT COMMUNICATION FAILURE | -| 08h 02h DTL WRSOMC LOGICAL UNIT COMMUNICATION PARITY ERROR | -| 08h 01h DTL WRSOMC LOGICAL UNIT COMMUNICATION TIME-OUT | -| 4Ch 00h DTLPWRSOMC LOGICAL UNIT FAILED SELF-CONFIGURATION | -| 3Eh 00h DTLPWRSOMC LOGICAL UNIT HAS NOT SELF-CONFIGURED YET | -| 04h 01h DTLPWRSOMC LOGICAL UNIT IS IN PROCESS OF BECOMING READY | -| 04h 00h DTLPWRSOMC LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE | -| 04h 04h DTL O LOGICAL UNIT NOT READY, FORMAT IN PROGRESS | -| 04h 02h DTLPWRSOMC LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED | -| 04h 03h DTLPWRSOMC LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED | -| 25h 00h DTLPWRSOMC LOGICAL UNIT NOT SUPPORTED | -| 15h 01h DTL WRSOM MECHANICAL POSITIONING ERROR | -| 53h 00h DTL WRSOM MEDIA LOAD OR EJECT FAILED | -| 3Bh 0Dh M MEDIUM DESTINATION ELEMENT FULL | -| 31h 00h DT W O MEDIUM FORMAT CORRUPTED | -| 3Ah 00h DTL WRSOM MEDIUM NOT PRESENT | -| 53h 02h DT WR OM MEDIUM REMOVAL PREVENTED | -| 3Bh 0Eh M MEDIUM SOURCE ELEMENT EMPTY | -| 43h 00h DTLPWRSOMC MESSAGE ERROR | -| 3Fh 01h DTLPWRSOMC MICROCODE HAS BEEN CHANGED | -| 1Dh 00h D W O MISCOMPARE DURING VERIFY OPERATION | -| 11h 0Ah DT O MISCORRECTED ERROR | -| 2Ah 01h DTL WRSOMC MODE PARAMETERS CHANGED | -| 07h 00h DTL WRSOM MULTIPLE PERIPHERAL DEVICES SELECTED | -| 11h 03h DT W SO MULTIPLE READ ERRORS | -| 00h 00h DTLPWRSOMC NO ADDITIONAL SENSE INFORMATION | -| 00h 15h R NO CURRENT AUDIO STATUS TO RETURN | -| 32h 00h D W O NO DEFECT SPARE LOCATION AVAILABLE | -| 11h 09h T NO GAP FOUND | -| 01h 00h D W O NO INDEX/SECTOR SIGNAL | -| 06h 00h D WR OM NO REFERENCE POSITION FOUND | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 71: (continued) -+=============================================================================+ -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 02h 00h D WR OM NO SEEK COMPLETE | -| 03h 01h T NO WRITE CURRENT | -| 28h 00h DTLPWRSOMC NOT READY TO READY TRANSITION, MEDIUM MAY HAVE CHANGED| -| 5Ah 01h DT WR OM OPERATOR MEDIUM REMOVAL REQUEST | -| 5Ah 00h DTLPWRSOM OPERATOR REQUEST OR STATE CHANGE INPUT (UNSPECIFIED) | -| 5Ah 03h DT W O OPERATOR SELECTED WRITE PERMIT | -| 5Ah 02h DT W O OPERATOR SELECTED WRITE PROTECT | -| 61h 02h S OUT OF FOCUS | -| 4Eh 00h DTLPWRSOMC OVERLAPPED COMMANDS ATTEMPTED | -| 2Dh 00h T OVERWRITE ERROR ON UPDATE IN PLACE | -| 3Bh 05h L PAPER JAM | -| 1Ah 00h DTLPWRSOMC PARAMETER LIST LENGTH ERROR | -| 26h 01h DTLPWRSOMC PARAMETER NOT SUPPORTED | -| 26h 02h DTLPWRSOMC PARAMETER VALUE INVALID | -| 2Ah 00h DTL WRSOMC PARAMETERS CHANGED | -| 03h 00h DTL W SO PERIPHERAL DEVICE WRITE FAULT | -| 50h 02h T POSITION ERROR RELATED TO TIMING | -| 3Bh 0Ch S POSITION PAST BEGINNING OF MEDIUM | -| 3Bh 0Bh S POSITION PAST END OF MEDIUM | -| 15h 02h DT WR O POSITIONING ERROR DETECTED BY READ OF MEDIUM | -| 29h 00h DTLPWRSOMC POWER ON, RESET, OR BUS DEVICE RESET OCCURRED | -| 42h 00h D POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN) | -| 1Ch 01h D O PRIMARY DEFECT LIST NOT FOUND | -| 40h 00h D RAM FAILURE (SHOULD USE 40 NN) | -| 15h 00h DTL WRSOM RANDOM POSITIONING ERROR | -| 3Bh 0Ah S READ PAST BEGINNING OF MEDIUM | -| 3Bh 09h S READ PAST END OF MEDIUM | -| 11h 01h DT W SO READ RETRIES EXHAUSTED | -| 14h 01h DT WR O RECORD NOT FOUND | -| 14h 00h DTL WRSO RECORDED ENTITY NOT FOUND | -| 18h 02h D WR O RECOVERED DATA - DATA AUTO-REALLOCATED | -| 18h 05h D WR O RECOVERED DATA - RECOMMEND REASSIGNMENT | -| 18h 06h D WR O RECOVERED DATA - RECOMMEND REWRITE | -| 17h 05h D WR O RECOVERED DATA USING PREVIOUS SECTOR ID | -| 18h 03h R RECOVERED DATA WITH CIRC | -| 18h 01h D WR O RECOVERED DATA WITH ERROR CORRECTION &ero RETRIES APPLIED| -| 18h 00h DT WR O RECOVERED DATA WITH ERROR CORRECTION APPLIED | -| 18h 04h R RECOVERED DATA WITH L-EC | -| 17h 03h DT WR O RECOVERED DATA WITH NEGATIVE HEAD OFFSET | -| 17h 00h DT WRSO RECOVERED DATA WITH NO ERROR CORRECTION APPLIED | -| 17h 02h DT WR O RECOVERED DATA WITH POSITIVE HEAD OFFSET | -| 17h 01h DT WRSO RECOVERED DATA WITH RETRIES | -| 17h 04h WR O RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED | -| 17h 06h D W O RECOVERED DATA WITHOUT ECC - DATA AUTO-REALLOCATED | -| 17h 07h D W O RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT | -| 17h 08h D W O RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE | -| 1Eh 00h D W O RECOVERED ID WITH ECC CORRECTION | -| 3Bh 08h T REPOSITION ERROR | -| 36h 00h L RIBBON, INK, OR TONER FAILURE | -| 37h 00h DTL WRSOMC ROUNDED PARAMETER | -| 5Ch 00h D O RPL STATUS CHANGE | -| 39h 00h DTL WRSOMC SAVING PARAMETERS NOT SUPPORTED | -| 62h 00h S SCAN HEAD POSITIONING ERROR | -| 47h 00h DTLPWRSOMC SCSI PARITY ERROR | -| 54h 00h P SCSI TO HOST SYSTEM INTERFACE FAILURE | -| 45h 00h DTLPWRSOMC SELECT OR RESELECT FAILURE | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 71: (concluded) -+=============================================================================+ -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 3Bh 00h TL SEQUENTIAL POSITIONING ERROR | -| 00h 03h T SETMARK DETECTED | -| 3Bh 04h L SLEW FAILURE | -| 09h 03h WR O SPINDLE SERVO FAILURE | -| 5Ch 02h D O SPINDLES NOT SYNCHRONIZED | -| 5Ch 01h D O SPINDLES SYNCHRONIZED | -| 1Bh 00h DTLPWRSOMC SYNCHRONOUS DATA TRANSFER ERROR | -| 55h 00h P SYSTEM RESOURCE FAILURE | -| 33h 00h T TAPE LENGTH ERROR | -| 3Bh 03h L TAPE OR ELECTRONIC VERTICAL FORMS UNIT NOT READY | -| 3Bh 01h T TAPE POSITION ERROR AT BEGINNING-OF-MEDIUM | -| 3Bh 02h T TAPE POSITION ERROR AT END-OF-MEDIUM | -| 3Fh 00h DTLPWRSOMC TARGET OPERATING CONDITIONS HAVE CHANGED | -| 5Bh 01h DTLPWRSOM THRESHOLD CONDITION MET | -| 26h 03h DTLPWRSOMC THRESHOLD PARAMETERS NOT SUPPORTED | -| 2Ch 01h S TOO MANY WINDOWS SPECIFIED | -| 09h 00h DT WR O TRACK FOLLOWING ERROR | -| 09h 01h WR O TRACKING SERVO FAILURE | -| 61h 01h S UNABLE TO ACQUIRE VIDEO | -| 57h 00h R UNABLE TO RECOVER TABLE-OF-CONTENTS | -| 53h 01h T UNLOAD TAPE FAILURE | -| 11h 00h DT WRSO UNRECOVERED READ ERROR | -| 11h 04h D W O UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED | -| 11h 0Bh D W O UNRECOVERED READ ERROR - RECOMMEND REASSIGNMENT | -| 11h 0Ch D W O UNRECOVERED READ ERROR - RECOMMEND REWRITE THE DATA | -| 46h 00h DTLPWRSOMC UNSUCCESSFUL SOFT RESET | -| 59h 00h O UPDATED BLOCK READ | -| 61h 00h S VIDEO ACQUISITION ERROR | -| 50h 00h T WRITE APPEND ERROR | -| 50h 01h T WRITE APPEND POSITION ERROR | -| 0Ch 00h T S WRITE ERROR | -| 0Ch 02h D W O WRITE ERROR - AUTO REALLOCATION FAILED | -| 0Ch 01h D W O WRITE ERROR RECOVERED WITH AUTO REALLOCATION | -| 27h 00h DT W O WRITE PROTECTED | -| | -| 80h XXh \ | -| THROUGH > VENDOR SPECIFIC. | -| FFh XX / | -| | -| XXh 80h \ | -| THROUGH > VENDOR SPECIFIC QUALIFICATION OF STANDARD ASC. | -| XXh FFh / | -| ALL CODES NOT SHOWN ARE RESERVED. | -|-----------------------------------------------------------------------------| -</verb></tscreen> - - -<sect1>ASC and ASCQ in numerical order - -<p> -<tscreen><verb> - Table 364: ASC and ASCQ Assignments - -+=============================================================================+ -| D - DIRECT ACCESS DEVICE | -| .T - SEQUENTIAL ACCESS DEVICE | -| . L - PRINTER DEVICE | -| . P - PROCESSOR DEVICE | -| . .W - WRITE ONCE READ MULTIPLE DEVICE | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 00 00 DTLPWRSOMC NO ADDITIONAL SENSE INFORMATION | -| 00 01 T FILEMARK DETECTED | -| 00 02 T S END-OF-PARTITION/MEDIUM DETECTED | -| 00 03 T SETMARK DETECTED | -| 00 04 T S BEGINNING-OF-PARTITION/MEDIUM DETECTED | -| 00 05 T S END-OF-DATA DETECTED | -| 00 06 DTLPWRSOMC I/O PROCESS TERMINATED | -| 00 11 R AUDIO PLAY OPERATION IN PROGRESS | -| 00 12 R AUDIO PLAY OPERATION PAUSED | -| 00 13 R AUDIO PLAY OPERATION SUCCESSFULLY COMPLETED | -| 00 14 R AUDIO PLAY OPERATION STOPPED DUE TO ERROR | -| 00 15 R NO CURRENT AUDIO STATUS TO RETURN | -| 01 00 DW O NO INDEX/SECTOR SIGNAL | -| 02 00 DWR OM NO SEEK COMPLETE | -| 03 00 DTL W SO PERIPHERAL DEVICE WRITE FAULT | -| 03 01 T NO WRITE CURRENT | -| 03 02 T EXCESSIVE WRITE ERRORS | -| 04 00 DTLPWRSOMC LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE | -| 04 01 DTLPWRSOMC LOGICAL UNIT IS IN PROCESS OF BECOMING READY | -| 04 02 DTLPWRSOMC LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED | -| 04 03 DTLPWRSOMC LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED | -| 04 04 DTL O LOGICAL UNIT NOT READY, FORMAT IN PROGRESS | -| 05 00 DTL WRSOMC LOGICAL UNIT DOES NOT RESPOND TO SELECTION | -| 06 00 DWR OM NO REFERENCE POSITION FOUND | -| 07 00 DTL WRSOM MULTIPLE PERIPHERAL DEVICES SELECTED | -| 08 00 DTL WRSOMC LOGICAL UNIT COMMUNICATION FAILURE | -| 08 01 DTL WRSOMC LOGICAL UNIT COMMUNICATION TIME-OUT | -| 08 02 DTL WRSOMC LOGICAL UNIT COMMUNICATION PARITY ERROR | -| 09 00 DT WR O TRACK FOLLOWING ERROR | -| 09 01 WR O TRA CKING SERVO FAILURE | -| 09 02 WR O FOC US SERVO FAILURE | -| 09 03 WR O SPI NDLE SERVO FAILURE | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 364: (continued) -+=============================================================================+ -| D - DIRECT ACCESS DEVICE | -| .T - SEQUENTIAL ACCESS DEVICE | -| . L - PRINTER DEVICE | -| . P - PROCESSOR DEVICE | -| . .W - WRITE ONCE READ MULTIPLE DEVICE | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 0A 00 DTLPWRSOMC ERROR LOG OVERFLOW | -| 0B 00 | -| 0C 00 T S WRITE ERROR | -| 0C 01 D W O WRITE ERROR RECOVERED WITH AUTO REALLOCATION | -| 0C 02 D W O WRITE ERROR - AUTO REALLOCATION FAILED | -| 0D 00 | -| 0E 00 | -| 0F 00 | -| 10 00 D W O ID CRC OR ECC ERROR | -| 11 00 DT WRSO UNRECOVERED READ ERROR | -| 11 01 DT W SO READ RETRIES EXHAUSTED | -| 11 02 DT W SO ERROR TOO LONG TO CORRECT | -| 11 03 DT W SO MULTIPLE READ ERRORS | -| 11 04 D W O UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED | -| 11 05 WR O L-EC UNCORRECTABLE ERROR | -| 11 06 WR O CIRC UNRECOVERED ERROR | -| 11 07 W O DATA RESYCHRONIZATION ERROR | -| 11 08 T INCOMPLETE BLOCK READ | -| 11 09 T NO GAP FOUND | -| 11 0A DT O MISCORRECTED ERROR | -| 11 0B D W O UNRECOVERED READ ERROR - RECOMMEND REASSIGNMENT | -| 11 0C D W O UNRECOVERED READ ERROR - RECOMMEND REWRITE THE DATA | -| 12 00 D W O ADDRESS MARK NOT FOUND FOR ID FIELD | -| 13 00 D W O ADDRESS MARK NOT FOUND FOR DATA FIELD | -| 14 00 DTL WRSO RECORDED ENTITY NOT FOUND | -| 14 01 DT WR O RECORD NOT FOUND | -| 14 02 T FILEMARK OR SETMARK NOT FOUND | -| 14 03 T END-OF-DATA NOT FOUND | -| 14 04 T BLOCK SEQUENCE ERROR | -| 15 00 DTL WRSOM RANDOM POSITIONING ERROR | -| 15 01 DTL WRSOM MECHANICAL POSITIONING ERROR | -| 15 02 DT WR O POSITIONING ERROR DETECTED BY READ OF MEDIUM | -| 16 00 DW O DATA SYNCHRONIZATION MARK ERROR | -| 17 00 DT WRSO RECOVERED DATA WITH NO ERROR CORRECTION APPLIED | -| 17 01 DT WRSO RECOVERED DATA WITH RETRIES | -| 17 02 DT WR O RECOVERED DATA WITH POSITIVE HEAD OFFSET | -| 17 03 DT WR O RECOVERED DATA WITH NEGATIVE HEAD OFFSET | -| 17 04 WR O RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED | -| 17 05 D WR O RECOVERED DATA USING PREVIOUS SECTOR ID | -| 17 06 D W O RECOVERED DATA WITHOUT ECC - DATA AUTO-REALLOCATED | -| 17 07 D W O RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT | -| 17 08 D W O RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE | -| 18 00 DT WR O RECOVERED DATA WITH ERROR CORRECTION APPLIED | -| 18 01 D WR O RECOVERED DATA WITH ERROR CORRECTION &ero RETRIES APPLIED| -| 18 02 D WR O RECOVERED DATA - DATA AUTO-REALLOCATED | -| 18 03 R RECOVERED DATA WITH CIRC | -| 18 04 R RECOVERED DATA WITH LEC | -| 18 05 D WR O RECOVERED DATA - RECOMMEND REASSIGNMENT | -| 18 06 D WR O RECOVERED DATA - RECOMMEND REWRITE | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 364: (continued) -+=============================================================================+ -| D - DIRECT ACCESS DEVICE | -| .T - SEQUENTIAL ACCESS DEVICE | -| . L - PRINTER DEVICE | -| . P - PROCESSOR DEVICE | -| . .W - WRITE ONCE READ MULTIPLE DEVICE | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 19 00 D O DEFECT LIST ERROR | -| 19 01 D O DEFECT LIST NOT AVAILABLE | -| 19 02 D O DEFECT LIST ERROR IN PRIMARY LIST | -| 19 03 D O DEFECT LIST ERROR IN GROWN LIST | -| 1A 00 DTLPWRSOMC PARAMETER LIST LENGTH ERROR | -| 1B 00 DTLPWRSOMC SYNCHRONOUS DATA TRANSFER ERROR | -| 1C 00 D O DEFECT LIST NOT FOUND | -| 1C 01 D O PRIMARY DEFECT LIST NOT FOUND | -| 1C 02 D O GROWN DEFECT LIST NOT FOUND | -| 1D 00 D W O MISCOMPARE DURING VERIFY OPERATION | -| 1E 00 D W O RECOVERED ID WITH ECC | -| 1F 00 | -| 20 00 DTLPWRSOMC INVALID COMMAND OPERATION CODE | -| 21 00 DT WR OM LOGICAL BLOCK ADDRESS OUT OF RANGE | -| 21 01 M INVALID ELEMENT ADDRESS | -| 22 00 D ILLEGAL FUNCTION (SHOULD USE 20 00, 24 00, OR 26 00) | -| 23 00 | -| 24 00 DTLPWRSOMC INVALID FIELD IN CDB | -| 25 00 DTLPWRSOMC LOGICAL UNIT NOT SUPPORTED | -| 26 00 DTLPWRSOMC INVALID FIELD IN PARAMETER LIST | -| 26 01 DTLPWRSOMC PARAMETER NOT SUPPORTED | -| 26 02 DTLPWRSOMC PARAMETER VALUE INVALID | -| 26 03 DTLPWRSOMC THRESHOLD PARAMETERS NOT SUPPORTED | -| 27 00 DT W O WRITE PROTECTED | -| 28 00 DTLPWRSOMC NOT READY TO READY TRANSITION(MEDIUM MAY HAVE CHANGED)| -| 28 01 M IMPORT OR EXPORT ELEMENT ACCESSED | -| 29 00 DTLPWRSOMC POWER ON, RESET, OR BUS DEVICE RESET OCCURRED | -| 2A 00 DTL WRSOMC PARAMETERS CHANGED | -| 2A 01 DTL WRSOMC MODE PARAMETERS CHANGED | -| 2A 02 DTL WRSOMC LOG PARAMETERS CHANGED | -| 2B 00 DTLPWRSO C COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT | -| 2C 00 DTLPWRSOMC COMMAND SEQUENCE ERROR | -| 2C 01 S TOO MANY WINDOWS SPECIFIED | -| 2C 02 S INVALID COMBINATION OF WINDOWS SPECIFIED | -| 2D 00 T OVERWRITE ERROR ON UPDATE IN PLACE | -| 2E 00 | -| 2F 00 DTLPWRSOMC COMMANDS CLEARED BY ANOTHER INITIATOR | -| 30 00 DT WR OM INCOMPATIBLE MEDIUM INSTALLED | -| 30 01 DT WR O CANNOT READ MEDIUM - UNKNOWN FORMAT | -| 30 02 DT WR O CANNOT READ MEDIUM - INCOMPATIBLE FORMAT | -| 30 03 DT CLEANING CARTRIDGE INSTALLED | -| 31 00 DT W O MEDIUM FORMAT CORRUPTED | -| 31 01 D L O FORMAT COMMAND FAILED | -| 32 00 D W O NO DEFECT SPARE LOCATION AVAILABLE | -| 32 01 D W O DEFECT LIST UPDATE FAILURE | -| 33 00 T TAPE LENGTH ERROR | -| 34 00 | -| 35 00 | -| 36 00 L RIBBON, INK, OR TONER FAILURE | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 364: (continued) -+=============================================================================+ -| D - DIRECT ACCESS DEVICE | -| .T - SEQUENTIAL ACCESS DEVICE | -| . L - PRINTER DEVICE | -| . P - PROCESSOR DEVICE | -| . .W - WRITE ONCE READ MULTIPLE DEVICE | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 37 00 DTL WRSOMC ROUNDED PARAMETER | -| 38 00 | -| 39 00 DTL WRSOMC SAVING PARAMETERS NOT SUPPORTED | -| 3A 00 DTL WRSOM MEDIUM NOT PRESENT | -| 3B 00 TL SEQUENTIAL POSITIONING ERROR | -| 3B 01 T TAPE POSITION ERROR AT BEGINNING-OF-MEDIUM | -| 3B 02 T TAPE POSITION ERROR AT END-OF-MEDIUM | -| 3B 03 L TAPE OR ELECTRONIC VERTICAL FORMS UNIT NOT READY | -| 3B 04 L SLEW FAILURE | -| 3B 05 L PAPER JAM | -| 3B 06 L FAILED TO SENSE TOP-OF-FORM | -| 3B 07 L FAILED TO SENSE BOTTOM-OF-FORM | -| 3B 08 T REPOSITION ERROR | -| 3B 09 S READ PAST END OF MEDIUM | -| 3B 0A S READ PAST BEGINNING OF MEDIUM | -| 3B 0B S POSITION PAST END OF MEDIUM | -| 3B 0C S POSITION PAST BEGINNING OF MEDIUM | -| 3B 0D M MEDIUM DESTINATION ELEMENT FULL | -| 3B 0E M MEDIUM SOURCE ELEMENT EMPTY | -| 3C 00 | -| 3D 00 DTLPWRSOMC INVALID BITS IN IDENTIFY MESSAGE | -| 3E 00 DTLPWRSOMC LOGICAL UNIT HAS NOT SELF-CONFIGURED YET | -| 3F 00 DTLPWRSOMC TARGET OPERATING CONDITIONS HAVE CHANGED | -| 3F 01 DTLPWRSOMC MICROCODE HAS BEEN CHANGED | -| 3F 02 DTLPWRSOMC CHANGED OPERATING DEFINITION | -| 3F 03 DTLPWRSOMC INQUIRY DATA HAS CHANGED | -| 40 00 D RAM FAILURE (SHOULD USE 40 NN) | -| 40 NN DTLPWRSOMC DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH) | -| 41 00 D DATA PATH FAILURE (SHOULD USE 40 NN) | -| 42 00 D POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN) | -| 43 00 DTLPWRSOMC MESSAGE ERROR | -| 44 00 DTLPWRSOMC INTERNAL TARGET FAILURE | -| 45 00 DTLPWRSOMC SELECT OR RESELECT FAILURE | -| 46 00 DTLPWRSOMC UNSUCCESSFUL SOFT RESET | -| 47 00 DTLPWRSOMC SCSI PARITY ERROR | -| 48 00 DTLPWRSOMC INITIATOR DETECTED ERROR MESSAGE RECEIVED | -| 49 00 DTLPWRSOMC INVALID MESSAGE ERROR | -| 4A 00 DTLPWRSOMC COMMAND PHASE ERROR | -| 4B 00 DTLPWRSOMC DATA PHASE ERROR | -| 4C 00 DTLPWRSOMC LOGICAL UNIT FAILED SELF-CONFIGURATION | -| 4D 00 | -| 4E 00 DTLPWRSOMC OVERLAPPED COMMANDS ATTEMPTED | -| 4F 00 | -| 50 00 T WRITE APPEND ERROR | -| 50 01 T WRITE APPEND POSITION ERROR | -| 50 02 T POSITION ERROR RELATED TO TIMING | -| 51 00 T O ERASE FAILURE | -| 52 00 T CARTRIDGE FAULT | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 364: (continued) -+=============================================================================+ -| D - DIRECT ACCESS DEVICE | -| .T - SEQUENTIAL ACCESS DEVICE | -| . L - PRINTER DEVICE | -| . P - PROCESSOR DEVICE | -| . .W - WRITE ONCE READ MULTIPLE DEVICE | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 53 00 DTL WRSOM MEDIA LOAD OR EJECT FAILED | -| 53 01 T UNLOAD TAPE FAILURE | -| 53 02 DT WR OM MEDIUM REMOVAL PREVENTED | -| 54 00 P SCSI TO HOST SYSTEM INTERFACE FAILURE | -| 55 00 P SYSTEM RESOURCE FAILURE | -| 56 00 | -| 57 00 R UNABLE TO RECOVER TABLE-OF-CONTENTS | -| 58 00 O GENERATION DOES NOT EXIST | -| 59 00 O UPDATED BLOCK READ | -| 5A 00 DTLPWRSOM OPERATOR REQUEST OR STATE CHANGE INPUT (UNSPECIFIED) | -| 5A 01 DT WR OM OPERATOR MEDIUM REMOVAL REQUEST | -| 5A 02 DT W O OPERATOR SELECTED WRITE PROTECT | -| 5A 03 DT W O OPERATOR SELECTED WRITE PERMIT | -| 5B 00 DTLPWRSOM LOG EXCEPTION | -| 5B 01 DTLPWRSOM THRESHOLD CONDITION MET | -| 5B 02 DTLPWRSOM LOG COUNTER AT MAXIMUM | -| 5B 03 DTLPWRSOM LOG LIST CODES EXHAUSTED | -| 5C 00 D O RPL STATUS CHANGE | -| 5C 01 D O SPINDLES SYNCHRONIZED | -| 5C 02 D O SPINDLES NOT SYNCHRONIZED | -| 5D 00 | -| 5E 00 | -| 5F 00 | -| 60 00 S LAMP FAILURE | -| 61 00 S VIDEO ACQUISITION ERROR | -| 61 01 S UNABLE TO ACQUIRE VIDEO | -| 61 02 S OUT OF FOCUS | -| 62 00 S SCAN HEAD POSITIONING ERROR | -| 63 00 R END OF USER AREA ENCOUNTERED ON THIS TRACK | -| 64 00 R ILLEGAL MODE FOR THIS TRACK | -| 65 00 | -| 66 00 | -| 67 00 | -| 68 00 | -| 69 00 | -| 6A 00 | -| 6B 00 | -| 6C 00 | -| 6D 00 | -| 6E 00 | -| 6F 00 | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 364: (concluded) -+=============================================================================+ -| D - DIRECT ACCESS DEVICE | -| .T - SEQUENTIAL ACCESS DEVICE | -| . L - PRINTER DEVICE | -| . P - PROCESSOR DEVICE | -| . .W - WRITE ONCE READ MULTIPLE DEVICE | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| ASC ASCQ DTLPWRSOMC DESCRIPTION | -| --- ---- ----------------------------------------------------- | -| 70 00 | -| 71 00 | -| 72 00 | -| 73 00 | -| 74 00 | -| 75 00 | -| 76 00 | -| 77 00 | -| 78 00 | -| 79 00 | -| 7A 00 | -| 7B 00 | -| 7C 00 | -| 7D 00 | -| 7E 00 | -| 7F 00 | -| | -| 80 xxh \ | -| THROUGH > VENDOR SPECIFIC. | -| FF xxh / | -| | -| xxh 80 \ | -| THROUGH > VENDOR SPECIFIC QUALIFICATION OF STANDARD ASC. | -| xxh FF / | -| ALL CODES NOT SHOWN OR BLANK ARE RESERVED. | -+=============================================================================+ -</verb></tscreen> - -<sect>A SCSI command code quick reference - -<p> -<tscreen><verb> -Table 365 is a numerical order listing of the command operation codes. - - Table 365: SCSI-2 Operation Codes - -+=============================================================================+ -| D - DIRECT ACCESS DEVICE Device Column Key | -| .T - SEQUENTIAL ACCESS DEVICE M = Mandatory | -| . L - PRINTER DEVICE O = Optional | -| . P - PROCESSOR DEVICE V = Vendor Specific| -| . .W - WRITE ONCE READ MULTIPLE DEVICE R = Reserved | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| OP DTLPWRSOMC Description | -|----------+----------+-------------------------------------------------------| -| 00 MMMMMMMMMM TEST UNIT READY | -| 01 M REWIND | -| 01 O V OO OO REZERO UNIT | -| 02 VVVVVV V | -| 03 MMMMMMMMMM REQUEST SENSE | -| 04 O FORMAT | -| 04 M O FORMAT UNIT | -| 05 VMVVVV V READ BLOCK LIMITS | -| 06 VVVVVV V | -| 07 O INITIALIZE ELEMENT STATUS | -| 07 OVV O OV REASSIGN BLOCKS | -| 08 M GET MESSAGE(06) | -| 08 OMV OO OV READ(06) | -| 08 O RECEIVE | -| 09 VVVVVV V | -| 0A M PRINT | -| 0A M SEND MESSAGE(06) | -| 0A M SEND(06) | -| 0A OM O OV WRITE(06) | -| 0B O OO OV SEEK(06) | -| 0B O SLEW AND PRINT | -| 0C VVVVVV V | -| 0D VVVVVV V | -| 0E VVVVVV V | -| 0F VOVVVV V READ REVERSE | -| 10 O O SYNCHRONIZE BUFFER | -| 10 VM VVV WRITE FILEMARKS | -| 11 VMVVVV SPACE | -| 12 MMMMMMMMMM INQUIRY | -| 13 VOVVVV VERIFY(06) | -| 14 VOOVVV RECOVER BUFFERED DATA | -| 15 OMO OOOOOO MODE SELECT(06) | -| 16 M MM MO RESERVE | -| 16 MM M RESERVE UNIT | -| 17 M MM MO RELEASE | -| 17 MM M RELEASE UNIT | -| 18 OOOOOOOO COPY | -| 19 VMVVVV ERASE | -| 1A OMO OOOOOO MODE SENSE(06) | -| 1B O LOAD UNLOAD | -| 1B O SCAN | -| 1B O STOP PRINT | -| 1B O OO O STOP START UNIT | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 365: (continued) -+=============================================================================+ -| D - DIRECT ACCESS DEVICE Device Column Key | -| .T - SEQUENTIAL ACCESS DEVICE M = Mandatory | -| . L - PRINTER DEVICE O = Optional | -| . P - PROCESSOR DEVICE V = Vendor Specific| -| . .W - WRITE ONCE READ MULTIPLE DEVICE R = Reserved | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| OP DTLPWRSOMC Description | -|----------+----------+-------------------------------------------------------| -| 1C OOOOOOOOOO RECEIVE DIAGNOSTIC RESULTS | -| 1D MMMMMMMMMM SEND DIAGNOSTIC | -| 1E OO OO OO PREVENT ALLOW MEDIUM REMOVAL | -| 1F | -| 20 V VV V | -| 21 V VV V | -| 22 V VV V | -| 23 V VV V | -| 24 V VVM SET WINDOW | -| 25 O GET WINDOW | -| 25 M M M READ CAPACITY | -| 25 M READ CD-ROM CAPACITY | -| 26 V VV | -| 27 V VV | -| 28 O GET MESSAGE(10) | -| 28 M MMMM READ(10) | -| 29 V VV O READ GENERATION | -| 2A O SEND MESSAGE(10) | -| 2A O SEND(10) | -| 2A M M M WRITE(10) | -| 2B O LOCATE | -| 2B O POSITION TO ELEMENT | -| 2B O OO O SEEK(10) | -| 2C V O ERASE(10) | -| 2D V O O READ UPDATED BLOCK | -| 2E O O O WRITE AND VERIFY(10) | -| 2F O OO O VERIFY(10) | -| 30 O OO O SEARCH DATA HIGH(10) | -| 31 O OBJECT POSITION | -| 31 O OO O SEARCH DATA EQUAL(10) | -| 32 O OO O SEARCH DATA LOW(10) | -| 33 O OO O SET LIMITS(10) | -| 34 O GET DATA BUFFER STATUS | -| 34 O OO O PRE-FETCH | -| 34 O READ POSITION | -| 35 O OO O SYNCHRONIZE CACHE | -| 36 O OO O LOCK UNLOCK CACHE | -| 37 O O READ DEFECT DATA(10) | -| 38 O O MEDIUM SCAN | -| 39 OOOOOOOO COMPARE | -| 3A OOOOOOOO COPY AND VERIFY | -| 3B OOOOOOOOOO WRITE BUFFER | -| 3C OOOOOOOOOO READ BUFFER | -| 3D O O UPDATE BLOCK | -| 3E O OO O READ LONG | -| 3F O O O WRITE LONG | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 365: (continued) -+=============================================================================+ -| D - DIRECT ACCESS DEVICE Device Column Key | -| .T - SEQUENTIAL ACCESS DEVICE M = Mandatory | -| . L - PRINTER DEVICE O = Optional | -| . P - PROCESSOR DEVICE V = Vendor Specific| -| . .W - WRITE ONCE READ MULTIPLE DEVICE R = Reserved | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| OP DTLPWRSOMC Description | -|----------+----------+-------------------------------------------------------| -| 40 OOOOOOOOOO CHANGE DEFINITION | -| 41 O WRITE SAME | -| 42 O READ SUB-CHANNEL | -| 43 O READ TOC | -| 44 O READ HEADER | -| 45 O PLAY AUDIO(10) | -| 46 | -| 47 O PLAY AUDIO MSF | -| 48 O PLAY AUDIO TRACK INDEX | -| 49 O PLAY TRACK RELATIVE(10) | -| 4A | -| 4B O PAUSE RESUME | -| 4C OOOOOOOOOO LOG SELECT | -| 4D OOOOOOOOOO LOG SENSE | -| 4E | -| 4F | -| 50 | -| 51 | -| 52 | -| 53 | -| 54 | -| 55 OOO OOOOOO MODE SELECT(10) | -| 56 | -| 57 | -| 58 | -| 59 | -| 5A OOO OOOOOO MODE SENSE(10) | -| 5B | -| 5C | -| 5D | -| 5E | -| 5F | -+=============================================================================+ -</verb></tscreen> - -<tscreen><verb> -Table 365: (concluded) -+=============================================================================+ -| D - DIRECT ACCESS DEVICE Device Column Key | -| .T - SEQUENTIAL ACCESS DEVICE M = Mandatory | -| . L - PRINTER DEVICE O = Optional | -| . P - PROCESSOR DEVICE V = Vendor Specific| -| . .W - WRITE ONCE READ MULTIPLE DEVICE R = Reserved | -| . . R - READ ONLY (CD-ROM) DEVICE | -| . . S - SCANNER DEVICE | -| . . .O - OPTICAL MEMORY DEVICE | -| . . . M - MEDIA CHANGER DEVICE | -| . . . C - COMMUNICATION DEVICE | -| . . . . | -| OP DTLPWRSOMC Description | -|----------+----------+-------------------------------------------------------| -| A0 | -| A1 | -| A2 | -| A3 | -| A4 | -| A5 M MOVE MEDIUM | -| A5 O PLAY AUDIO(12) | -| A6 O EXCHANGE MEDIUM | -| A7 | -| A8 O GET MESSAGE(12) | -| A8 OO O READ(12) | -| A9 O PLAY TRACK RELATIVE(12) | -| AA O SEND MESSAGE(12) | -| AA O O WRITE(12) | -| AB | -| AC O ERASE(12) | -| AD | -| AE O O WRITE AND VERIFY(12) | -| AF OO O VERIFY(12) | -| B0 OO O SEARCH DATA HIGH(12) | -| B1 OO O SEARCH DATA EQUAL(12) | -| B2 OO O SEARCH DATA LOW(12) | -| B3 OO O SET LIMITS(12) | -| B4 | -| B5 | -| B5 O REQUEST VOLUME ELEMENT ADDRESS | -| B6 | -| B6 O SEND VOLUME TAG | -| B7 O READ DEFECT DATA(12) | -| B8 | -| B8 O READ ELEMENT STATUS | -| B9 | -| BA | -| BB | -| BC | -| BD | -| BE | -| BF | -+=============================================================================+ -</verb></tscreen> - -<sect>Example programs - -<p> -Here is the C example program, which requests manufacturer/model and -reports if a medium is loaded in the device. -<tscreen><verb> -#define DEVICE "/dev/sgc" -/* Example program to demonstrate the generic SCSI interface */ -#include <stdio.h> -#include <unistd.h> -#include <string.h> -#include <fcntl.h> -#include <errno.h> -#include <scsi/sg.h> - -#define SCSI_OFF sizeof(struct sg_header) -static unsigned char cmd[SCSI_OFF + 18]; /* SCSI command buffer */ -int fd; /* SCSI device/file descriptor */ - -/* process a complete scsi cmd. Use the generic scsi interface. */ -static int handle_scsi_cmd(unsigned cmd_len, /* command length */ - unsigned in_size, /* input data size */ - unsigned char *i_buff, /* input buffer */ - unsigned out_size, /* output data size */ - unsigned char *o_buff /* output buffer */ - ) -{ - int status = 0; - struct sg_header *sg_hd; - - /* safety checks */ - if (!cmd_len) return -1; /* need a cmd_len != 0 */ - if (!i_buff) return -1; /* need an input buffer != NULL */ -#ifdef SG_BIG_BUFF - if (SCSI_OFF + cmd_len + in_size > SG_BIG_BUFF) return -1; - if (SCSI_OFF + out_size > SG_BIG_BUFF) return -1; -#else - if (SCSI_OFF + cmd_len + in_size > 4096) return -1; - if (SCSI_OFF + out_size > 4096) return -1; -#endif - - if (!o_buff) out_size = 0; - - /* generic scsi device header construction */ - sg_hd = (struct sg_header *) i_buff; - sg_hd->reply_len = SCSI_OFF + out_size; - sg_hd->twelve_byte = cmd_len == 12; - sg_hd->result = 0; -#if 0 - sg_hd->pack_len = SCSI_OFF + cmd_len + in_size; /* not necessary */ - sg_hd->pack_id; /* not used */ - sg_hd->other_flags; /* not used */ -#endif - - /* send command */ - status = write( fd, i_buff, SCSI_OFF + cmd_len + in_size ); - if ( status < 0 || status != SCSI_OFF + cmd_len + in_size || - sg_hd->result ) { - /* some error happened */ - fprintf( stderr, "write(generic) result = 0x%x cmd = 0x%x\n", - sg_hd->result, i_buff[SCSI_OFF] ); - perror(""); - return status; - } - - if (!o_buff) o_buff = i_buff; /* buffer pointer check */ - - /* retrieve result */ - status = read( fd, o_buff, SCSI_OFF + out_size); - if ( status < 0 || status != SCSI_OFF + out_size || sg_hd->result ) { - /* some error happened */ - fprintf( stderr, "read(generic) result = 0x%x cmd = 0x%x\n", - sg_hd->result, o_buff[SCSI_OFF] ); - fprintf( stderr, "read(generic) sense " - "%x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\n", - sg_hd->sense_buffer[0], sg_hd->sense_buffer[1], - sg_hd->sense_buffer[2], sg_hd->sense_buffer[3], - sg_hd->sense_buffer[4], sg_hd->sense_buffer[5], - sg_hd->sense_buffer[6], sg_hd->sense_buffer[7], - sg_hd->sense_buffer[8], sg_hd->sense_buffer[9], - sg_hd->sense_buffer[10], sg_hd->sense_buffer[11], - sg_hd->sense_buffer[12], sg_hd->sense_buffer[13], - sg_hd->sense_buffer[14], sg_hd->sense_buffer[15]); - if (status < 0) - perror(""); - } - /* Look if we got what we expected to get */ - if (status == SCSI_OFF + out_size) status = 0; /* got them all */ - - return status; /* 0 means no error */ -} - -#define INQUIRY_CMD 0x12 -#define INQUIRY_CMDLEN 6 -#define INQUIRY_REPLY_LEN 96 -#define INQUIRY_VENDOR 8 /* Offset in reply data to vendor name */ - -/* request vendor brand and model */ -static unsigned char *Inquiry ( void ) -{ - unsigned char Inqbuffer[ SCSI_OFF + INQUIRY_REPLY_LEN ]; - unsigned char cmdblk [ INQUIRY_CMDLEN ] = - { INQUIRY_CMD, /* command */ - 0, /* lun/reserved */ - 0, /* page code */ - 0, /* reserved */ - INQUIRY_REPLY_LEN, /* allocation length */ - 0 };/* reserved/flag/link */ - - memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) ); - - /* - * +------------------+ - * | struct sg_header | <- cmd - * +------------------+ - * | copy of cmdblk | <- cmd + SCSI_OFF - * +------------------+ - */ - - if (handle_scsi_cmd(sizeof(cmdblk), 0, cmd, - sizeof(Inqbuffer) - SCSI_OFF, Inqbuffer )) { - fprintf( stderr, "Inquiry failed\n" ); - exit(2); - } - return (Inqbuffer + SCSI_OFF); -} - -#define TESTUNITREADY_CMD 0 -#define TESTUNITREADY_CMDLEN 6 - -#define ADD_SENSECODE 12 -#define ADD_SC_QUALIFIER 13 -#define NO_MEDIA_SC 0x3a -#define NO_MEDIA_SCQ 0x00 -int TestForMedium ( void ) -{ - /* request READY status */ - static unsigned char cmdblk [TESTUNITREADY_CMDLEN] = { - TESTUNITREADY_CMD, /* command */ - 0, /* lun/reserved */ - 0, /* reserved */ - 0, /* reserved */ - 0, /* reserved */ - 0};/* reserved */ - - memcpy( cmd + SCSI_OFF, cmdblk, sizeof(cmdblk) ); - - /* - * +------------------+ - * | struct sg_header | <- cmd - * +------------------+ - * | copy of cmdblk | <- cmd + SCSI_OFF - * +------------------+ - */ - - if (handle_scsi_cmd(sizeof(cmdblk), 0, cmd, - 0, NULL)) { - fprintf (stderr, "Test unit ready failed\n"); - exit(2); - } - - return - *(((struct sg_header*)cmd)->sense_buffer +ADD_SENSECODE) != - NO_MEDIA_SC || - *(((struct sg_header*)cmd)->sense_buffer +ADD_SC_QUALIFIER) != - NO_MEDIA_SCQ; -} - -void main( void ) -{ - fd = open(DEVICE, O_RDWR); - if (fd < 0) { - fprintf( stderr, "Need read/write permissions for "DEVICE".\n" ); - exit(1); - } - - /* print some fields of the Inquiry result */ - printf( "%s\n", Inquiry() + INQUIRY_VENDOR ); - - /* look if medium is loaded */ - if (!TestForMedium()) { - printf("device is unloaded\n"); - } else { - printf("device is loaded\n"); - } -} - - -</verb></tscreen> -</article> diff --git a/LDP/howto/linuxdoc/archived/VPN.sgml b/LDP/howto/linuxdoc/archived/VPN.sgml deleted file mode 100644 index a5e07fb2..00000000 --- a/LDP/howto/linuxdoc/archived/VPN.sgml +++ /dev/null @@ -1,360 +0,0 @@ -<!doctype linuxdoc system> - -<article> - -<title>The VPN HOWTO -<author>Arpad Magosanyi <mag@bunuel.tii.matav.hu> v0.2,7 Aug1997 -<date>v0.3, 2001-12-01 - -<p> -<bf>Archived Document Notice:</bf> This document has been archived by the LDP -because it does not apply to modern Linux systems. It is no longer -being actively maintained. -</p> - -<sect>Changes -<p> - -The 'no controlling tty problem' -> -o 'BatchMode yes' by Zot O'Connor <zot@crl.com> - -warning about kernel 2.0.30 by mag -<sect>Blurb -<p> - -This is the Linux VPN howto, a collection of information on how to set up a Virtual Protected Network in Linux (and other unices in general). -<sect1>Copyright -<p> - -This document is part of the Linux Documentation Project. The copyright notice is the following: -<p> -The VPN mini HOWTO written by me can be copied, -distributed, and/or modified under the terms of the GNU Free Documentation -License, Version 1.1 or any later version published by the Free Software -Foundation; with the Invariant Section being the section entitled "About -the ppp over ssh vpn technique", with any Front-Cover Text containing the p= -hrase -"Based on the work of Arpad Magosanyi", and with any Back-Cover Text. - -<sect1>Disclaimer -<p> - -As usual: the author not responsible for any damage. For the correct wording, see the relevant part of the GNU GPL 0.1.1 -<sect1>Disclaimer -<p> - -We are dealing with security: you are not safe if you haven't got good security policy, and other rather boring things. -<sect1>Credits -<p> - -Thanks to all of who has written the tools used. - -Thanks to Zot O'Connor <zot@crl.com> for pointing out the "no controlling tty" problem, and it's solution. -<sect1>State of this document -<p> - -This is very preliminary. You should have thorough knowledge of administrating IP, at least some knowledge of firewalls, ppp and ssh. You should know them anyway if you want to set up a VPN. I just decided to write down my experiences not to forget them. There are possibly some security holes indeed. To be fair I've tried it on hosts configured as routers not firewalls, saying: It's simple from that point. -<sect1>Related documentations -<p> -<itemize> -<item>The Linux Firewall-HOWTO /usr/doc/HOWTO/Firewall-HOWTO -<item>The Linux PPP-HOWTO /usr/doc/HOWTO/PPP-HOWTO.gz -<item>The ssh documentations /usr/doc/ssh/* -<item>The Linux Network Admins' Guide -<item>NIST Computer Security Special Publications http://csrc.ncsl.nist.gov/nistpubs/ -<item>Firewall list (majordomo@greatcircle.com) -</itemize> -<sect>Introduction -<p> - -As firewalls are in more and more widely use in internet and intranet security, the ability to do nice VPNs is important. Here are my experiences. Comments are welcome. -<sect1>Naming conventions -<p> - -I will use the terms "master firewall" and "slave firewall", though making a VPN has nothing to do with client-server architecture. I simply refer to them as the active and passive participants of the connection's setup. The host which is starts the setup will be referred as the master, and the passive participant will be the slave. -<sect>Doing it -<p> -<sect1>Planning -<p> - -Before you start to set up your system, you should know the networking details. I assume you have two firewalls protecting one intranet per firewall, and they are both connected to the internet. So now you should have two network interfaces (at least) per firewall. Take a sheet of paper, write down their IP addresses and network mask. You will need one more IP adresses per firewall for the VPN you want to do now. Those addresses should be outside of your existing subnets. I suggest using addresses from the "private" address ranges. They are the followings: -<itemize> -<item>10.0.0.0 - 10.255.255.255 -<item>172.16.0.0 - 172.31.255.255 -<item>192.168.0.0 - 192.168.255.255 -</itemize> - -For the sake of example, here's a sample configuration: The two bastions are called fellini and polanski. They have one interface for the internet (-out), one for the intranet (-in), and one for the vpn (-vpn). The addresses and netmasks: -<itemize> -<item>fellini-out: 193.6.34.12 255.255.255.0 -<item>fellini-in: 193.6.35.12 255.255.255.0 -<item>fellini-vpn: 192.168.0.1 point-to-point -<item>polanski-out: 193.6.36.12 255.255.255.0 -<item>polanski-in: 193.6.37.12 255.255.255.0 -<item>polanski-vpn: 192.168.0.2 point-to-point -</itemize> - -So we have the plan. -<sect1>Gathering the tools -<p> - -You will need a -<itemize> -<item>Linux firewall -<item>kernel -<item>very minimal configuration -<item>ipfwadm -<item>fwtk -<item>Tools for the VPN -<item>ssh -<item>pppd -<item>sudo -<item>pty-redir -</itemize> - -Current versions: -<itemize> -<item>kernel: 2.0.29 Use a stable kernel, and it must be newer than 2.0.20, because the ping'o'death bug. At the time of writing 2.0.30 is the last "stable" kernel, but it has some bugs. If you want to have the fast and cool networking code introduced in it, try a prepatch. the 3rd is working for me nicely. -<item>base system: I prefer Debian. YMMV. You absolutely don't want to use any big packages, and you never even tought of using sendmail, of course. You also definitely don't want to enable telnet, ftp, and the 'r' commands (as usual in case of any other unix hosts). -<item>ipfwadm: I've used 2.3.0 -<item>fwtk: I've used 1.3 -<item>ssh: >= 1.2.20. There are problems with the underlying protocol in the older versions. -<item>pppd: I've used 2.2.0f for the tests, but I'm not sure if is it secure, this is why I turned the setuid bit off, and used sudo to launch it. -<item>sudo: 1.5.2 the newest I am aware of -<item>pty-redir: It is written by me. Try ftp://ftp.vein.hu/ssa/contrib/mag/pty-redir-0.1.tar.gz. Its version number is 0.1 now. Tell me it there is any problem with it. -</itemize> -<sect1>Compile and install -<p> - -Compile or otherwise install the gathered tools. Look at every one's documentation (and the firewall-howto) for details. Now we have the tools. -<sect1>Configure the other subsystems -<p> - -Configure your firewall rules, etc. You need to enable ssh traffic between the two firewll hosts. It means a connection to port 22 on the slave from the master. Start sshd on the slave and verify if you can login. This step is untested, please tell me your results. -<sect1>Set up the accounts for the VPN -<p> - -Create an account on the slave firewall use your favourite tool (e.g. vi, mkdir, chown, chmod) you might create an account on the master also, but I think you want to set up the connection at boot time, so your ordinary root account will do. Can anyone point out risks on using the root account on the master? -<sect1>Generate an ssh key for your master account -<p> - -Use the ssh-keygen program. Set empty password for the private key if you want to do automatic setup of the VPN. -<sect1>Set up automatic ssh login for the slave account -<p> - -Copy the newly generated public key in the slave account under .ssh/authorized_keys, and set up file permissions like the following: -<verb> -drwx------ 2 slave slave 1024 Apr 7 23:49 ./ -drwx------ 4 slave slave 1024 Apr 24 14:05 ../ --rwx------ 1 slave slave 328 Apr 7 03:04 authorized_keys --rw------- 1 slave slave 660 Apr 14 15:23 known_hosts --rw------- 1 slave slave 512 Apr 21 10:03 random_seed -</verb> - -The first row being ˜slave/.ssh, and the second is ˜slave. -<sect1>Tighten ssh security on the bastions. -<p> - -It means the followings on my setup in sshd_conf: -<verb> -PermitRootLogin no -IgnoreRhosts yes -StrictModes yes -QuietMode no -FascistLogging yes -KeepAlive yes -RhostsAuthentication no -RhostsRSAAuthentication no -RSAAuthentication yes -PasswordAuthentication no -PermitEmptyPasswords no -</verb> - -Password authentication is turned off, so login is only possible with authorized keys. (You've turned off telnet and the 'r' commands of course). -<sect1>Enable execution of ppp and route for both accounts. -<p> - -As the master account is the root in my case, it has nothing to do. For the slave account, the following lines appear in /etc/sudoers: -<verb> -Cmnd_Alias VPN=/usr/sbin/pppd,/usr/local/vpn/route -slave ALL=NOPASSWD: VPN -</verb> - -As you can see, I am using some scripts to set up ppp and the routing tables on the slave host. -<sect1>Do the scripting -<p> - -On the master host there is a full-blown init script I am using: -<verb> -#! /bin/sh -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg <miquels@cistron.nl>. -# Modified for Debian GNU/Linux -# by Ian Murdock <imurdock@gnu.ai.mit.edu>. -# -# Version: @(#)skeleton 1.6 11-Nov-1996 miquels@cistron.nl -# - -PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11/: -PPPAPP=/home/slave/ppp -ROUTEAPP=/home/slave/route -PPPD=/usr/sbin/pppd -NAME=VPN -REDIR=/usr/local/bin/pty-redir -SSH=/usr/bin/ssh -MYPPPIP=192.168.0.1 -TARGETIP=192.168.0.2 -TARGETNET=193.6.37.0 -MYNET=193.6.35.0 -SLAVEWALL=polanski-out -SLAVEACC=slave - -test -f $PPPD || exit 0 - -set -e - -case "$1" in - start) - echo setting up vpn - $REDIR $SSH -o 'Batchmode yes' -t -l $SLAVEACC $SLAVEWALL sudo $PPPAPP >/tmp/device - TTYNAME=`cat /tmp/device` -echo tty is $TTYNAME - sleep 10s - if [ ! -z $TTYNAME ] - then - $PPPD $TTYNAME ${MYPPPIP}:${TARGETIP} - else - echo FAILED! - logger "vpn setup failed" - fi - sleep 5s - route add -net $TARGETNET gw $TARGETIP - $SSH -o 'Batchmode yes' -l $SLAVEACC $SLAVEWALL sudo $ROUTEAPP - ;; - stop) - ps -ax | grep "ssh -t -l $SLAVEACC " | grep -v grep | awk '{print $1}' | xargs kill - ;; - *) - # echo "Usage: /etc/init.d/$NAME {start|stop|reload}" - echo "Usage: /etc/init.d/$NAME {start|stop}" - exit 1 - ;; -esac - -exit 0 - -</verb> - -The slave uses one script for routing setup (/usr/local/vpn/route): -<verb> -#!/bin/bash -/sbin/route add -net 193.6.35.0 gw 192.168.0.1 -</verb> - -and its .ppprc consists of the following: -<verb> -passive -</verb> -<sect>Look at what's happening: -<p> - -The master logs in into the slave, starts pppd, and redirects this all thing into a local pty. It consists of the following steps: -<itemize> -<item>allocating a new pty -<item>sshing into the slave -<item>running pppd on the slave -<item>the master runs pppd in this local pty -<item>and sets up the routing table on the client. -</itemize> - -There are (not very tight) timing considerations involved, this is why that 'sleep 10s'. -<sect>Doing it by hand. -<p> -<sect1>Logging in -<p> - -You've already tried if ssh works well, aren't you? If the slave refuses to log you in, read the logs. Perhaps there are problems with file permissions or the sshd setup. -<sect1>Firing up ppp -<p> - -Log in into slave, and issue: -<verb>sudo /usr/sbin/pppd passive - -</verb> - -You should see garbage coming at this point. If it works good, if not, there is some problem either with sudo, either with pppd. Look what the commands had said, and at the logs and at the <em>/etc/ppp/options</em>, and the <em>.ppprc </em>file. If it works, write this 'passive' word into .ppprc, and try again. To get rid off the garbage and continue working, press enter,'˜' and '^Z'. You should have the master's prompt now, and kill %1. See the section about tuning if you want to know more of the escape character. -<sect1>Together the two -<p> - -Well, then -<verb>ssh -l slave polanski sudo /usr/sbin/pppd - -</verb> - -should work also, and deliver the garbage right into your face. -<sect1>Pty redirecting -<p> - -Try to redirect this whole thing this time: -<verb>/usr/local/bin/pty-redir /usr/bin/ssh -l slave polanski sudo /usr/sbin/pppd - -</verb> - -Nice long sentence isn't it? You should use the full path into the ssh executable, as the pty-redir program allows only this form for security reasons. Now you've got a device name from the program. Let's say, you've got <em>/dev/ttyp0 </em> You can use the ps command to look what has happened. Look for 'p0' -<sect1>Is anything on the device? -<p> - -Try -<verb>/usr/sbin/pppd /dev/ttyp0 local 192.168.0.1:192.168.0.2 - -</verb> - -to establish the connection. Look at the output of the ifconfig command to see if the device has established, and use ping to check your virtual net. -<sect1>Setting up the routes -<p> - -Set up the routes on the master host, and on the slave also. Now you should be able to ping one host in one intranet from other host in the other intranet. Set up the additional firewalling rules. Now as you have the VPN, you can set up the rules concerning the connectivity of the two intranets. -<sect>Tuning -<p> -<sect1>Configuration tuning -<p> - -As I said this HOWTO is mainly a quick memo on how I had set up a VPN. There are things in the configuration I didn't experiment yet. These things will go into their place when I try them, or anyone tells me "it works in the following way" The most important thing is that the connection ppp uses is not 8-bit yet. I believe it has something to do either with ssh configuration or the pty setup. In this configuration ssh uses the tilde (˜) character as an escape character. It might stop or slow down the communication, as any newline-tilde sequence causes ssh to give a prompt. Ssh documentation said: <On most systems, setting the escape character to ``none'' will also make the session transparent even if a tty is used.> The corresponding flag to ssh is '<em>-e</em>', and you can also set it in the configuration file. -<sect1>Bandwith vs. cicles -<p> - -Creating anything virtual comes with utilization of real-world resources. A VPN eats up bandwidth and computing resources. The goal would be to get balance between the two. You can tune it with the '-C' switch or the 'CompressionLevel' option. You might try using another cipher, but I don't recommend it. Also note that the round-trip-time can be longer if you use better compression. Any experiments on it are welcome. -<sect>Vulnerability analisis -<p> - -I try to cover here the vulnerability issues arising from this particular setup and VPNs in general. Any comments are warmly welcome. -<itemize> -<item>sudo: Well, I'm excessively using sudo. I believe it's still safer than using setuid bits. It's still a backdraw of Linux that it hasn't got more fine-grained access control. Waiting for POSIX.6 compatibility <http://www.xarius.demon.co.uk/software/posix6/>. What is worse, there are shell scripts which are getting called through sudo. Bad enough. Any idea out there? -<item>pppd: It runs suid root also. It can be configured by user's .ppprc. There might be some nice buffer overruns in it. The bottom line: secure your slave account as tightly as you can. -<item>ssh: Beware that ssh older than 1.2.20 has security holes. What is worse, we made a configuration such when the master account had been compromised, the slave account is also compromised, and wide open to attacks using the two sudoed programs. It is because I've choosen not to have password on the master's secret key to enable automatic setup of the VPN. -<item>firewall: With inproperly set firewall rules on one bastion, you open both of the intranets. I recommend using IP masquerading (as setting up incorrect routes is a bit less trivial), and doing hard control on the VPN interfaces. -</itemize> - - -<sect1>About the ppp over ssh VPN technique -<p> -I developed this technique when there was no usable, standard -VPN for Linux. Now this is no longer the case. -At the time of writing this, you have the following alternatives: -If you want to use standard IPSEC VPN, you can use FreeS/WAN or pipsecd. -For PPTP you can use PoPToP (but be aware that PPTP protocol has -weaknesses). It is also worth to mention CIPE which is a lightweight -alternative for IPSEC. -<p> -This wide range of alternatives means that the ssh/ppp implementation -described in this howto is in the most cases not the best solution. -This is due the fact that this implementation is complex to set up -and has performance problems because of its tcp based nature. -<p> -I believe that the ssh/ppp technique is no longer beneficial for -building a VPN for non-illegal purposes in most cases, so I have -discontinued maintaining this HOWTO. - - -</article>