https://www.xmodulo.com/change-default-boot-kernel-centos.html
Change the Default Boot Kernel Temporarily on CentOS
Often times you may want to switch to a different kernel just temporarily, not permanently. Even if you do want to change the default kernel permanently, it is a good idea to try a temporary boot to a new kernel before making a permanent transition from the old kernel to a new one. That way, in case there is any kernel crash with the new kernel, you can easily fall back to the old kernel simply by rebooting.
Of course you can choose a kernel to boot interactively via GRUB menu. However, such interactive control is not always available, for example, when you are booting over SSH remotely.
Here is how to change the default boot kernel temporarily from the command line. I assume that 2
is the numeric GRUB menu entry value of a kernel that you want to boot
into during the next boot session. Replace the number with your own.
On CentOS 7:
[root~]# grub2-reboot 2 [root~]# reboot
On CentOS 6:
[root~]# echo "savedefault --default=2 --once" | grub --batch [root~]# reboot
Once you reboot, you will boot into a specified kernel just once. Next time you reboot, you will revert to the default kernel.
======= Change boot order permanently
https://studysection.com/blog/how-to-change-boot-order-in-ubuntu-18-04-from-grub2-to-set-windows-as-default-launch/
Using terminal
- Edit the configuration file via command:
# sudo gedit /etc/default/grub
Now, change the line GRUB_DEFAULT=0 to GRUB_DEFAULT=saved
and now save the file.
In Ubuntu, use the command below to edit the Grub configuration file:
# sudo nano /etc/default/grub
And save changes in this file. - To apply the configuration changes you need to run the Update grub command :
# sudo update-grub
- Finally set a default boot OS simply using the below command:
# sudo grub-set-default NUMBER
Boot entries start from 0. If the Windows Boot Manager is the second entry, so the NUMBER is
댓글 없음:
댓글 쓰기