CentOS의 커널 패닉 - Google Compute Engine 인스턴스

CentOS의 커널 패닉 - Google Compute Engine 인스턴스

Google Compute Engine의 CentOS 인스턴스에서 커널 패닉 오류가 발생합니다. 오류를 확인하고 해결 방법을 알아냈지만 직렬 콘솔을 통해 GRUB 메뉴에 들어갈 수 없습니다.

dracut: Mounted root filesystem /dev/sda1
dracut: Loading SELinux policy
type=1404 audit(1479929075.614:2): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
dracut: SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.24: No such file or directory
 /sbin/load_policy: Can't load policy and enforcing mode requested: No such file or directory
dracut Warning: Initial SELinux policy load failed.
dracut FATAL: Initial SELinux policy load failed. Machine in enforcing mode. To disable selinux, add selinux=0 t
o the kernel command line.
dracut Warning: 
dracut Warning: Boot has failed. To debug this issue add "rdshell" to the kernel command line.
dracut Warning: Signal caught!
dracut Warning: Boot has failed. To debug this issue add "rdshell" to the kernel command line.
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.32-642.11.1.el6.x86_64 #1
Call Trace:
     [<ffffffff815482b1>] ? panic+0xa7/0x179
     [<ffffffff8112aea0>] ? perf_event_exit_task+0xc0/0x340
     [<ffffffff81081f97>] ? do_exit+0x867/0x870
     [<ffffffff8119b735>] ? fput+0x25/0x30
     [<ffffffff81081ff8>] ? do_group_exit+0x58/0xd0
     [<ffffffff81082087>] ? sys_exit_group+0x17/0x20
     [<ffffffff8100b0d2>] ? system_call_fastpath+0x16/0x1b

CentOS 버전은 6.7이며 yum 업데이트 이후에 발생했습니다. 허용 모드로 부팅하기 위해 GRUB 메뉴로 가서 "selinux=0"을 추가하고 싶지만 직렬 콘솔을 통해서는 그렇게 할 수 없는 것 같습니다. 도움을 주시면 감사하겠습니다.

답변1

해결 방법을 완료하고 인스턴스를 다시 실행했습니다. 기본적인 문제는 기본적으로 GCP의 Linux 인스턴스가 GRUB 메뉴에서 시간 제한 0으로 설정되어 있다는 것입니다. 따라서 시리얼 콘솔을 통해서도 메뉴에 접근할 수 없습니다. 인스턴스를 복원하기 위해 수행한 단계를 설명하겠습니다.

  1. 머신 부팅 디스크의 스냅샷을 생성합니다.
  2. 첫 번째 단계에서 생성된 스냅샷을 소스로 하는 디스크를 생성합니다. 그렇게 부르자구조판.
  3. 새 Linux 인스턴스를 시작합니다. 아마도 나중에 삭제할 수 있는 마이크로 인스턴스일 것입니다. 불러라구조 사례.
  4. 붙이다구조판도착하다구조 사례.
  5. ~에서구조 사례설치하다구조판<mount point>/etc/grub.conf그리고 다음과 같이 변경합니다 .
    루트(hd0,0)
    kernel/boot/vmlinuz-2.6.32-642.11.1.el6.x86_64 ro root=UUID=23f78139-a1ac-4a7a-b608-05687cecfa37selinux=0
  1. 연결 끊기구조판~에서구조 사례필요한 경우 인스턴스를 삭제합니다.
  2. 소스가 다음과 같은 새 인스턴스를 시작합니다.구조판. 디스크에서 이 작업을 수행할 수 있습니다.

gcloud에서 이미 다른 Linux 인스턴스를 실행 중인 경우 새 인스턴스를 만들 필요가 없으며 보유하고 있는 가상 머신을 사용하면 됩니다.

관련 정보