SELinux 설정 후 Kernel panic
최근 서버 구축 후 이것 저것 설정 하고 재부팅 했더니 kernel panic 메세지 나타 나며
부팅 실패 하였습니다.
처음에는 Dell R730 서버와 Cent OS 문제 호환성 문제 인가 생각하고 몇번 재 설치 했습니다.
설치 후 바로 재부팅은 전혀 문제 없었고 이상 없음을 확인하고 다시 셋팅 하여 재부팅 했더니
다시 kernel panic ㅜㅜ
몇번 반복 후 알게된 나의 실수
SELinux 설정시 /etc/selinux/config 파일을 수정 합니다. 이 파일에는 SELINUX, SELINUXTYPE 설정 파라메터가 2개있습니다.
1
2 # This file controls the state of SELinux on the system.
3 # SELINUX= can take one of these three values:
4 # enforcing - SELinux security policy is enforced.
5 # permissive - SELinux prints warnings instead of enforcing.
6 # disabled - No SELinux policy is loaded.
7 SELINUX=enforcing
8 # SELINUXTYPE= can take one of these two values:
9 # targeted - Targeted processes are protected,
10 # mls - Multi Level Security protection.
11 SELINUXTYPE=targeted
2 # This file controls the state of SELinux on the system.
3 # SELINUX= can take one of these three values:
4 # enforcing - SELinux security policy is enforced.
5 # permissive - SELinux prints warnings instead of enforcing.
6 # disabled - No SELinux policy is loaded.
7 SELINUX=enforcing
8 # SELINUXTYPE= can take one of these two values:
9 # targeted - Targeted processes are protected,
10 # mls - Multi Level Security protection.
11 SELINUXTYPE=targeted
SELINUX를 disabled 변경하려다가 11번째 라인의 SELINUXTYPE에 disabled 를 수정 후 재부팅 하게 되면 부팅시 커널 패닉 에러가 발생합니다.
복구 방법
- 싱글 모드로 부팅
- GRUB 메뉴에서 e 키를 누릅니다.
- kernel 행을 선택하여 키보드의 e키를 누릅니다.
- 수정 모드가 표시되면 마지막 부분에 한칸 띄우고 enforcing=0 라고 입력하여 추가합니다.
- b키를 눌러 OS를 부팅합니다.
- 부팅후 /etc/selinux/config파일 SELINUX을 desabled로 설정 하고 재부팅합니다.
'IT세상 > Linux' 카테고리의 다른 글
Centos em0 -> eth0 변경 방법 (0) | 2017.06.30 |
---|---|
Linux NTP 설정 (0) | 2017.06.30 |
NetworkManager Disable (0) | 2017.06.30 |
linux RPM 명령어 (0) | 2017.06.30 |
Bash 패치 (0) | 2017.06.30 |