- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2018-09-09T18:29:10+09:00","default:regex","regex")
*UEFI Boot項目の整理 [#m7cbeca3]
BIOSのブートメニューを整理します。
# efibootmgr -v
BootCurrent: 000C
Timeout: 0 seconds
BootOrder: 000C,0000,000B,0001
Boot0000* ubuntu HD(3,GPT,09dab29f-f682-4ea5-9a54-4d3feb3304db,0xdee08800,0x64000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager HD(2,GPT,edfe77d0-e2a7-4407-b5d6-684887d90dc1,0x170ade,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot000B* UEFI OS HD(3,GPT,09dab29f-f682-4ea5-9a54-4d3feb3304db,0xdee08800,0x64000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot000C* ubuntu HD(3,GPT,09dab29f-f682-4ea5-9a54-4d3feb3304db,0xdee08800,0x64000)/File(EFI\Ubuntu\grubx64.efi)
必要なのは、Windows Boot Managerとubuntuのgrubx64.efiです。~
ubuntuのshimx64.efi(Boot0000)を消します。~
# efibootmgr --delete-bootnum --bootnum 0
BootCurrent: 000C
Timeout: 0 seconds
BootOrder: 000C,000B,0001
Boot0001* Windows Boot Manager
Boot000B* UEFI OS
Boot000C* ubuntu
UEFI OSは消えないので、inactiveにします。~
# efibootmgr --inactive --bootnum 000D
BootCurrent: 000C
Timeout: 0 seconds
BootOrder: 000C,0001,000D
Boot0001* Windows Boot Manager
Boot000C* ubuntu
Boot000D UEFI OS
これで、項目は2つになりました。
*消し過ぎかも・・・ [#ibeb2990]
shimx64.efiはセキュアブートが有効になっている環境で「GRUB2」を起動するOSローダーらしいので、消すのはちょっとまずいかもしれないので、もとに戻して、inactiveにします。~
ESPは、sdcにありました。~
# gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdc: 3907029168 sectors, 1.8 TiB
Model: TOSHIBA DT01ACA2
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 09D605FD-5858-9090-8081-828310111213
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 4205 sectors (2.1 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 3571484671 1.7 TiB 0700 Basic data partition
2 3571484672 3739254783 80.0 GiB 0700 Basic data partition
3 3739256832 3739666431 200.0 MiB EF00 ESP
4 3739666432 3907028991 79.8 GiB 8300
パーティションは3ですね。~
# efibootmgr --create --disk /dev/sdc --part 3 --loader \\EFI\\ubuntu\\shimx64.efi --label UbuntuSec
BootCurrent: 000C
Timeout: 0 seconds
BootOrder: 0000,000C,0001,000D
Boot0001* Windows Boot Manager
Boot000C* ubuntu
Boot000D UEFI OS
Boot0000* UbuntuSec
確認
# efibootmgr -v
BootCurrent: 000C
Timeout: 0 seconds
BootOrder: 0000,000C,0001,000D
Boot0000* UbuntuSec HD(3,GPT,09dab29f-f682-4ea5-9a54-4d3feb3304db,0xdee08800,0x64000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager HD(2,GPT,edfe77d0-e2a7-4407-b5d6-684887d90dc1,0x170ade,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot000C* ubuntu HD(3,GPT,09dab29f-f682-4ea5-9a54-4d3feb3304db,0xdee08800,0x64000)/File(EFI\Ubuntu\grubx64.efi)
Boot000D UEFI OS HD(3,GPT,09dab29f-f682-4ea5-9a54-4d3feb3304db,0xdee08800,0x64000)/File(\EFI\BOOT\BOOTX64.EFI)