Linux – How to remove unneccessary boot device options

bootgrublinuxpartitioningwindows 8

Long story short: had win8, decided to make dualboot, installed manjaro linux (mounted /boot/efi to windows' efi partition), oh noes grub doesnt show option to log into win8, managed to create win8 option via grub-customizer, logged into win8, decided to remove manjaro, created recovery usb via win8, used this guide, deleted manjaro partitions, oh noes there were unneccessary boot options, mounted efi partition in win8 and deleted manjaro, gummiboot folders and grub.cfg hoping that they'd dissapear. They didn't.

enter image description here

So how to remove these unneccessary options?

Best Answer

  • These entries are stored in UEFI’s NVRAM. You could use efibootmgr on Linux (has to be UEFI-booted) to remove/manage them. This program should be available (either installed by default or from the repositories) on all recent Linux distributions.

    Run efibootmgr as root to get a list of boot entries:

    [root@db-nb-11 ~]# efibootmgr
    BootCurrent: 0019
    Timeout: 0 seconds
    BootOrder: 0019,000C,000A,0006,0007,0008,0009,000B,000E,000F,0010,0011,0012,0013,000D
    Boot0000  Setup
    Boot0001  Boot Menu
    Boot0002  Diagnostic Splash Screen
    Boot0003  Startup Interrupt Menu
    Boot0004  ME Configuration Menu
    Boot0005  Rescue and Recovery
    Boot0006* USB CD
    Boot0007* USB FDD
    Boot0008  ATAPI CD0
    Boot0009  ATA HDD2
    Boot000A* ATA HDD0
    Boot000B  ATA HDD1
    Boot000C* USB HDD
    Boot000D* PCI LAN
    Boot000E  ATAPI CD1
    Boot000F  ATAPI CD2
    Boot0010  Other CD
    Boot0011  ATA HDD3
    Boot0012  ATA HDD4
    Boot0013  Other HDD
    Boot0014* IDER BOOT CDROM
    Boot0015* IDER BOOT Floppy
    Boot0016* ATA HDD
    Boot0017* ATAPI CD:
    Boot0018* PCI LAN
    Boot0019* Arch Linux

    You might notice that most of these entries aren’t relevant to you. Better take care not to delete anything important, who knows what might happen. ;)

    To delete entry Boot0019, you’d have to execute the following command:

    bootmgr --bootnum 19 --delete-bootnum

    Or, if you like short options:

    bootmgr -b 19 -B
  • Related Question