4

I got a computer with Windows 10. After installing Ubuntu along Windows 10 and fixing the boot sector with boot-repair, I ended up with this for the 1st time:

grub menu

It does work when I choose the 1st or 2nd last ones. But how to delete all those redundant items?

hg8
  • 13,410
  • 12
  • 71
  • 103
Incerteza
  • 1,460
  • 5
  • 16
  • 27

1 Answers1

4

Removing & modifying grub entries

Graphical way :

Install grub-customizer, it will let you manage your grub entry easily:

sudo apt-add-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

grub customizer

Select the entry you want to delete, click on Remove and when you are done do not forget to click on Save.


In case of problem :

Restoring deleted entries :

If you accidentally deleted the wrong entry grub-customizer include a function to easily restore removed entry :

enter image description here


Restoring initial grub configuration :

You should not need this but I write it just in case something goes wrong.

grub-customizer keep a backup of your initial grub config in /etc/grub.d/backup.

If you accidentally messed up or want to go back to your original grub configuration here is what you can do :

To fix an unbootable configuration, run:

sudo cp /etc/grub.d/backup/boot_grub /boot/grub

To reset the whole configuration, also copy these files:

sudo cp /etc/grub.d/backup/etc_grub_d /etc/grub.d
sudo cp /etc/grub.d/backup/default_grub /etc/default/grub
sudo update-grub 

(Taken from /etc/grub.d/backup/RESTORE_INSTRUCTIONS)


If you still can not managed manage to restore your grub configuration after that, follow this guide.


Refer here for more information.

hg8
  • 13,410
  • 12
  • 71
  • 103
  • If you later want to resurrect an item, how do you do it (assuming you've rebooted multiple times since deleting)? – Ruslan Sep 29 '15 at 11:16
  • It would be hard if you have not made a backup of your grub config file. You can try to use `grub-repair`. You should ask a new question, you will maybe find better solutions ;) – hg8 Sep 29 '15 at 12:08
  • 1
    @Ruslan Take a look at 7) [here](http://ubuntuforums.org/showthread.php?t=1664134) – hg8 Sep 29 '15 at 12:19
  • Yeah, that seems to answer my question. It seems your answer would be more complete if you included the instructions on restoring defaults in it. – Ruslan Sep 29 '15 at 13:15
  • I will add it ;) – hg8 Sep 29 '15 at 13:15
  • If things get totally borked and you can't boot at all, boot up a LiveUSB and run [`boot-repair`](https://help.ubuntu.com/community/Boot-Repair) (may need to install via `apt-get install boot-repair` first). It will fix your Grub menu and ensure your operating systems are all visible. – Kevin Sep 29 '15 at 13:52
  • which one can I safely delete? – Incerteza Oct 21 '15 at 16:52
  • You can safely delete anything. In your case you can just keep `Ubuntu` and `Windows Boot Manager` (if this one boot fine) for example. – hg8 Oct 21 '15 at 16:54
  • @cl-netbox, ookkkkkeyyy, okkkkeyyyyyy my friend. – Incerteza Nov 04 '15 at 13:22
  • I'm fine, how about you? Where did you go today? – Incerteza Nov 04 '15 at 13:45
  • @hg8, what a nice day! – Incerteza Nov 04 '15 at 14:35