적용 가능 Linux 버전 :
Red Hat Family - RHEL / Fedora / CentOS / Oracle / Rocky / Alma / NAVIX …
- 설정 변경
방법 1)
# vim /etc/default/grub GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root ..... 추가가할파라메터"
방법 2)
- 현재 설정 확인 # grubby --info DEFAULT - 현재 런닝중인 커널 이미지에 추가 # grubby --update-kernel=/boot/vmlinux-$(name -r) --args="<추가할파라메터>" - 모든 커널 이미지에 추가 # grubby --update-kernel=ALL --args="<추가할파라메터>"
- 설정사항 반영
BIOS: # grub2-mkconfig -o /boot/grub2/grub.cfg EFI: # grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg (RHEL : grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg) * 또는 아래처럼 BIOS(Legacy) / EFI 공통으로 수행 (/etc/grub2.cfg 가 BIOS/EFI에 맞게 싱볼릭 링크되어 있음) # grub2-mkconfig -o /etc/grub2.cfg * RHEL 9.3 이후 버전에서는 아래와 같이 --update-bls-cmdline 옵션을 추가로 넣어야 업데이트가 된다. # grub2-mkconfig -o /etc/grub2.cfg --update-bls-cmdline
* 아래 'EFI 사용 여부 확인'을 통해 확인
- 반영된것 확인
# ls -la /boot/grub2/../efi/EFI/redhat/grubenv # ls -la /boot/grub2/grubenv
- 재부팅 후 적용 확인 (커널)
# cat /proc/cmdline
- EFI 사용 여부 확인 (참고사항)
방법 1. grub. conf 의 위치
[root@Sample-local ~]# ls -la /boot/efi/EFI/redhat/grub.conf -rwx—— 1 root root 869 2015-09-09 13:26 /boot/efi/EFI/redhat/grub.conf [root@Sample-local ~]# ls -la /etc/grub.conf lrwxrwxrwx. 1 root root 32 2015-09-09 13:26 /etc/grub.conf -> ../boot/efi/EFI/redhat/grub.conf
방법 2. efi 디렉토리 존재 유무
[root@Sample-local ~]# ll /sys/firmware 합계 0 drwxr-xr-x 4 root root 0 2015-09-09 04:52 acpi drwxr-xr-x 3 root root 0 2015-09-09 13:27 efi drwxr-xr-x 12 root root 0 2015-09-09 13:27 memmap
방법 3. dmesg 를 통한 EFI 메모리 할당 정보 확인
[root@Sample-local ~]# dmesg |grep EFI EFI v2.30 by VMware, Inc. EFI: mem00: type=10, attr=0xf, range=[0x0000000000000000-0x0000000000001000) (0MB) EFI: mem01: type=7, attr=0xf, range=[0x0000000000001000-0x000000000009e000) (0MB) EFI: mem02: type=2, attr=0xf, range=[0x000000000009e000-0x00000000000a0000) (0MB) EFI: mem03: type=7, attr=0xf, range=[0x0000000000100000-0x000000007baa0000) (1977MB) EFI: mem04: type=2, attr=0xf, range=[0x000000007baa0000-0x000000007d2e5000) (24MB) EFI: mem05: type=4, attr=0xf, range=[0x000000007d2e5000-0x000000007da39000) (7MB) EFI: mem06: type=2, attr=0xf, range=[0x000000007da39000-0x000000007de39000) (4MB)
CentOS 7, 8, 9 - kernel command-line (grub2) 설정