- 論壇徽章:
- 1
|
作者:CNL
剛看了sco一篇技術(shù)貼子,閑來無事轉(zhuǎn)過來供各位參考:
原文URL:
http://wdb1.sco.com/kb/showta?taid=114161&qid=575967163&sid=1815378419&pgnum=1
如果你的系統(tǒng)裝了很多東西后才想起來做mkdev fd制作緊急引導(dǎo)盤,
相信很多人都會(huì)碰到軟盤容量不夠的問題,
論壇里面有篇精華貼子講過如何制作一個(gè)2.88M容量引導(dǎo)軟盤的貼子,
但是還有一種讓內(nèi)核先瘦身再做引導(dǎo)盤的解決辦法,步驟如下
1) 進(jìn)入單用戶維護(hù)模式下,vi建立一個(gè)瘦身的vuifile(內(nèi)核段聲明),比如名字為/etc/conf/cf.d/vuifile.strip
文件內(nèi)容如下
MEMORY {
below_loadsite: origin = 0x00000000, length = 0xF0010000
KV_loadsite: origin = 0xF0010000, length = 0x007F0000
above_loadsite: origin = 0xF0800000, length = 0x0F7FFFFF
}
SECTIONS {
.text: {} > KV_loadsite
.data ALIGN(0x1000): {} > KV_loadsite
.bss ALIGN(0x1000): {} > KV_loadsite
}
2) 將boot文件系統(tǒng)重新mount為可寫
# btmnt -w
3) 改一下當(dāng)前的內(nèi)核/stand/unix文件名
# mv /stand/unix /stand/unix.good
4) 去掉內(nèi)核中的符號(hào)和注釋,這樣大約可以讓你的/stand/unix小20%
# cd /etc/conf/cf.d
# idld -s vuifile.strip -o /stand/unix /stand/unix.good
# mcs -d /stand/unix
5) 開始做緊急引導(dǎo)盤了
# mkdev fd
6) 做好了恢復(fù)內(nèi)核到原來的樣子
# mv /stand/unix /stand/unix.stripped
# mv /stand/unix.good /stand/unix
7) 將boot文件系統(tǒng)重新mount為只讀
# btmnt -r
測(cè)試一下你做好的boot軟盤,看看是否能把你的系統(tǒng)正常引導(dǎo)起來
插入boot盤
# reboot
(bios里面確認(rèn)一下從軟盤引導(dǎo))
over!
本文來自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u/31/showart_509069.html |
|