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

📄 ch03.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 5 页
字号:


	2. </B>Verify the integrity of the backup. You want to make sure that you can read



	your <BR>



	archived data later.<BR>



	<B><BR>



	3.</B> Create an MS-DOS bootable floppy, using a command such as <TT>FORMAT /S A:</TT>,



	which puts the MS-DOS system files on a new floppy.<BR>



	<B><BR>



	4.</B> Copy the files <TT>FDISK.EXE</TT> and <TT>FORMAT.COM</TT> to this floppy,



	as well as any other utilities you need (including, for example, your restore program,



	editors, and such).<BR>



	<B><BR>



	5. </B>Boot the PC using the MS-DOS system floppy you just created. Run FDISK (MS-DOS



	only).<BR>



	<B><BR>



	6.</B> Use the FDISK menu options to delete the partitions you want to resize.<BR>



	<B><BR>



	7.</B> Use the MS-DOS FDISK menu options to create newer, smaller MS-DOS partitions.



	Do not create or assign disk space for partitions you intend to use for Linux. You



	will create and set the type for the Linux partitions later in the Linux installation



	process.<BR>



	<B><BR>



	8.</B> Exit FDISK.<BR>



	<B><BR>



	9. </B>Reformat the new MS-DOS partitions with the MS-DOS <TT>FORMAT</TT> command.



	Do not format partitions that are designated for Linux.<BR>



	<B><BR>



	10.</B> Restore the MS-DOS original files from backup.



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading18<FONT COLOR="#000077"><B>NOTE: </B></FONT>A utility called



	FIPS, an FDISK clone for MS-DOS, can nondestructively resize your partitions. You



	can find it on <TT>sunsite.unc.edu</TT>, in <TT>/pub/Linux/system/Install</TT>. It



	is a compressed tar file, so you need to uncompress and untar it before transferring



	it to DOS. Having said this, I should warn you that it's safer for you to back up



	your DOS partition than to risk it with any utility.



<HR>







</DL>











<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading19<FONT COLOR="#000077"><B>CAUTION: </B></FONT>Running FDISK



	will destroy all data on these partitions. If you are using multiple operating systems



	on the same hard disk, be sure to back up all data before starting to repartition.



	The fdisk commands used by different operating systems can conflict in such a way



	that entire partitions might disappear or become inaccessible, even if you use the



	command correctly.



<HR>







</DL>







<P>Note that MS-DOS FDISK also offers the option of creating a logical DOS drive.



A logical DOS drive is space on a logical partition on your hard drive. You can install



Linux on an extended partition. So if you're currently using a logical DOS drive



and want to install Linux in its place, delete the logical drive with MS-DOS FDISK.



Then you can create a logical drive for use with Linux in its place.







<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading20<FONT COLOR="#000077"><B>TIP:</B> </FONT>The mechanism used



	to repartition for OS/2 and other operating systems is similar. See the documentation



	for those operating systems for details.



<HR>







</DL>







<CENTER>



<H3><A NAME="Heading21<FONT COLOR="#000077">Booting the System for Installation</FONT></H3>



</CENTER>



<P>Now that you have prepared your hard drive and created your boot and root disks,



you can boot and install Linux on your machine. Place the first boot disk in drive



A of your target PC, and reset the machine.</P>



<P>You see a flurry of messages and other information pass by while the system boots.



Look for this message:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">&quot;Welcome to the Slackware Linux .... Bootkernel disk!&quot;



</FONT></PRE>



<P>After booting the kernel, you are prompted to enter the Slackware root disk:<FONT



COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">VFS: Insert root floppy and press ENTER:



</FONT></PRE>



<P>At this point, you should remove the boot disk from the drive and insert the root



disk. Then press Enter to go on.







<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading22<FONT COLOR="#000077"><B>CAUTION:</B> </FONT>Do not remove



	any floppy disk unless you are explicitly asked to do so via a prompt. If you remove



	the floppy while the system has it mounted, the system will crash and require a reboot.



<HR>







</DL>







<P>You should be presented with a login prompt. Log in as <TT>root</TT>:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">slackware login: root



</FONT></PRE>







<PRE><FONT COLOR="#0066FF">#



</FONT></PRE>



<P>If you do not know how to log in, don't worry. Just type <TT>root</TT> at the



prompt (<TT>login</TT>) and press Enter, and you are presented with a hash mark (<TT>#</TT>).



This is your root login prompt. You issue commands to the Linux kernel at this prompt.



<CENTER>



<H3><A NAME="Heading23<FONT COLOR="#000077">Using Linux fdisk</FONT></H3>



</CENTER>



<P>After the system is up, you must assign the partitions you set aside in the previous



steps for use with Linux. Basically, you will set up the partitions with fdisk and



then run the <TT>setup</TT> command to install the software on this machine.</P>



<P>From the <TT>#</TT> prompt, run the <TT>fdisk</TT> command in Linux. Note that



the Linux fdisk is not the same FDISK program under MS-DOS, and you should know about



its commands before you press the wrong keys!</P>



<P>The Linux fdisk program is interactive, and you have to type one-letter commands



for all actions. The <TT>m</TT> (menu) command presents you with a list of the available



options. Following is a list of command options for the fdisk program: 



<TABLE BORDER="0">



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>d</TT> </TD>



		<TD ALIGN="LEFT">Deletes a partition from the table </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>l</TT> </TD>



		<TD ALIGN="LEFT">Lists all known partition types for fdisk </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>n</TT> </TD>



		<TD ALIGN="LEFT">Creates a new partition in the current drive </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>p</TT> </TD>



		<TD ALIGN="LEFT">Displays your current partition table entries </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>q</TT> </TD>



		<TD ALIGN="LEFT">Quits without saving any changes </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>t</TT> </TD>



		<TD ALIGN="LEFT">Changes the partition type code </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>u</TT> </TD>



		<TD ALIGN="LEFT">Changes display and entry units </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>v</TT> </TD>



		<TD ALIGN="LEFT">Verifies the partition table </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT"><TT>w</TT> </TD>



		<TD ALIGN="LEFT">Writes all changes and exits </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD WIDTH="54" ALIGN="LEFT" VALIGN="TOP"><TT>x<BR>



			</TT></TD>



		<TD ALIGN="LEFT" VALIGN="TOP">Starts Expert mode (used only for bit manipulation of sectors and so forth)<BR>



					</TD>



	</TR>



</TABLE>



In Linux, partitions are given a name based on the drive they belong to. Drives and



partitions on drives are named in Linux by the following convention: h for IDE hard



drive, a for the first drive, b for the second drive, and s for SCSI drives. Up to



four partitions numbered from 1 to 4 are allowed per drive. So /dev/hdb1 is the first



partition on the second IDE drive, /dev/sdb is for the first SCSI drive, /dev/hda



is the first drive itself, and /dev/hda2 is the second partition on the first IDE



drive. If you have any logical partitions, they are numbered starting with /dev/hda5,



/dev/hda6, and so on.</P>



<P>You run the <TT>fdisk</TT> command like this:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF"># fdisk



</FONT></PRE>



<P>The fdisk program starts and presents you with the following prompt:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">pop:/sbin# fdisk



Using /dev/hda as default device!



The number of cylinders for this disk is set to 2100.



This is larger than 1024, and may cause problems with:



1) software that runs at boot time (e.g., LILO)



2) booting and partitioning software form other OSs



   (e.g., DOS FDISK, OS/2 FDISK)



Command (m for help):



</FONT></PRE>



<P>Note that the default drive in this case is the first drive, /dev/hda.</P>



<P>You can specify the drive name to the <TT>fdisk</TT> command at the command line



to use a different drive. For example, the command<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">fdisk /dev/hdb



</FONT></PRE>



<P>starts fdisk using the information on the second IDE drive.</P>



<P>The fdisk program works one drive at a time, so you have to run fdisk once for



each drive. Linux partitions do not have to be on the same physical drive. You might



want to create your root file system partition on /dev/hda3 and your swap partition



on /dev/hdb2, for example.







<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading24<FONT COLOR="#000077"><B>CAUTION:</B> </FONT>Linux's fdisk



	and the FDISK from MS-DOS are suited for their own respective file system. It's best



	not to create or delete partitions for operating systems other than Linux with Linux



	fdisk. Similarly, don't create or delete Linux partitions with MS-DOS's version of



	FDISK.



<HR>







</DL>











<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading25<FONT COLOR="#000077"><B>NOTE:</B> </FONT>An extended partition



	does not equal an extended file system. An extended partition acts as a container



	for logical partitions. With this container, you can have more than four partitions



	on a hard drive. Extended partitions cannot hold data on their own. You must create



	logical partitions on the extended partition to hold data. On the other hand, an



	extended file system is a Linux file system that resides on a logical partition.



<HR>







</DL>





⌨️ 快捷键说明

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