這一章中, 我們首先來看看 bootdisk 作為救急磁片的用途。
Slackware linux 的 bootdisk 的第一個救急用途, 就是用來
啟動硬碟內的 Linux 系統, 什麼時候需要用到呢? 比方說您原本
從硬碟開機忽然失效了, 更不巧您也沒有做軟碟開機片, 這些情況
您就可以使用 bootdisk 開機 (沒有用到 rootdisk 磁片), 之後
在提示符號下使用 mount root=/dev/hda1 指令, 具體情況如下面
螢幕所示。
LILO
Welcome to the Slackware Linux 2.0.2 Bootkernel disk!
If you have any extra parameters to pass to the kernel, enter them at the
PRompt below. For instance, you might need something like this to detect the
hard drive on PS/1 and ValuePoint models from IBM:
ramdisk hd=cyl,hds,secs (Where "cyl", "hds", and "secs" are the number of
cylinders, sectors, and heads on the drive. Most
machine won't need this.)
Also, in a pinch, you can boot your system with a command like:
mount root=/dev/hda1
On machines with low memory, you can mount root=/dev/fd1 or
mount root=/dev/fd0 to install without a ramdisk. See LOWMEM.TXT for details.
If you wold rather load the root/install disk from your second floppy drive:
drive2 (or even this: ramdisk root=/dev/hd1)
DON'T SWITCH ANY DISKS YET! This prompt is just for entering extra paramters.
If you don't need to enter any paramters, hit ENTER to conitnue.
boot: mount root=/dev/hda1
把上面 /dev/hda1 換成您實際的情況就可以。
Slackware Linux bootdisk/rootdisk 組合也可以作為系統急救
磁片, 比方說您不小心修改 /etc/fstab 檔案, 但卻由於有錯誤造成
無法開機, 類似這種例子, 您就可以用 bootdisk 磁片開機, 之後換
插入 rootdisk磁片, 繼續執行開機作業, 我們前面提很多次, 這樣子
執行的就是一套陽春的 Linux作業系統, 但雖然陽春, 基本的系統工
具程式都有, 比方說 vi 文字編輯器。
由這軟碟系統來修復硬碟內的 Linux檔案系統的作法, 是先把硬
碟內的 Linux / (root) 檔案系統掛上來, 之後用 vi 修改造成錯誤
的設定檔案, 或者用 e2fsck 或 fsck 來修復硬碟內的檔案系統結構
(就類似 DOS的 CHKDSK指令)。
$ mount -t ext2 /dev/hda2 /mnt
筆者發現 Slackware Linux 2.02 以後的 rootdisk 磁片里面已
經沒有 vi 及 e2fsck 等工具, 假如您想使用 vi 的話, 可以試看看
/mnt/usr/bin/vi。