📄 user_guide.tex
字号:
\documentclass[12pt]{article}\usepackage[headings]{fullpage}\usepackage{url,fancyhdr}\ifx\pdfoutput\undefined\usepackage[dvips]{color}\else\usepackage[pdftex]{color}\fi\usepackage{listings}\pagestyle{fancy}\renewcommand\headrulewidth{0.4pt}\fancyhead{}\fancyhead[R]{\thepage}\fancyhead[L]{\nouppercase{\leftmark}}\renewcommand\footrulewidth{0.4pt}\fancyfoot{}\fancyfoot[R]{\thepage}\fancyfoot[L]{ttylinux 5.0}\footskip=60pt\renewcommand\familydefault{\sfdefault}\definecolor{lightblue}{rgb}{0.80,0.80,1.00}\definecolor{lightgray}{rgb}{0.90,0.90,0.90}\definecolor{darkgray}{rgb}{0.40,0.40,0.40}\lstset{language=ksh}\lstset{backgroundcolor=\color{lightgray}}\lstset{rulesepcolor=\color{darkgray}}\lstset{frame=single,framerule=0pt,framesep=3pt}\lstset{aboveskip=12pt}\lstset{basicstyle=\ttfamily\small}%\lstset{xrightmargin=8pt}\parindent=0pt\parskip=12pt\title{ttylinux User Guide\\Version 5.0}\author{Pascal Schmidt}\begin{document}\maketitle\thispagestyle{empty}\newpage\tableofcontents\newpage\section{Introduction}This section gives an overview on ttylinux. What is it, who can useit, why it is there.\subsection{What is ttylinux?} ttylinux is a minimalistic Linux distribution. It can be installedby hand or by using the bootable CD version that includes aninstaller script. For a custom installation by hand, another Linuxsystem already up and running is needed.ttylinux aims to put as much as possible into as little space aspossible. It provides multi-tasking, multi-user, and networkingcapabilities within less than 4 megabytes of operating system size.The main use that ttylinux comes prepared for is dialing into anInternet provider by modem or ISDN. A text mode web browser ispresent. A package management script capable of installing and removingbinary software packages is included. This makes it possible toadapt ttylinux to specific needs.ttylinux can be installed onto hard disk, CD-ROM, or any other mediayou can boot from. With a custom made bootable CD-ROM, as littleas 2.88 MB of space are enough. The basic filesystem (excludingthe kernel) is 4 MB in size. If you use the installer providedby the bootable CD-ROM version of ttylinux, a kernel image ofa little under 2 MB will also be installed. This makes the minimumworkable size for a hard disk partition to install ttylinux onaround 7-8 MB.You can also use ttylinux as a basis for putting together a morecomplete minimal system. ttylinux uses the same C library as fullLinux systems, so compiling programs on another Linux machine andcopying them over to the ttylinux filesystem should result in workingprograms.\subsection{What is ttylinux not?}ttylinux is not as complete a Linux distribution as others,mostly due to the limited size. It does not contain developertools or a graphical user interface (GUI), for example. \subsection{Who is ttylinux aimed at?} As ttylinux can be used on machines which are considered obsolete bynow, such as 386SX class PCs, it is aimed at people who want to havea minimalistic Linux distribution to run when little space isavailable. ttylinux is aimed at people who already have some Linux experience.There is no big user manual describing how to use the system, so abit of Unix or Linux experience is very useful when trying to usethe system. Most of the programs present are smaller versions of commonUnix utilities, and documentation on those can be found in various placeson the Internet. ttylinux can fit into an Eltorito image useful for bootable CD-ROMs. Itcould be used for installation discs or rescue systems on CD. ttylinuxprovides a working Linux environment from the boot image, and thena script could mount the rest of the CD to provide a full system.Note: ttylinux is really not aimed at Linux beginners. Knowledgeabout how to compile a kernel (the basic ttylinux filesystem comeswithout a precompiled kernel to allow maximum flexibility, thoughthe CD-ROM version provides a precompiled kernel) and find yourway around a Linux system in general is assumed.\subsection{License}The software packages that are part of ttylinux are licensed under anumber of different open source licenses, as listed below. The scriptsthat hold the distribution together are licensed under the GNU GeneralPublic License. A copy is included in the file \url{COPYING}.\begin{center}\begin{tabular}{l|l|l}Package & Version & License\\\hline{\tt bash} & {\tt 3.1.14} & GPL\\{\tt busybox} & {\tt 1.1.0} & GPL\\{\tt dhcpcd} & {\tt 1.3.22-pl4} & GPL\\{\tt dropbear} & {\tt 0.48.1} & MIT\\{\tt e2fsprogs} & {\tt 1.38} & GPL\\{\tt e3} & {\tt 2.7.0} & GPL\\{\tt glibc} & {\tt 2.3.6} & LGPL\\{\tt iptables} & {\tt 1.3.4} & GPL\\{\tt isdn4k-utils} & {\tt 3.2p1} & GPL\\{\tt lilo} & {\tt 22.7.1} & BSD\\{\tt ncurses} & {\tt 5.5} & GPL\\{\tt ppp} & {\tt 2.4.4b1} & BSD\\{\tt retawq} & {\tt 0.2.5c} & GPL\\\end{tabular}\end{center}For more information on any of the licenses, please visitthe \url{opensource.org} website.\section{Installation guide} This section describes the requirements of ttylinux, where to downloadit, and how to customize and install it. \subsection{Requirements} The ttylinux distribution requires at least a 386SX processor. Howmuch memory is needed depends on how you want to run the system.Running the system from ramdisk will need about 10-12 MB of memory,depending on the exact kernel version used.The bootable CD-ROM version uses a fairly large kernel imageto support a broad range of hardware. It also loads the wholesystem into a ramdisk. This means the bootable CD-ROM versionneeds about 12-14 MB of memory to run.Once the system is installed onto hard disk, the memory requirementis reduced to about 8-10 MB of memory. This is when using thedefault kernel as installed by the CD-ROM installer. Thisrequirement can be reduced further by installing a custom kernelby hand. With a minimal 2.4.x kernel configuration, for example,ttylinux can be made to run within 5-6 MB of memory.\subsubsection{Custom kernel requirements}If you install ttylinux by hand, not using the bootable CD-ROM,what you get is a 4 MB ext2 filesystem image that contains onlythe distribution files. You will need to add a Linux kernelto this to make a complete system.The kernel you use will obviously need to support all the hardwareyou want to use, plus some additional requirements for ttylinuxitself. The kernel used for running ttylinux needs to have ramdisksupport, initial ramdisk support, and a default ramdisk size of atleast 4096. Note that the stock kernel configuration will use aramdisk size of 4096, which is enough. If you want to use the basicfirewall script of ttylinux, your kernel also needs iptables support.If you want to use the telnet server in ttylinux, your kernel willneed to have Unix98 pseudo terminal support and support for the \url{devpts} filesystem.ttylinux is basically designed to work with any kernel from 2.4.4upwards. You might be able to run the system with a 2.2.x kernel,but this is neither officially supported nor tested. Thettylinux firewall script definitiely won't work with a 2.2.x kernel.The Linux kernel on the system that is used to install ttylinux needsto have support for the \url{ext2} filesystem and loopback device. If thereis no loopback support, you cannot customize ttylinux for yoursystem. No problem if the defaults suit you perfectly, but that is rather unlikely. For the default installation process describes below, it is alsorequired that the system used to install ttylinux is based on \url{glibc},also known as \url{libc6}. The customization process requires youto run a program from ttylinux at one point that is linked against\url{glibc}.This may all sound like a lot of requirements for the preparationsystem, but almost any half-recent Linux distribution with itsdefault kernel will do.\subsection{Download} You can download ttylinux from the official homepage, which at themoment is at \url{http://www.minimalinux.org/ttylinux/}.Go to the downloads page and get the ISO image version if you want to burn ttylinux onto a bootable CD-ROM. This versionof ttylinux can be booted on any PC that can boot from a CD-ROMdrive. You can use it as a rescue system or for trying outttylinux. You can also use the installer script to installthe system onto hard disk after booting from the CD-ROM.If you want to install by hand, you can find a binary tarball ofthe distribution on the downloads page. Grab this. Inside thearchive you will find this user guide and a file called\url{rootfs.gz}, which is the compressed filesystem image forttylinux itself. It contains an \url{ext2} filesystem with thedistribution installed on it.The inidividual binary packages that were used to create the filesystemimage are also available for download. You may want to download them ifyou use the package manager to remove a package from your ttylinuxsystem and later need to reinstall it.You can also download source code packages, including a build systemthat you can use to build a binary ttylinux package yourself. Thebuild system package includes a \url{README} file that describes theprocess.\subsection{Booting the CD-ROM version}To boot ttylinux from CD-ROM, simply burn the downloaded ISOimage onto a blank disc. Then reboot your computer with thenew disc inserted into your CD-ROM drive. ttylinux shouldboot up automatically. Note that your computer's BIOS setupmay not be set up to allow booting from CD-ROM discs. In thatcase you need to go into the BIOS setup screen(s) and changethat.Once ttylinux has booted up, you will be see a login prompt.You can use the user name "root" (the administrator account)and password "root" for logging in. Read the rest of thisuser guide for pointers about what you can do with thesystem.\subsection{Installing from CD-ROM}WARNING: Running the installer can easily destroy all operatingsystem installations currently present on the target machine. Proceed with caution and backup all important data beforeinstalling ttylinux! This is no drill.To install ttylinux onto hard disk from the bootable CD-ROM,you first need to burn the ISO image onto a blank CD-ROM discand boot into it as described in the previous section.Once logged in as the "root" user, you can start the installation.You need to know three things to run the installer: what yourCD-ROM device is, onto which hard disk partition you want toinstall ttylinux, and where you want to put the boot loader.If you don't know the answers to those three questionsafter reading the following instructions, the safe bet wouldbe {\bf not} to proceed with installation -- sorry, the ttylinuxinstaller isn't yet automated or user-friendly enough for you.\subsubsection{Source CD-ROM device}The name of your CD-ROM device depends on how the drive ishooked up to your IDE or SATA controller. If your system usesIDE, the following device names are possible:\begin{center}\begin{tabular}{l|l}Device name & Description \\\hline{\tt /dev/hda} & Master device on first IDE controller \\{\tt /dev/hdb} & Slave device on first IDE controller \\{\tt /dev/hdc} & Master device on second IDE controller \\{\tt /dev/hdd} & Slave device on second IDE controller \\\end{tabular}\end{center}Among the above, {\tt /dev/hda} is very unlikely to be yourCD-ROM device (this is normally the device name of your hard disk).A more likely possibility is {\tt /dev/hdc}.If your system uses SATA (Serial ATA), use this table:\begin{center}\begin{tabular}{l|l}Device name & Description \\\hline{\tt /dev/scd0} & First SATA CD-ROM device \\{\tt /dev/scd1} & Second SATA CD-ROM device \\{\tt /dev/scd2} & Third SATA CD-ROM device \\{\tt /dev/scd3} & Fourth SATA CD-ROM device\end{tabular}\end{center}Most of the time, your SATA CD-ROM device will be{\tt /dev/scd0}.\subsubsection{Target partition device}You need to find out the device name for the hard diskpartition you want to install ttylinux on. The device names forpartitions are formed by appending numbers to the device nameof the corresponding hard disk. For example, if your hard diskdevice is {\tt /dev/hda}, the device {\tt /dev/hda3} is thethird partition on that hard disk. Numbers 1-4 are the primarypartition, extended partitions start at 5.Due to the combined space requirements of the 4 MB ttylinuxfilesystem and the 2 MB default kernel, the minimum partitionsize you can install ttylinux on and have it work is about7-8 MB.IDE hard disks use the same device names as given for IDECD-ROM devices above. For SATA, the names are as follows:\begin{center}\begin{tabular}{l|l}Device name & Description \\\hline{\tt /dev/sda} & First SATA hard disk device \\{\tt /dev/sdb} & Second SATA hard disk device \\{\tt /dev/sdc} & Third SATA hard disk device \\{\tt /dev/sdd} & Fourth SATA hard disk device\end{tabular}\end{center}Note that if you want to create a dual-boot setup withWindows and ttylinux on the same hard-disk later (a topic notcovered here), you can't use {\tt /dev/hda1} or{\tt /dev/sda1} as your target partition because that iswhere Windows needs to be installed to work.Here are some examples of possible device names for yourtarget partition:\begin{center}\begin{tabular}{l|l}Device name & Description \\\hline{\tt /dev/hda1} & First primary partition on primary IDE master \\{\tt /dev/hdb5} & First extended partition on primary IDE slave \\{\tt /dev/sda2} & Second primary partition on first SATA hard disk \\{\tt /dev/sdc6} & Second extended partition on third SATA hard disk\end{tabular}\end{center}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -