4

For each Kernel I use with my 15.04 install I have three options in GRUB:

  • normal (systemd)
  • upstart
  • recovery

How can I remove the upstart option for all my Kernels?

2 Answers 2

7

There are several ways you may wish to approach this one, I have tried to be complete as possible and hope that one of these solves your problem.

Is it needed?

On systems up to at least 16.04, yes, you need Upstart if you want to log in.

But if you are completely sure that you don't need upstart at all, just uninstall it:

sudo apt-get purge upstart

that will cause it to be removed from automatically from the menu too

In the case that you NEED upstart (probably something that depends on it) and want it still around but not to start up your system, you can get rid of the entry manualling by editing your grub configuration files. There are two ways of going about it (first one being the more dangerous of the two).

Temporary Removal

You can edit the /boot/grub/grub.cfg for TEMPORARY removal (regenerating with grub-mkconfig will UNDO this change). Remove the menu_entry block that bears the names Ubuntu ....... (upstart) { .. many lines .. }.1

Preferred Removal

The annoying upstart entry is generated because of a single variable inside the /etc/grub.d/10_linux template file, which is what you should edit. The variable in question is called SUPPORTED_INITS and is set very close to the beginning of the file. If you want to get rid of support for starting upstart, you must remove it from here.

Change this:

SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart"

To This:

SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd"

Then you need to rebuild your boot configuration file from the template you just edited1:

sudo grub-mkconfig -o /boot/grub/grub.cfg

Backup Your Changes

When making these changes, make a backup of the file you are changing, and put it in a safe place like a ~/Documents directory or something to ensure that a package manager operation doesn't accidentally delete it. If that is too much work, just make a copy of the line you are changing, and comment it out (of course in the case of grub.cfg, grub-mkconfig would overwrite those changes the next time it was run.


1You should always check your script after changing it to verify it will run. You can use grub-script-check /boot/grub/grub.cfg to ensure there are no syntax errors in your script after editing or generating a new one, and definitely before rebooting.

1
  • 1
    You can just run update-grub to rebuild the config file after changing SUPPORTED_INITS
    – Ron
    Jul 22, 2015 at 16:35
2

What about Grub Customizer? I'm using it to cutomize Grub and never had any issue with it. Well, actually I had one once, and asked the author about it, and got a fixing answer very fast.

1
  • Welcome to Ask Ubuntu! Could you expand this a bit, please? How would the OP go about using Grub customizer?
    – anonymous2
    Nov 12, 2016 at 20:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .