轻轻松松的安装Slackware Linux -- 5.其他非标准安装程序解析转, 尤其是记忆体消耗的情况, 若发觉有需要, 可以再设立第二个 Swap Partition, 若没有办法增加 Swap Partition, 可以用 Swap File, 不过 Swap File 效率上比 Swap Partition 低。 最後提醒读者一个观念, 假如系统经常性的使用掉大量的虚拟记 忆体, 这时您或许就该考虑扩充实际的记忆体了, 假如您希望系统运 转的效率处在最佳状态的话。 对於把 Linux使用在有严肃生产力场合 的读者朋友来说, 尤其要注意这一点。 □ 手工建造 Swap Partition 手工建造一个 Swap Partition 作为虚拟记忆体, 操作上非常简 单, 我们同样是用 fdisk 规划出一个新的分割区 (假设硬碟内仍未 满), 同时把该分割区的型别改别 Swap Partition, 之後我们用 mkswap 指令赋予其档案系统属性, 最後, 用 swapon 指令启动使用就可以。 一共三道步骤。 以下我们就来看一下实际操作系范例。 步骤一. /# fdisk /dev/hda ← 在Shell提示符号後键入fdisk指令 Command (m for help): p ← 我先来看看目前的设定情况 Disk /dev/hda: 15 heads, 17 sectors, 1001 cylinders Units = cylinders of 255 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/hda1 * 1 1 161 20519 4 DOS 16-bit <32M /dev/hda2 302 302 1001 89250 81 Linux/MINIX /dev/hda3 260 260 301 5355 81 Linux/MINIX Command (m for help): n ← 增加一个Partition Command action e extended p primary partition (1-4) p ← 指定Primary Partition number (1-4): 4 ← 指定第四个分割区 (前三个已经满了) First cylinder (162-1001): 162 ← 回答162 (162为系统自动侦测得知) Last cylinder or +size or +sizeM or +sizeK (162-259): 259 ← 259也是系统自动侦测, 这两个数据, 您依照自己情况调整 Command (m for help): t ← t 变更分割区的 ID Partition number (1-4): 4 ← 第4个分割区 (您依照情况调整) Hex code (type L to list codes): 82 ← 82代表Swap Partition Changed system type of partition 4 to 82 (Linux swap) Command (m for help): p ← 设定完毕, 我们先瞧一瞧 Disk /dev/hda: 15 heads, 17 sectors, 1001 cylinders Units = cylinders of 255 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/hda1 * 1 1 161 20519 4 DOS 16-bit <32M /dev/hda2 302 302 1001 89250 81 Linux/MINIX /dev/hda3 260 260 301 5355 81 Linux/MINIX /dev/hda4 162 162 259 12495 82 Linux swap 果然新造一个/dev/hda4 partition, 且指定为Linux Swap Command (m for help): w ← 无误後, 将以上设定存起来 The partition table has been altered. Please reboot before doing anything else. 步骤二. 执行步骤一後, 重新开机, 接着执行步骤二及步骤三。 $ mkswap -c /dev/hda4 12495 ← 这里 /dev/hda4为刚设定的Swap Partition, 12495为该分割区的大小 Setting up swapspace, size = 12787712 bytes 步骤三. $ /sbin/swapon /dev/hda4 假如您是临时需要扩充虚拟记忆体, 上面这三道步骤已经足够了 。但假如您想让系统在每次开机後都自动取用这些虚拟记忆体, 这时 您就要有额外的设定, 否则每次您都要重复执行步骤三, 系统才知道 上一篇:轻轻松松的安装Slackware Linux -- 4.如何在硬碟建置Linux系统 下一篇:没有了 更多相关文章
|
推荐文章
精彩文章
|