发信人: netangel.bbs@bbs.dlut.edu.cn (网络天使), 信区: cnlinux
标  题: 轻轻松松安装 Linux (6)
发信站: 碧海青天 (Sun Nov 30 19:43:47 1997)
转信站: Lilac!ustcnews!ustcnews!sjtunews!DUT
出  处: rose.dlut.edu.cn

□ 系统软体安装前的说明

    到这里为止, 我们硬碟内实际上仍然没有东西, 我们只做了基本
的分割区规划, 更重要的档案系统、 系统软体、 系统核心服务程式
、系统工具程式以及应用软体等等, 都还未安装。

    刚刚我们完成分割区规划後, 重新开机, 并再次以 root 帐号进入
系统, 假如无误的话, 我们接下来要用 setup 指令, 完成全程安装动
作。 请读者留意, setup 的动作可以指定全自动, 也可以指定一步一
步监督安装。 这两不种不同方式其所需的时间相差很大, 我建议读者
第一次执行的话, 指定一步一步慢慢来 (这是内定方式), 这样您可以
浏览整个过程, 也就可以对系统有更深的了解。 还有一点很重要的,
由於您不想由於您的不慎, 以致於安装了一套有潜在瑕疵的 Linux 系
统, 可是明显的您又没有经验, 怎麽办呢? 简单, 先把第一次安装当
作是测试, 不论成功与否, 都仔细观察仔细学, 之後, 再重新从头开
始一次, 仔细的一步步进行硬碟规划、 建置档案系统、 及系统软体
安装。

□ set up 六程序
    Slackware Linux 的安装可以大略分解为六个步骤, 其实这些步
骤其在彩色安装画面上都已经有清楚显示, 读者此处不妨快速浏览即
可。 以下这六个步骤可以是连贯动作, 但也可以个别独立操作。

1. 启动 SWAP PARTITION
    除非您硬碟内已经没有可用的分割区, 最好您第一个步骤就要先
设置 SWAP PARTITION, 让系统所需要的虚拟记忆体立刻生效, 这对
记忆体很小的机器尤其重要, 否则您甚至可能没有办法继续进行安装
工作。


2. 指定安装目的分割区 (Target)
    第二个步骤, 就是告诉系统安装程式, 究竟您想把系统安装到哪
一个 (或者哪几个) 硬碟分割区。 实际执行这步骤时, 您只需要把游
标移到萤幕上的 Target 选项, 按下 <Enter> 键, 之後回答一些问题
即可。

3. 指定安装来源 (Source)
    您首先要告诉安装程式, 您究竟想用什麽方式安装, 比方磁片、
硬碟、 CD-ROM、 网路远端一部 NFS server 或 磁带等等, 这就是
安装来源。 实际执行操作时, 您可以在刚刚指定 Target的阶段之後
面, 接著进行指定 Source, 或者, 也可以在萤幕上选择 Source选项


4. 选择安装软体 (DISK SETS)
    执行这项操作时, 首先我们要选择安装哪些软体, 或者哪些不安
装。

5. 实际安装 (Install)
   这步骤就是真枪实弹把软体从 Source 安装到 Target 的过程。

6. 最後系统设定 (Configuration)

    前面五个步骤完成後, 基本上整个系统所需的软体都已经安装完
成, 只不过, 这仍然是一套死的系统, 因为大部分的功能都还没有办
法正确运转, 这是为什麽, 我们需要进一步做最後的设定。 这步骤实
际上的作法, 也是回答一些问题, 之後安装软体会自动执行。



□ setup 启动

    透过上面的说明, 我们大慨已经明了 setup 所执行的工作, 接下
来我们就要实际来执行 setup 的各项细节。

    我们先来回忆一下。 刚刚用 bootdisk 及 rootdisk 开机成功後
, 我们首先以 root 帐号进入系统, 我们眼前就已经是一个阳春的
Linux/Unix 作业环境, 使用 sh (Bounre Shell) 与系统打交道。

    以下我们在 Shell提示符号下键入 setup 指令, 就可以开始执
行安装程序。

$ setup

<< 画面 5-9 >>
     ______________ Slackware Linux Setup (version FD-2.0.2) 
______________□    □ Welcome to Slackware Linux 
Setup.                                   □    □ Select an option below using 
the UP/DOWN keys and SPACE or ENTER.   □    □ Alternate keys may also be 
used: '+', '-', and TAB.                 □    □ 
__________________________________________________________________□□    
□□HELP       Read the Slackware Setup HELP file                    □□    
□□KEYMAP     Remap your keyboard if you're not using a US one      □□    
□□QUICK      Choose quick or verbose install mode [now: VERBOSE]   □□    
□□MAKE TAGS  Experts may customize tagfiles to preselect packages  □□    
□□ADDSWAP    Set up your swap partition(s)                         □□    
□□TARGET     Set up your target partitions                         □□    
□□SOURCE     Select source media                                   □□    
□□DISK SETS  Decide which disk sets you wish to install            □□    
□□INSTALL    Install selected disk sets                            □□    
□□CONFIGURE  Reconfigure your Linux system                         □□    
□□EXIT       Exit Slackware Linux Setup                            □□    
□ __________________________________________________________________□□    
□_____________________________________________________________________□    
□                       <  OK  >      <Cancel>                        □     
______________________________________________________________________□ 

    在这画面中, 我们可以移动上下方向键, 萤幕上的反白就会跟著
移动, 我们把反白移动到某一行, 之後按 <Enter> 键, 就是要执行该
选项工作。

    至於萤幕底端有 <OK> 及 <Cancel> 两个选项, 可个可以 <Tab>
键或者左右方向键来跳跃选择, 您也同样可以游标移动, 假如移到
 <Cancel> 处, 接著按 <Enter>, 这就会取消目前的作业。

    下面说明则是该画面的中文翻译说明。

    HELP       阅读线上安装说明
    KEYMAP     更改键盘排列
    QUICK      快速安装模式, 假如使用这选项的话, 系统安装过程
               就不会停下来一一询问您问题。 另外, 这选项可以,
               搭配下面 "MAKE TAGS", 但是, 不是专家的话, 请勿
               使用。
    MAKE TAGS  改变软体内键安装选项
    ADDSWAP    启动 swap partition, 使虚拟记忆体即刻生效
    TARGET     指定目的硬碟分割区
    SOURCE     指定来源 source media
    DISK SETS  选择安装软体系列
    INSTALL    开始安装
    CONFIGURE  系统设定
    EXIT       结束安装作业


□ 启动虚拟记忆体


    前面主服务画面 (< 画面 5-9 >) 下第五个选项 ADDSWAP, 我们
用方向键往下移动到此, 之後按 <Enter> 键。 这画面中的 /dev/hdb2
是系统自己抓到的, 无须额外手工指定, 不过, 前提是之前进行硬碟
分割时, 已经把 /dev/hdb2 的分割区型态 (Partition Type) 正确
设定为 ″Linux swap″。

    以下自动化程序所作的有三个动作, 第一就是对现有的 Swap
Partition 执行规划动作 (mkswap), 第二个动作, 是让该新规划好的
Swap partition 即刻生效 (swapon)。 最後一步, 则是安装到将来系
统的 /etc/fstab, 这样系统安装完成後, 每次系统开机时就会自动启
动虚拟记忆体。


<< 画面 5-10 >>
      ______________________  SWAP SPACE DETECTED ________________________
     □                                                                   
□     □ Slackware Setup has detected a swap partition:                    
□     □                                                                   
□     □    Device Boot  Begin   Start     End  Blocks   Id  System        
□     □ /dev/hdb2         101     101     160   30240   82  Linux swap    
□     □                                                                   
□     □ Do you wish to install this as your swap partition?               
□     □                                                                   
□     
□___________________________________________________________________□     
□                       < Yes >      <  No  >                       □      
____________________________________________________________________□ 
    上面这画面下, 按 <Enter> 就可以继续到下面画面, 假若要中断
的话, 按 <Tab> 键可以移动反白到 < No > 区域。

 
<< 画面 5-11 >>
       ________________________ MKSWAP WARNING ________________________
      □ IMPORTANT NOTE: If you have already made any of your swap      
□      □ partitions active (using the swapon command), then you         
□      □ should not allow Setup to use mkswap on your swap partitions,  
□      □ because it may corrupt memory pages that are currently         
□      □ swapped out. Instead, you will have to make sure that your     
□      □ swap partitions have been prepared (with mkswap) before they   
□      □ will work. You might want to do this to any inactive swap      
□      □ partitions before you reboot.                                  
□       ________________________________________________________________ 
□      □                           <  OK  >                             
□       ________________________________________________________________ □ 

 
<< 画面 5-12 >>
        ________________________  USE MKSWAP? ________________________
       □  Do you want Setup to use mkswap on your swap partitions?   
□        
______________________________________________________________□       
□                    < Yes >      <  No  >                    □        
______________________________________________________________□

    以上三个连续画面所执行的, 也可以用下面这个指令手工完成, 这
提供读者参考。
 
    $ /sbin/mkswap /dev/hdb2 30240

    还有一点要注意, 假如以前已经做过这指令, 此处就不要重复。
至於操作方法, 上面画面中, 可以移动 <Tab> 键, 选择 No 不安装,
这样会直接跳到下面画面。 假若以前没有操作过, 可以直接按 <Enter>
,这样会自动执行 mkswap动作。


    下面画面则无论如何一定要执行, 这样就立刻才可以使 Swap
Partition 生效。 以此例来说, 会立刻增加约 30MB 的虚拟记忆体。

<< 画面 5-13 >>
           __________________ ACTIVATE SWAP SPACE? __________________
          □ If you have not already activated your swap partitions  
□          □ with 'swapon', you should do so at this time. Activate  
□          □ swap partitions with 'swapon'?                          
□           
__________________________________________________________□          
□                  < Yes >      <  No  >                  □           
__________________________________________________________□ 
 
    上面画面所执行的, 就等同於以下这指令:

    $ /sbin/swapon /dev/hdb2

    下面这画面, 安装程式询问说要不要更改 /etc/fstab, 这效果是
以後系统 (指安装完成後的系统) 每次开机後, 会自行启动该 Swap
Partition, 此处我们按 <Enter> 键, 选择安装。

 
 
<< 画面 5-14 >>
     ______________________  SWAP SPACE CONFIGURED ________________________
    □ Your swapspace has been configured. This information will           
□    □ be added to your /etc/fstab:                                        
□    □                                                                     
□    □ /dev/hdb2        swap        swap        defaults                   
□    □                                                                     
□    □                                                                     
□    □                                                                     
□    □                                                                     
□    □                                                                     
□     
______________________________________________________________________□    
□                              <  OK  >                               □     
______________________________________________________________________□ 
 
    下面是最後一个画面, 安装程式询问我们是否接下来继续执行我
前面介绍的 『2. 指定安装目的分割区 (Target)』, 若按 <Enter>
回答 Yes, 则会立刻接续下去, 若按 <Tab> 选择 No, 则回到最外层
主服务画面。

 
<< 画面 5-15 >>
           ______________ CONTINUE WITH INSTALLATION? ______________
          □ Now that you've set up your swap space, you may         
□          □ continue on with the installation. Otherwise, you'll    
□          □ be returned to the main menu. Would you like to         
□          □ continue the installation and set up your TARGET        
□          □ drive(s)?                                               
□           
__________________________________________________________□          
□                  < Yes >      <  No  >                  □           
__________________________________________________________□ 
 

□ 指定安装目的分割区

    在这步骤里, 我们要一一的告诉系统安装程式, 哪一个分割区我
们想作为 / 档案系统, 哪一个分割区指定为 /usr 档案系统, 等等。
除此以外, 假如硬碟某一个分割区已经安装有 DOS 或 OS/2, 也可以
在此告诉系统安装程式, 这样子将来就可以直些在 Linux 档案系统
下取用 DOS与 OS/2 档案系统内的东西 (Linux支援 DOS FAT 及 OS2
HPFS 等档案系统)。

    这一阶段的实际操作步骤也很简单。 我们首先指定所要安装
Linux 的分割区, 接著安装程式会询问确认该分割区的属性, 然後
们需决定要不要对该分割区规划出档案系统 (make filesystem)。

    下面画面中, 我们可以看到, 系统安装程式会自动侦测出所有属
性为 Linux native (Partition ID 为 83) 的分割区。 这画面中,
我们被询问的第一个话题, 就是 / 档案系统将设於何处?  这里笔
者回答 /dev/hdb3, 这是第二颗硬碟的第三个分割区。 额外一提,
Linux 可以安装在第一或第二颗硬碟, 悉听尊便。


<< 画面 5-16 >>
     _____________________________________________________________________
    □                                                                     
□    □    Device Boot  Begin   Start     End  Blocks   Id  System          
□    □ /dev/hdb1           1       1     100   50368+  83  Linux native    
□    □ /dev/hdb3         536     536     736  101304   83  Linux native    
□    □                                                                     
□    □ Which device would you like to use for your root Linux partition?   
□    □ __________________________________________________________________  
□    □□dev/hdb3                                                         
□□    □ 
__________________________________________________________________□□    
□                                                                     □    
□                                                                     □    
□                                                                     □    
□                                                                     □    
□                                                                     □    
□                                                                     □    
□                                                                     □     
______________________________________________________________________□    
□                       <  OK  >      <Cancel>                        □     
______________________________________________________________________□ 
 
    接下来读者会看到下面这画面, 这里询问档案系统型态, 我建议
读者选择 ext2, 因为绝大多数人都是选用这个。 我们用方向键把反
白移至 ext2 这行, 之後按<Enter> 键。


<< 画面 5-17 >>
        __________________  CHOOSE LINUX FILESYSTEM __________________
       □ There are two main filesystem types that are used for        
□       □ Linux. These are the xiafs filesystem, and the second        
□       □ extended filesystem (ext2). Ext2 seems to be the current     
□       □ standard. Xiafs hasn't really been changed in quite some     
□       □ time. Ext2 has one really nice feature that xiafs doesn't    
□       □ have: as an ext2 partition is unmounted, a clean bit is      
□       □ written to it. When the machine is rebooted, checking is     
□       □ skipped for any partitions that have the clean bit on them.  
□       □ Xiafs may be a better choice for machines with low memory,   
□       □ however, so it's still supported. What filesystem do you     
□       □ plan to use on your root partition (/dev/hdb3), ext2fs or    
□       □ xiafs?                                                       
□       □ __________________________________________________________   
□       □□         ext2   Linux Second Extended Filesystem          
□□       □□         xiafs  Linux Xiafs                               
□□       □ __________________________________________________________   
□        ______________________________________________________________ 
□       □                   <  OK  >      <Cancel>                     
□        ______________________________________________________________ □ 
 
    选择 ext2 档案系统後, 接著又询问我们是否要真的执行建造动
作 (相当於DOS的格式化动作), 假如这是我们第一次安装, 很可能我
要就要选择 Format 或 Check, 但是如果确定以前已经做过, 这里也
可以选择 No。 至於 Format 与 Check的不同, Check 除了做 Format
动作外, 还额外检测硬碟是否有坏轨, 假如您硬碟有瑕疵的话, 记得
选用 Check。

<< 画面 5-18 >>
      ________________________  FORMAT PARTITION ________________________
     □ If this partition has not been formatted, you should format it.   
□     □ NOTE: This will erase all data on it. If you are trying to        
□     □ upgrade an existing Linux partition, you should use setup from    
□     □ your hard drive, not from the boot/root disk. (The versions of    
□     □ setup supplied on the hard drive and the boot/root disk differ)   
□     □ Would you like to format this partition?                          
□     □ 
________________________________________________________________□□     
□□       Format  Quick format with no bad block checking         □□     
□□       Check   Slow format that checks for bad blocks          □□     
□□       No      No, do not format this partition                □□     □ 
________________________________________________________________□□      
____________________________________________________________________□     
□                      <  OK  >      <Cancel>                       □      
____________________________________________________________________□ 
 
    以下我选择 Format, 系统就立刻执行 mkfs 动作, 额外一提, 这
动作相同於 $ mke2fs /dev/hdb3 101304 指令, 读者朋友以後进行正
常系统管理时, 会用到这命令。


<< 画面 5-19A >>


       ______________________SELECT INODE DENSITY ______________________
       □ Ext2fs defaults to one inode per 4096 bytes of drive space.  
□       □ If you're going to have many small files on your drive,      
□       □ then you may need more inodes (one is used for each file     
□       □ entry). You can change the density to one inode per 2048     
□       □ bytes, or even per 1024 bytes. Select '2048' or '1024', or   
□       □ just hit enter to accept the default of 4096 bytes. NOTE:    
□       □ If you are going to run from CD using a small (<60MB)        
□       □ partition, use 1024 to be safe. Each link uses an inode and  
□       □ it's easy to run out of space.                               
□       
□____________________________________________________________□□       
□□         4096  1 inode per 4096 bytes. (default)          □□       
□□         2048  1 inode per 2048 bytes.                    □□       
□□         1024  1 inode per 1024 bytes.                    □□       
□____________________________________________________________□□        
_______________________________________________________________
       □                   <  OK  >      <Cancel>                     
□        _______________________________________________________________□ 
    画面 5-19A 的选择, 笔者建议, 若是用来作为 News spool 区域
(也就是 /var/spool/news) 的档案系统, 不妨选择 1024 这一栏, 这
结果会造成一个 Block (照内定, 一个Block等於1024 bytes) 等於一
个 Inode 除此以外的正常状况, 选择第一选项 4096, 这结果一个Inode
会等於 4096 bytes。 以上若读者无法明白什麽是 Bloack/Inode, 请
忽略无妨, 这些观念并不重要。


<< 画面 5-19B >>
                  ______________  FORMATTING ________________
                 □ Formatting /dev/hdb3                     
□                 □ Size in 1K blocks:    70560              
□                 □ Filesystem type: ext2                    
□                  __________________________________________
 

    以上连续几个动作已经成功的指定某一个分割区作为系统的 /
(root) 档案系统, 假如您只有一个 Linux属性的分割区, 这时 / 档
案系统就是您唯一的档案系统。 不过, 假如您有一个以上, 您就可
以看到下面画面, 这画面告诉我们说, 本电脑硬碟下有不只一个 Linux
属性分割区, 而 /dev/hdb3 已经指定作为 / 档案系统, 这时是否要
把剩下的分割区也包含进来, 比方独立出 /usr 或 /usr/X11 档案系
统等等的?

    这里我回答是。 再重复一次, 把 / 档案系统规划小一些, 也就
是把 /usr、 /var、 /home、 /tmp 独立出来对系统执行效率以及系
统安全都会有助益。 不过, 对 Linux 或 Unix经验仍薄弱的朋友, 我
强烈建议您就此停住, 先不要顾虑效率或安全, 先跑看看, 增加一些
经验, 之後, 再考虑重新设定一个最佳的系统。

<< 画面 5-20 >>
      ____________________________________________________________________
     □ You seem to have more than one partition tagged as Linux native.  
□     □ You may use these to distribute your Linux system across more     
□     □ than one partition. Currently, you have /dev/hdb3 mounted as      
□     □ your / partition. You might want to mount large directories such  
□     □ as /usr or /usr/X11 or seperate partitions. You should not try    
□     □ to mount /etc, /sbin, or /bin on their own partitions since they  
□     □ contain utilities needed to bring the system up and mount         
□     □ partitions. Would you like to use some of the other Linux         
□     □ partitions to mount some of your directories?                     
□     □                                                                   
□      
____________________________________________________________________□     
□                       < Yes >      <  No  >                       □      
____________________________________________________________________□ 
 
 
    以下重复进行刚刚的动作, 这里我回答 /dev/hdb1 分割区。 另
外一点要注意的是, 假如这时您临时决定不再增加任何分割区, 可以
键入 q , 之後按 <Enter> 键即可。

<< 画面 5-21 >>
    ______________________________________________________________________
   □                                                                      
□   □ These are your Linux partitions:                                     
□   □ /dev/hdb1           1       1     100   50368+  83  Linux native     
□   □ /dev/hdb3         536     536     736  101304   83  Linux native     
□   □                                                                      
□   □ These partitions are already in use:                                 
□   □ /dev/hdb1 on /mnt type ext2 (rw)                                     
□   □                                                                      
□   □ Please enter the partition you would like to use, or                 
□   □ type [q] to quit adding new partitions:                              
□   □ __________________________________________________________________   
□   □□/dev/hdb1                                                         
□□   □ __________________________________________________________________ 
□□   □                                                                      
□   □                                                                      
□   □                                                                      
□   □                                                                      
□   □                                                                      
□    ______________________________________________________________________ 
□   □                       <  OK  >      <Cancel>                         
□    ______________________________________________________________________ 
□ 
 
    以下同样指定 ext2。

 
<< 画面 5-22 >>
        __________________  CHOOSE LINUX FILESYSTEM __________________
       □ There are two main filesystem types that are used for        
□       □ Linux. These are the xiafs filesystem, and the second        
□       □ extended filesystem (ext2). Ext2 seems to be the current     
□       □ standard. Xiafs hasn't really been changed in quite some     
□       □ time. Ext2 has one really nice feature that xiafs doesn't    
□       □ have: as an ext2 partition is unmounted, a clean bit is      
□       □ written to it. When the machine is rebooted, checking is     
□       □ skipped for any partitions that have the clean bit on them.  
□       □ Xiafs may be a better choice for machines with low memory,   
□       □ however, so it's still supported. What filesystem do you     
□       □ plan to use on your root partition (/dev/hdb3), ext2fs or    
□       □ xiafs?                                                       
□       □ __________________________________________________________   
□       □□         ext2   Linux Second Extended Filesystem          
□□       □□         xiafs  Linux Xiafs                               
□□       □ __________________________________________________________   
□        ______________________________________________________________ 
□       □                   <  OK  >      <Cancel>                     
□        ______________________________________________________________ □ 
 
<< 画面 5-23 >>

                  ______________  FORMATTING ________________
                 □ Formatting /dev/hdb3                     
□                 □ Size in 1K blocks:    70560              
□                 □ Filesystem type: ext2                    
□                  __________________________________________
 

    假如您硬碟内规划有很多 Linux 分割区, 这时您重复以上动作就
可以。 以下接著安装程式侦测到我第一个硬碟内有 DOS 分割区 (C:
碟), 就问我们说, 是否要把这DOS分割区包含进来, 成为系统的档案
系统之一, 於是我们可以在 Linux系统下直接存取原本 C: 磁碟内的
东西。 这里按 <Enter> 回答是, 若不想要, 按 <Tab> (或方向键),
把反白移到 No, 之後按 <Enter>。


<< 画面 5-24 >>
    ____________________  DOS AND OS/2 PARTITION SETUP ____________________ 
□   □                                                                       
□   □ The following DOS FAT or OS/2 HPFS partitions were found:             
□   □                                                                       
□   □ /dev/hda1   *       1       1    1000  127491+   6  DOS 16-bit >=32M  
□   □                                                                       
□   □ Would you like to make some of these partitions visible from Linux?   
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□   □                                                                       
□    
________________________________________________________________________□   
□                         < Yes >      <  No  >                         □    
________________________________________________________________________□ 
 
    由於我回答 Yes, 以下就要进一步回答 /dev/hda1。

 
<< 画面 5-25 >>
   __________________________  CHOOSE PARTITION 
____________________________□  □ These DOS or OS/2 partitions are available 
to mount:                   □  □ /dev/hda1   *       1       1    1000  
127491+   6  DOS 16-bit >=32M   □  □ Please enter the partition you want to 
access from Linux,              □  □ or type [q] to quit adding new 
partitions:                             □  □ 
____________________________________________________________________   □  
□□dev/hda1                                                            □□  
□ ____________________________________________________________________ □□  
□                                                                        □  
□                                                                        □  
□                                                                        □  
□                                                                        □  
□                                                                        □  
□                                                                        □  
□                                                                        □  
□                                                                        □  
□                                                                        □  
□                                                                        □  
□                                                                        □   
________________________________________________________________________ □  
□                        <  OK  >      <Cancel>                          □   
________________________________________________________________________ □ 
 
    以下画面则是要选择 Mount Point, 这个就是说把 

--
※ 来源:.碧海青天 bbs.dlut.edu.cn.[FROM: dragon.dlut.edu]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:421.629毫秒