さくら夜のガジェットブログ

ガジェットやノベルゲームについて語ったり

WindowsPCにrEFIndを入れてみた

他にも解説している記事がありましたが複数環境を紹介していて見づらかったので簡潔にまとめたいと思いました。 参考サイト

まずはrEFInd Boot Managerの配布サイトにアクセスします

www.rodsbooks.com

A binary zip file をクリックしてバイナリの入ったzipを落としてきます。

rEFInd-EFIのバイナリ配布サイト
rEFInd-EFIのバイナリ配布サイト

今回はrefind-bin-0.13.3.1が落ちてきました。

全て展開します。

展開
展開

ダウンロードフォルダの下にrefind-bin-0.13.3.1というフォルダが作られたのを確認します。

コマンドプロンプトを管理者権限で開きます。

管理者権限でcmd起動
管理者権限でcmd起動
mountvol M: /Sと入力して、EFIパーティーションをマウントします。

refindのディレクトリに移動します。 自分の場合はC:\Users\sakurayoru\Downloads\refind-bin-0.13.3.1\refind-bin-0.13.3.1だったのでcd C:\Users\sakurayoru\Downloads\refind-bin-0.13.3.1\refind-bin-0.13.3.1と入力します。

ディレクトリ移動
ディレクトリ移動

refindのバイナリの入ってるディレクトリをEFIディレクトリにこのコマンドでコピーさせます。xcopy /E refind M:\EFI\refind\

バイナリをコピーする
バイナリをコピーする

サンプルコンフィグをリネームさせます。

M:
cd M:\EFI\refind
copy .\refind.conf-sample .\refind.conf

リネーム作業
リネーム作業

ブートローダーの作成及びdescriptionの変更

bcdedit /set {bootmgr} path .\EFI\refind\refind_x64.efi
bcdedit /set {bootmgr} description "rEFInd"

これで再起動するとrEFIndが基本的には起動します。

(IvyなESPRIMOは何故か動かなかった…)

UEFI画面でブートローダー指定出来てるか確認してみましょう

UEFI画面でブートローダー指定されてる例
UEFI画面でブートローダー指定されてる例

仮想ODDデバイスを繋いだ結果SSDにインストール済みのOS以外に起動可能なOSインストーラーも画面に並んでいる図
仮想ODDデバイスを繋いだ結果SSDにインストール済みのOS以外に起動可能なOSインストーラーも画面に並んでいる図

memtestをrEFInd経由で起動できるようにする

memtest86+の公式サイトもしくはAURに置いてあるpassmark memtest86を落としてきます。 今回はmemtest86+のBinary Files (.bin/.efi)を落とします。

 Binary Filesを選択
Binary Filesを選択
落としてきたzipを展開します。 ダウンロードフォルダにmt86plus_6.10.binariesフォルダが出来たことを確認します。 コマンドプロンプトを管理者権限で開きます。 mountvol M: /Sと入力して、EFIパーティーションをマウントします。

mt86plus_6.10のバイナリの入ってるフォルダをtoolsフォルダにリネームします。 cmdの方でtoolsフォルダの1つ上に移動します。 自分の場合はC:\Users\sakurayoru\Downloads\toolsだったのでcd C:\Users\sakurayoru\Downloadsと入力します。

refindのバイナリの入ってるディレクトリをEFIディレクトリにこのコマンドでコピーさせます。xcopy /E tools M:\EFI\tools\ 使いたいefiバイナリをmemtest86.efiにリネームします

M:
cd M:\EFI\tools
move memtest64.efi memtest86.efi

EFIイメージのリネーム
EFIイメージのリネーム

OSを再起動してrEFIndの左下にmemtestアイコンが表示されてれば成功です。

refind-memtest
refind-memtest
memtest86+
memtest86+
また、右下にあるReboot to Computer Setup Utlityを選択するとUEFI画面に行けます。
Reboot to Computer Setup Utlity
Reboot to Computer Setup Utlity
UEFI画面
UEFI画面

おまけ

対応してるEFIイメージを適切な名前でEFI\tools\に投げ込むとmemtestのようにサードパーティーツールを下のメニューから起動できます。

# Which non-bootloader tools to show on the tools line, and in what
# order to display them:
#  shell            - the EFI shell (requires external program; see rEFInd
#                     documentation for details)
#  memtest          - the memtest86 program, in EFI/tools, EFI/memtest86,
#                     EFI/memtest, EFI/tools/memtest86, or EFI/tools/memtest
#  gptsync          - the (dangerous) gptsync.efi utility (requires external
#                     program; see rEFInd documentation for details)
#  gdisk            - the gdisk partitioning program
#  apple_recovery   - boots the Apple Recovery HD partition, if present
#  windows_recovery - boots an OEM Windows recovery tool, if present
#                     (see also the windows_recovery_files option)
#  mok_tool         - makes available the Machine Owner Key (MOK) maintenance
#                     tool, MokManager.efi, used on Secure Boot systems
#  csr_rotate       - adjusts Apple System Integrity Protection (SIP)
#                     policy. Requires "csr_values" to be set.
#  install          - an option to install rEFInd from the current location
#                     to another ESP
#  bootorder        - adjust the EFI's (NOT rEFInd's) boot order
#  about            - an "about this program" option
#  hidden_tags      - manage hidden tags
#  exit             - a tag to exit from rEFInd
#  shutdown         - shuts down the computer (a bug causes this to reboot
#                     many UEFI systems)
#  reboot           - a tag to reboot the computer
#  firmware         - a tag to reboot the computer into the firmware's
#                     user interface (ignored on older computers)
#  fwupdate         - a tag to update the firmware; launches the fwupx64.efi
#                     (or similar) program
#  netboot          - launch the ipxe.efi tool for network (PXE) booting
# Default is shell,memtest,gdisk,apple_recovery,windows_recovery,mok_tool,about,hidden_tags,shutdown,reboot,firmware,fwupdate
#
#showtools shell, bootorder, gdisk, memtest, mok_tool, apple_recovery, windows_recovery, about, hidden_tags, reboot, exit, firmware, fwupdate