Skip to contentSkip to conversation

How to pick a kernel to boot ?

DISCUSSION Lukáš Czerner 4 participants 4 messages Oct 24, 2013 – Oct 25, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

I have a simple question about grub2 which I can not find satisfying answer to.

What is a proper way to pick a kernel to boot from in case I have multiple kernels installed ? Note that picking the right kernel from the menu is not an option I do not always have access to the console.

With grub legacy, this was easy. Simply edit

/boot/grub/menu.lst

and pick the right number. All the information I need are in that file.

So what is a recommended way to do this with grub2 ?

Thanks!
-Lukas

#1 lore raw
Quoted 10 lines · Lukáš Czerner

Hi,

I have a simple question about grub2 which I can not find satisfying answer to.

What is a proper way to pick a kernel to boot from in case I have multiple kernels installed ? Note that picking the right kernel from the menu is not an option I do not always have access to the console.

Quoted 8 lines

With grub legacy, this was easy. Simply edit

/boot/grub/menu.lst

and pick the right number. All the information I need are in that file.

So what is a recommended way to do this with grub2 ?

Same thing in /boot/grub/grub.cfg. There is default with a number.

Signature · 1 line
Len Sorensen
#2 lore raw
Quoted 13 lines · Lennart Sorensen
Quoted 12 lines · Lukáš Czerner

Hi,

I have a simple question about grub2 which I can not find satisfying answer to.

What is a proper way to pick a kernel to boot from in case I have multiple kernels installed ? Note that picking the right kernel from the menu is not an option I do not always have access to the console.

With grub legacy, this was easy. Simply edit

Quoted 9 lines
Quoted 6 lines

/boot/grub/menu.lst

and pick the right number. All the information I need are in that file.

So what is a recommended way to do this with grub2 ?

Same thing in /boot/grub/grub.cfg. There is default with a number.

Sorry ... some how left the list off my initial reply ...

To set a default to boot, use

grub2-set-default [kernel entry number]

To boot a kernel once and keep the default the same (ie, boot a kernel one time)

grub2-reboot [kernel entry number]

I've noticed a lot of people messing with /boot/grub2/grub.conf ... you shouldn't have to do that to select a kernel to boot.

P.

#3 lore raw
In reply to Lukáš Czerner
Quoted 10 lines · Lukáš Czerner

Hi,

I have a simple question about grub2 which I can not find satisfying answer to.

What is a proper way to pick a kernel to boot from in case I have multiple kernels installed ? Note that picking the right kernel from the menu is not an option I do not always have access to the console.

Quoted 9 lines

With grub legacy, this was easy. Simply edit

/boot/grub/menu.lst

and pick the right number. All the information I need are in that file.

So what is a recommended way to do this with grub2 ?

You can use numbers but it's a bad idea since they change on update. Use ids As you see in menuentry:
menuentry ... $menuentry_id_option 'gnulinux-simple-000000000000000000000000000000'
Or
menuentry ... --id 'gnulinux-simple-000000000000000000000000000000'

Quoted 10 lines

Thanks!
-Lukas

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
.