📄 lsg03.htm
字号:
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>If you've turned on the swap space and still get error messages when you try to install Linux, you need either more physical RAM or a larger swap space. Increasing the swap space now and then installing Linux is better than having to redo it later. To increase the size of a swap space partition, you may have to remove the existing Linux partitions and recreate them with fdisk.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<BR>
<A NAME="E69E35"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Creating the Linux Filesystem Partition</B></FONT></CENTER></H4>
<BR>
<P>Once you have a swap space configured and working, you can set up the Linux filesystem. Some Linux installation scripts automate this step, or you may have to execute it yourself. Either way, this section explains what is going on.
<BR>
<P>You have already allocated the partition table to support a Linux filesystem. Now you can create the filesystem with the mkfs (make filesystem) command. The exact format of the command depends on the type of filesystem you are setting up. The most popular filesystem (for reasons of speed and flexibility) is called the Second Extended filesystem (which has nothing to do with extended partitions on a hard disk). To create a Second Extended filesystem, issue the command
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">mke2fs -c <partition> <size></FONT></PRE>
<P>where partition is the device name and size is the size of the partition in blocks (taken from the partition display in fdisk). For example, to create a filesystem in /dev/hda3 that is 162,344 blocks in size, the command would be
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">mke2fs -c /dev/hda3 162344</FONT></PRE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>When specifying the size of a partition, make sure you use blocks and not sectors or cylinders. Using the wrong value will result in errors or only a fraction of your partition being used.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>The mke2fs utility checks the partition for bad blocks (the -c option), and then sets the filesystem up properly in that partition. If you are setting up a large partition, the disk check can take a few minutes, but you should not skip it unless you know your disk is good.
<BR>
<P>The other filesystems available to Linux are the Xia filesystem, the Extended filesystem, and the Minix filesystem. The Xia filesystem is good, but not as popular as the Second Extended filesystem. The Extended filesystem is an older version of Second Extended, and the Minix filesystem is compatible with the old Minix operating system (which Linux was written to replace). You can create these filesystems with the following commands:
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Extended
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
mkefs
</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Minix
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
mkfs
</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Xia
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
mkxfs</FONT>
</TABLE><P>All three commands take the same arguments as the Second Extended filesystem command. The Minix filesystem is limited to 64M. None of the mkfs commands format the filesystem; they just set it up. You are prompted for a filesystem format during the installation process.
<BR>
<BR>
<A NAME="E68E14"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Installing the Linux Software</B></FONT></CENTER></H3>
<BR>
<P>After you create and format the partitions and create the filesystems, you can install the Linux software. This step may be automated, depending on the installation procedure included with your Linux distribution. Most versions of Linux include a utility called setup that installs the software for you. From the Linux prompt, type the command
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">setup</FONT></PRE>
<P>If you are running the color root image, you get graphic, full-screen windows for the installation process. Other root images use character-based installation messages instead. Many users who install Linux frequently avoid the color root image because it can take a little longer to answer all the questions the script poses and some typing errors are difficult to correct. Whichever root image you choose, carefully read each screen.
<BR>
<P>The setup utility supplied with the Linux system on this book's CD-ROM is shown in Figure 3.7. Some minor variations in menu choices exist between versions of Linux, but the primary options are much the same.
<BR>
<P><B> <A HREF="03LSG07.gif">Figure 3.7.</B>
<BR><B>The most common setup utility menu.</A></B>
<BR>
<P>Linux presents you with many choices during the installation. Although the default choices are correct for most people, check that the default is what you want. You have the option of letting Linux install everything without your prompting, except when disk sets change, but you should use this option only if you know exactly what is going on your disk. If you are installing Linux for the first time or want to choose the software to be installed by examining descriptions of each package, use the verbose options to show all messages and let you control the process.
<BR>
<BR>
<A NAME="E69E36"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Selecting the Source and Disk Sets</B></FONT></CENTER></H4>
<BR>
<P>The setup installation script either asks you or lets you set several pieces of information. First, you need to specify the source of the software. You can usually accomplish this step by by selecting Source from the setup menu when setup starts its automatic installation process. If you have a CD-ROM, it should have been activated during the boot process if the drivers were correct for your hardware. Select the CD-ROM option. You may be asked to further narrow down the type of CD-ROM you have on your system. Choose the exact type(or the one closest to it) and hope for the best. If you are installing from another disk drive partition (such as another Linux partition or a DOS partition), provide the full device and path names. Figure 3.8 shows the Source option choices presented from the setup menu. From here, you can select CD-ROM. If Linux didn't identify your CD-ROM drive when it booted, you may be presented with another screen and asked to choose the type of CD-ROM drive your system has.
<BR>
<P><B> <A HREF="03LSG08.gif">Figure 3.8.</B>
<BR><B>The Source option on the setup menu lets you select where the Linux </B><B>software will be read from.</A></B>
<BR>
<P>The installation program then asks for the target of the installation. The target is where you want the software to be installed. The newly created Linux partition is probably the location you want, so enter the partition's name. You will probably be asked whether you want to format that partition; answer yes. (Running mkfs or its variants does not format the partition for you.)
<BR>
<P>Next, Linux displays a list of the disk sets you can install. You may get to this screen through the normal installation process, or you can select Disk Sets from the setup menu. Choose the ones you want. The list of disk sets is usually a scrolling window, as shown in Figure 3.9. Make sure you scroll through the entire list and mark the disk sets you want to install.
<BR>
<P><B> <A HREF="03LSG09.gif">Figure 3.9.</B>
<BR><B>The scrolling list holds the names of each major package Linux </B><B>offers.</A></B>
<BR>
<P>Some setup versions let you further refine the list of utilities when the disk set is installed. As a last step, verify the information, and then let Linux install itself. If this process doesn't start automatically, choose the Install option from the setup menu. Linux may double-check with you that you want to install the disk sets you've selected. This screen message looks similar to the one shown in Figure 3.10. This is your last chance to change your mind before Linux starts copying files to your hard drive. After you tell Linux to go ahead and install the software, watch for messages and prompts, and follow any on-screen instructions. If you are installing from a floppy disk, you will be prompted at intervals to change to the next disk in the disk set.
<BR>
<P><B> <A HREF="03LSG10.gif">Figure 3.10.</B>
<BR><B>The Linux installation routine usually stops and prompts you before it </B><B>starts installing software.</A></B>
<BR>
<P>As Linux installs software, it displays status screens like the one shown in Figure 3.11 whenever the disk set is changed. As each piece of software in a disk set is installed, its name, size, and a brief description is often displayed, as shown in Figure 3.12. Occasionally, you will be asked to choose whether to install a particular component, as shown in Figure 3.13. Choosing yes installs the package described on the screen; choosing no (use the scroll key to display the no option) skips that package and moves to the next.
<BR>
<P><B> <A HREF="03LSG11.gif">Figure 3.11.</B>
<BR><B>As Linux installs each selected disk set, </B><B>setup</B><B> displays the letter of </B><B>the set. The e set being installed here is the GNU Emacs editor.</A></B>
<BR>
<P><B> <A HREF="03LSG12.gif">Figure 3.12.</B>
<BR><B>Each package in a disk set that is installed by default is displayed in </B><B>a status message, along with the size and brief description of the </B><B>package.</A></B>
<BR>
<P><B> <A HREF="03LSG13.gif">Figure 3.13.</B>
<BR><B>Some disk sets contain optional components. When one is encountered, you </B><B>are presented with a screen like this one that describes the package and </B><B>asks whether you want to install it.</A></B>
<BR>
<BR>
<A NAME="E69E37"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Creating a Boot Disk</B></FONT></CENTER></H4>
<BR>
<P>At the end of the installation routine, you may be prompted whether you want to create a boot disk. Figure 3.14 shows this screen from the Linux CD-ROM included with this book. The boot disk enables you to access the system at any time, especially if the normal boot process fails. You should always make a boot disk for emergency purposes. This disk is not the same as the boot floppy disk you made to start the installation (which is only useful when you reinstall from scratch).
<BR>
<P><B> <A HREF="03LSG14.gif">Figure 3.14.</B>
<BR><B>During the installation process, </B><B>setup</B><B> may ask you whether you want to </B><B>create a boot disk.</A></B>
<BR>
<P>When you choose to create a boot disk, Linux prompts you for a floppy disk, as shown in Figure 3.15. Insert a floppy disk in the drive and choose Yes. (Choosing No abandons the creation of the boot disk.) Linux then proceeds to copy the the kernel image and some extra information to the floppy disk. While Linux is creating the boot disk, it shows you a message like the one in Figure 3.16.
<BR>
<P><B> <A HREF="03LSG15.gif">Figure 3.15.</B>
<BR><B>When you choose to create a boot disk, Linux prompts you to insert a </B><B>floppy disk in the drive and choose Yes.</A></B>
<BR>
<P><B> <A HREF="03LSG16.gif">Figure 3.16.</B>
<BR><B>This screen shows the progress of the creation of the boot disk.</A></B>
<BR>
<BR>
<A NAME="E69E38"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Configuration Details</B></FONT></CENTER></H4>
<BR>
<P>After installing disk sets and creating a boot disk, the setup routine may give you a choice to continue with the installation process by configuring your system or to leave the configuration until later. It's a good idea to continue with the process because back-tracking can be difficult sometimes. Although the order of prompts and the options presented to you are different depending on the version of the Linux system you are installing, usually you are asked to set up your modem first, as shown in Figure 3.17.
<BR>
<P><B> <A HREF="03LSG17.gif">Figure 3.17.</B>
<BR><B>The first configuration information you are asked about is your </B><B>modem.</A></B>
<BR>
<P>If you have a modem installed on your system already, choose the Yes option to configure the port and modem speed now. Alternatively, if you are not sure which port you want to use or want to add the modem later, choose No. If you choose Yes to install a modem, you are asked for the device it is attached to, as shown in Figure 3.18. The devices are named in Linux format, with /dev/cua0 equivalent to COM1, /dev/cua1 equivalent to COM2, and so on. Choose the proper device. If your modem is used by DOS' COM2 port, for
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -