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インスタンスを実行している場合は、新しいインスタンスを作成する必要はなく、保持している仮想マシンを使用するだけです。

おすすめ記事