⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 065-067.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Configuration and Installation:Installing Linux</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=1558285660//-->

<!--TITLE=Linux Configuration and Installation//-->

<!--AUTHOR=Patrick Volkerding//-->

<!--AUTHOR=Kevin Reichard//-->

<!--AUTHOR=Eric Foster//-->

<!--PUBLISHER=IDG Books Worldwide, Inc.//-->

<!--IMPRINT=M & T Books//-->

<!--CHAPTER=2//-->

<!--PAGES=065-067//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="061-065.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="067-070.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<P><FONT SIZE="+1"><B>Linux and Hard Disk Names</B></FONT></P>

<P>After logging in, you&#146;ll want to directly run the <B>fdisk</B> command (ignoring what the screen instructions say about the <B>setup</B> command). The <B>fdisk</B> command assumes that the first IDE drive is the default drive. If you plan on installing Linux on another drive, you&#146;ll need to specify that on the command line. Table 2.5 lists the hard disk device names.</P>

<CENTER>

<TABLE WIDTH="100%"><CAPTION><B>Table 2.5</B> Linux Hard Disk Device Names

<TR>

<TH WIDTH="20%" ALIGN="LEFT">Name

<TH WIDTH="80%" ALIGN="LEFT">Meaning

<TR>

<TH COLSPAN="2"><HR>

<TR>

<TD><B>/dev/hda</B>

<TD>First IDE hard drive

<TR>

<TD><B>/dev/hdb</B>

<TD>Second IDE hard drive

<TR>

<TD><B>/dev/sda</B>

<TD>First SCSI hard drive

<TR>

<TD><B>/dev/sdb</B>

<TD>Second SCSI hard drive

<TR>

<TD><B>/dev/fd0</B>

<TD>First floppy drive (<B>A:</B>)

<TR>

<TD><B>/dev/fd1</B>

<TD>Second floppy drive (<B>B:</B>)

<TR>

<TD COLSPAN="2"><HR>

</TABLE>

</CENTER>

<P>Note the pattern in Table 2.5? In addition, Linux allows you to specify the partitions in the device names. For example, the first primary partition on the first IDE drive would be known as <B>/dev/hda1</B>, the second primary partition on the first IDE drive would be known as <B>/dev/hda2</B>, and so on. If you&#146;re installing logical partitions, the first logical partition would appear as <B>/dev/hda5</B>, the second logical partition would appear as <B>/dev/hda6</B>, and so on.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>NOTE:&nbsp;&nbsp;</B>The files representing these devices will end up in the directory /<B>dev</B>.<HR></FONT>

</BLOCKQUOTE>

<P>To run <B>fdisk</B> on the second SCSI hard drive, you&#146;d use the following command line:</P>

<!-- CODE SNIP //-->

<PRE>

     # fdisk /dev/sdb

</PRE>

<!-- END CODE SNIP //-->

<P>Most of you (most PCs are sold with IDE drives) will be told that Linux is using the first hard drive as the default. When you press <B>m</B> for a list of options, you&#146;ll see the following listing:</P>

<!-- CODE //-->

<PRE>

     Command action

        a   toggle a bootable flag

        c   toggle the dos compatibility flag

        d   delete a partition

        l   list known partition types

        m   print this menu

        n   add a new partition

        p   print the partition table

        q   quit without saving changes

        t   change a partition's system id

        u   change display/entry units

        v   verify the partition table

        w   write table to disk and exit

        x   extra functionality (experts only)

</PRE>

<!-- END CODE //-->

<P>There are really only three options you&#146;ll ever use, unless you run into some esoteric configurations:

</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;<B>d</B>, which deletes a current partition. This will work on non-Linux partitions.

<DD><B>&#149;</B>&nbsp;&nbsp;<B>n</B>, which creates a new partition.

<DD><B>&#149;</B>&nbsp;&nbsp;<B>p,</B> which prints a rundown of the current partition table. This will list non-Linux partitions as well.

</DL>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>WARNING:&nbsp;&nbsp;</B>Linux allows you to make your hard disk configuration (and <I>any</I> configuration) as complex as you want it to be. Our philosophy is to keep it as simple as possible; unless you have a real need for multiple partitions and the like, just keep to the basics&#151;a DOS partition, a Linux partition, and perhaps a partition for an additional operating system (like OS/2) if you like.

<P>Some argue that by creating multiple Linux partitions, you&#146;ll be able to recover more easily if something happens to the boot partition. (Damage to one partition doesn&#146;t automatically mean that all the partitions are damaged.) However, if you&#146;re making frequent backups of important files (mostly data and configuration files), you&#146;ll have a more reliable setup. If there&#146;s damage to the PC&#146;s File Allocation Table (FAT), you&#146;ll have problems with <I>all</I> your partitions.<HR></FONT>

</BLOCKQUOTE>

</P>

<P>If you select <B>p</B>, you&#146;ll see the following:</P>

<!-- CODE SNIP //-->

<PRE>

   Device Boot  Begin   Start    End  Blocks   Id  System

/dev/hda1   *       1       1     63   20762&#43;   4  DOS 16-bit (32M)

</PRE>

<!-- END CODE SNIP //-->

<P>This is the DOS partition you created in the previous sections.

</P>

<P>Before you actually create the Linux partition, you should decide if you want to install a swap partition.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="061-065.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="067-070.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -