ハイブリッド MBR ディスクへの grub-install

ハイブリッド MBR ディスクへの grub-install

私はハイブリッドMBRレコード(GPT/MBR)を作成するための非常に詳細なガイドに従いました。ここ

今、gdiskハイブリッドMBRがあると言っています。しかし、UEFIでしか起動できず、BIOSでは起動できません(外付けハードドライブを使用しています)。単純に実行するとgrub-installUEFI部分だけがインストールされるようです。議論 保護エントリをディスクの先頭に配置する必要があるという要件について、最初に配置しましたが、これが根本的な原因ではありません。

そこで質問なのですが、BIOS/MBR と UEFI/GPT の両方から OS を起動できるように GRUB をインストールするにはどうすればよいでしょうか?

$ sudo gdisk /dev/sdd

GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): o

Disk size is 468862128 sectors (223.6 GiB)
MBR disk identifier: 0x7213C4A0
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1                     1       208895   primary     0xEE
   2      *         208896      1196031   primary     0x83
   3               1196032    135413759   primary     0x83
   4             200425472    468860927   primary     0x83

Recovery/transformation command (? for help): p
Disk /dev/sdd: 468862128 sectors, 223.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 21773ad9-3d43-4832-85b7-6c841d20ce75
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 1-sector boundaries
Total free space is 62183 sectors (30.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              63           80324   39.2 MiB    EF00  Basic data partition
   2          208896         1196031   482.0 MiB   8300  Basic data partition
   3         1196032       135413759   64.0 GiB    8300
   4       135413760       168968191   16.0 GiB    0700  Basic data partition
   5       168968192       200425471   15.0 GiB    0700  Basic data partition
   6       200425472       468860927   128.0 GiB   8300
   7           81920          149503   33.0 MiB    EF02

$ sudo パート /dev/sdd

GNU Parted 3.2
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA OCZ-VECTOR150 (scsi)
Disk /dev/sdd: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name                  Flags
 1      32.3kB  41.1MB  41.1MB  fat32           Basic data partition  boot, esp
 7      41.9MB  76.5MB  34.6MB                                        bios_grub
 2      107MB   612MB   505MB   ext4            Basic data partition
 3      612MB   69.3GB  68.7GB  ext4
 4      69.3GB  86.5GB  17.2GB  linux-swap(v1)  Basic data partition  msftdata
 5      86.5GB  103GB   16.1GB  ntfs            Basic data partition  msftdata
 6      103GB   240GB   137GB   ext4

$ sudo grub-install

Installing for x86_64-efi platform.
Installation finished. No error reported.

答え1

BIOS/MBR と UEFI/GPT の両方から OS を起動できるように GRUB をインストールするにはどうすればよいですか?

あなたはBIOS ブート パーティションラベルが付けられていますbios_grub。このパーティションは GRUB をインストールする前に作成する必要があります。

GRUB が BIOS ベースのシステム上の GPT パーティション ディスクから起動するには、BIOS ブート パーティションが必要です。このパーティションは /boot マウントポイントとは無関係であり、GRUB によって直接使用されることに注意してください。このパーティションにファイル システムを作成したり、マウントしたりしないでください。

作成方法BIOS ブート パーティション? 最小サイズはどれくらいですか?

GPT システムで BIOS ブート パーティションを作成する場合、そのサイズが少なくとも 31 KiB であることを確認する必要があります。(GPT 形式のディスクは通常それほど小さくないので、十分な拡張の余地を残すために、1 MiB などの最小値よりも大きくすることをお勧めします。) また、パーティション タイプが適切であることも確認する必要があります。GNU Parted を使用すると、次のようなコマンドを使用してこれを設定できます。

parted /dev/disk set partition-number bios_grub on

関連情報