「EFI システムパーティション」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(言語間リンクと関連記事を追加)
(同じ利用者による、間の4版が非表示)
10行目: 10行目:
 
{{Related|ブートローダー}}
 
{{Related|ブートローダー}}
 
{{Related articles end}}
 
{{Related articles end}}
[[Wikipedia:EFI System partition|EFI System Partition]] (ESP や EFISYS とも呼ばれます) は FAT32 でフォーマットされた物理パーティション (ディスクのメインのパーティションディスクで、LVM やソフトウェア RAID などとは異なります) でここから [[UEFI]] ファームウェア UEFI ブートローダアプリケーションを起動OS とは独立パーティションであり、UEFI ブートには必須のパーティションになります。
+
[[Wikipedia:EFI System partition|EFI System Partition]] (ESP とも呼ばれます) は UEFI ファームウェアによって起動される EFI ブートローダアプリケーション、ドライバの格納場所とて機能OS に依存ないパーティションです。UEFI ブートには必須す。
   
  +
== Check for an existing partition ==
{{Warning|UEFI/GPT 環境で既存の Windows と[[Windows と Arch のデュアルブート|デュアルブート]]する場合、UEFI パーティションを再フォーマットしてはいけません。Windows を起動するために必要な Windows の ''.efi'' ファイルが含まれています。既存のパーティションを利用して、[[#パーティションのマウント|パーティションをマウント]]してください。}}
 
  +
  +
If you are installing Arch Linux on an UEFI-capable computer with an installed operating system, like [[Windows と Arch のデュアルブート|Windows]] 10 for example, it is very likely that you already have an EFI system partition.
  +
  +
To find out the disk partition scheme and the system partition, use [[fdisk]] as root on the disk you want to boot from:
  +
  +
# fdisk -l /dev/sd''x''
  +
  +
The command returns:
  +
  +
* The disk's partition table: it indicates {{ic|Disklabel type: gpt}} if the partition table is [[GPT]] or {{ic|Disklabel type: dos}} if it is [[MBR]].
  +
* The list of partitions on the disk: Look for the EFI system partition in the list, it is usually at least 100 MiB in size and has the type {{ic|EFI System}} or {{ic|EFI (FAT-12/16/32)}}. To confirm this is the ESP, [[mount]] it and check whether it contains a directory named {{ic|EFI}}, if it does this is definitely the ESP.
  +
  +
{{Tip|To find out whether it is a FAT12, FAT16 or FAT32 file system, follow [[FAT#Detecting FAT type]].}}
  +
  +
{{Warning|When dual-booting, avoid reformatting the ESP, as it may contain files required to boot other operating systems.}}
  +
  +
If you found an existing EFI system partition, simply proceed to [[#Mount the partition]]. If you did not find one, you will need to create it, proceed to [[#Create the partition]].
   
 
== パーティションの作成 ==
 
== パーティションの作成 ==

2022年1月18日 (火) 21:22時点における版

関連記事

EFI System Partition (ESP とも呼ばれます) は UEFI ファームウェアによって起動される EFI ブートローダ、アプリケーション、ドライバの格納場所として機能する OS に依存しないパーティションです。UEFI ブートには必須です。

Check for an existing partition

If you are installing Arch Linux on an UEFI-capable computer with an installed operating system, like Windows 10 for example, it is very likely that you already have an EFI system partition.

To find out the disk partition scheme and the system partition, use fdisk as root on the disk you want to boot from:

# fdisk -l /dev/sdx

The command returns:

  • The disk's partition table: it indicates Disklabel type: gpt if the partition table is GPT or Disklabel type: dos if it is MBR.
  • The list of partitions on the disk: Look for the EFI system partition in the list, it is usually at least 100 MiB in size and has the type EFI System or EFI (FAT-12/16/32). To confirm this is the ESP, mount it and check whether it contains a directory named EFI, if it does this is definitely the ESP.
ヒント: To find out whether it is a FAT12, FAT16 or FAT32 file system, follow FAT#Detecting FAT type.
警告: When dual-booting, avoid reformatting the ESP, as it may contain files required to boot other operating systems.

If you found an existing EFI system partition, simply proceed to #Mount the partition. If you did not find one, you will need to create it, proceed to #Create the partition.

パーティションの作成

以下のセクションでは EFI System Partition (ESP) を作成する方法を説明しています。

ノート: UEFI ファームウェアによっては UEFI-MBR ブートができないため UEFI ブートでは出来るだけ GPT を使うことが推奨されます。

ESP の容量は 512 MiB にすることが推奨されていますが他のサイズでも問題ありません [1]

Microsoft のドキュメントには ESP の容量について説明があります: Advanced Format 4K Native (4-KB-per-sector) のドライブでは、FAT32 ファイルフォーマットの制限によって、最小容量は 256 MiB となります。FAT32 のドライブの最小パーティションサイズはセクターサイズ (4KB) x 65527 = 256 MiB と計算されます。Advanced Format 512e ドライブはセクターサイズが 512 バイトだとエミュレートされているのでこの制限を受けません。512 バイト x 65527 = 32 MB、これはパーティションの最小容量 100 MB よりも少ない値です。参照: [2]

GPT でパーティションされたディスク

GPT でパーティションされたディスクに ESP を作成する場合、以下の方法のどちらかを使って下さい:

MBR でパーティションされたディスク

fdisk を使ってパーティションタイプ EFI System のパーティションを作成し、パーティションをフォーマットしてください。

パーティションのフォーマット

ESP を作成したら、FAT32 でフォーマットします:

# mkfs.fat -F32 /dev/sdxY

上記の GNU Parted を使用した場合、既にフォーマットされているはずです。

WARNING: Not enough clusters for a 32 bit FAT! というエラーが表示される場合、mkfs.fat -s2 -F32 ... あるいは -s1 を使ってクラスタのサイズを減らして下さい。エラーを放置すると UEFI からパーティションを読み取れなくなる可能性があります。

パーティションのマウント

EFISTUB の場合、カーネルと initramfs のファイルは EFI System Partition に保存する必要があります。また、EFISTUB ブートでは /boot パーティションを別に作らないで ESP を /boot パーティションとして使うことでシンプルにすることも可能です。その場合、上記のように EFI システムパーティションを作成・フォーマットした後、/bootマウントしてください。

#バインドマウントを使うも参照。

既知の問題

RAID 上に ESP を配置

ESP を RAID1 アレイに置くことも可能ですが、データが破損する危険性があり、また、ESP を作成する際に様々な注意をする必要があります。詳しくは [3][4] を見て下さい。

ヒントとテクニック

バインドマウントを使う

ESP を /boot にマウントする代わりに、バインドマウントを使うことで ESP のディレクトリを /boot にマウントすることができます (mount(8) を参照)。これによって ESP を自由に扱えるようにしつつ pacman が直接カーネルを更新できるようにすることができます。ファイルをコピーする他の方法よりもずっとシンプルな方法になります。

ノート: バインドマウントを利用するには FAT32 に対応するカーネルとブートローダーが必要です。通常の Arch のインストールでは問題になりませんが、他のディストリビューションでは問題になることがあります (つまり /boot にシンボリックリンクを必要とするディストリビューション)。フォーラムのこの投稿 を見て下さい。

EFISTUB#カーネルと initramfs を ESP にコピーするに書かれているように、ESP のディレクトリに全てのブートファイルをコピーしますが、ESP は /boot の外にマウントします (例: /esp)。そしてディレクトリをバインドマウントします:

# mount --bind /esp/EFI/arch/ /boot

ファイルが /boot に現れるようにしたい場合、fstab を編集して永続化させます:

/etc/fstab
/esp/EFI/arch /boot none defaults,bind 0 0
警告: この方法を使って起動するには root=system_root カーネルパラメータを使う必要があります。

参照