Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Unix知識 >> Unix基礎知識

Unix啟動故障的應急診斷與處理

Windows、NT若啟動失敗,可透過系統工具製作應急引導盤來搶救。而Unix在啟動失敗時,多數人往往直接重裝系統、重建資料,其實大可不必——你完全可以像Windows那樣,用Unix應急引導盤成功引導系統。

製作並測試boot與root應急盤

步驟:1、以超級用戶root登入;2、鍵入 # mkdev fd;3、依提示插入3.5吋軟盤,分別製作boot盤與root盤。

原理:應急盤由boot(引導盤)與root(根檔案系統盤)組成。boot盤含引導與裝入核心所需的三個檔案:/boot、/etc/default/boot、/Unix;root盤則含部分實用程式,用以把系統完整恢復。製作完成後務必測試:以root登入並鍵入 # /etc/shutdown,於出現reboot提示時插入boot盤並回車,提示插入root盤時插入root盤並回車,若能出現提示符 # 即表示製作正確。

分情況對症下藥

1)出現"NO OS"

插入BOOT盤,於boot:時鍵入 hd(40)Unix,進入單用戶模式後鍵入 instbb hd /dev/hd0a 與 dparam -w。

原理:此提示表明硬碟上管理引導的 /etc/hd0boot、/etc/hd1boot 或主引導塊 /etc/masterboot 被破壞。instbb把引導塊分區由軟盤寫回硬碟,dparam則把引導塊程式碼寫回硬碟。

2)出現"boot not found"

插入boot盤,於boot:時鍵入 fd(60)Unix.Z root=hd(42),進入單用戶模式後依序執行:

# umount /stand
# mount /stand
# mount -r /dev/fd0 /mnt
# cp /mnt/boot /stand
# umount /mnt

再以haltsys重啟,出現press any key to reboot時移走root盤。原理:此提示表明 /boot 遺失,umount /stand 卸載損壞的引導檔與核心,cp 把應急盤上的 /boot 拷回硬碟 /stand。

3)出現"Unix not found"

插入boot應急盤重啟,於boot:時鍵入 fd(60)Unix.Z root=hd(42) swap=hd(41),進入單用戶模式後依序執行:

# umount /stand
# mount /stand
# mount -r /dev/fd0 /mnt
# cp /mnt/Unix.Z /stand
# umount /mnt

再以haltsys重啟並移走root盤。原理:此提示表明核心Unix遺失,cp 把boot盤上的Unix核心壓縮檔複製回硬碟即可。

Copyright © Linux教程網 All Rights Reserved