089-092.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 136 行

HTML
136
字号
<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=089-092//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="086-089.html">Previous</A></TD>

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

<TD><A HREF="092-095.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<P>Once <B>GZIP</B> has done its thing, the <B>COLOR.GZ</B> file will be replaced in the <B>C:\SLACK</B> directory by the uncompressed version, named <B>COLOR</B>. To write this to a diskette, insert a formatted 3.5-inch floppy disk in your <B>A:</B> drive and use the <B>RAWRITE</B> command to dump the image to disk:</P>

<!-- CODE SNIP //-->

<PRE>

     C:\SLACK&gt; RAWRITE COLOR A:

</PRE>

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

<P>If your 3.5-inch drive is on <B>B:</B>, use this command instead:</P>

<!-- CODE SNIP //-->

<PRE>

     C:\SLACK&gt; RAWRITE COLOR B:

</PRE>

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

<P>Now you&#146;re ready to boot the install disk. Assuming you&#146;ve selected and created a bootdisk already (if not, see the previous section explaining this), put the bootdisk in your <B>A:</B> drive and reboot. When the disk starts, you&#146;ll see a welcome message and a screenful of information, as well as a</P>

<!-- CODE SNIP //-->

<PRE>

     boot:

</PRE>

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

<P>prompt at the bottom of the screen. You&#146;ll need to enter some information at this prompt to tell the kernel where to mount your rootdisk. If you have a 3.5-inch floppy drive on <B>B:</B>, great&#151;you&#146;ll want to use that for the rootdisk. If not, you&#146;ll have to manages with the rootdisk in your boot drive. With the rootdisk in the boot drive you won&#146;t be able to install from floppy disks or make a bootdisk at the end of the installation process, because the disk will be &#147;mounted&#148; in the boot drive and cannot be removed (no matter what the screen tells you) until the machine is rebooted. Here&#146;s the command to enter at the <I>boot:</I> prompt to use an uncompressed rootdisk in your <B>A:</B> drive:</P>

<!-- CODE SNIP //-->

<PRE>

     boot: mount root=/dev/fd0 ramdisk=0

</PRE>

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

<P>If you have the rootdisk in your <B>B:</B> drive, insert the rootdisk in <B>B:</B>, and enter this command instead:</P>

<!-- CODE SNIP //-->

<PRE>

     boot: mount root=/dev/fd1 ramdisk=0

</PRE>

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

<P>The kernel will now boot. If you&#146;re using drive <B>A:</B> for your rootdisk, you&#146;ll be prompted to exchange the disks and hit <B>Enter</B>. Once you&#146;ve done this, the rootdisk will start loading, eventually giving you a login prompt. From here, you can install Linux. A word of caution: If you&#146;re using this method to install with the rootdisk in drive <B>A:</B>, you cannot remove the rootdisk from your drive until the machine has been shut down. As a result, you&#146;ll be unable to install your bootdisk kernel or make a system bootdisk when configuring your system, and you will need to have a different method of initially starting your machine. A simple way to boot your machine is to use the installation bootdisk with a slightly different command at the <I>boot:</I> prompt. If, for example, you installed Linux on <B>/dev/hda2</B>, you can start Linux with this command on the bootdisk&#146;s <I>boot:</I> prompt:</P>

<!-- CODE SNIP //-->

<PRE>

     boot: mount root=/dev/hda2 ramdisk=0 ro

</PRE>

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

<P>This will boot Linux on <B>/dev/hda2</B>, with no ramdisk, read-only. If you use UMSDOS, you&#146;ll want to boot your system in read-write mode, like this:</P>

<!-- CODE SNIP //-->

<PRE>

     boot: mount root=/dev/hda2 ramdisk=0 rw

</PRE>

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

<P>Once your machine is up and running, you can switch to a different kernel if you like, using one of the choices in the <B>\KERNELS</B> directory on the CD-ROM, or compile your own from the kernel source in <B>/usr/src/linux</B>. This will provide optimal performance, because it won&#146;t contain any unnecessary drivers.</P>

<P><FONT SIZE="+1"><B>Booting Linux from DOS Using Loadlin</B></FONT></P>

<P><B>Loadlin</B> is a handy utility for Linux users that also run MS-DOS or Windows 95. Using <B>Loadlin</B>, you can start Linux from a DOS prompt or set up an icon in Windows 95 that allows you to switch to Linux. <B>Loadlin</B> is also probably the safest way to launch Linux from your hard drive, because it doesn&#146;t require messing with the partition table at all&#151;you just boot DOS normally and then use the <B>LOADLIN.EXE</B> command to start Linux when you need it.</P>

<P>To use <B>Loadlin</B>, you&#146;ll need to install it on your DOS drive. To do this, you&#146;ll need to use an unzip program, such as <B>UNZIP.EXE</B> or <B>PKUNZIP.EXE</B>; most DOS users will already have copies of these. Assuming your Slackware CD is on drive <B>E:</B> and you want to put <B>Loadlin</B> on drive <B>C:</B>, unzip the file like this:</P>

<!-- CODE SNIP //-->

<PRE>

     C:\&gt; PKUNZIP -d E:\KERNELS\LODLIN16.ZIP

</PRE>

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

<P>The <I>-d</I> flag tells the command to preserve the directory structure found in the zip archive. This will create a <B>C:\LOADLIN</B> directory on your machine containing a number of files.</P>

<P>The next step is to pick an appropriate kernel from a subdirectory under <B>\KERNELS</B> on the CD-ROM. The <B>\BOOTDSKS.144 \WHICH.ONE</B> document might be helpful in making your selection. The actual kernel file will be named <B>ZIMAGE</B> or <B>BZIMAGE</B>; this is what you&#146;ll want to copy into your <B>C:\LOADLIN</B> directory.</P>

<P>For this example, we&#146;ll use the kernel in the <B>E:\KERNELS\BARE.I</B> directory:</P>

<!-- CODE SNIP //-->

<PRE>

     C:\&gt; CD LOADLIN

     C:\LOADLIN&gt; COPY E:\KERNELS\BARE.I\ZIMAGE .

</PRE>

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

<P>Now we have everything we need to start a Linux system. To do that, you need to know the following things:

</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;The device name of the Linux partition you intend to boot (such as <B>/dev/hda2</B>)

<DD><B>&#149;</B>&nbsp;&nbsp;The path and filename of the Linux kernel you plan to use (such as <B>C:\LOADLIN\ZIMAGE</B>)

<DD><B>&#149;</B>&nbsp;&nbsp;Whether the partition should be mounted read-only (as in the case of a native Linux partition, so it can do safe filesystem checking at boot time) or read-write (needed by UMSDOS, which does not check filesystems at boot)

</DL>

<P>This information is fed to the <B>LOADLIN.EXE</B> program, which in turn loads Linux into memory and boots it. Here&#146;s an example:</P>

<!-- CODE SNIP //-->

<PRE>

     C:\LOADLIN&gt; LOADLIN C:\LOADLIN\ZIMAGE ROOT=/dev/hda2 RO

</PRE>

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

<P>This loads the Linux kernel and boots the <B>/dev/hda2</B> partition in read-only (RO) mode. If you&#146;re using UMSDOS, you&#146;d replace the <I>RO</I> with <I>RW</I> to use read-write mode instead.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>NOTE:&nbsp;&nbsp;</B>Some DOS drivers interfere with <B>Loadlin</B>, in particular the emm386 driver for expanded memory. If this happens, you&#146;ll have to remove the driver from your <B>CONFIG.SYS</B> file and try again. Also, <B>Loadlin</B> will not run directly under Windows 95, although you can still set up an icon for it that first switches your computer into DOS mode. (In other words, the process is to start a DOS session under Windows 95 and then launch <B>Loadlin</B>. We&#146;ll explain further in the next section.)<HR></FONT>

</BLOCKQUOTE>

<P>If all goes well, your machine should switch to Linux. If you&#146;d like to automate the process further, edit the <B>LINUX.BAT</B> file in your <B>C:\LOADLIN</B> directory. Then copy <B>LINUX.BAT</B> into your <B>C:\DOS</B> directory, and you&#146;ll be able to switch to Linux from DOS by simply typing <B>LINUX</B> at a prompt.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="086-089.html">Previous</A></TD>

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

<TD><A HREF="092-095.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





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

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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