Use essential "init" package to ensure that an init system is present

Bug #1357713 reported by Removed by request
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Invalid
Undecided
Unassigned
init-system-helpers (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I'm using Ubuntu 14.10 dev with ifupdown 0.7.48.1ubuntu4 and upstart 1.13.1-0ubuntu3 and currently it is possible to remove ifupdown and upstart as they are not essential packages or any essential/manual package does depend on them. Here is the output:

root@ubuntu:/# apt-get remove ifupdown
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  ifupdown upstart
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 895 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

As I know Ubuntu wants to change from upstart to systemd in the future so removing upstart may be fine but I'm wondering why ifupdown can be removed (wouldn't this remove the ability to create a network connection?).

Revision history for this message
Harry (harry33) wrote :

First of all, I do not think that being unbound is a bug in these unbound packages (upstart and ifupdown).
The possible bug is in the package, which should depend on them.

However, one should not remove upstart from the setup, unless certain installations and settings is made.
First of all, for the removal of upstart, one must install package systemd-sysv.
This is to change the setup from using upstart to use sysv instead.
Systemd-sysv will force the removal of upstart and upstart-bin.
Also these packages must be removed: cgmanager, libcgmanager0, systemd-shim, libjson0.
In addition one should add "init=/lib/systemd/systemd" to the kernel line.

However, this is all experimental now, I assume, and that is why Canonical hasn't officially proceeded to do this.

Revision history for this message
Martin Pitt (pitti) wrote :

ubuntu-minimal depends on upstart and ifupdown, so supposedly you removed that. This is really not a supported configuration.

As for upstart: Debian has a new essential package "init" which depends on systemd-sysv | upstart | sysvinit. We could decide to adopt that. Moving to init-system-helpers for that.

As for ifupdown: ;Most desktops, phones, etc. use dynamic network configuration with NetworkManager, there is no essential need for ifupdown.

But still, of course you can shoot yourself into the foot by randomly removing packages. So just don't do that then :-)

affects: upstart (Ubuntu) → init-system-helpers (Ubuntu)
Changed in init-system-helpers (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in ifupdown (Ubuntu):
status: New → Invalid
summary: - ifupdown and upstart can be removed
+ Use essential "init" package to ensure that an init system is present
Revision history for this message
Martin Pitt (pitti) wrote :

> First of all, for the removal of upstart, one must install package systemd-sysv.

Right, that will switch the default init to systemd. If you want to experiment with that, you can do either that or boot with init=/bin/systemd (you don't need both).

This is indeed not officially supported yet as there are still some hundred packages to update which only have upstart jobs, but for a day to day desktop it works quite fine these days.

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 1357713] Re: ifupdown and upstart can be removed

Doesn't ifupdown still bring up lo?

Excerpts from Martin Pitt's message of 2014-09-23 06:17:10 UTC:
> ubuntu-minimal depends on upstart and ifupdown, so supposedly you
> removed that. This is really not a supported configuration.
>
> As for upstart: Debian has a new essential package "init" which depends
> on systemd-sysv | upstart | sysvinit. We could decide to adopt that.
> Moving to init-system-helpers for that.
>
> As for ifupdown: ;Most desktops, phones, etc. use dynamic network
> configuration with NetworkManager, there is no essential need for
> ifupdown.
>
> But still, of course you can shoot yourself into the foot by randomly
> removing packages. So just don't do that then :-)
>
> ** Package changed: upstart (Ubuntu) => init-system-helpers (Ubuntu)
>
> ** Changed in: init-system-helpers (Ubuntu)
> Importance: Undecided => Low
>
> ** Changed in: init-system-helpers (Ubuntu)
> Status: New => Triaged
>
> ** Changed in: ifupdown (Ubuntu)
> Status: New => Invalid
>
> ** Summary changed:
>
> - ifupdown and upstart can be removed
> + Use essential "init" package to ensure that an init system is present
>
> --
> You received this bug notification because you are subscribed to
> ifupdown in Ubuntu.
> https://bugs.launchpad.net/bugs/1357713
>
> Title:
> Use essential "init" package to ensure that an init system is present
>
> Status in “ifupdown” package in Ubuntu:
> Invalid
> Status in “init-system-helpers” package in Ubuntu:
> Triaged
>
> Bug description:
> I'm using Ubuntu 14.10 dev with ifupdown 0.7.48.1ubuntu4 and upstart
> 1.13.1-0ubuntu3 and currently it is possible to remove ifupdown and
> upstart as they are not essential packages or any essential/manual
> package does depend on them. Here is the output:
>
> root@ubuntu:/# apt-get remove ifupdown
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following packages will be REMOVED:
> ifupdown upstart
> 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
> After this operation, 895 kB disk space will be freed.
> Do you want to continue? [Y/n] n
> Abort.
>
>
> As I know Ubuntu wants to change from upstart to systemd in the future so removing upstart may be fine but I'm wondering why ifupdown can be removed (wouldn't this remove the ability to create a network connection?).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1357713/+subscriptions

Revision history for this message
Martin Pitt (pitti) wrote :

Clint Byrum [2014-09-23 7:15 -0000]:
> Doesn't ifupdown still bring up lo?

Systemd (or perhaps something else too), does that as well. You can
install systemd-sysv, purge ifupdown and upstart, and lo will be up.

Revision history for this message
Removed by request (removed3425744) wrote :

> ubuntu-minimal depends on upstart and ifupdown, so supposedly you removed that. This is really not a supported configuration.

If this is not officialy supported I recommend to make ubuntu-minimal essential in this case. At least removing it is currently a valid configuration.

> Debian has a new essential package "init" which depends on systemd-sysv | upstart | sysvinit. We could decide to adopt that.

> Systemd (or perhaps something else too), does that as well. You can
install systemd-sysv, purge ifupdown and upstart, and lo will be up.

This sounds like a possible solution for this problem then.

Revision history for this message
Harry (harry33) wrote :

Martin Pitt wrote:
"Right, that will switch the default init to systemd. If you want to experiment with that, you can do either that or boot with init=/bin/systemd (you don't need both)."

Well I did test that with my high-end setup (Intel Core i7 4790 + Asus Z97 Sabertooth + Samsung 850 Pro SSD) using CPU integrated GPU (Intel HD 4600).

1. If I only install systemd-sysv (thus upstart, upstart-bin and ureadahead are removed) and not do the kernel line addition, the setup will not boot at all. It will stop early complaining having init issues.

2. If I then recover the setup by chrooting (live USB) and re-installing upstart and upstart-bin plus removing systemd-sysv), the setup boots OK.

3. If I then only add the kernel line: init=/lib/systemd/systemd, the setup boots well, using systemd.
Note: systemd-sysv not installed.

4. Lastly I tested booting by reinstalling systemd-sysv and removing all this: upstart, upstart-bin, systemd-shim, cgmanager, libcgmanager0, ifupdown, libjson0. The setup boots well.
Note: the kernel line addition in use.

So, at least for me only installing systemd-sysv will break the setup.

Revision history for this message
Martin Pitt (pitti) wrote :

Sometimes cgmanager starts up under systemd, then things break (I haven't seen it break up to the point of not booting, though). You can try installing systemd-sysv and removing cgmanager to verify this.

Please feel free to report a new bug against systemd for this, as this is different from enforcing which init system is installed. Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :

This is the case now in vivid, "init" is essential and ensures that systemd-sysv or upstart-sysv is installed.

Changed in init-system-helpers (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Removed by request (removed3425744) wrote :

Theoretically https://bugs.launchpad.net/ubuntu/+source/init-system-helpers/+bug/1436691 is a duplicate of this report but the first symptoms haven't revealed this. And as I have figured out later that this happened because init is not essential I haven't remembered this ticket.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.