当前位置:操作系统 > Unix/Linux >>

如何在硬碟建置Linux系统之指定安装目的分割区

在这步骤里, 我们要一一的告诉系统安装程式, 哪一个分割区我

  们想作为 / 档案系统, 哪一个分割区指定为 /usr 档案系统, 等等。

  除此以外, 假如硬碟某一个分割区已经安装有 DOS 或 OS/2, 也可以

  在此告诉系统安装程式, 这样子将来就可以直些在 Linux 档案系统

  下取用 DOS与 OS/2 档案系统内的东西 (Linux支援 DOS FAT 及 OS2

  HPFS 等档案系统)。

  这一阶段的实际操作步骤也很简单。 我们首先指定所要安装

  Linux 的分割区, 接着安装程式会询问确认该分割区的属性, 然後

  们需决定要不要对该分割区规划出档案系统 (make filesystem)。

  下面画面中, 我们可以看到, 系统安装程式会自动侦测出所有属

  性为 Linux native (Partition ID 为 83) 的分割区。 这画面中,

  我们被询问的第一个话题, 就是 / 档案系统将设於何处? 这里笔

  者回答 /dev/hdb3, 这是第二颗硬碟的第三个分割区。 额外一提,

  Linux 可以安装在第一或第二颗硬碟, 悉听尊便。

  << 画面 4-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 > ?

  ______________________________________________________________________?

  接下来读者会看到下面这画面, 这里询问档案系统型态, 我建议

  读者选择 ext2, 因为绝大多数人都是选用这个。 我们用方向键把反

  白移至 ext2 这行, 之後按 键。

  << 画面 4-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 > ?

  ______________________________________________________________ ?

  选择 ext2 档案系统後, 接着又询问我们是否要真的执行建造动

  作 (相当於DOS的格式化动作), 假如这是我们第一次安装, 很可能我

  要就要选择 Format 或 Check, 但是如果确定以前已经做过, 这里也

  可以选择 No。 至於 Format 与 Check的不同, Check 除了做 Format

  动作外, 还额外检测硬碟是否有坏轨, 假如您硬碟有瑕疵的话, 记得

  选用 Check。

  << 画面 4-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 > ?

  ____________________________________________________________________?

  以下我选择 Format, 系统就立刻执行 mkfs 动作, 额外一提, 这

  动作相同於 $ mke2fs /dev/hdb3 101304 指令, 读者朋友以後进行正

  常系统管理时, 会用到这命令。

  << 画面 4-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 > ?

  _______________________________________________________________?

  画面 4-19A 的选择, 笔者建议, 若是用来作为 News spool 区域

  (也就是 /
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,