Linux – How to one choose a new kernel on boot, running a dedicated server

debiangrublinuxproxmox

As part of installing proxmox on a dedicated server running Debian, it installed a new kernel. As part of the install instructions, I am supposed to choose the new kernel in grub. However I dont have a virtual console for accessing the server at the time of boot. The only thing I can do, is to run an ssh console to the server after it boots. How can I select the pv kernel as default for boot time?

I am running Debian Wheezy on the server, and installed proxmox 3.

Best Answer

Set the GRUB_DEFAULT variable in /etc/default/grub. You can use the title of the kernel entry instead of an index, so it's not disturbed by subsequent kernel installs/removals. Then you need to run update-grub. From the Grub manual:

‘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.