「Limine」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(「Limine」を作成(英語版より))
 
(同期)
 
(同じ利用者による、間の15版が非表示)
7行目: 7行目:
 
{{Related|Unified Extensible Firmware Interface}}
 
{{Related|Unified Extensible Firmware Interface}}
 
{{Related articles end}}
 
{{Related articles end}}
  +
[https://limine-bootloader.org Limine] は、先進的で、ポータブルな、マルチプロトコルの[[ブートローダー]]です。元は Limine ブートプロトコルのリファレンス実装として開発されましたが、Linux のブートや他のブートローダのチェインロードもサポートしています。
   
  +
{{Note|記事全体で、{{ic|''esp''}} は [[EFI システムパーティション]](別名 ESP) のマウントポイントを示します。}}
[https://limine-bootloader.org Limine] is an advanced multiprotocol x86/x86_64 BIOS and [[UEFI]] [[boot loader]] originally developed as a reference implementation for the [https://github.com/stivale/stivale stivale] boot protocol, but later expanded with the ability to boot Linux as well as chainload other boot loaders.
 
   
  +
== サポートされているファイルシステム ==
{{Note|In the entire article {{ic|''esp''}} denotes the mountpoint of the [[EFI system partition]] aka ESP.}}
 
   
  +
バージョン 6 から、Limine は [[Wikipedia:ja:Extended file system|ext2/3/4]] ファイルシステムをサポートしなくなり、[[FAT12]]、[[FAT16]]、[[FAT32]]、[[Wikipedia:ja:ISO 9660|ISO9660]] のみの[https://github.com/limine-bootloader/limine/blob/trunk/README.md#supported-filesystems サポート]となりました。サポートされているファイルシステムは、[https://github.com/limine-bootloader/limine/blob/trunk/PHILOSOPHY.md Limine の設計理念に基づいて意図的に制限されています]。
== サポートされるファイルシステム ==
 
 
Limine supports ext2, [[ext3]], [[ext4]], [[FAT12]], [[FAT16]], [[FAT32]], [[NTFS]], ISO9660, and [https://github.com/echfs/echfs echfs].
 
   
 
== インストール ==
 
== インストール ==
   
  +
{{Pkg|limine}} をインストールしてください。
{{AUR|limine}} is available as an [[AUR]] package. Installing the package will not deploy the boot loader for usage; it will just install its files and installation program.
 
   
  +
== Limine ブートローダーをインストールする ==
== BIOS システム ==
 
   
=== MBR vs. GPT ===
+
=== BIOS システム ===
   
  +
==== MBR vs. GPT ====
Legacy PC BIOS is capable of booting from either [[GPT]] or [[MBR]] partitioned devices. Limine supports both, with a very similar installation procedure. Furthermore, unlike [[GRUB]], it does not require creating an extra partition containing raw data when installing to a GPT partitioned device.
 
   
  +
レガシーな PC BIOS は、[[GPT]] または [[MBR]] でパーティショニングされたデバイスから起動することができます。Limine はこれら両方をサポートしており、インストール手順は非常に似ています。さらに、[[GRUB]] とは違って、GPT でパーティショニングされたデバイスにインストールする際に、生のデータを含む追加のパーティションを作成する必要はありません。
Choosing GPT is beneficial for larger drives as it allows placing partitions further than 2TiB on disk, alongside additional benefits such as partition and disk [[GUID|GUIDs]].
 
   
  +
GPT では 2TiB 以上のパーティションをディスクに配置することができるし、パーティションやディスクの [[パーティショニング#GUID Partition Table|GUID]] を利用できたりなどの利点があるので、大きいドライブにおいて良い選択です。
On the other hand, MBR is older and more limited, but it will ensure compatibility with quirky BIOSes which refuse to boot from GPT partitioned media.
 
   
  +
一方、MBR はより古く、多くの制限があります。しかし、GPT パーティションのメディアから起動できない、風変わりな BIOS に対する互換性を確保できます。
=== 導入 ===
 
   
  +
==== デプロイ ====
After installing the {{AUR|limine}} package, core bootloader files will be installed to {{ic|/usr/share/limine}}; most important for installing to BIOS systems is the {{ic|limine.sys}} file, which contains stage 3 code that Limine needs to boot. This file needs to reside on either the root, or a {{ic|/boot}} directory of any partition on the disk onto which Limine will be deployed, as long as the filesystem is supported.
 
   
  +
コアのブートローダーファイルは {{ic|/usr/share/limine}} にあります。BIOS システムにインストールする際に最も重要なのは {{ic|limine-bios.sys}} ファイルです。このファイルには、Limine が起動するのに必要なステージ3のコードが含まれています。このファイルは、Limine を導入するディスク上の任意のパーティション上のルートディレクトリか、{{ic|/boot}}、{{ic|/limine}}、{{ic|/boot/limine}} ディレクトリのどれかに置く必要があります。さらに、そのファイルシステムがサポートされている必要があります。
For example:
 
   
  +
例:
# cp /usr/share/limine/limine.sys /boot/
 
   
  +
# cp /usr/share/limine/limine-bios.sys /boot/
Once that is done, stage 1 and 2 need to be deployed on disk. This is achieved by means of the {{ic|limine-deploy}} utility, installed as part of the {{AUR|limine}} package. Installation is identical regardless of whether MBR or GPT is used, as {{ic|limine-deploy}} will auto-detect what scheme is used and install itself appropriately.
 
   
  +
次に、ステージ1とステージ2をディスクにデプロイする必要があります。Limine は使用されているスキームを自動検出して適切にインストールするので、MBR と GPT のどちらが使用されていようとインストール方法は同じです:
Run {{ic|limine-deploy}} as such:
 
   
# limine-deploy /dev/sdX
+
# limine bios-install /dev/sdX
   
  +
{{ic|''/dev/sdX''}} の部分は、Limine をインストールする'''ディスク'''('''パーティションではありません''')に書き換えてください。例えば、{{ic|/dev/sda}} や {{ic|/dev/nvme0n1}} です。ブロックデバイス名のスキームについては [[デバイスファイル#ブロックデバイスの名前]] を見てください。
where {{ic|''/dev/sdX''}} is the '''disk''' ('''not a partition''') where Limine is to be installed. For example {{ic|/dev/sda}} or {{ic|/dev/nvme0n1}}. See [[Device file#Block device names]] for a description of the block device naming scheme.
 
   
== UEFI システム ==
+
=== UEFI システム ===
   
  +
UEFI システム上に Limine をデプロイするには、{{ic|/usr/share/limine/BOOTX64.EFI}} ファイルを [[EFI システムパーティション]]にコピーします。通常 {{ic|''esp''/EFI/BOOT/BOOTX64.EFI}} にコピーしますが、別のファイル名を使用することもできます。ただし、UEFI BIOS がそのファイルを検出できる必要があります。[[GRUB]] とは異なり、Limine は NVRAM に Limine のブートローダーエントリを追加しません。Limine のエントリをセットアップするには [[efibootmgr]] を使用してください。
=== 導入 ===
 
   
  +
=== UEFI+BIOS 起動可能ドライブ ===
Deploying Limine on UEFI systems involves copying the {{ic|/usr/share/limine/BOOTX64.EFI}} file to an EFI system partition, usually to {{ic|''esp''/EFI/BOOT/BOOTX64.EFI}}, but it can be given other filenames, as long as the UEFI BIOS is aware of them (see [[UEFI#efibootmgr]]).
 
   
  +
ドライブが [[GPT]] でフォーマットされていて、かつ [[EFI システムパーティション]] を含んでいる場合、BIOS と UEFI の両方のデプロイ手順を行うことにより、そのドライブをレガシー BIOS と UEFI の両方のシステムで起動できるようになります。これは、例えば、UEFI に対応/非対応の複数のシステム上で使用する USB フラッシュドライブにオペレーティングシステムをインストールする場合や、システムをまたいでハードドライブを使用しやすくする場合に便利です。
== UEFI+BIOS 起動可能ドライブ ==
 
 
As long as a drive is [[GPT]] formatted, and it contains an EFI system partition, it is possible to follow both the BIOS and UEFI deployment procedures in order to create a drive capable of booting on both legacy BIOS as well as UEFI systems. This is useful, for example, for installing an operating system on a USB flash drive which is to be used on multiple systems which may, or may not support UEFI, or to ease moving hard drives across systems.
 
   
 
== 設定 ==
 
== 設定 ==
   
  +
{{Pkg|limine}} にはデフォルトの設定ファイルが同梱されていません。なので、作成する必要があります。このファイルは、どのオペレーティングシステムが起動できるかを Limine に指示するために必要です。Limine はカスタマイズ性が高いので、設定ファイルには多くのオプションがあります。設定ファイルのフォーマットやキーに関する詳細なドキュメントは[https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md ここ]で見られます。
{{AUR|limine}} does not ship a default configuration file, it is therefore necessary to create one. This file is necessary to teach Limine which operating systems are available for boot. The configuration file has a lot of options as Limine allows for a fair degree of customisation. A detailed documentation of the configuration file, its format, and its keys can be found [https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md here].
 
   
  +
設定ファイルは、({{ic|limine-bios.sys}} と同じように) Limine がデプロイされたドライブ上の任意のパーティションにあるルートディレクトリか {{ic|/boot}}、{{ic|/limine}}、{{ic|/boot/limine}} ディレクトリのどれかに置く必要があります。ただし、そのパーティションのファイルシステムがサポートされている必要があります。設定ファイルは {{ic|limine.cfg}} という名前でなければなりません。
The configuration file, just like {{ic|limine.sys}}, can reside on either the root, or the {{ic|/boot}} directory of a partition on the drive on which Limine is deployed, as long as the file system of said partition is supported. The configuration file has to be named {{ic|limine.cfg}}
 
   
{{Note|In a Limine config, {{ic|boot:///}} represents the partition on which {{ic|limine.cfg}} is located. In case there is no separate {{ic|/boot}} partition, and {{ic|limine.cfg}} resides on the root partition instead, then, in the following example, {{ic|boot:///}} should instead be {{ic|boot:///boot/}}.}}
+
{{Note| Limine の設定では、{{ic|boot:///}} {{ic|limine.cfg}} が存在するパーティションを表しています。{{ic|/boot}} のあるパーティションが分離されておらず、{{ic|limine.cfg}} が代わりにルートパーティションにある場合、{{ic|boot:///}} {{ic|boot:///boot/}} のように書き換える必要があります。}}
   
  +
以下は、典型的な Arch Linux カーネルと initramfs の1つのブートメニューエントリを含む設定の例です:
Here follows a simple example configuration that contains 1 boot menu entry that describes a typical Arch Linux kernel and initramfs:
 
  +
{{bc|1=
 
  +
{{hc|limine.cfg|2=
 
TIMEOUT=5
 
TIMEOUT=5
   
 
:Arch Linux
 
:Arch Linux
  +
PROTOCOL=linux
  +
KERNEL_PATH=boot:///vmlinuz-linux
  +
CMDLINE=root=UUID=''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'' rw
  +
MODULE_PATH=boot:///initramfs-linux.img
  +
}}
   
  +
{{ic|''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx''}} はルートファイルシステムの [[UUID]] です。
PROTOCOL=linux
 
  +
KERNEL_PATH=boot:///vmlinuz-linux
 
  +
{{Tip|[[セキュアブート]]が有効化されている UEFI システムでブートする場合は、Limine の設定ファイルとリソースファイル (カーネルやモジュールなど) の両方をセキュアにしておくことを検討してください。実際、これらの設定ファイルとリソースファイルが格納されている FAT パーティションにアクセスできる人物は、セキュアブートが有効化されている場合でもこれらのファイルを変更できてしまいます。
CMDLINE=root=UUID=''root-uuid'' rw loglevel=3 quiet
 
  +
MODULE_PATH=boot:///initramfs-linux.img
 
  +
これらのファイルを守るには、まず、すべてのリソースファイルの {{ic|b2sum}} チェックサムを設定ファイル内に記述しておく必要があります。ファイルを表現する URI には、そのファイルの {{ic|b2sum}} チェックサムを記述するための任意のフィールドが存在します。このフィールドは、ファイルパスの後に {{ic|#}} 文字を追加し、さらにその後に '''128 文字'''のチェックサムを追加することで指定できます:
  +
  +
{{hc||2=
  +
boot:///''path''#''checksum''
 
}}
 
}}
  +
where {{ic|''root-uuid''}} is to be replaced with the root filesystem's UUID that can be obtained by running (as root):
 
  +
設定ファイルを守るには、{{ic|limine enroll-config}} コマンドで EFI 実行ファイル内に設定ファイルの {{ic|b2sum}} チェックサムを埋め込んでおく必要があります。}}
{{bc|
 
  +
blkid -s UUID -o value ''/dev/sdX1''
 
  +
=== Windows エントリ ===
  +
  +
Windows を起動できるようにするには、ESP 内の {{ic|bootmgfw.efi}} へのパスを知る必要があります。[[ESP]] 内に移動して、以下のコマンドを使用することで可能です:
  +
  +
{{hc|$ find -name "bootmgfw.efi"|
  +
./EFI/Microsoft/Boot/bootmgfw.efi
  +
}}
  +
  +
次にするべきことは、以下の内容を設定に追加することだけです:
  +
  +
{{hc|limine.cfg|2=
  +
:Windows
  +
PROTOCOL=efi_chainload
  +
IMAGE_PATH=boot://'''/EFI/Microsoft/Boot/bootmgfw.efi'''
 
}}
 
}}
where {{ic|''/dev/sdX1''}} is the Arch Linux install's root partition. For example {{ic|/dev/sda1}} or {{ic|/dev/nvme0n1p2}}. See [[Device file#Block device names]] for a description of the block device naming scheme.
 
   
 
== pacman フック ==
 
== pacman フック ==
   
  +
必須ではありませんが、Limine がアップデートされるたびに Limine をデプロイする [[pacman フック]] を設定すれば便利です。
While not mandatory, it may be useful to set up a [[pacman hook]] to deploy Limine whenever it is upgraded.
 
   
  +
以下は単なる例です。システム構成に合うようにパスやデバイスを編集してください。
The following are just examples. Edit paths and devices to match the system's configuration.
 
   
 
=== BIOS ===
 
=== BIOS ===
   
  +
{{Note|デバイスを接続/除去したり、別のマシンにインストール環境を移動したり、または他の原因により、デバイスのパスは変わるかもしれないことに注意してください。これにより、BIOS のフックが意図しないデバイスに誤って Limine をインストールするかもしれません。}}
{{Note|Keep in mind that the device paths may change with the addition or removal of devices, moving the installation to different machines, and other factors. This may cause the BIOS hook to accidentally install Limine on an unwanted device.}}
 
  +
 
{{hc|/etc/pacman.d/hooks/liminedeploy.hook|2=
 
{{hc|/etc/pacman.d/hooks/liminedeploy.hook|2=
 
[Trigger]
 
[Trigger]
  +
Operation = Install
 
Operation = Upgrade
 
Operation = Upgrade
 
Type = Package
 
Type = Package
99行目: 121行目:
 
Description = Deploying Limine after upgrade...
 
Description = Deploying Limine after upgrade...
 
When = PostTransaction
 
When = PostTransaction
Exec = /bin/sh -c "limine-deploy ''/dev/sdX'' && cp /usr/share/limine/limine.sys /boot/"
+
Exec = /bin/sh -c "/usr/bin/limine bios-install ''/dev/sdX'' && /usr/bin/cp /usr/share/limine/limine-bios.sys /boot/"
 
}}
 
}}
   
106行目: 128行目:
 
{{hc|/etc/pacman.d/hooks/liminedeploy.hook|2=
 
{{hc|/etc/pacman.d/hooks/liminedeploy.hook|2=
 
[Trigger]
 
[Trigger]
  +
Operation = Install
 
Operation = Upgrade
 
Operation = Upgrade
 
Type = Package
 
Type = Package
118行目: 141行目:
 
== 参照 ==
 
== 参照 ==
   
* [https://limine-bootloader.org Limine's website]
+
* [https://limine-bootloader.org Limine のウェブサイト]
* [https://github.com/limine-bootloader/limine Limine's GitHub repository]
+
* [https://github.com/limine-bootloader/limine Limine GitHub リポジトリ]
  +
  +
{{TranslationStatus|Limine|2024-02-03|798794}}

2024年2月3日 (土) 23:11時点における最新版

関連記事

Limine は、先進的で、ポータブルな、マルチプロトコルのブートローダーです。元は Limine ブートプロトコルのリファレンス実装として開発されましたが、Linux のブートや他のブートローダのチェインロードもサポートしています。

ノート: 記事全体で、espEFI システムパーティション(別名 ESP) のマウントポイントを示します。

サポートされているファイルシステム

バージョン 6 から、Limine は ext2/3/4 ファイルシステムをサポートしなくなり、FAT12FAT16FAT32ISO9660 のみのサポートとなりました。サポートされているファイルシステムは、Limine の設計理念に基づいて意図的に制限されています

インストール

limine をインストールしてください。

Limine ブートローダーをインストールする

BIOS システム

MBR vs. GPT

レガシーな PC BIOS は、GPT または MBR でパーティショニングされたデバイスから起動することができます。Limine はこれら両方をサポートしており、インストール手順は非常に似ています。さらに、GRUB とは違って、GPT でパーティショニングされたデバイスにインストールする際に、生のデータを含む追加のパーティションを作成する必要はありません。

GPT では 2TiB 以上のパーティションをディスクに配置することができるし、パーティションやディスクの GUID を利用できたりなどの利点があるので、大きいドライブにおいて良い選択です。

一方、MBR はより古く、多くの制限があります。しかし、GPT パーティションのメディアから起動できない、風変わりな BIOS に対する互換性を確保できます。

デプロイ

コアのブートローダーファイルは /usr/share/limine にあります。BIOS システムにインストールする際に最も重要なのは limine-bios.sys ファイルです。このファイルには、Limine が起動するのに必要なステージ3のコードが含まれています。このファイルは、Limine を導入するディスク上の任意のパーティション上のルートディレクトリか、/boot/limine/boot/limine ディレクトリのどれかに置く必要があります。さらに、そのファイルシステムがサポートされている必要があります。

例:

# cp /usr/share/limine/limine-bios.sys /boot/

次に、ステージ1とステージ2をディスクにデプロイする必要があります。Limine は使用されているスキームを自動検出して適切にインストールするので、MBR と GPT のどちらが使用されていようとインストール方法は同じです:

# limine bios-install /dev/sdX

/dev/sdX の部分は、Limine をインストールするディスク(パーティションではありません)に書き換えてください。例えば、/dev/sda/dev/nvme0n1 です。ブロックデバイス名のスキームについては デバイスファイル#ブロックデバイスの名前 を見てください。

UEFI システム

UEFI システム上に Limine をデプロイするには、/usr/share/limine/BOOTX64.EFI ファイルを EFI システムパーティションにコピーします。通常 esp/EFI/BOOT/BOOTX64.EFI にコピーしますが、別のファイル名を使用することもできます。ただし、UEFI BIOS がそのファイルを検出できる必要があります。GRUB とは異なり、Limine は NVRAM に Limine のブートローダーエントリを追加しません。Limine のエントリをセットアップするには efibootmgr を使用してください。

UEFI+BIOS 起動可能ドライブ

ドライブが GPT でフォーマットされていて、かつ EFI システムパーティション を含んでいる場合、BIOS と UEFI の両方のデプロイ手順を行うことにより、そのドライブをレガシー BIOS と UEFI の両方のシステムで起動できるようになります。これは、例えば、UEFI に対応/非対応の複数のシステム上で使用する USB フラッシュドライブにオペレーティングシステムをインストールする場合や、システムをまたいでハードドライブを使用しやすくする場合に便利です。

設定

limine にはデフォルトの設定ファイルが同梱されていません。なので、作成する必要があります。このファイルは、どのオペレーティングシステムが起動できるかを Limine に指示するために必要です。Limine はカスタマイズ性が高いので、設定ファイルには多くのオプションがあります。設定ファイルのフォーマットやキーに関する詳細なドキュメントはここで見られます。

設定ファイルは、(limine-bios.sys と同じように) Limine がデプロイされたドライブ上の任意のパーティションにあるルートディレクトリか /boot/limine/boot/limine ディレクトリのどれかに置く必要があります。ただし、そのパーティションのファイルシステムがサポートされている必要があります。設定ファイルは limine.cfg という名前でなければなりません。

ノート: Limine の設定では、boot:///limine.cfg が存在するパーティションを表しています。/boot のあるパーティションが分離されておらず、limine.cfg が代わりにルートパーティションにある場合、boot:///boot:///boot/ のように書き換える必要があります。

以下は、典型的な Arch Linux カーネルと initramfs の1つのブートメニューエントリを含む設定の例です:

limine.cfg
TIMEOUT=5

:Arch Linux
    PROTOCOL=linux
    KERNEL_PATH=boot:///vmlinuz-linux
    CMDLINE=root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rw
    MODULE_PATH=boot:///initramfs-linux.img

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx はルートファイルシステムの UUID です。

ヒント: セキュアブートが有効化されている UEFI システムでブートする場合は、Limine の設定ファイルとリソースファイル (カーネルやモジュールなど) の両方をセキュアにしておくことを検討してください。実際、これらの設定ファイルとリソースファイルが格納されている FAT パーティションにアクセスできる人物は、セキュアブートが有効化されている場合でもこれらのファイルを変更できてしまいます。

これらのファイルを守るには、まず、すべてのリソースファイルの b2sum チェックサムを設定ファイル内に記述しておく必要があります。ファイルを表現する URI には、そのファイルの b2sum チェックサムを記述するための任意のフィールドが存在します。このフィールドは、ファイルパスの後に # 文字を追加し、さらにその後に 128 文字のチェックサムを追加することで指定できます:


boot:///path#checksum
設定ファイルを守るには、limine enroll-config コマンドで EFI 実行ファイル内に設定ファイルの b2sum チェックサムを埋め込んでおく必要があります。

Windows エントリ

Windows を起動できるようにするには、ESP 内の bootmgfw.efi へのパスを知る必要があります。ESP 内に移動して、以下のコマンドを使用することで可能です:

$ find -name "bootmgfw.efi"
./EFI/Microsoft/Boot/bootmgfw.efi

次にするべきことは、以下の内容を設定に追加することだけです:

limine.cfg
:Windows
    PROTOCOL=efi_chainload
    IMAGE_PATH=boot:///EFI/Microsoft/Boot/bootmgfw.efi

pacman フック

必須ではありませんが、Limine がアップデートされるたびに Limine をデプロイする pacman フック を設定すれば便利です。

以下は単なる例です。システム構成に合うようにパスやデバイスを編集してください。

BIOS

ノート: デバイスを接続/除去したり、別のマシンにインストール環境を移動したり、または他の原因により、デバイスのパスは変わるかもしれないことに注意してください。これにより、BIOS のフックが意図しないデバイスに誤って Limine をインストールするかもしれません。
/etc/pacman.d/hooks/liminedeploy.hook
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = limine

[Action]
Description = Deploying Limine after upgrade...
When = PostTransaction
Exec = /bin/sh -c "/usr/bin/limine bios-install /dev/sdX && /usr/bin/cp /usr/share/limine/limine-bios.sys /boot/"

UEFI

/etc/pacman.d/hooks/liminedeploy.hook
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = limine

[Action]
Description = Deploying Limine after upgrade...
When = PostTransaction
Exec = /usr/bin/cp /usr/share/limine/BOOTX64.EFI /boot/EFI/BOOT/

参照

翻訳ステータス: このページは en:Limine の翻訳バージョンです。最後の翻訳日は 2024-02-03 です。もし英語版に 変更 があれば、翻訳の同期を手伝うことができます。