萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 程式設計 >  >> 伺服器教學

SCO OpenServer 5.0.5 十大經典故障診斷與修復實戰

前言

SCO OpenServer 5.0.5 作為金融、電信領域的經典商業 Unix,雖已停止主流維護,但大量存量系統仍在運行。本文整理 10 個高頻故障現象、根因分析與分級修復方案,助力存量系統穩健運維。

故障 1:Boot 文件丟失/找不到

現象

boot not found
cannot open stage 1
boot failure: error loading hd(40)/boot

根因

/stand/boot 文件損壞/丟失,或 CMOS 硬盤參數錯誤導致找不到分區。

修復步驟

  1. 啟動盤/光盤引導進入單用戶模式:hd(40) unix
  2. 重掛載 /stand 為可寫:umount /stand; mount /stand
  3. 從啟動盤恢復:mount /dev/fd0135ds18 /mnt; cp /mnt/boot /stand/boot
  4. 修正屬主:chown bin:bin /stand/boot
  5. 若為 CMOS 參數錯,進 BIOS 執行「IDE Auto Detect」

故障 2:Unix 內核文件丟失

現象

unix not found

修復

  1. 啟動盤引導:fd(60)unix.Z root=hd(42) swap=hd(41)
  2. 重掛載 /stand,從啟動盤恢復:cp /mnt/unix.Z /stand/unix
  3. 修正屬主:chown bin:mem /stand/unix

故障 3:/bin/sh 損壞導致啟動腳本失敗

現象

INIT: command exec /etc/brc ... failed to execute, errno=9 (exec of shell failed)

修復

  1. 啟動盤 + Root 盤雙盤引導進維護模式
  2. mount /dev/hd0root /mnt; cp /bin/sh /mnt/bin/sh
  3. 修正屬主:chown bin:bin /mnt/bin/sh

故障 4:關機報 /etc/uadmin 缺失

現象

/etc/initscript: /etc/uadmin: not found

修復

  • 單機:掛載 Root 盤 cp /mnt/etc/uadmin /etc/uadmin
  • 集群:rcp good_host:/etc/uadmin /etc/uadmin 或 tar 傳輸
  • 修正屬主:chown bin:bin /etc/uadmin

故障 5:/etc/init 丟失導致掛起

現象

Kernel: i/o bufs=600k  (然後掛起)

修復

  1. 雙盤引導進維護模式
  2. cp /etc/init /mnt/etc/init
  3. 修正屬主:chown bin:bin /mnt/etc/init

故障 6:顯示 NO OS(主引導塊損壞)

修復

  1. 啟動盤進單用戶:hd(40) unix
  2. 重寫引導塊:instbb hd /dev/hd0a; dparam -w
  3. 重啟

故障 7:無法進入多用戶模式(/etc/inittab 丟失)

現象

INIT: can not open /etc/inittab error 2

修復

cp /etc/conf/cf.d/init.base /etc/inittab
/etc/conf/cf.d/link_unix -y
# 重新鏈接內核並重啟

關鍵:不能直接從啟動盤複製 inittab,必須從 init.base 重建。

故障 8:/etc/bcheckrc 符號鏈接丟失

現象

/etc/initscript: /etc/bcheckrc: not found

修復

# 從源文件恢復符號鏈接
ln -s /opt/K/SCO/Unix/5.0.5Eb/etc/bcheckrc /etc/bcheckrc
# 或複製
cp /opt/K/SCO/Unix/5.0.5Eb/etc/bcheckrc /etc/bcheckrc

故障 9:單用戶模式下 /bin/sulogin 缺失

現象

INIT: SINGLE USER MODE /etc/initscript: /bin/sulogin: not found

修復

需在多用戶模式下修復(因無法進單用戶):

ln -s /opt/K/SCO/Unix/5.0.5Eb/bin/sulogin /bin/sulogin

故障 10:策略管理器初始化失敗(時間錯誤)

現象

LOGIN: ERROR - Failed to initialize policy manager. (IFOR_PM_FATAL)

根因

系統時間早於 OS 安裝時間,通常因 BIOS 電池耗盡導致 CMOS 時間重置。

修復

  1. 進 BIOS 修正時間
  2. 或單用戶模式下:date MMDDhhmmYYYY 修正系統時間

運維總結

  1. 備份關鍵文件:/stand/boot, /stand/unix, /bin/sh, /etc/init, /etc/inittab, /etc/uadmin, /bin/sulogin
  2. 製作專用啟動盤:包含完整根文件系統與修復工具
  3. 記錄 CMOS 參數:硬盤幾何參數、啟動順序
  4. 定期更換主板電池:預防時間漂移導致安全策略失效
  5. 建立災難恢復演練:每季度驗證備份可用性

結語

商業 Unix 運維的核心是「精準定位、最小變更、快速恢復」。掌握這 10 類故障模式,配合完善的備份與啟動盤體系,能讓 SCO OpenServer 系統在壽命末期依然穩健服務業務。

copyright © 萬盛學電腦網 all rights reserved