kledgeb UbuntuやLinuxの最新情報を紹介

Ubuntu Boot Repair その26 - おすすめの修復でUbuntuを起動できるようにする(修正内容)(UEFI + GPT)

おすすめの修復(修正内容)

  「おすすめの修復」で行われた修復内容を見ていきます。

  今回どのような修正が行われたのか、「BootInfoサマリ」を見てみます。

  「BootInfoサマリ」を開いて「Recommended repair」の行を検索します。
  「Recommended repair」の行以降に、修正の内容が出力されています。


BootInfoサマリを見る

  「BootInfoサマリ」に出力された修復内容を見ます。

  注意

    環境や修正内容により、出力される内容は異なります。

  修正内容

    修正内容を抽出すると、以下のようになります。

=================== Recommended repair
Recommended-Repair
This setting will reinstall the grub-efi-amd64-signed of sda2, using the following options:        sdb2/boot/efi,
Additional repair will be performed: unhide-bootmenu-10s   fix-windows-boot


/boot/efi added in sda2/fstab
Quantity of real Windows: 1
df: `/dev/sdb2@/efi/Microsoft/Boot/bootmgfw.efi': そのようなファイルやディレクトリはありません
Could not detect USEDPERCENT of sdb2@/efi/Microsoft/Boot/bootmgfw.efi ().
df: `/dev/sdb2@/efi/Microsoft/Boot/bootmgfw.efi': そのようなファイルやディレクトリはありません

sda2/boot/efi not empty
Mount sdb2 on /boot/efi
ls /boot/efi/1:

*******lspci -nnk | grep -iA3 vga
00:0f.0 VGA compatible controller [0300]: VMware SVGA II Adapter [15ad:0405]
Subsystem: VMware SVGA II Adapter [15ad:0405]
Kernel driver in use: vmwgfx
00:10.0 SCSI storage controller [0100]: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI [1000:0030] (rev 01)
Subsystem: VMware LSI Logic Parallel SCSI Controller [15ad:1976]
*******

grub-install (GRUB) 2.00-19ubuntu2.1,grub-install (GRUB) 2.

efibootmgr -v
BootOrder: 0001,0000,0002,0003,0004,0006
Boot0000* EFI VMware Virtual SCSI Hard Drive (0.0)    ACPI(a0341d0,0)PCI(10,0)SCSI(0,0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (1.0)    ACPI(a0341d0,0)PCI(11,0)PCI(6,0)03120a00010000000000
Boot0002* EFI Network    ACPI(a0341d0,0)PCI(11,0)PCI(1,0)MAC(000c297dbd79,0)
Boot0003* EFI Network 1    ACPI(a0341d0,0)PCI(11,0)PCI(2,0)MAC(000c297dbd83,1)
Boot0004* EFI Internal Shell (Unsupported option)    MM(b,7efcb000,7f355fff)
Boot0006* EFI VMware Virtual SCSI Hard Drive (1.0)    ACPI(a0341d0,0)PCI(10,0)SCSI(1,0)
uname -r
Kernel: 3.11.0-14-generic
WinEFI を検出しました。 [Backup and rename Windows EFI files]を有効にしますか? yes (if any choice fails, please retry with the other)

Reinstall the grub-efi-amd64-signed of sda2
Installation finished. No error reported.
grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot : BootOrder: 0005,0001,0000,0002,0003,0004,0006
Boot0000* EFI VMware Virtual SCSI Hard Drive (0.0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (1.0)
Boot0002* EFI Network
Boot0003* EFI Network 1
Boot0004* EFI Internal Shell (Unsupported option)
Boot0006* EFI VMware Virtual SCSI Hard Drive (1.0)
Boot0005* ubuntu
exit code of grub-install :0

mv 25_custom
ls /boot/efi/1:
ls /boot/efi/1:
df /dev/sdb2
Save and rename /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi (/boot/efi/EFI/Microsoft/Boot/bkpbootmgfw.efi)
cp /boot/efi/EFI/ubuntu/shimx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
df /dev/sdb2
cp /boot/efi/EFI/ubuntu/shimx64.efi /boot/efi/EFI/Microsoft/Boot/bootx64.efi (& .grb)
df /dev/sdb2
Save and rename /boot/efi/EFI/Boot/bootx64.efi (/boot/efi/EFI/Boot/bkpbootx64.efi)
cp /boot/efi/EFI/ubuntu/shimx64.efi /boot/efi/EFI/Boot/bootx64.efi
ls /boot/efi/1:
Add /boot/efi efi entries in /etc/grub.d/25_custom
Adding custom /boot/efi/EFI/Microsoft/Boot/bkpbootmgfw.efi
Adding custom /boot/efi/EFI/Boot/bkpbootx64.efi
sdb2/bkpbootx64.efi already added
sdb2/bkpbootmgfw.efi already added
Adding custom /boot/efi/EFI/ubuntu/MokManager.efi
df /dev/sda1
df /dev/sda1
df /dev/sda1
ls /boot/efi/1:
Add /boot/efi efi entries in /etc/grub.d/25_custom
Adding custom /boot/efi/EFI/Microsoft/Boot/bkpbootmgfw.efi
Adding custom /boot/efi/EFI/Boot/bkpbootx64.efi
sda1/bkpbootx64.efi already added
sda1/bkpbootmgfw.efi already added
Adding custom /boot/efi/EFI/ubuntu/MokManager.efi
Installation finished. No error reported.
grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot : BootCurrent: 0005
BootOrder: 0001,0000,0002,0003,0004,0006
Boot0000* EFI VMware Virtual SCSI Hard Drive (0.0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (1.0)
Boot0002* EFI Network
Boot0003* EFI Network 1
Boot0004* EFI Internal Shell (Unsupported option)
Boot0006* EFI VMware Virtual SCSI Hard Drive (1.0)
BootCurrent: 0005
BootOrder: 0005,0001,0000,0002,0003,0004,0006
Boot0000* EFI VMware Virtual SCSI Hard Drive (0.0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (1.0)
Boot0002* EFI Network
Boot0003* EFI Network 1
Boot0004* EFI Internal Shell (Unsupported option)
Boot0006* EFI VMware Virtual SCSI Hard Drive (1.0)
Boot0005* ubuntu
exit code of grub-install :0

efibootmgr -v
BootCurrent: 0005
BootOrder: 0005,0001,0000,0002,0003,0004,0006
Boot0000* EFI VMware Virtual SCSI Hard Drive (0.0)    ACPI(a0341d0,0)PCI(10,0)SCSI(0,0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (1.0)    ACPI(a0341d0,0)PCI(11,0)PCI(6,0)03120a00010000000000
Boot0002* EFI Network    ACPI(a0341d0,0)PCI(11,0)PCI(1,0)MAC(000c297dbd79,0)
Boot0003* EFI Network 1    ACPI(a0341d0,0)PCI(11,0)PCI(2,0)MAC(000c297dbd83,1)
Boot0004* EFI Internal Shell (Unsupported option)    MM(b,7efcb000,7f355fff)
Boot0005* ubuntu    HD(2,96800,31800,eb257547-b0f8-4c10-a681-c7e6c22b73b7)File(EFIubuntushimx64.efi)
Boot0006* EFI VMware Virtual SCSI Hard Drive (1.0)    ACPI(a0341d0,0)PCI(10,0)SCSI(1,0)

efibootmgr -v
BootCurrent: 0005
BootOrder: 0005,0001,0000,0002,0003,0004,0006
Boot0000* EFI VMware Virtual SCSI Hard Drive (0.0)    ACPI(a0341d0,0)PCI(10,0)SCSI(0,0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (1.0)    ACPI(a0341d0,0)PCI(11,0)PCI(6,0)03120a00010000000000
Boot0002* EFI Network    ACPI(a0341d0,0)PCI(11,0)PCI(1,0)MAC(000c297dbd79,0)
Boot0003* EFI Network 1    ACPI(a0341d0,0)PCI(11,0)PCI(2,0)MAC(000c297dbd83,1)
Boot0004* EFI Internal Shell (Unsupported option)    MM(b,7efcb000,7f355fff)
Boot0005* ubuntu    HD(2,96800,31800,eb257547-b0f8-4c10-a681-c7e6c22b73b7)File(EFIubuntushimx64.efi)
Boot0006* EFI VMware Virtual SCSI Hard Drive (1.0)    ACPI(a0341d0,0)PCI(10,0)SCSI(1,0)

update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.0-14-generic
Found initrd image: /boot/initrd.img-3.11.0-14-generic
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Windows Boot Manager on /dev/sdb2@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 13.04 (13.04) on /dev/sdb5
Unhide GRUB boot menu in sda2/boot/grub/grub.cfg

ブート正常に修復。

今すぐコンピューターを再起動することができます。
BIOSはsda (107GB)ディスクにブートすることを忘れないでください!

[今使っているOS - Ubuntu 13.10]のブートファイルが、ディスクのスタート位置から遠く離れた位置にあります。BIOSはこれを検知できないでしょう。 /bootパーティションを作ったあとで、再度試した方がいいかもしれません (EXT4, >200MB, ディスクの開始). これはgPartedのようなツールを介して実行することができます。 [ブート修復]オプションの [別パーティションに/bootを構成:] から、このパーティションを選択して下さい。 (https://help.ubuntu.com/community/BootPartition)

[Backup and rename Windows EFI files]オプションを無効にした後に再試行することができます。

  ポイントをみていきます。

  1.修正内容の概要

    以下の出力は、修正内容の概要です。

This setting will reinstall the grub-efi-amd64-signed of sda2, using the following options: sdb2/boot/efi,

    意訳すると、
      「sda2」にインストールされているUbuntuの「grub-efi-amd64-signed」を再インストールします。
      「sdb2」の「/boot/efi」にOSローダーをインストールします。

    grub-efi-amd64-signed

      「grub-efi-amd64-signed」はパッケージ名ですが、パッケージ名から以下のことが分かります。

      efi:UEFIに対応している
      amd64:64bit
      signed:セキュアブートに対応している

      この環境はセキュアブートに対応していませんが、セキュアブート対応の「GRUB2」を利用することができます。

  2.修正オプション

    修正オプションです。

Additional repair will be performed: unhide-bootmenu-10s   fix-windows-boot

    意訳すると、
       「GRUB2」のブートメニューを10秒間表示するようにします。
      Windowsのブートマネージャーを修復します。

  3.GRUB2のインストール

    GRUB2がインストールされます。

Reinstall the grub-efi-amd64-signed of sda2
Installation finished. No error reported.
grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot : BootOrder: 0005,0001,0000,0002,0003,0004,0006
Boot0000* EFI VMware Virtual SCSI Hard Drive (0.0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (1.0)
Boot0002* EFI Network
Boot0003* EFI Network 1
Boot0004* EFI Internal Shell (Unsupported option)
Boot0006* EFI VMware Virtual SCSI Hard Drive (1.0)
Boot0005* ubuntu

exit code of grub-install :0

    意訳すると、
    「sda2」にインストールされているUbuntuの「grub-efi-amd64-signed」を再インストールします。
      インストールが完了しました。
      問題は報告されていません。
   
    もし「GRUB2」のインストールに失敗した場合、そのエラーメッセージが出力されます。
    また最後の行の数値(上記では「0」)は、エラーコードです。
    「0」ならば問題ありません。

    このタイミングでUEFIに「ubuntu」のOSローダーが登録されます。
    上記では、「Boot0005* ubuntu」がこれに該当します。

  4.OSローダーの差し替え

    WindowsのOSローダーを「GRUB2」のOSローダーに差し替えます。

Save and rename /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi (/boot/efi/EFI/Microsoft/Boot/bkpbootmgfw.efi)
cp /boot/efi/EFI/ubuntu/shimx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
df /dev/sdb2
cp /boot/efi/EFI/ubuntu/shimx64.efi /boot/efi/EFI/Microsoft/Boot/bootx64.efi (& .grb)
df /dev/sdb2
Save and rename /boot/efi/EFI/Boot/bootx64.efi (/boot/efi/EFI/Boot/bkpbootx64.efi)
cp /boot/efi/EFI/ubuntu/shimx64.efi /boot/efi/EFI/Boot/bootx64.efi

  5.GRUB2のブートメニューのカスタムエントリーの追加

    OSローダーの差し替えを行った場合、Windowsのブートマネージャーを起動するエントリーが必要になります。

    Windowsのブートマネージャーを起動するエントリーが追加されます。

Add /boot/efi efi entries in /etc/grub.d/25_custom
Adding custom /boot/efi/EFI/Microsoft/Boot/bkpbootmgfw.efi
Adding custom /boot/efi/EFI/Boot/bkpbootx64.efi

sdb2/bkpbootx64.efi already added
sdb2/bkpbootmgfw.efi already added
Adding custom /boot/efi/EFI/ubuntu/MokManager.efi
df /dev/sda1
df /dev/sda1
df /dev/sda1
ls /boot/efi/1:
Add /boot/efi efi entries in /etc/grub.d/25_custom
Adding custom /boot/efi/EFI/Microsoft/Boot/bkpbootmgfw.efi
Adding custom /boot/efi/EFI/Boot/bkpbootx64.efi

sda1/bkpbootx64.efi already added
sda1/bkpbootmgfw.efi already added
Adding custom /boot/efi/EFI/ubuntu/MokManager.efi

  6.UEFIのブートマネージャー情報の表示

    UEFIのブートマネージャーの情報が表示されます。

efibootmgr -v
BootOrder: 0005,0001,0000,0002,0003,0004,0006
Boot0000* EFI VMware Virtual SCSI Hard Drive (0.0)    ACPI(a0341d0,0)PCI(10,0)SCSI(0,0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (1.0)    ACPI(a0341d0,0)PCI(11,0)PCI(6,0)03120a00010000000000
Boot0002* EFI Network    ACPI(a0341d0,0)PCI(11,0)PCI(1,0)MAC(000c297dbd79,0)
Boot0003* EFI Network 1    ACPI(a0341d0,0)PCI(11,0)PCI(2,0)MAC(000c297dbd83,1)
Boot0004* EFI Internal Shell (Unsupported option)    MM(b,7efcb000,7f355fff)
Boot0005* ubuntu    HD(2,96800,31800,eb257547-b0f8-4c10-a681-c7e6c22b73b7)File(EFIubuntushimx64.efi)
Boot0006* EFI VMware Virtual SCSI Hard Drive (1.0)    ACPI(a0341d0,0)PCI(10,0)SCSI(1,0)

    「BootOrder」が起動順になります。
    最初に「0005」があるので、UEFIはまず「Boot0005」の項目を起動しようとします。
    もし起動に失敗した場合は、次の「0001」である「Boot0001」(sda)から起動しようとします。

  7.ブートメニューの再構築

    最後に「GRUB2」のブートメニューが再構築されます。
    このタイミングでOSの再検出が行われます。

update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.0-14-generic
Found initrd image: /boot/initrd.img-3.11.0-14-generic
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Windows Boot Manager on /dev/sdb2@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 13.04 (13.04) on /dev/sdb5
Unhide GRUB boot menu in sda2/boot/grub/grub.cfg


    「Found」の行は、検出されたOSです。
    「GRUB2」のブートメニューに表示されます。

Ubuntuの起動

  Ubuntuを起動して、変更された内容を見てみます。

  UEFIブートマネージャー

    UEFIが管理しているブートマネージャーの一覧を見ると、以下のように「ubuntu」が追加されています。
    このUEFIが管理しているブートマネージャーはOSから操作可能なため、「GRUB2」インストール時に、「ubuntu」を追加しています。


    UEFIの設定画面はPCによって異なるため、PCの説明書を参考にしてください。

  ブートメニュー

    ブートメニューには、Windowsのブートマネージャーを起動するエントリーやMOKを操作するMokManagerを起動する項目が追加されています。


    ブートメニューについては、「おすすめの修復でUbuntuを起動できるようにする(ブートメニュー)」を参考にしてください。

  EFIシステムパーティション

    修復前にマウントされていたEFIシステムパーティションは、「sda1」でした。
    修復後は以下のように「sdb2」のEFIシステムパーティションがマウントされています。


    EFIシステムパーティションのマウントは、「/etc/fstab」で行われています。


    「/etc/fstab」をテキストエディターで開くと、以下のようになっています。


    青枠

      青枠は修正前の内容です。
      修正によりコメントに修正され、無効になっています。

    赤枠

      赤枠は修正後の内容です。
      修正により「sdb2」をEFIシステムパーティションとして「/boot/efi」にマウントするように記述されています。


Boot Repair
スポンサー
コメント
コメントポリシー
コメントをする前に UbuntuのCode of Conduct(CoC/行動規範) を確認し、CoCに沿ったコメントをお願いします。
コメントの使い方は、コメントの使い方を参照してください。
同一カテゴリーの記事
SNS
人気の記事
  • Ubuntu 22.04 その120 - UbuntuのブートローダーをBoot Repairで修復するには・Ubuntuが起動しないトラブルを解決
    UbuntuのブートローダーをBoot Repairで修復するには 「Boot Repair」はOSのブートローダーに起因するOSが起動しない問題を簡単に解決してくれるアプリです。
  • Ubuntu 22.04 その79 - 画面ロックの有効・無効を設定するには・画面ロック時の設定をカスタマイズするには
    画面ロックの有効・無効を設定するには 一定時間ユーザーによる操作がない時に、自動的に画面をロックしパスワードで保護したり、画面をブランク状態にできます。
  • Ubuntu 22.04 その95 - ディスプレイサーバーを切り替えるには・XorgとWayland
    ディスプレイサーバーを切り替えるには 「Ubuntu」はデフォルトで2種類のディスプレイサーバーを提供しています。
  • Ubuntu nano その5 - 文字列を検索する
    文字列を検索する(Where Is)   文字列の検索は、部分一致と正規表現による検索が可能です。 検索の開始始点   現在カーソルのある位置から検索を行います。   もし、テキストの最後まで検索して文字が見つからない場合、   nanoはテキストの先頭から検索...
  • Ubuntu 24.04 その70 - Ubuntu 24.04.4 LTS のリリーススケジュール
    Ubuntu 24.04.4 LTS のリリーススケジュール Ubuntu 24.04.4 LTS のリリーススケジュールを紹介します。
  • Ubuntuのバージョンと開発コードの対応表
    UbuntuのバージョンとUbuntuの開発コード 「Ubuntu」には各バージョンごとに開発コードが設定されます。
  • Ubuntu 22.04 その98 - 入力ソースとキーボートレイアウトと日本語入力のカスタマイズ
    入力ソースとキーボートレイアウトと日本語入力 「Ubuntu」ではユーザーが利用しているキーボードレイアウトや日本語入力のカスタマイズが可能です。
  • Linux その309 - This Week in Plasma の貢献者の募集と投稿頻度の抑制
    This Week in Plasma の貢献者の募集と投稿頻度の低下 KDE で This Week in Plasma の貢献者が募集されています。
  • Ubuntu 22.04 LTSのインストール その5 - UEFI環境でパーティションの作成と構成 〜 ブートローダーのインストール先の選択
    UEFI環境でパーティションの作成と構成を行う UEFI環境でパーティションの作成と構成を行います。
  • VirtualBox その125 - ゲストOSのUbuntuにLinux Guest Additionsをインストールするには
    ゲストOSのUbuntuにLinux Guest Additionsをインストールするには 仮想マシンにインストールしたゲストOSの「Ubuntu」に、「Linux Guest Additions」をインストールする方法です。
記事のピックアップ
オプション