Show Table of Contents
E.5.2. 檔案名稱與區塊表
當輸入指令指定一個檔案給 GRUB 時,例如選單表,在裝置與分割區位置後必須指定完整的檔案途徑。
下列為指令結構:
(<device-type><device-number>,<partition-number>)</path/to/file>
在這個範例中,將 <device-type> 替換為
hd、fd 或 nd。將 <device-number> 替換為整數。 將 </path/to/file> 替換為一個包括裝置位置的完整路徑。
同時您也可以指定一個沒有顯示在系統檔案上得檔案給 GRUB,例如在分割區上前幾個區塊中的連續載入器。與載入這類檔案,提供一個指定檔案於分割區區塊中位置的 blocklist。因為檔案通常包含了幾個不同的區塊,blocklist會用一種特殊語法。包含該檔案的區塊會由偏數指定,接著為從偏置點的區塊編號。區塊偏置會以逗號分開連續的列在列表上。
下列為範例 blocklist :
0+50,100+25,200+1
這個範例 blocklist 指定在分割區上得第一個區塊,並使用區塊 0 到 49、100 到 124 以及 200。
使用 GRUB 在需要連續載入的作業系統上,blocklist 的撰寫方式變得很實用。如由區塊 0 開始,則可以不需填入區塊的偏數。例如,如果連續載入檔位於主硬碟上得主分割區則應命名為:
(hd0,0)+1
在設定正確的裝置與分割區為 root 後,於 GRUB 的指令列顯示一個與 blocklist 相似的
chainloader 指令:
chainloader +1
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.