Debian Bug report logs - #390401
debian-installer: mdadm postinst script fails during install

version graph

Package: mdadm; Maintainer for mdadm is Debian mdadm maintainers <pkg-mdadm-devel@lists.alioth.debian.org>; Source for mdadm is src:mdadm.

Reported by: Pedro Rodrigues <reis@fc.ul.pt>

Date: Sun, 1 Oct 2006 01:03:01 UTC

Severity: important

Found in version 2.5.2-7

Fixed in version 2.5.3.git200608202239-8

Done: martin f krafft <madduck@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reis@fc.ul.pt, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#390401; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Pedro Rodrigues <reis@fc.ul.pt>:
New Bug report received and forwarded. Copy sent to reis@fc.ul.pt, Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Pedro Rodrigues <reis@fc.ul.pt>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: debian-installer: mdadm postinst script fails during install
Date: Sun, 01 Oct 2006 01:35:07 +0100
Package: debian-installer
Version: beta3
Severity: important

During instalation of the base system in a machine with RAID arrays 
configured the mdadm.postinst script as failed.
The problem is that the script /usr/share/debconf/confmodule is 
returning a nonzero value making the script madm.postinst to stop with 
an error status and the installer aborts the instalation.
I have no success in figuring out what is the problem but puting exit 0 
at the end of the confmodule script allowed the instalation to proceed.
This is not a solution, of course, because it breaks postinst scripts. 
After the minimal instalation is finished I had to comment/remove the 
line and do a dpkg-reconfigure -a to have the packages properly 
configured. At this time, the script mdadm.postinst worked perfectly so 
it seems to be a problem caused by the installer.
Since this is a production machine, I am not able to do more tests here 
but I can try to assemble a testing box if needed.

Thanks

Pedro

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-686
Locale: LANG=pt_PT.UTF-8, LC_CTYPE=pt_PT.UTF-8 (charmap=UTF-8)



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#390401; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Jim Paris <jim@jtan.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 390401@bugs.debian.org (full text, mbox):

From: Jim Paris <jim@jtan.com>
To: 390401@bugs.debian.org
Subject: Same problem, maybe fixed
Date: Fri, 6 Oct 2006 05:24:56 -0400
I ran into this problem on three installations now.  The fix I used
was to switch to a virtual console during installation and run

  chroot /target
  mount -t proc proc /proc
  DEBIAN_HAS_FRONTEND=1 /var/lib/dpkg/info/mdadm.postinst configure
    (press ENTER at each prompt)
  umount /proc
  exit

then go back to the installer and retry the grub setup (which was the
first step that actually stopped due to the mdadm being unconfigured).

Searching just now, I suspect this was already fixed recently:

 mdadm  (2.5.3.git200608202239-7) unstable; urgency=medium

   * Fixed a serious bug in the debconf script which would cause the
     configuration to exit prematurely in cases when the root could not be
     determined. Since this is RC, the urgency is set to medium.
   * Updated the documentation a bit.
   * Updated debconf translations:
     - Swedish by Daniel Nylander (closes: #389040).
     - Czech by Miroslav Kure (closes: #389083).
     - Russian by Yuri Kozlov (closes: #389086).
     - Brazilian Portuguese by Felipe Augusto.

 -- martin f. krafft <madduck@debian.org>  Fri, 29 Sep 2006 16:31:44 +0200

(As of when I did the installations, 2.5.3.git200608202239-6 was still
the version in etch).

-jim



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#390401; Package debian-installer. Full text and rfc822 format available.

Message #13 received at 390401@bugs.debian.org (full text, mbox):

From: martin f krafft <madduck@debian.org>
To: Jim Paris <jim@jtan.com>, 390401@bugs.debian.org
Subject: Re: Bug#390401: Same problem, maybe fixed
Date: Fri, 6 Oct 2006 15:00:38 +0200
[Message part 1 (text/plain, inline)]
also sprach Jim Paris <jim@jtan.com> [2006.10.06.1124 +0200]:
> I ran into this problem on three installations now.  The fix I used
> was to switch to a virtual console during installation and run
> 
>   chroot /target
>   mount -t proc proc /proc
>   DEBIAN_HAS_FRONTEND=1 /var/lib/dpkg/info/mdadm.postinst configure
>     (press ENTER at each prompt)
>   umount /proc
>   exit
> 
> then go back to the installer and retry the grub setup (which was the
> first step that actually stopped due to the mdadm being unconfigured).
> 
> Searching just now, I suspect this was already fixed recently:

Actually, I am not sure whether it has been fixed, since your fix
is simply to mount /proc, while my solution has nothing to do with
/proc, at least not directly.

Would it be possible for you to reproduce this problem and make the
output of

DEBIAN_HAS_FRONTEND=1 sh -x /var/lib/dpkg/info/mdadm.postinst configure

available to me?

-- 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#390401; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Jim Paris <jim@jtan.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #18 received at 390401@bugs.debian.org (full text, mbox):

From: Jim Paris <jim@jtan.com>
To: martin f krafft <madduck@debian.org>
Cc: 390401@bugs.debian.org
Subject: Re: Bug#390401: Same problem, maybe fixed
Date: Fri, 6 Oct 2006 14:22:02 -0400
martin f krafft wrote:
> Actually, I am not sure whether it has been fixed, since your fix
> is simply to mount /proc, while my solution has nothing to do with
> /proc, at least not directly.
> 
> Would it be possible for you to reproduce this problem and make the
> output of
> 
> DEBIAN_HAS_FRONTEND=1 sh -x /var/lib/dpkg/info/mdadm.postinst configure
> 
> available to me?

Hi Martin,

Mounting /proc is just a habit -- the actual fix was using
DEBIAN_HAS_FRONTEND=1.

I did a new install (on i386 this time, previously I've been on
amd64), with the disk split into a root and RAID1 partition to ensure
mdadm would be installed.  It failed during base install, at which
point I ran:
  
  mkdir /target/install-log
  mount > /target/install-log/mount
  cat /proc/partitions > /target/install-log/partitions
  cp -r /var/log /target/install-log/varlog
  chroot /target
  sh -x /var/lib/dpkg/info/mdadm.postinst configure >/install-log/config.txt 2>&1
  exit
  umount /target/raid
  umount /target

then put the disk in another machine and tarred it up.  I didn't run
mdadm.postinst with DEBIAN_HAS_FRONTEND=1 because I wanted to leave
things in the broken state, but I can do it again if that'll help.
The file is here (86M):

  http://jim.sh/~jim/tmp/target.tar.gz

Let me know if there's anything else I should try.

-jim





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#390401; Package debian-installer. Full text and rfc822 format available.

Message #21 received at 390401@bugs.debian.org (full text, mbox):

From: martin f krafft <madduck@debian.org>
To: Jim Paris <jim@jtan.com>
Cc: 390401@bugs.debian.org
Subject: Re: Bug#390401: Same problem, maybe fixed
Date: Fri, 6 Oct 2006 21:11:12 +0200
[Message part 1 (text/plain, inline)]
also sprach Jim Paris <jim@jtan.com> [2006.10.06.2022 +0200]:
> I did a new install (on i386 this time, previously I've been on
> amd64), with the disk split into a root and RAID1 partition to ensure
> mdadm would be installed.  It failed during base install, at which
> point I ran:

Your help is really appreciated and excellent in detail!

> then put the disk in another machine and tarred it up.  I didn't run
> mdadm.postinst with DEBIAN_HAS_FRONTEND=1 because I wanted to leave
> things in the broken state, but I can do it again if that'll help.
> The file is here (86M):
> 
>   http://jim.sh/~jim/tmp/target.tar.gz
> 
> Let me know if there's anything else I should try.

I don't know how DEBIAN_HAS_FRONTEND=1 would help things.

Anyway, could you see if using

  http://debian.madduck.net/repo/dists/unstable/main/binary-amd64/admin/mdadm_2.5.3.git200608202239-8~unreleased.1_amd64.deb

fixes the problem for you? Either by installing it into the chroot
by hand before APT does, or by adding

  deb http://debian.madduck.net/repo sid main

as APT repository during the install? If this does not fix it, then
we can debug the existing issue further. I am almost sure it will
though.

Thanks a lot, again, for your help!

-- 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#390401; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Jim Paris <jim@jtan.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #26 received at 390401@bugs.debian.org (full text, mbox):

From: Jim Paris <jim@jtan.com>
To: martin f krafft <madduck@debian.org>
Cc: 390401@bugs.debian.org
Subject: Re: Bug#390401: Same problem, maybe fixed
Date: Fri, 6 Oct 2006 17:49:40 -0400
martin f krafft wrote:
> >   http://jim.sh/~jim/tmp/target.tar.gz
> I don't know how DEBIAN_HAS_FRONTEND=1 would help things.

Neither do I, but it does :)  Here's how to demonstrate it using
target.tar.gz on another system:

  su
  cd /tmp
  tar xzf target.tar.gz
  chroot target

then you can see the problem by running

  apt-get -f install    # dpkg error

Try configuring normally:

  /var/lib/dpkg/info/mdadm.postinst configure
  apt-get -f install    # dpkg error

Try configuring with DEBIAN_HAS_FRONTEND:
  
  DEBIAN_HAS_FRONTEND=1 /var/lib/dpkg/info/mdadm.postinst configure
  # (hit enter for each of the configuration prompts)
  apt-get -f install    # works

> Anyway, could you see if using

I'll test that .deb out a bit later tonight or tomorrow, thanks.

-jim



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#390401; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #31 received at 390401@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: martin f krafft <madduck@debian.org>, 390401@bugs.debian.org
Cc: Jim Paris <jim@jtan.com>
Subject: Re: Bug#390401: Same problem, maybe fixed
Date: Sat, 7 Oct 2006 14:01:14 -0400
[Message part 1 (text/plain, inline)]
martin f krafft wrote:
> Would it be possible for you to reproduce this problem and make the
> output of
> 
> DEBIAN_HAS_FRONTEND=1 sh -x /var/lib/dpkg/info/mdadm.postinst configure

This won't work, you need to edit the postinst and add set -x to the
top to get a useful -x log.

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Bug reassigned from package `debian-installer' to `mdadm'. Request was from Joey Hess <joeyh@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian mdadm maintainers <pkg-mdadm-devel@lists.alioth.debian.org>:
Bug#390401; Package mdadm. Full text and rfc822 format available.

Message #36 received at 390401@bugs.debian.org (full text, mbox):

From: martin f krafft <madduck@debian.org>
To: Joey Hess <joeyh@debian.org>
Cc: 390401@bugs.debian.org, Jim Paris <jim@jtan.com>
Subject: Re: Bug#390401: Same problem, maybe fixed
Date: Sun, 8 Oct 2006 00:42:55 +0200
[Message part 1 (text/plain, inline)]
also sprach Joey Hess <joeyh@debian.org> [2006.10.07.2001 +0200]:
> martin f krafft wrote:
> > Would it be possible for you to reproduce this problem and make
> > the output of
> > 
> > DEBIAN_HAS_FRONTEND=1 sh -x /var/lib/dpkg/info/mdadm.postinst
> > configure
> 
> This won't work, you need to edit the postinst and add set -x to
> the top to get a useful -x log.

I have since found out... Jim, please follow Joey's advice, unless
the package I provided fixes your issue.

-- 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian mdadm maintainers <pkg-mdadm-devel@lists.alioth.debian.org>:
Bug#390401; Package mdadm. Full text and rfc822 format available.

Acknowledgement sent to Jim Paris <jim@jtan.com>:
Extra info received and forwarded to list. Copy sent to Debian mdadm maintainers <pkg-mdadm-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #41 received at 390401@bugs.debian.org (full text, mbox):

From: Jim Paris <jim@jtan.com>
To: martin f krafft <madduck@debian.org>, Joey Hess <joeyh@debian.org>
Cc: 390401@bugs.debian.org
Subject: Re: Bug#390401: Same problem, maybe fixed
Date: Sun, 8 Oct 2006 17:14:51 -0400
Hi Martin,

> Anyway, could you see if using
>
>   http://debian.madduck.net/repo/dists/unstable/main/binary-amd64/admin/mdadm_2.5.3.git200608202239-8~unreleased.1_amd64.deb
>
> fixes the problem for you? Either by installing it into the chroot
> by hand before APT does, or by adding

>   deb http://debian.madduck.net/repo sid main
> 
> as APT repository during the install?

Actually, I'm not sure how to do that.  I tried, but the chroot is set
up and mdadm is installed during the "Installing the base system"
step.  Even with the expert install there's no opportunity to change
things after apt/dpkg but before mdadm.  And I don't see a way to
select more than one repository before the base install.  I suppose I
could put together my own repository mirror with this updated package.

However, I think it's not necessary -- I did the install again on both
amd64 and i386 now that mdadm 2.5.3.git200608202239-7 is in testing,
and everything is working fine on both systems.  It installs without a
problem, and everything works properly on the new system.

-jim





Reply sent to martin f krafft <madduck@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Pedro Rodrigues <reis@fc.ul.pt>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #46 received at 390401-done@bugs.debian.org (full text, mbox):

From: martin f krafft <madduck@debian.org>
To: 390401-done@bugs.debian.org
Subject: fixed with -8
Date: Mon, 9 Oct 2006 10:50:26 +0200
[Message part 1 (text/plain, inline)]
Version: 2.5.3.git200608202239-8

I believe the problem should be fixed with the -8 upload.

-- 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
[signature.asc (application/pgp-signature, inline)]

Bug marked as found in version 2.5.2-7. Request was from martin f.krafft <madduck@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 24 Jun 2007 08:34:51 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 08:25:49 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.