I'd like to ask for help getting grub-reboot
to work.
The theory: According to this blog post (and other sources) I should be able to choose the kernel for the next reboot, using grub-reboot
. However, this does not work for me; grub always boots to the default kernel.
Here's what I tried:
$ grep GRUB_DEFAULT /etc/default/grub
GRUB_DEFAULT=saved
$ grep "menuentry " /boot/grub/grub.cfg
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f3a807d1-3fd6-4970-b741-5382e9801060' {
menuentry 'Ubuntu, with Linux 4.4.0-43-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-43-generic-advanced-f3a807d1-3fd6-4970-b741-5382e9801060' {
menuentry 'Ubuntu, with Linux 4.4.0-43-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-43-generic-recovery-f3a807d1-3fd6-4970-b741-5382e9801060' {
menuentry 'Ubuntu, with Linux 4.4.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-36-generic-advanced-f3a807d1-3fd6-4970-b741-5382e9801060' {
menuentry 'Ubuntu, with Linux 4.4.0-36-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-36-generic-recovery-f3a807d1-3fd6-4970-b741-5382e9801060' {
# Version 1, using the name
$ sudo grub-reboot "Ubuntu, with Linux 4.4.0-36-generic"
# Version 2, using the id
$ sudo grub-reboot gnulinux-4.4.0-36-generic-advanced-f3a807d1-3fd6-4970-b741-5382e9801060
# Version 3, counting
$ sudo grub-reboot 3
Neither of these commands seem to have an effect; after reboot, I always end up with the 4.4.0-43 kernel.
Note: This is on Ubuntu 16.04 Xenial. It is a server machine and I don't have access to the console during boot, so I can't look at the grub menu :(
grub-reboot
to work then? – Oct 18 '16 at 11:09apt-get purge
the one kernel that's currently running. – Sjlver Oct 18 '16 at 12:27