Come rimuovere voci EFI non necessarie da GRUB?


12

This is how my GRUB menu entry looks like

Come posso liberarmi di queste voci di menu di GRUB indesiderate. Ubuntu e Windows vengono caricati correttamente, ma queste voci non necessarie non mi servono. Grazie in anticipo. Ecco come appare grub.cfg (/boot/grub/grub.cfg) nel mio caso:

# BEGIN /etc/grub.d/00_header ###
if [-s $ prefix / grubenv]; poi
  set have_grubenv = true
  load_env
fi
if ["$ {next_entry}"]; poi
   set default = "$ {next_entry}"
   imposta next_entry =
   save_env next_entry
   impostare boot_once = true
altro
   set default = "5"
fi

if [x "$ {feature_menuentry_id}" = xy]; poi
  menuentry_id_option = "- id"
altro
  menuentry_id_option = ""
fi

esporta menuentry_id_option

if ["$ {prev_saved_entry}"]; poi
  set saved_entry = "$ {prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry =
  save_env prev_saved_entry
  impostare boot_once = true
fi

function savedefault {
  if [-z "$ {boot_once}"]; poi
    saved_entry = "$ {} scelto"
    save_env saved_entry
  fi
}
funzione recordfail {
  set recordfail = 1
  if [-n "$ {have_grubenv}"]; allora se [-z "$ {boot_once}"]; quindi save_env recordfail; fi; fi
}
funzione load_video {
  if [x $ feature_all_video_module = xy]; poi
    insmod all_video
  altro
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [x $ feature_default_font_path = xy]; poi
   font = unicode
altro
insmod part_gpt
insmod ext2
set root = 'hd0, gpt7'
if [x $ feature_platform_search_hint = xy]; poi
  cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
altro
  cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
fi
    font = "/ usr / share / grub / unicode.pf2"
fi

se loadfont $ font; poi
  imposta gfxmode = auto
  load_video
  insmod gfxterm
  set locale_dir = $ prefisso / locale
  set lang = en_US
  insmod gettext
fi
terminal_output gfxterm
if ["$ {recordfail}" = 1]; poi
  impostare il timeout = -1
altro
  if [x $ feature_timeout_style = xy]; poi
    imposta timeout_style = menu
    impostare il timeout = 30
  # Codice di timeout normale di fallback nel caso in cui la funzione timeout_style sia
  # non disponibile.
  altro
    impostare il timeout = 30
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
impostare menu_color_normal = bianco / nero
set menu_color_highlight = nero / grigio chiaro
se background_color 44,0,30,0; poi
  chiaro
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
funzione gfxmode {
    set gfxpayload = "$ {1}"
    if ["$ {1}" = "keep"]; poi
        impostare vt_handoff = vt.handoff = 7
    altro
        impostare vt_handoff =
    fi
}
if ["$ {recordfail}"! = 1]; poi
  if [-e $ {prefisso} /gfxblacklist.txt]; poi
    se hwmatch $ {prefisso} /gfxblacklist.txt 3; poi
      if [$ {match} = 0]; poi
        set linux_gfx_mode = keep
      altro
        impostare linux_gfx_mode = text
      fi
    altro
      impostare linux_gfx_mode = text
    fi
  altro
    set linux_gfx_mode = keep
  fi
altro
  impostare linux_gfx_mode = text
fi
esporta linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-simple-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
    recordfail
    load_video
    gfxmode $ linux_gfx_mode
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root = 'hd0, gpt7'
    if [x $ feature_platform_search_hint = xy]; poi
      cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
    altro
      cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
    fi
    linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro quiet splash $ vt_handoff
    initrd /boot/initrd.img-3.13.0-49-generic
}
sottomenu 'Opzioni avanzate per Ubuntu' $ menuentry_id_option 'gnulinux-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
    menuentry 'Ubuntu, con Linux 3.13.0-49-generic' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-49-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        gfxmode $ linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-49-generico ...'
        linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro quiet splash $ vt_handoff
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-49-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-49-generic (modalità di ripristino)' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-49-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-49-generico ...'
        linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 nomodeset di ripristino ro 
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-49-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-48-generic' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-48-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        gfxmode $ linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-48-generico ...'
        linux /boot/vmlinuz-3.13.0-48-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro quiet splash $ vt_handoff
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-48-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-48-generic (modalità di ripristino)' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-48-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-48-generico ...'
        linux /boot/vmlinuz-3.13.0-48-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro nomodeset di recupero 
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-48-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-46-generic' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-46-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        gfxmode $ linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-46-generico ...'
        linux /boot/vmlinuz-3.13.0-46-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro quiet splash $ vt_handoff
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-46-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-46-generic (modalità di ripristino)' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-46-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-46-generico ...'
        linux /boot/vmlinuz-3.13.0-46-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 nomodeset di ripristino ro 
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-46-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-44-generic' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-44-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        gfxmode $ linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-44-generico ...'
        linux /boot/vmlinuz-3.13.0-44-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro quiet splash $ vt_handoff
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-44-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-44-generic (modalità di ripristino)' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-44-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-44-generico ...'
        linux /boot/vmlinuz-3.13.0-44-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 nomodeset di ripristino ro 
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-44-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-32-generic' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-32-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        gfxmode $ linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-32-generico ...'
        linux /boot/vmlinuz-3.13.0-32-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro quiet splash $ vt_handoff
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-32-generic
    }
    menuentry 'Ubuntu, con Linux 3.13.0-32-generic (modalità di ripristino)' --class ubuntu --class gnu-linux --class gnu --class os $ menuentry_id_option 'gnulinux-3.13.0-32-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73 '{
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root = 'hd0, gpt7'
        if [x $ feature_platform_search_hint = xy]; poi
          cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt7 --hint-efi = hd0, gpt7 --hint-baremetal = ahci0, gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
        altro
          cerca --no-floppy --fs-uuid --set = root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo 'Caricamento Linux 3.13.0-32-generico ...'
        linux /boot/vmlinuz-3.13.0-32-generic.efi.signed root = UUID = 0307c8a7-964b-4f91-9eb0-31dddf1eee73 nomodeset di ripristino ro 
        echo 'Caricamento del ramdisk iniziale ...'
        initrd /boot/initrd.img-3.13.0-32-generic
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/25_custom ###

menuentry "Windows UEFI bootmgfw.efi" {
cerca --fs-uuid --no-floppy --set = root E467-1A3B
chainloader ($ {root}) / EFI / Microsoft / Boot / bootmgfw.efi
}

menuentry "Caricatore UEFI di avvio Windows" {
cerca --fs-uuid --no-floppy --set = root E467-1A3B
chainloader ($ {root}) / EFI / Boot / bkpbootx64.efi
}

menuentry "EFI / HP / SystemRecovery / bootmgfw.efi" {
cerca --fs-uuid --no-floppy --set = root E467-1A3B
chainloader ($ {root}) / EFI / HP / SystemRecovery / bootmgfw.efi
}
### END /etc/grub.d/25_custom ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on / dev / sda2)' --class windows --class os $ menuentry_id_option 'osprober-efi-E467-1A3B' {
    insmod part_gpt
    grasso insmod
    set root = 'hd0, gpt2'
    if [x $ feature_platform_search_hint = xy]; poi
      cerca --no-floppy --fs-uuid --set = root --hint-bios = hd0, gpt2 --hint-efi = hd0, gpt2 --hint-baremetal = ahci0, gpt2 E467-1A3B
    altro
      cerca --no-floppy --fs-uuid --set = root E467-1A3B
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
imposta timeout_style = menu
if ["$ {timeout}" = 0]; poi
  set timeout = 10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
    fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
else
  search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=10
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
    else
      search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
    fi
    linux   /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro  quiet splash $vt_handoff
    initrd  /boot/initrd.img-3.13.0-49-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
    menuentry 'Ubuntu, with Linux 3.13.0-49-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-49-generic-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-49-generic ...'
        linux   /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-49-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-49-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-49-generic-recovery-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-49-generic ...'
        linux   /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-49-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-48-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-48-generic-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-48-generic ...'
        linux   /boot/vmlinuz-3.13.0-48-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-48-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-48-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-48-generic-recovery-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-48-generic ...'
        linux   /boot/vmlinuz-3.13.0-48-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-48-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-46-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-46-generic-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-46-generic ...'
        linux   /boot/vmlinuz-3.13.0-46-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-46-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-46-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-46-generic-recovery-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-46-generic ...'
        linux   /boot/vmlinuz-3.13.0-46-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-46-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-44-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-44-generic-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-44-generic ...'
        linux   /boot/vmlinuz-3.13.0-44-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-44-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-44-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-44-generic-recovery-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-44-generic ...'
        linux   /boot/vmlinuz-3.13.0-44-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-44-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-32-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-32-generic ...'
        linux   /boot/vmlinuz-3.13.0-32-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-32-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-32-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-recovery-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  0307c8a7-964b-4f91-9eb0-31dddf1eee73
        else
          search --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
        fi
        echo    'Loading Linux 3.13.0-32-generic ...'
        linux   /boot/vmlinuz-3.13.0-32-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-32-generic
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/25_custom ###

menuentry "Windows UEFI bootmgfw.efi" {
search --fs-uuid --no-floppy --set=root E467-1A3B
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "Windows Boot UEFI loader" {
search --fs-uuid --no-floppy --set=root E467-1A3B
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/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-E467-1A3B' {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  E467-1A3B
    else
      search --no-floppy --fs-uuid --set=root E467-1A3B
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
    fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/backup25_custom ###

menuentry "Windows UEFI bootmgfw.efi" {
search --fs-uuid --no-floppy --set=root E467-1A3B
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/backup25_custom ###

Couldn't follow the link. It gave a 404. You can use the key combination ctrl + G or select the 'img' option in the editor directly above the text field. That way, the image is tied to the post.
— Andrew Wallace

Please check your link was broken, so removed, enter your valid link again
— Maythux

posted the image now.
— Ashu

ubuntuforums.org/showthread.php?t=2275315 - following on that thread also for the same problem
— Ashu

Risposte:


5

finalmente sono in grado di risolvere questo problema ... ho passato tutti i file nella directory /etc/grub.d/ e mi sono sbarazzato delle voci non necessarie e poi ho eseguito 'sudo update-grub'. Sono entrato in 25_custom e ho cancellato tutte le voci in cui non erano necessarie (per avviare al momento dell'avvio - come tutte le voci EFI non necessarie).

sudo gedit  /etc/grub.d/25_custom
sudo update-grub

Assicurati di fare un backup dei file che stai modificando. Assicurati di non archiviare nessuno dei file di backup che iniziano con 25_custom ... se lo memorizzi con 25_custom_today'sdate ecc .... Il caricatore di avvio EFI continuerà a leggere le voci da quello .... Per le persone che hanno HP Laptop: questo funzionerà sicuramente per te. Grazie per tutto il tuo aiuto.


2

Per pulire la voce di Grub devi decidere quale menuentry rimuovere, per prima cosa modifichiamo lo script di file personalizzato nella directory /etc/grub.d con lo stesso contenuto del tuo grub.cfg.

gedit /boot/grub/grub.cfg

Copia tutto il contenuto e vai al file /etc/grub.d/40_custom

sudo gedit  /etc/grub.d/40_custom

Aggiungi il contenuto copiato alle righe fondate in 40_custom.

Ora in questo file personalizzato basta rimuovere tutti i menu che non si desidera visualizzare nel menu di Grub. Assicurati di rimuovere il nodo del menuentry racchiuso da {}

Ora quando hai finito Salva il file 40_custom e esci da gedit

Quindi eseguire il comando:

sudo update-grub

Questo comando creerà un nuovo menu di avvio nel file /boot/grub/grub.cfg che contiene le voci di menu personalizzate che abbiamo specificato.

Puoi verificare, prima di riavviare, per essere sicuro, usando il comando: gedit /boot/grub/grub.cfg. Questo aprirà il file in modalità di sola lettura.

Se il file è come previsto, vai avanti e riavvia altrimenti controlla dove si è verificato un errore.

puoi leggere alcuni articoli per maggiori informazioni come questa e questa .


1
Questo è un modo sbagliato per UEFI.
— Pilota

1
Sembra il menu di grub, non UEFI. E hai eseguito Boot-Repair? Boot-Repair aggiunge tutti i file efi che trova in 25_custom. Quindi puoi eseguire il backup di 25_custom e modificarlo a piacimento. Quindi eseguire ilsudo update-grub
— oldfred

Grazie oldfred ci proverò ... per favore specifica i passaggi in maggiori dettagli.
— Ashu,

@Maythux No che non funziona ... in effetti peggiorerà la situazione.
— Ashu,

Leggi i link nell'ultima riga con tutti i dettagli, perfetti per imparare da
— Maythux,

1

Per rimuovere le voci EFI da UEFI efibootmgr viene utilizzato.

È possibile elencare le voci per

sudo efibootmgr

E rimuovere le voci di

sudo efibootmgr -Bb <entry_number>

Manuale di Efibootmgr


non utile: ashu @ ashu-700-430qe: ~ $ sudo efibootmgr [sudo] password per ashu: BootCurrent: 0003 Timeout: 2 secondi BootOrder: 0003,0001.0002.000A, 0007.0008.000B, 000C, 0000 Boot0000 * ubuntu Boot0001 * USB Floppy / CD Boot0002 * USB Hard Disk Boot0003 * Windows Boot Manager Boot0007 * USB Floppy / CD Boot0008 * Hard Drive Boot000A * ATAPI CD-ROM Drive Boot000B * CD / DVD Drive Boot000C * Realtek PXE B03 D00 ashu @ ashu- 700-430qe: ~ $ ashu @ ashu-700-430qe: ~ $
— Ashu
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.