📄 047-050.html
字号:
<HTML>
<HEAD>
<TITLE>Special Edition Using Linux, Fourth Edition:Linux Installation Overview</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=0789717468//-->
<!--TITLE=Special Edition Using Linux, Fourth Edition//-->
<!--AUTHOR=Jack Tackett//-->
<!--AUTHOR=Jr.//-->
<!--AUTHOR=Steve Burnett//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Que//-->
<!--CHAPTER=2//-->
<!--PAGES=047-050//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="044-047.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="050-052.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading19"></A><FONT COLOR="#000077">Using the Linux <I>fdisk</I> Program
</FONT></H4>
<P>At the <TT>fdisk</TT> prompt, type <TT>m</TT> for a list of commands. Table 2.6 lists the available commands.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 2.6</B> The Linux <I>fdisk</I> Commands
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TH WIDTH="30%" ALIGN="LEFT">Command
<TH WIDTH="70%" ALIGN="LEFT">Description
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TD><TT>a</TT>
<TD>Toggles a bootable flag
<TR>
<TD><TT>c</TT>
<TD>Toggles the DOS compatibility flag
<TR>
<TD><TT>d</TT>
<TD>Deletes a partition
<TR>
<TD><TT>l</TT>
<TD>Lists known partition types
<TR>
<TD><TT>m</TT>
<TD>Displays this menu
<TR>
<TD><TT>n</TT>
<TD>Adds a new partition
<TR>
<TD><TT>p</TT>
<TD>Displays the partition table
<TR>
<TD><TT>q</TT>
<TD>Quits without saving changes
<TR>
<TD><TT>t</TT>
<TD>Changes a partition’s system ID
<TR>
<TD><TT>u</TT>
<TD>Changes display/entry units
<TR>
<TD><TT>v</TT>
<TD>Verifies the partition table
<TR>
<TD><TT>w</TT>
<TD>Writes the table to disk and exits
<TR>
<TD><TT>x</TT>
<TD>Provides extra functionality for experts only
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>To begin the partitioning, select the <TT>p</TT> command (press <p><Return>) to display the current partition table, which should reflect the drive you partitioned earlier with the DOS <TT>FDISK</TT> program. Listing 2.1 shows a possible listing from the <TT>p</TT> command.</P>
<P><B>Listing 2.1</B> Example of a Current Partition Table</P>
<!-- CODE SNIP //-->
<PRE>
Disk /dev/hda: 15 heads, 17 sectors, 1024 cylinders
Units = cylinders of 255 * 512 bytes
Device Boot Begin Start End Blocks Id System
/dev/hda1 * 1 1 41 5219 1 DOS 12-bit FAT
dev/hda2 1024 1024 4040 384667+ 51 Novell?
Partition 2 has different physical/logical endings:
phys=(967, 14, 17) Logical=(4096, 14.17)
</PRE>
<!-- END CODE SNIP //-->
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>NOTE: </B>Your screen may appear different than what’s shown in Listing 2.1, because the values are different for each drive type and the partitions already defined on that drive.<HR></FONT>
</BLOCKQUOTE>
<P>Listing 2.1 indicates the various partitions already defined that it can detect, the start and ending locations of the partition, and how big it is in blocks. The listing also indicates the partition type. Table 2.7 shows all the different types of partitions you can define with the Linux <TT>fdisk</TT> program. The primary partition types you used are 83-Linux Native and 82-Linux Swap. You can get a similar listing with the <TT>l</TT> command.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 2.7</B> The Known Linux Partition Types
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TH WIDTH="30%" ALIGN="LEFT">Reference Number
<TH WIDTH="70%" ALIGN="LEFT">Type
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TD>0
<TD>Empty
<TR>
<TD>1
<TD>DOS 12-bit FAT
<TR>
<TD>2
<TD>XENIX root
<TR>
<TD>3
<TD>XENIX usr
<TR>
<TD>4
<TD>DOS 16-bit < 32M
<TR>
<TD>5
<TD>Extended
<TR>
<TD>6
<TD>DOS 16-bit >= 32M
<TR>
<TD>7
<TD>OS/2 HPFS
<TR>
<TD>8
<TD>AIX
<TR>
<TD>9
<TD>AIX bootable
<TR>
<TD>a
<TD>OS/2 Boot Manager
<TR>
<TD>40
<TD>Venix 80286
<TR>
<TD>51
<TD>Novell?
<TR>
<TD>52
<TD>Microport
<TR>
<TD>63
<TD>GNU HURD
<TR>
<TD>64
<TD>Novell
<TR>
<TD>75
<TD>PC/IX
<TR>
<TD>80
<TD>Old MINIX
<TR>
<TD>81
<TD>MINIX/Linux
<TR>
<TD>82
<TD>Linux Swap
<TR>
<TD>83
<TD>Linux Native
<TR>
<TD>93
<TD>Amoeba
<TR>
<TD>94
<TD>Amoeba BBT
<TR>
<TD>a5
<TD>BSD/386
<TR>
<TD>b7
<TD>BSDI fs
<TR>
<TD>b8
<TD>BSDI swap
<TR>
<TD>c7
<TD>Syrinx
<TR>
<TD>db
<TD>CP/M
<TR>
<TD>e1
<TD>DOS access
<TR>
<TD>e3
<TD>DOS R/O
<TR>
<TD>f2
<TD>DOS secondary
<TR>
<TD>ff
<TD>BBT
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>In Listing 2.1, Linux prints a note about the different physical and logical endings at the bottom of the screen. The difference exists because on the system used to write this chapter, a prior partition containing the DOS D drive was left intact, whereas the C drive was repartitioned to a smaller C drive to make room for Linux. Thus, there’s space between the C drive and the D drive. This is where the necessary partitions required by Linux will be created.
</P>
<P>The begin, start, and end numbers from Listing 2.1 are very important and you should write them down. You’ll need them in a later step to specify the necessary sizes of the partitions you’ll add.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="044-047.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="050-052.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 + -