風中的羽翼 | 【教學】CD Shell 官網: http://www.cdshell.org/ 下載: http://www.cdshell.org/download.html CD Shell 是一個光碟引導器,可以提供你建立多重選啟動磁碟.... 這邊用得是 CD Shell 2.0.11 release,當然我並不建議各位下載 Beta 版 因為 Beta 版可能在某些機器上有不相容問題... 另外,CD Shell 並沒有支援中文選單,不過這並不影響其功能... 雖然標題寫的是教學,但這是粗略講解一下而已... 想要更深入了解 CD Shell 的話,請去官網看文件... CD Shell 檔案結構一覽: / (根目錄) | + BOOT | | | + FONTS (字型目錄,非必要) | | | + GRAPHICS (圖形目錄,非必要) | | | | | > SPLASH.BMP (低解析的 splash 圖形檔,非必要) | | | | | > SPLASH.CSI (高解析的 splash 圖形檔,非必要) | | | + MODULES (模組目錄,必要) | | | | | > *.CSM (所有模組檔) | | | | | > MEMDISK (memdisk 命令) | | | > CDSH.BIN (CD Shell 的程式檔,必要) | | | > CDSHELL.INI (啟動腳本,非必要) | | | > LOADER.BIN (引導器程式檔,必要) | + ISOLINUX (ISOLINUX 目錄,非必要) | | | > *.* (Linux kernels, isolinux.cfg, or other isolinux-related files) | | | > MEMDISK (alternative location for the memdisk program) | + tools (CSI轉換工具目錄,非必要) | + licenses (一些 licenses 檔,非必要) | > *.* (其他你想要放置的東西) 關於 Splash Screens : CD Shell 啟動時,可以展示一幅 5 秒鐘的開機圖形 此圖形解析度可以是 320x240x8 或 640x480x24 低解析度的圖檔為 BMP 檔,必須是 320x240x8(256色),使用 Run Length Encoding (RLE)編碼 高解析度的圖檔為 CSI 檔,可以為 640x480x24(16.7百萬色),可用 CD Shell 提供的 /tools/convert.exe 來轉換 當 CD Shell 啟動時,會先檢視 /boot/graphics/splash.csi 檔,假如檔案存在將會顯示該圖檔 否則的話,將會顯示 /boot/graphics/splash.bmp 檔... convert.exe 圖形轉換工具的說明: D:\CDSHELL\tools>convert.exe /? CD Shell Image conversion utility, Version 1.1 Copyright (C) 2002-2003 Michael K Ter Louw Visit http://www.cdshell.org for terms of use. Error: Conversion mode not specified. Syntax: convert <-bmp2csi | -csi2bmp> <-o outputfile> <inputfile> 如上所顯示的,此工具只在 BMP <-> CSI 中互轉 例:convert -bmp2csi -o splash.csi test.bmp 例:convert -csi2bmp -o splash.bmp test_file.csi 其他模組(Modules): Bootable CD Wizard Module 1.5 by reanimatolog http://www.cdshell.org/files/submiss...olog/bcdw.html 這個模組相當好用,使用 Bootable CD Wizard 程式來啟動映像檔 可以讓你執行一些非常規大小的映像檔,例如下面的連結: http://bootcd.narod.ru/images_e.htm 關於 cdshell.ini: CD Shell 最初會去搜尋 /boot/cdshell.ini 腳本檔,假如這檔存在,將會自動執行其中的命令... 至於其語法,請參考原文: http://www.cdshell.org/scripting.html http://www.cdshell.org/cmdref.html http://www.cdshell.org/functref.html http://www.cdshell.org/varref.html CD Shell 本身其實就有一些選單樣本檔,都放在 /boot/samples/doctorxp 裡面 其中我選了一個樣本檔出來,稍微重新修正一下,因為有的樣本檔不知是什麼原因,好像缺了些語法 可能是作者誤刪了某些東西,或是改漏了吧,執行時畫面並不美觀,所以......... 我上傳的壓縮檔中有三個檔,分別是 cdshell.ini、menu1.scr、menutemp.cds 其先後引入的順序是 cdshell.ini -> menu1.scr -> menutemp.cds 一般的設定全在 menu1.scr 上,其中要注意的是「設定選單相對應的指令動作」區的指令 Set Action?_Cmd 搭配 Set Action?_Par (Cmd 要搭配 Par 路徑,其中 ? 為 1∼6) Set Action?_Macro 搭配 Set Action?_Silent (Macro 標籤要搭配 Silent,其中 ? 為 1∼6) 另外,menutemp.cds 樣本檔內定已有 cmdline,ShowWinKey,HDDBoot 三個標籤 cmdline:為 CD Shell 的 Console ShowWinKey:Windows Key 的提示窗,只是提示而已,不用想太多.... HDDBoot:為硬碟啟動 0x80 例如,如下:使用命令 bcdw 啟動根目錄下的 MSDOS710.IMG 檔 Set Action2_Cmd="bcdw" Set Action2_Par="/MSDOS710.IMG" 例如,如下:使用命令 goto 到 cmdline 標籤 Set Action1_Cmd="goto" Set Action1_Par="cmdline" 例如,如下:到 HDDBoot 標籤 Set Action5_Macro="HDDBoot" Set Action5_Silent=1 最後處理完畢之後,可以使用 cdimage.exe 來生成 iso 檔,如下: CDIMAGE.EXE -lWXPFPP_EN -h -n -o -m -bD:\CDSHELL\boot\loader.bin D:\CDSHELL D:\TEST_TEST.ISO 以下為展示圖: |
回覆 |
進階會員 | 多謝兄的教學,晚一點來玩玩看 ; Diskem 1.x 畢竟陽春了點... |
回覆 |
進 | 不錯的工具!!有空再來試試看!Diskem也是類似的軟體? 我只有玩過EasyBoot而已! |
回覆 |
進階會員 | 引用:
Diskem 1.X只有文字模式,很陽春,但文字位置很好調整 指令也很簡單 | |
回覆 |
風中的羽翼 | 引用:
cdshell.ini 你可以把它當成 autoexec.bat 至於 menu1.scr 和 menutemp.cds 都是和 cdshell.ini 一樣,由 script 寫成,其檔名和副檔名是可以任意命名的... 先後順序是因為 cdshell.ini 中有類似 "script menu1.scr" 的執行語法 而 menu1.scr 中的最底下也有 "script menutemp.cds" 的執行語法 所以才會是 cdshell.ini -> menu1.scr -> menutemp.cds 另外,如果覺得選單不夠用的,可以自己複製 menu1.scr 為 menu2.scr 然後在 menu1.scr 的選單中使用 "script menu2.scr" 的語法來引用 menu2.scr 選單 如我在 menu1.scr 中「設定選單相對應的指令動作」區的兩行就是這樣寫的 Set Action6_Cmd="script" Set Action6_Par="/boot/menu2.scr" | |
回覆 |
風中的羽翼 | 大陸那邊的人好像比較喜歡使用 EasyBoot ,也有一些使用 Diskem 2.x 不過本人不會用 EasyBoot (汗),沒認真去看過 Diskem 1.x 和 CD Shell 其實都很簡單,通常只要下幾個指令就可以了 只是本例中的 CD Shell 樣本檔,好像比較複雜一點,其中用了很多變數.... 所以我看了其寫法之後,發覺它是朝模組化的方式去寫的.... CD Shell 也可以以圖檔方式來呈現,這樣反而更多樣化... 不過除了上面提到的 bcdw(Bootable CD Wizard Module) 模組之外,還必須再放一個 Showgif 模組進去 MODULES 目錄 http://www.cdshell.org/files/submiss...g/showgif.html 這次之前作的,廢圖再利用,以下全都是圖檔拼成的... |
回覆 |
進 | http://img21.imageshack.us/img21/5096/PastedImage.jpg http://img21.imageshack.us/img21/4629/PastedImage2.jpg 這是之前隨便玩的!!看看就好!EasyBoot是比較簡單用! CD Shell看起來真不賴!選單還不錯看!! |
回覆 |
風中的羽翼 | 引用:
只知道是換顏色,但不知道為什麼有那麼多的 \ 符號 所以再研究看看... menutemp.cds 看起來就像是一個選單樣版模組,一般應該不需要去動,當然除非你有大動作... 另外,本來都沒有注意到熱鍵是否需要,可是一想到我想作兩頁選單,就需要到這個功能 再瞭解一下 menutemp.cds 的內容,發現裡面也有這個功能,只是好像被 disable 了 menutemp.cds 內的 respondtokeys: 標籤如下... 不過本人只需要上一頁、下一頁,所加了紅色那兩行.. # respondtokeys: # #if ($lastKey == key[$Option1_HotKey]); then goto DoAction1 #if ($lastKey == key[$Option2_HotKey]); then goto DoAction2 #if ($lastKey == key[$Option3_HotKey]); then goto DoAction3 #if ($lastKey == key[$Option4_HotKey]); then goto DoAction4 #if ($lastKey == key[$Option5_HotKey]); then goto DoAction5 #if ($lastKey == key[$Option6_HotKey]); then goto DoAction6 if ($lastKey == key[f10]); then goto cmdline if ($lastKey == key[esc]); then goto HDDBoot if ($lastKey == key[pgup]); then script /boot/menu1.scr if ($lastKey == key[pgdn]); then script /boot/menu2.scr return 其他相關 key 的設定,請參考官方的 key 指令對照 http://www.cdshell.org/functref.html#key 最後,你會發現 Option?_HotKey (? 為 1∼6) 是被 # 當成註解 這表示你可以把 Option?_HotKey (? 為 1∼6) 複製到 menu1.scr 去成為 set Option1_HotKey="1" set Option2_HotKey="2" set Option3_HotKey="3" set Option4_HotKey="4" set Option5_HotKey="5" set Option6_HotKey="6" 然後記得把 respondtokeys: 內的 # 拿掉,就可以替選單設熱鍵了 | |
回覆 |
進階會員 | # respondtokeys: # #if ($lastKey == key[$Option1_HotKey]); then goto DoAction1 #if ($lastKey == key[$Option2_HotKey]); then goto DoAction2 #if ($lastKey == key[$Option3_HotKey]); then goto DoAction3 #if ($lastKey == key[$Option4_HotKey]); then goto DoAction4 #if ($lastKey == key[$Option5_HotKey]); then goto DoAction5 #if ($lastKey == key[$Option6_HotKey]); then goto DoAction6 if ($lastKey == key[f10]); then goto cmdline if ($lastKey == key[esc]); then goto HDDBoot 修改成: # respondtokeys: # if ($lastKey == key[$Option1_HotKey]); then goto DoAction1 if ($lastKey == key[$Option2_HotKey]); then goto DoAction2 if ($lastKey == key[$Option3_HotKey]); then goto DoAction3 if ($lastKey == key[$Option4_HotKey]); then goto DoAction4 if ($lastKey == key[$Option5_HotKey]); then goto DoAction5 if ($lastKey == key[$Option6_HotKey]); then goto DoAction6 if ($lastKey == key[f10]); then goto cmdline if ($lastKey == key[esc]); then goto HDDBoot 會出現下面的錯誤: 先把Info改好再看要怎麼解決@@" |
回覆 |
|
類似的主題 | ||||
主題 | 主題作者 | 討論版 | 回覆 | 最後發表 |
Shell Script 求教 | FYI | -- FreeBSD & Linux 討 論 版 | 10 | 2011-02-02 02:22 AM |
【軟體】2 nice Shell extensions | kingleo | -- 軟 體 分 享 版 | 0 | 2005-11-15 07:40 PM |
【軟體】MSN Shell | kanako0605 | -- 網 路 軟 體 討 論 二 版 (網路其他軟體) | 23 | 2004-07-01 02:34 AM |
【教學】Linux Shell 裡一些很少用到卻很有用的指令 | smallway | -- FreeBSD & Linux 討 論 版 | 0 | 2002-11-05 01:40 AM |
哪兒有 Unix shell 程式的教學? | leonchou | -- 其 他 軟 體 討 論 版 | 2 | 2001-09-25 12:35 AM |
XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。