Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
"server" and no virtual console? Bad - maybe return it to the seller and ask for a server? What do you do if you need to reinstall totally, or do a bios upgrade? Remoete viortual consoles are standard even on low end servers these days. –  TomTom Aug 2 '13 at 10:02

3 Answers 3

up vote 1 down vote accepted

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. 
share|improve this answer

Just edit /boot/grub/grub.cfg

set default="X"

where X is an index number of kernel definition in the /boot/grub/grub.cfg

share|improve this answer
    
But that will be reset on running a update-grub, wont it? –  Droidzone Aug 2 '13 at 8:13

There's grub-set-default(8) which can be used to select the boot entry if you're using savedefault. If you're not using savedefault the default is set default="0" which boots the first defined kernel. Usually the kernels are ordered from latest to oldest in order to boot into the latest kernel.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.