Here is something I'd like for it to do that it does not do by default, and which seem to require (somehow) a bit of research to configure.

What I want is simple. Select the OS that I chose the last time.

Note: I am running 11.10 now which I believe is GRUB 2 but I don't know what version (1.99?)

  • check the grub version using grub-install -v command in terminal. – user45315 Feb 9 '12 at 10:50
  • And, I have two solutions, but none of them would choose the OS which selected last time. 1st one would help to select which OS should be boot-up on next start-up and 2nd one just to set another OS as default to boot-up on every start-up. Do you want them? – user45315 Feb 9 '12 at 11:19
  • 1
    I think I've figured out how to set the default (set an index for the entry in /etc/default/grub, run update-grub after) but setting for the next startup would be useful. – Steven Lu Feb 9 '12 at 17:15
  • Sorry for the delay. grub-choose-default may help you to choose OS for next start-up before shutting down the current one. :) – user45315 Feb 18 '12 at 5:38

Last selected entry

To configure grub2 to remember the last selected entry, put these parameters in /etc/default/grub :


and save this configuration using the command :


Specific entry

If you want to select a specific entry and don't want it to change if a new kernel is installed, you have to use the name of this entry instead of its index number. You took the name in the file /boot/grub/grub.cfg :

menuentry 'Ubuntu, avec Linux 3.2.0-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 35b16ba3-50a4-4832-bd60-644db6670637
    linux   /boot/vmlinuz-3.2.0-30-generic root=UUID=35b16ba3-50a4-4832-bd60-644db6670637 ro   quiet splash $vt_handoff
    initrd  /boot/initrd.img-3.2.0-30-generic

And use it in the file /etc/default/grub :

GRUB_DEFAULT='Ubuntu, avec Linux 3.2.0-30-generic'

Save configuration with :

| improve this answer | |

For me , the quickest, safest, easiest way is getting grub-customizer which customizes your Grub.

Giving it a try is an option.

grub-customizer Install grub-customizer

Install via the software center

grub-customizer Launchpad logo

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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