I have been using grub1, where you could edit the menu.1st command to change kernels. The only place that I see the kernels listed is in /boot/grub2/grub.cfg which is generated by the files in /etc.
If the current kernel does not work as desired, how does one choose the previous kernel? The only choices I see are:
1. edit the script that says do not edit 2. remove the bad kernel from /boot and run grub2-mkconfig
Please advise. Once boot is broken, it is really bad!
Thanks, don
On Fri, 2012-02-03 at 12:19 -0700, don fisher wrote:
I have been using grub1, where you could edit the menu.1st command to change kernels. The only place that I see the kernels listed is in /boot/grub2/grub.cfg which is generated by the files in /etc.
If the current kernel does not work as desired, how does one choose the previous kernel? The only choices I see are:
- edit the script that says do not edit
- remove the bad kernel from /boot and run grub2-mkconfig
Please advise. Once boot is broken, it is really bad!
Thanks, don
https://flyingpengwin.wordpress.com/2011/12/15/fedora-how-to-change-the-boot...
google search: grub2 boot order change fefora
On 3 February 2012 19:19, don fisher hdf3@comcast.net wrote:
I have been using grub1, where you could edit the menu.1st command to change kernels. The only place that I see the kernels listed is in /boot/grub2/grub.cfg which is generated by the files in /etc.
If the current kernel does not work as desired, how does one choose the previous kernel? The only choices I see are:
- edit the script that says do not edit
- remove the bad kernel from /boot and run grub2-mkconfig
Please advise. Once boot is broken, it is really bad!
Been wondering this myself with the recent wireless breakage, I haven't tried this yet, but: https://help.ubuntu.com/community/Grub2 section /etc/default/grub looks to be useful. Mine is currently set to 'saved' which doesn't seem to do what you'd expect, I think it might be necessary to also do GRUB_SAVEDEFAULT=true to remember the previous selection (something you couldn't do previously, so an improvement if it works even if there is a learning curve). The other thing to watch out for is having a working kernel drop off your system when another update comes out.
GRUB_DEFAULT - Sets the default menu entry. Entries may be numeric, a complete menuentry quotation, or "saved"
GRUB_DEFAULT=0 Sets the default menu entry by menu position. Counting of entries is the same as in GRUB - the first "menuentry" in grub.cfg is 0, the second is 1, etc.
Note: Grub 1.99 introduces a submenu menu structure. For a menu item in a submenu, the entry becomes a two-digit entry. The first entry is the position of the submenu title in the main menu. The second entry is the position within the submenu. If the submenu is the 3rd entry in the main entry, and the user wishes to boot the first entry in the submenu, it would be designated as "2>0"
GRUB_DEFAULT="xxxx" An exact menu entry, including the quotation symbols, may also be used. In this case, location in the menu will not matter. Example: GRUB_DEFAULT="Ubuntu, Linux 2.6.31-9-generic"
In a Grub 1.99 submenu, the format would first include the submenu number, followed by the title. Example: "2>Ubuntu, Linux 2.6.38-8-generic"
GRUB_DEFAULT=saved The information in this section applies to GRUB 1.98 and later. Enables the "grub-reboot" and "grub-set-default" commands to set the default OS.
The default OS will not be set by an interactive selection of an OS from the menu.
grub-set-default Sets the default boot entry until changed.
The format is sudo grub-set-default X, with X being the menu entry position (starting with 0 as the first entry) or the exact menu string.
Examples: sudo grub-set-default 3 or sudo grub-set-default "Ubuntu, Linux 2.6.32-15-generic"
To obtain the existing menu entry choice number (starting from 0) or the menu entry "string", run grep menuentry /boot/grub/grub.cfg
grub-reboot This command sets the default boot entry for the next boot only. The format of the command is the same as for grub-set-default (see above).
GRUB_SAVEDEFAULT= If set to true this setting will automatically set the last selected OS from the menu as the default OS on the next boot.
No commands need be run to set the default OS. Any time a menu entry is manually selected from the GRUB 2 menu, it becomes the default OS.
This option currently does not work if your /boot directory resides on an LVM partition or RAID.
On 2/3/2012 2:19 PM, don fisher wrote:
I have been using grub1, where you could edit the menu.1st command to change kernels. The only place that I see the kernels listed is in /boot/grub2/grub.cfg which is generated by the files in /etc.
If the current kernel does not work as desired, how does one choose the previous kernel? The only choices I see are:
- edit the script that says do not edit
- remove the bad kernel from /boot and run grub2-mkconfig
Please advise. Once boot is broken, it is really bad!
Thanks, don
try, in the very first stages of boot, pressing nearly any keyboard key; it should bring up a menu listing your available kernels which you can then choose from by using your up/down arrow keys...
On 02/03/2012 11:19 AM, don fisher wrote:
If the current kernel does not work as desired, how does one choose the previous kernel? The only choices I see are:
- edit the script that says do not edit
- remove the bad kernel from /boot and run grub2-mkconfig
Please advise. Once boot is broken, it is really bad!
Currently, I have to select an old 2.x kernel on my laptop because all of the 3.x kernels hang. It's safe to edit /boot/grub2/grub.cfg if you're careful, but the next time it's generated your changes will go away. One thing that's safe to change is the timeout period, because all that does is decide how long you have before grub2 starts booting your default kernel. Setting it to 5 gives you five seconds, and that should be ample because once you press the ANY key, the timer stops; if you have good reflexes, or quick boot times are important, three's probably ample.
On Friday 03 Feb 2012 12:19:32 don fisher wrote:
I have been using grub1, where you could edit the menu.1st command to change kernels. The only place that I see the kernels listed is in /boot/grub2/grub.cfg which is generated by the files in /etc.
If the current kernel does not work as desired, how does one choose the previous kernel? The only choices I see are:
- edit the script that says do not edit
- remove the bad kernel from /boot and run grub2-mkconfig
Please advise. Once boot is broken, it is really bad!
Don, make any changes in the grub file which is in /etc/default/
The line you want to edit is GRUB_DEFAULT=
and then run
grub2-mkconfig -o /boot/grub2/grub.cfg
Then the changes you made are kept during the next kernel update/reboot etc
HTH
Colin
On 03/02/12 19:19, don fisher wrote:
Please advise. Once boot is broken, it is really bad!
Thanks, don
Hit esc during boot up. You should see a list of the installed kernels. My advice. Edit: /etc/default/grub remove "rhgb quiet" then: on the command line. grub-mkconfig -o /boot/grub2/grub.cfg
That way you will alway see the kernels you have. It's just a down arrow to change.
On 04/02/12 15:21, Joe Zeff wrote:
On 02/04/2012 12:56 AM, Frank Murphy wrote:
Hit esc during boot up. You should see a list of the installed kernels. My advice. Edit: /etc/default/grub remove "rhgb quiet"
No, that's what you do to see all of the boot messages.
True, but valuable.
What he needs is
a timeout >0.
true, best set in /etc/default/grub