概要
- Ubuntu22.04とWindows10をデュアルブート構築した際に、UbuntuのGRUBにWindowsを表示させる方法。
- Ubuntu22.04からセキュリティが強化されたため、GRUBに追加の設定が必要。
動作確認環境
- Ubuntu22.04
- Windows10
前提
- Ubuntu22.04とWindowsを各々インストールしておく。
- BIOSでUbuntu22.04のインストールディスクを優先起動するようにしておく。
方法
-
Ubuntu22.04を起動
-
現在の設定を確認
sudo update-grub
下記のように警告メッセージが表示される
Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.19.0-38-generic Found initrd image: /boot/initrd.img-5.19.0-38-generic Found linux image: /boot/vmlinuz-5.15.0-25-generic Found initrd image: /boot/initrd.img-5.15.0-25-generic Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done
-
Windowsを起動できるようにGRUBの設定
/etc/default/grub を下記コマンドで編集する。sudo vi /etc/default/grub
Windowsを起動できるように下記を追記する。
GRUB_DISABLE_OS_PROBER=false
GRUBメニュー表示させるため、下記も併せて追記する。
GRUB_TIMEOUT_STYLE=menu
再度、grubの更新を実行する。
sudo update-grub
下記のようになれば成功。
Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.19.0-41-generic Found initrd image: /boot/initrd.img-5.19.0-41-generic Found linux image: /boot/vmlinuz-5.19.0-38-generic Found initrd image: /boot/initrd.img-5.19.0-38-generic Found linux image: /boot/vmlinuz-5.15.0-25-generic Found initrd image: /boot/initrd.img-5.15.0-25-generic Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. Found Windows Boot Manager on /dev/sdc1@/efi/Microsoft/Boot/bootmgfw.efi Adding boot menu entry for UEFI Firmware Settings ... done
Windowsが見つかっていることがわかる。
Found Windows Boot Manager on /dev/sdc1@/efi/Microsoft/Boot/bootmgfw.efi
-
再起動して、GRUBメニューでWindowsが見つかれば成功。