[Bug 922340] Re: update-initramfs (latest update) always fails during kernel install

dino99 922340 at bugs.launchpad.net
Sun Aug 2 07:48:33 UTC 2015


This version has expired

** Changed in: initramfs-tools (Ubuntu)
       Status: New => Invalid

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

Title:
  update-initramfs (latest update) always fails during kernel install

Status in initramfs-tools package in Ubuntu:
  Invalid

Bug description:
  ONEIRIC XUbuntu

  During a large batch of upgrades, I found a persistent failure to do
  the kernel update.  The error message stated that the post-install
  script returned an error 127 from update-initramfs, at or near line
  1010.

  Investigating the script, I find the only command in the vicinity is a "rm -f ${initramfs}.new" . 
  But the problem appears to be that the return code ( $? ) is tested BEFORE calling the command.  

  The "diff -U6" output below shows both the way it was, and the way
  (IMNSHO) it should be.  If the $? was intended to capture the result
  of some previous command, I would strongly suggest capturing it
  immediately after that command.

  <code language="patch">
  @@ -170,15 +170,16 @@
   		OPTS="-v ${OPTS}"
   	fi
   	if mkinitramfs ${OPTS} "${initramfs}.new" "${version}"; then
   		mv -f "${initramfs}.new" "${initramfs}"
   		set_sha1
   	else
  -		mkinitramfs_return="$?"
  +#### <superbiskit> 2012-01-24: capture return AFTER remove
   		remove_initramfs_bak
  -		rm -f "${initramfs}.new"
  +		mkinitramfs_return="$?"
  +		rm -fv "${initramfs}.new"
   		if [ "$mkinitramfs_return" = "2" ]; then
   			# minversion wasn't met, exit 0
   			exit 0
   		fi
   		echo "update-initramfs: failed for ${initramfs} with $mkinitramfs_return." >&2
   		exit $mkinitramfs_return

  //
  </code>

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/922340/+subscriptions



More information about the foundations-bugs mailing list