3

I have kernel 4.4.0-66-generic-tuxonice and would like to change it to another one 4.4.0-66-generic.

How can I change the entries in the grub config file in order to do this? I have:

SET GRUB_DEFAULT=0  

I believe we can select a specific kernel by specifying its name also? I have no idea of how to do that though...

The reason is that 4.4.0-66-generic seems to do hibernation better than the TuxOnIce but it requests the TuxOnIce files be installed.

Zanna
  • 70,465
devilz
  • 169
  • 1
  • 3
  • 16
  • I have edited the question. Please let me know if any other details needs to be added – devilz Mar 21 '17 at 13:19
  • 1
    Close voters: Answered question. – Elder Geek Mar 22 '17 at 01:16
  • @ElderGeek +1 to close as "unclear what you're asking". The question has a good answer which seems solve the original problem. But the question is still horribly hard to understand. I thus vote to close. We can re-open the question once it has been updated. – MadMike Mar 23 '17 at 07:45
  • wanted to make sure that Grub-Customiser would work and was hoping to find out the name of the kernel in the terminal and enter it into the /etc/default/grub to make it the default one – devilz Mar 23 '17 at 07:49
  • @MadMike Seems clear to me. OP wanted to change which kernel is booting by default in GRUB. Perhaps since I've spent an inordinate amount of time monkeying with GRUB recently? I wouldn't be at all surprised if there are questions that are baffling to me that are clear as glass to you. We are all the products of our experiences after all. Good thing there are so many of us on the team. All that aside, if the community agrees with your assessment it will be closed. I for one thought it was about as straightforward as "Would you sugar or artificial sweetener in your coffee?" ;-) – Elder Geek Mar 23 '17 at 12:30

1 Answers1

2

SET GRUB_DEFAULT=0 is for all intents and purposes an index number indicating the first entry.

If your intent is to modify an existing entry to use a different kernel you can edit /etc/boot/grub/grub.cfg find the appropriate line and adjust for example:

linux   /boot/vmlinuz-3.13.0-86-generic root=UUID=03a31723-1f61-4bae-ae5d-403cd35d0adc (and etc)

and change the vmlinuz-x.xx-x-xx-blahblah bit to point to your existing preferred kernel.

The above is a bit of a hack though and might break at the next update. (I've done such things on flash drives booting ISO's that never change and never update grub on them.)

If your intent is simply to select a kernel already on the grub menu as default, I think you'll find the powerful grub customizer by Daniel Richter quite useful.

grub-customizer

You can right click on a kernel entry in the list configuration and choose to move it up or down or edit it.

On the General Settings Tab, You can easily select and set the default entry by name from the list of predefined entries (as you indicated in your question.) See the image below for an example:

GC-General

Save your changes and reboot and enjoy your new default boot entry.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
  • Will my selection remain even after my system gets an update while using Grub-Customizer. And was hoping to do it using the terminal. – devilz Mar 22 '17 at 08:32
  • Yes your selection will remain. All grub-customizer is doing is making it easier to make the changes to to your grub configuration. Of course you can accomplish the changes to SET GRUB_DEFAULT from the terminal using your favorite text editor. Kust Remember to start counting boot entries at 0 and you should be fine. – Elder Geek Mar 22 '17 at 12:14