A server requires a GRUB2 boot option which will always boot to runlevel 1. Which line of a GRUB2 configuration file starts the beginning of the settings needed to make this new choice available?

A. initrd
B. linux
C. menuentry
D. runlevel

題解

GRUB2 設定檔中的每個開機選項都是用「menuentry」命令來定義的,「menuentry」後面會接著選項的標題,再用大括號把選擇這個選項後要執行的命令包起來。所以若要新增一個開機選項,設定的開頭就是「menuentry」這一行,答案是選項 C。

在「menuentry」的大括號內,GRUB2 的「linux」命令可以讀取 Linux 核心,並且可以透過加入「single」參數來指定是用單人模式(runlevel 1),或者也可以直接加入想要使用的 runlevel 數字來改變開機後要進入的 runlevel。如果是 GRUB Legacy 就要使用「kernel」命令,而不是「linux」命令。