[Bug 430224] Re: init: support chroots

memartin 430224 at bugs.launchpad.net
Fri Jul 20 09:10:11 UTC 2012


I've come across this problem while setting up a headless 12.04 server
via debootstrap and chroot. To be able to upgrade or install services
(like mdadm, which requires postfix) I had to use Ericks workaround and
divert initctl.

It worked fine, however, there seems to be something missing in Ericks
proposed command to delete the divert. Maybe this is the cause for his
problems with gdm afterwards.

Here's what worked for me:

Set the divert:

# dpkg-divert --local --rename --add /sbin/initctl
# ln -s /bin/true /sbin/initctl

Remove the divert:

# rm /sbin/initctl
# dpkg-divert --local --rename --remove /sbin/initctl

Note the added '--rename' option that was missing in Ericks post.
Without this, dpkg-divert says it removed the divert, however,
/sbin/initctl.distrib is not renamed back to the original initctl
command. Which in consequence breaks all services.

Took me a while to find out why my headless remote system got stuck at boot ;-)
Hope this is of help to someone, since the underlying problem seems to persist.

Cheerz, Martin.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/430224

Title:
  init: support chroots

Status in Release Notes for Ubuntu:
  Fix Released
Status in Upstart:
  Fix Released
Status in “upstart” package in Ubuntu:
  Fix Released
Status in “upstart” source package in Karmic:
  Won't Fix

Bug description:
  Binary package hint: upstart

  $ sudo chroot /media/karmic dpkg --configure -a
  Setting up cups (1.4.1-1) ...
  update-rc.d: warning: /etc/init.d/cups missing LSB information
  update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
  Rather than invoking init scripts through /etc/init.d, use the service(8)
  utility, e.g. service cups start

  Since the script you are attempting to invoke has been converted to an
  Upstart job, you may also use the start(8) utility, e.g. start cups
  start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
  invoke-rc.d: initscript cups, action "start" failed.
  dpkg: error processing cups (--configure):
   subprocess installed post-installation script returned error exit status 1
  Errors were encountered while processing:
   cups

  
  WORKAROUND: Create an executable /media/karmic/usr/sbin/policy-rc.d with this in it:
  #!/bin/sh
  exit 101

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/430224/+subscriptions




More information about the foundations-bugs mailing list