6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RHEL9 で grub だけ更新したら OS が起動しなくなった話(Secure Boot の罠)

6
Posted at

脆弱性の対応としてパッケージのアップデートをしたところ、
OSが起動できない状態になってしまった為、
知見として残します、、、

コマンドライン上、アップデートは正常終了し、
再起動のコマンドを実行したのですが、一切アクセスできない状態となり、
VMの管理画面には次のエラーが表示されていました。

Verification failed:(0x1A) Security Violation

SSHはもちろん、pingも通らない状態です。

結論

Secure Boot有効環境で、grubだけ更新し、shimを更新していなかったことが原因でした。

Secure Bootの起動フロー

電源ON
↓
UEFI Firmware
↓(署名検証)
shim(Microsoft署名済み)
↓(署名検証)
grub(Red Hat署名)
↓
Linux Kernel
↓
OS起動

今回何が起きたのか

  • grub:更新された
  • shim:更新されていない

その結果、古いshimが新しいgrubの署名を検証できず、
Secure Bootによって起動がブロックされました。

なぜハマりやすいのか

  • パッケージ更新は正常終了する
  • 再起動するまで問題が分からない
  • grub単体更新は一見安全そうに見える

対策・教訓

  • shim / grub / kernelはセットで更新する
  • grub更新時はshimの更新有無を必ず確認する
  • 更新作業は再起動確認まで含める

まとめ

Secure Boot環境では、ブート周りのアップデートは特に慎重に行う必要があります。

6
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?