참조 : https://wlsvud84.tistory.com/24
**GRUB 옵션변경
/etc/default/grub 수정 후.
grub2-mkconfig -o /boot/grub2/grub.cfg 을 통해 grub 적용.
이때.
booting mode 가 UEFI의 경우.
/boot/efi/EFI/centos/grub.cfg (rhel은 censos -> redhat)
booting mode 가 BIOS/Lagacy의 경우
/boot/grub2/grub.cfg
파일을 이용하여 mkconfig 실행
**부팅가능한 커널 버전 리스트 확인 및 변경
현재 적용되어 있는 부팅버전 확인
# grub2-editenv list
적용가능한 커널버전확인
grep ^menuentry /boot/grub2/grub.cfg | cut -d “‘” -f2-> grub.cfg
파일은 환경에 맞게 확인.
grub2-set-default “CentOS Linux (3.10.0-1160.62.1.el7.x86_64) 7 (Core)”
-> 다른 커널버전 1순위로 부팅순서 변경.
grub2-editenv list
saved_entry=CentOS Linux (3.10.0-1160.62.1.el7.x86_64) 7 (Core)-> 확인
ex>
[root@instance-20220414-nextcloud2 ~]# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-1160.88.1.el7.x86_64) 7 (Core)
[root@instance-20220414-nextcloud2 ~]# grep ^menuentry /boot/efi/EFI/centos/grub.cfg | cut -d “‘” -f2
CentOS Linux (3.10.0-1160.88.1.el7.x86_64) 7 (Core)
CentOS Linux 7 Rescue acda96df79e7452399a2a74cc7a0203d (3.10.0-1160.62.1.el7.x86_64)
CentOS Linux (3.10.0-1160.62.1.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-1160.59.1.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-1160.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-813e1db7313944faa2482e2ddc83db3a) 7 (Core)
[root@instance-20220414-nextcloud2 ~]# grub2-set-default “CentOS Linux (3.10.0-1160.62.1.el7.x86_64) 7 (Core)”
[root@instance-20220414-nextcloud2 ~]# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-1160.62.1.el7.x86_64) 7 (Core)