[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#703404: debian-installer: wheezy (PXE boot) failes to install busybox and kernel



Package: debian-installer
Version: 20130211
Followup-For: Bug #703404

Hi,

I don't understand why bug #703146 is not already fixed,
but here is a workaround based on the suggestion of
Pierre Blondeau (http://bugs.debian.org/703404#112):

It consists to modify /bin/apt-install in the initrd to make
it manages errors differently; if installation of a package
fails (this can happen for busybox or any other package
after the debootstrap-base stage), then clean and update
the APT database of the target, and try again.

This works fine, also for automated and preseeded
installations; this has been tested with the netboot initrd
(20130211).

See the diff in attachment.

cheers,
quidame



-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-486
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information
--- a/bin/apt-install	2011-02-11 03:00:13.000000000 +0100
+++ b/bin/apt-install	2013-04-02 10:07:43.038031326 +0200
@@ -76,6 +76,21 @@
 in-target sh -c "debconf-apt-progress --no-progress --logstderr -- \
 	apt-get $apt_opts install $packages" || ERRCODE=$?
 
+################################################################################
+# This is a workaround of the bugs:
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703146
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703404
+# If installation of a package fails, clean and update APT database, and try
+# again.
+if [ "$ERRCODE" != 0 ]; then
+	ERRCODE=0
+	in-target find /var/lib/apt/lists/ -type f -delete
+	in-target apt-get update
+	in-target sh -c "debconf-apt-progress --no-progress --logstderr -- \
+		apt-get $apt_opts install $packages" || ERRCODE=$?
+fi
+################################################################################
+
 if [ "$REMOUNT_CD" ]; then
 	load-install-cd "/target" || true
 fi

Reply to: