[Bug 1001131] Re: debootstrap fails to install customized Ubuntu

Launchpad Bug Tracker 1001131 at bugs.launchpad.net
Sun May 20 22:54:31 UTC 2012


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: debootstrap (Ubuntu)
       Status: New => Confirmed

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

Title:
  debootstrap fails to install customized Ubuntu

Status in “debootstrap” package in Ubuntu:
  Confirmed

Bug description:
  When following the Install CD customization procedure (https://help.ubuntu.com/community/InstallCDCustomization) I fail to get an installable image.
  Even with no changes in the CD tree, the created image fails to install. The same procedure worked before precise, I had success with natty and lucid.
  The installation stops at installing base-files and base-passwd (see attached image).
  If I go back to the installation menu and select Install the base system, then it succeds. Unfortunatelly, debootstrap.log gets deleted by this time, so I created a special debootstrap package with lots of debug messages. It turned out that both packages (base-files and base-passwd) got installed, but still, somehow the dpkg installing them failed.
  It turned out, that base-passwd has a postinstall script that - during system installation - populates /etc/passwd and /etc/group copying the files from /usr/share/base-passwd

  if [ ! -e /etc/passwd ] ; then
          cp /usr/share/base-passwd/passwd.master /etc/passwd
  fi

  if [ ! -e /etc/group ] ; then
          cp /usr/share/base-passwd/group.master /etc/group
  fi

  On the other hand, base-files also has a postinstall script changes the owner of /var/lib/dpkg
  if [ ! -d /var/lib/dpkg ]; then
    mkdir -m 755 -p /var/lib/dpkg
    chown root:root /var/lib/dpkg
  fi

  In my log this shows as:
  + echo
  + chown: invalid user: `root:root'
  dpkg: error processing base-files (--install):
   subprocess installed post-installation script returned error exit status 1
  dpkg: base-passwd: dependency problems, but configuring anyway as you requested:
   base-passwd depends on libc6 (>= 2.8); however:
    Package libc6 is not installed.
  Setting up base-passwd (3.5.24) ...
  install base-files

  which indicates that the /target/etc/passwd is not yet populated and
  chown cannot resolv root:root.

  For some unknown reason, the postinstall script of base-files runs BEFORE the postinstall script of base-passwd in my installation, altough it does no such thing in the standard precise installation.
  The code fragment that does this installation is:
    x_core_install base-files base-passwd
  (in a debootstrap script called precise - a link to a long unchanged script called gutsy)

  Modifying this script to have the two packages installed separatelly did the trick:
    x_core_install base-passwd
    x_core_install base-files

  Now, I can install my customized distro.

  I would like your opinion on what could have gone wrong about it:
  Why the standard Ubuntu precise installs flawlessly while my reconstructed distro doesn't? How is it, that the same procedure used to create a custom distro suddenly went wrong with no apparent change in the components?
  Ok, there might have been changes, but this area is very poorly documented so I had to trial and error to find out how things work (and I still might be wrong).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/1001131/+subscriptions




More information about the foundations-bugs mailing list