3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ミニpcにUbuntu Serverをクリーンインストールして詰まった

Last updated at Posted at 2024-07-19

はじめに

先日ミニPCを購入しUbuntu Server 24.04 LTSをクリーンインストールしようとしたところエラーが発生して詰まったため、備忘録もかねて記事にしてみます。似たようなエラーに悩まされている人がいらっしゃれば、お力になれれば嬉しいです。
初めて記事を書くため色々と拙いところがあるかと思いますが、お付き合いくださいますと幸いです。

概要

先日Amazon Prime Dayで安くなっていたミニPCを購入し、Ubuntu Server 24.04 LTSをUSBメモリからクリーンインストールしていました。
しかしgrub-installを行っている途中にエラーが発生し、そこから進めなくなりました。
grubはUbuntuの標準ブートローダですので、もしかしたらgrubを標準のブートローダとしている他のディストリビューションでも同じエラーが発生するかもしれません。

ミニPC

エラーの発生したミニPCはこちらです。

GMKTec M5
CPU:AMD Ryzen7 5700U
RAM:16GB
SSD:512GB

余談ですが、WindowsライセンスはOEMでした。
中華系メーカーはVLライセンスが多いという話を聞いていたため、Ubuntu Serverを入れなおすのを少し躊躇しました。

発生したエラー

grub-install中に、以下のようなエラーが発生しました。

(略)
finish:cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub: FAIL: installing grub to target devices
finish:cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub: FAIL: configuration target system boot loader
finish:cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub: FAIL: curtin command curthooks
Traceback (most recent call last):
(中略)
File '/snap/subiquity/5741/lib/python3.10/site-packages/curtin/util.py',line 172, in _subp curtin.util.ProcessExecutionError: Unexpected error while running command.
Command: ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'efibootmgr', '-v']
Exit code: 2
Reason: -
Stdout: ''
Stderr: EFI variables are not supported on this system.
       error trace:

Unexpected error while running command.
Command: ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'efibootmgr', '-v']
Exit code: 2
Reason: -
Stdout: ''
Stderr: EFI variables are not supported on this system.

このシステムでEFI変数がサポートされていないという内容のエラーが吐かれていました。
ここで一度自分の検索能力の限界を感じchatgptに相談したのですが、「CSMの有効化」や「Legacyモードでの起動」といったミニPCのUEFIファームウェアがサポートしていない機能の話しかされなかったため、かなり絶望しました。

解決

そんな中ふとRedditを覗いたところ、一筋の光が!

I had the same problem on mine.
I got it to work by setting "NX Mode" to enabled in Advanced > CPU Configuration

なんとUEFIファームウェアのAdvanced中にあるCPU Configurationから、NX ModeEnableに設定したらインストールに成功するというのです。
2日半も悩んだエラーがこんなひと手間で解決するものかと半信半疑で設定を行ってみたところ、実際にインストールすることが出来ました。(画像等のエビデンスはありません)

これは私の推測ですが、NX MODEはメモリ領域に実行不可能なエリアを作る設定であるため、有効化していなければOSのセキュリティ要件を満たさず弾かれてしまうのかもしれません。

おわりに

ここまで読んでいただきありがとうございました!
初めての記事執筆でかなり拙い記事となってしまった気がしますが、似たような悩みを持っている方の助けになれたなら幸いです。

3
0
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
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?