2022년 10월 20일 목요일

Linux Grub2 boot order change, temorarily

======= Change boot order Temporarily

 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

  1. 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.
    ubuntu1
    In Ubuntu, use the command below to edit the Grub configuration file:
    # sudo nano /etc/default/grub
    And save changes in this file.
  2. To apply the configuration changes you need to run the Update grub command :
    # sudo update-grub
  3. 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
    ubuntu2
People having good knowledge of Financial accounting can get an Accounting Certification Exams from StudySection to increase their chances of getting a job in this field. You can get a foundation level certification if you are new to Financial accounting or you can go for advanced level certification if you have expert level skills in Financial accountin

sublime close without confirmation

  Close without confirm   Yes, you can just write a plugin to set the view as scratch and close it. Then create a keybinding for that c...