2 轻轻松松安装 Linux( 二 )


Unix高手在确定硬碟Partition没有被DOS占满後, 就可以开始动手 。
〔第一步〕当然是先造出一个Linux 装机用的启动磁片, 这动作是在 DOS下执行的, 您手上有 Slackware Linux bootdisk/rootdisk两个档案 ,以及RAWRITE.EXE程式, 接著您执行RAWRITE.EXE把这两个档案写到两张 刚FORMAT过的A磁片上, 您的所有步骤都是从这两张装机磁片开始 。
〔第二步〕把这张装机磁片摆入A槽, 启动机器 。没有错误的话, 您 现在已经进入Linux系统了, 您第一次的Login当然是″root″, 您现在所 处的环境是Bourne shell 。
〔第三步〕执行fdisk造出Linux自己的空间来, 至於是否把全部硬碟 都给Linux, 这由您自己决定, 图1.1让您参考 。
┌—图1.1 ——————————————————————————————┐ │ /# fdisk ← 在Shell提示符号後键入fdisk指令 │ │ │ │ Command (m for help): p ← 我们先来浏览目前的Partition配置情况 │ │ │ │ Disk /dev/hda: 15 heads, 17 sectors, 1001 cylinders │ │ Units = cylinders of 255 * 512 bytes │ │ │ │ /dev/hda1 1 1 161 20519 4 DOS 16-bit <32M │ │ /dev/hda4 162 162 483 41055 a5 Unknown │ │ │ │ Command (m for help): m ← 键入m求助 │ │ Command action │ │ a toggle a bootable flag ← 设定(或取消) Partition为Active │ │ d delete a Partition ← 删除Partition │ │ l list known Partition types │ │ m print this menu │ │ n add a new partition ← 增建一个新的Partition │ │ p print the partition table │ │ q quit without saving changes ← 中断执行fdisk │ │ t change a partition‘s system id │ │ u change display/entry units │ │ v verify the partition table ← 确认设定 │ │ w write table to disk and exit ← 设定完成後, 储存起来 │ │ x extra functionality (experts only) │ │ │ │ │ │ Command (m for help): n ← 回答n, ″n″是增建新Partition │ │ Command action │ │ e extended │ │ p primary partition (1-4) │ │ p ← 回答p, 指定primary partition │ │ │ │ Partition number (1-4): 2 ← 回答2 (因为我硬碟内编号1以及 │ │ 编号4的partition已经被其他系 │ │ 系统所用 。这里若回答″3″也 │ │ 可以, 不过以下都要跟著改变 。│ │ First cylinder (484-1001): 484 ← 这里″484-1001″是fdisk自动 │ │ 侦测出来的, 假如您完全依照 │ │ 这两个数据来回答, 则表示您 │ │ 要把目前DOS剩下的空间全都给 │ │ Linux, 这例中我们就照著回答 。│ │ │ │ Last cylinder orsize orsizeM orsizeK (484-1001): 1001 │ │ │ │ Command (m for help): t ← 更改partition id │ │ Partition number (1-4): 2 ← 同样是编号2的Partition │ │ Hex code (type L to list codes): 83 ← 83 代表Linux native │ │ │ │ Command (m for help): v ← 确认以上的设定 │ │ Command (m for help): p ← 浏览刚刚设定後的partition 表 │ │ │ │ Disk /dev/hda: 15 heads, 17 sectors, 1001 cylinders │ │ Units = cylinders of 255 * 512 bytes │ │ │ │ /dev/hda1 1 1 161 20519 4 DOS 16-bit <32M │ │ /dev/hda2 * 484 484 1001 66045 83 Linux native │ │ /dev/hda4 162 162 483 41055 a5 Unknown │ │ │ │ 果然, 硬碟内位於/dev/hda2的Partiion已经是Linux专用的Partition │ │ │ │ Command (m for help): w │ │ reboot now before doing anything else │ │ /# │ │ │ └——————————————————————————————————┘
〔第三步〕建置档案系统 。这步骤在标准 Slackware Linux 的 setup 安装程序下, 是可以省略的, 也就是说, 让 setup 自动帮您 执行 。
┌—图1.2 ———————————————————————————┐ │ │ │ /# mke2fs -c /dev/hda2 66045 这操作, 意义上等同於DOS的 │ │ ″format c:″指令 │ └———————————————————————————————┘

推荐阅读