Every time I've run boot-repair it adds a 5 extra Windows boot options
to my main grub menu that do not work. In your case it has added 11
extra entries! grub.cfg shows the problem
The secret can be found within /etc/grub/grub.cfg file:
BEGIN /etc/grub.d/25_custom
menuentry "Windows UEFI bootmgfw.efi" { search --fs-uuid --no-floppy --set=root D656-F2A8 chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi }
menuentry "Windows Boot UEFI loader" { search --fs-uuid --no-floppy
--set=root D656-F2A8 chainloader (${root})/EFI/Boot/bkpbootx64.efi }
menuentry "EFI/ubuntu/fwupx64.efi" { search --fs-uuid --no-floppy
--set=root D656-F2A8 chainloader (${root})/EFI/ubuntu/fwupx64.efi }
menuentry "Windows UEFI bootmgfw.efi sda1" { search --fs-uuid
--no-floppy --set=root 9478-B6E2 chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi }
menuentry "Windows Boot UEFI loader sda1" { search --fs-uuid
--no-floppy --set=root 9478-B6E2 chainloader (${root})/EFI/Boot/bkpbootx64.efi
END /etc/grub.d/25_custom
BEGIN /etc/grub.d/30_os-prober ### menuentry 'Windows Boot Manager (on /dev/nvme0n1p2)' --class windows --class os $menuentry_id_option
'osprober-efi-D656-F2A8' {
savedefault
insmod part_gpt
insmod fat
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root D656-F2A8
else
search --no-floppy --fs-uuid --set=root D656-F2A8
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi } menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os
$menuentry_id_option 'osprober-efi-9478-B6E2' {
savedefault
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 9478-B6E2
else
search --no-floppy --fs-uuid --set=root 9478-B6E2
fi
chainloader /efi/Microsoft/Boot/bootmgfw.efi }
END /etc/grub.d/30_os-prober
The section 30_os-prober contains the "good" Windows grub menu entries
you want to keep. Section 25_custom contains the bogus entries created
by boot-repair. You can't edit the grub configuration file because it
will simply be overwritten the next time update-grub is run. Section
25_custom was created by Boot Repair
On my system:
$ locate 25_custom
/boot/efi/boot-repair/log/20171111_224241/nvme0n1p5/25_custom
/boot/efi/boot-repair/log/20171208_030854/nvme0n1p5/25_custom
/etc/grub.d/25_custom
Take a look at the extra Windows options that were setup (and don't
work):
$ cat /boot/efi/boot-repair/log/20171208_030854/nvme0n1p5/25_custom
!/bin/sh exec tail -n +3 $0
menuentry "Windows UEFI bootmgfw.efi" { search --fs-uuid --no-floppy
--set=root D656-F2A8 chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi }
menuentry "Windows Boot UEFI loader" { search --fs-uuid --no-floppy
--set=root D656-F2A8 chainloader (${root})/EFI/Boot/bkpbootx64.efi }
menuentry "EFI/ubuntu/fwupx64.efi" { search --fs-uuid --no-floppy
--set=root D656-F2A8 chainloader (${root})/EFI/ubuntu/fwupx64.efi }
menuentry "Windows UEFI bootmgfw.efi sda1" { search --fs-uuid
--no-floppy --set=root 9478-B6E2 chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi }
menuentry "Windows Boot UEFI loader sda1" { search --fs-uuid
--no-floppy --set=root 9478-B6E2 chainloader (${root})/EFI/Boot/bkpbootx64.efi
These are the erroneous entries boot-repair created in
/etc/grub.d/25_custom that were subsequently compiled into
\boot\grub\grub.cfg. Reverse Boot Repair's change to 25_custom
You want to edit the file /etc/grub.d/25_custom and delete everything
except the first three lines:
!/bin/sh exec tail -n +3 $0
The file now contains two lines with text and one blank line.
Save the file.
Run sudo update-grub.
Reboot.
Now your menu is no longer bloated with five bogus Windows menu
entries that don't work. Double-check there are three lines in
25_custom
Run this command and verify 25_custom has three lines:
$ wc /etc/grub.d/25_custom
3 6 30
^ ^ ^
| | +--- Number of characters
| +----------- Number of words
+------------------- Number of lines
I added the # comments to decipher wc (word count) output.
Eu tentei editar 25_custom arquivo como Fabby descreveu.
No entanto, o unbuntu não salvará o arquivo de texto editado.
Eu não sei o que fazer a partir daqui, como sou um iniciante.
Estou usando o ubuntu 18.10 , no modo avançado, (não o modo de recuperação avançada)
Como essas opções extras, criadas pelo Boot-repair, podem ser removidas do 25_custom ?
-Andrew
$
/etc/grub.d/25_custom
'#! / bin / sh
exec tail -n +3 $ 0
menuentry "Windows UEFI bootmgfw.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / Microsoft / Boot / bootmgfw.efi
}
menuentry "Carregador UEFI de inicialização do Windows" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / Boot / bkpbootx64.efi
}
menuentry "Inicialização do Windows UEFI fbx64.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / Boot / fbx64.efi
}
menuentry "Windows Boot UEFI mmx64.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / Boot / mmx64.efi
}
menuentry "EFI / ubuntu / MokManager.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / ubuntu / MokManager.efi
}
menuentry "EFI / ubuntu / fwupx64.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / ubuntu / fwupx64.efi
}
menuentry "EFI / ubuntu / mmx64.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / ubuntu / mmx64.efi
}
menuentry "EFI / HP / BIOSUpdate / CryptRSA.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / HP / BIOSUpdate / CryptRSA.efi
}
menuentry "EFI / HP / BIOSUpdate / HpBiosMgmt.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / HP / BIOSUpdate / HpBiosMgmt.efi
}
menuentry "EFI / HP / BIOSUpdate / HpBiosUpdate.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / HP / BIOSUpdate / HpBiosUpdate.efi
}
menuentry "EFI / HP / SystemDiags / CryptRSA.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / HP / SystemDiags / CryptRSA.efi
}
menuentry "EFI / HP / SystemDiags / HpSysDiags.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / HP / SystemDiags / HpSysDiags.efi
}
menuentry "EFI / HP / SystemDiags / SystemDiags.efi" {
pesquisa --fs-uuid --no-floppy --set = root 8611-7AF2
chainloader ($ {root}) / EFI / HP / SystemDiags / SystemDiags.efi
} '
$