Linux

如何在啟動時選擇新核心,執行專用伺服器?

  • August 2, 2013

作為在執行 Debian 的專用伺服器上安裝 proxmox 的一部分,它安裝了一個新核心。作為安裝說明的一部分,我應該在 grub 中選擇新核心。但是我沒有在啟動時訪問伺服器的虛擬控制台。我唯一能做的就是在伺服器啟動後執行一個 ssh 控制台。如何選擇 pv 核心作為引導時間的預設值?

我在伺服器上執行 Debian Wheezy,並安裝了 proxmox 3。

GRUB_DEFAULT變數設置在/etc/default/grub. 您可以使用核心條目的標題而不是索引,因此它不會受到後續核心安裝/刪除的干擾。然後你需要執行update-grub. 從Grub 手冊

‘GRUB_DEFAULT’
The default menu entry. This may be a number, in which case it identifies the
Nth entry in the generated menu counted from zero, or the title of a menu entry,
or the special string ‘saved’. Using the title may be useful if you want to set
a menu entry as the default even though there may be a variable number of entries 
before it.

For example, if you have:

    menuentry 'Example GNU/Linux distribution' --class gnu-linux {
    ...
    }

then you can make this the default using:

   GRUB_DEFAULT='Example GNU/Linux distribution'

If you set this to ‘saved’, then the default menu entry will be that saved by
‘GRUB_SAVEDEFAULT’, grub-set-default, or grub-reboot. 

引用自:https://serverfault.com/questions/528178