Author |
Message |
Barlafuss
|
|
Post subject: [SOLVED]dpkg return error --> initramfs-tools
Posted: 13.09.2013, 15:53
|
|

Joined: 2010-09-14
Posts: 65
Status: Offline
|
|
Hello All.
With last update (yesterday) I have following issue at the end of the process:
Code:
E: /usr/share/initramfs-tools/hooks/udev_era failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.10-4.slh.3-aptosid-amd64 with 1.dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any hint what I did wrong?
Here my system :
Code:
$infobash -v
Host/Kernel/OS "Obelix" running Linux 3.10-4.slh.3-aptosid-amd64 x86_64 [ aptosid 2011-02 Ἡμέρα - kde-lite - (201107131633) ]
CPU Info 4x Intel Core i5-2400 @ clocked at [ 2976.000 MHz ]
Videocard NVIDIA GF108 [GeForce GT 440] X.Org 1.12.4 [ 1280x1024@60.0hz ]
Processes 232 | Uptime 4days | Memory 1455.8/7969.4MB | HDD Size 500GB (52%used) | GLX Renderer GeForce GT 440/PCIe/SSE2 | GLX Version 4.3.0 NVIDIA 325.15 | Client Shell | Infobash v3.46
Thanks in advance,
Barlafuss |
Last edited by Barlafuss on 15.09.2013, 09:38; edited 1 time in total
|
|
|
|
 |
slh
|
|
Post subject: RE: dpkg return error --> initramfs-tools
Posted: 13.09.2013, 16:10
|
|

Joined: 2010-08-25
Posts: 954
Status: Offline
|
|
First of all, do not reboot before this problem has been resolved, the kernel can't boot without a functional initramfs image (older kernels may not be affected).
Please check where this hook comes from (dpkg -S /usr/share/initramfs-tools/hooks/udev_era), as it doesn't appear to be in Debian (or aptosid). If possible, purging the package shipping this hook should help. |
|
|
|
|
 |
Barlafuss
|
|
Post subject: RE: dpkg return error --> initramfs-tools
Posted: 14.09.2013, 09:34
|
|

Joined: 2010-09-14
Posts: 65
Status: Offline
|
|
thanks slh for the fast reply and warning on booting.
Here what i can see on the hook:
Code:
$ dpkg -S /usr/share/initramfs-tools/hooks/udev_era
dpkg-query: no path found matching pattern /usr/share/initramfs-tools/hooks/udev_era
$ ls -l /usr/share/initramfs-tools/hooks/
total 88
-rwxr-xr-x 1 root root 378 Jul 29 2011 busybox
-rwxr-xr-x 1 root root 1015 Jun 28 12:14 cryptgnupg
-rwxr-xr-x 1 root root 452 Jun 28 12:14 cryptkeyctl
-rwxr-xr-x 1 root root 1569 Jun 28 12:14 cryptopenct
-rwxr-xr-x 1 root root 1510 Jun 28 12:14 cryptopensc
-rwxr-xr-x 1 root root 913 Jun 28 12:14 cryptpassdev
-rwxr-xr-x 1 root root 13042 Jun 28 12:14 cryptroot
-rwxr-xr-x 1 root root 472 Oct 12 2009 dmsetup
-rwxr-xr-x 1 root root 230 Mar 10 2013 fuse
-rwxr-xr-x 1 root root 1299 Oct 6 2012 keymap
-rwxr-xr-x 1 root root 686 Sep 21 2012 klibc
-rwxr-xr-x 1 root root 355 Apr 7 19:10 kmod
-rwxr-xr-x 1 root root 762 Oct 8 2009 lvm2
-rwxr-xr-x 1 root root 7313 Jan 24 2013 mdadm
-rwxr-xr-x 1 root root 426 Mar 10 2013 ntfs_3g
-rwxr-xr-x 1 root root 1275 Dec 6 2010 thermal
-rwxr-xr-x 1 root root 2030 Sep 12 00:25 udev
-rwxr-xr-x 1 root root 1987 Feb 13 2012 udev_era
|
|
|
|
|
 |
slh
|
|
Post subject: RE: dpkg return error --> initramfs-tools
Posted: 14.09.2013, 15:42
|
|

Joined: 2010-08-25
Posts: 954
Status: Offline
|
|
If the license header permits it, please post the contents of udev_era in full, as there is no apparent indication where it comes from. |
|
|
|
|
 |
Barlafuss
|
|
Post subject: RE: dpkg return error --> initramfs-tools
Posted: 14.09.2013, 18:53
|
|

Joined: 2010-09-14
Posts: 65
Status: Offline
|
|
here the content :
Code:
$ cat /usr/share/initramfs-tools/hooks/udev_era
#!/bin/sh -e
PREREQS=""
prereqs() { echo "$PREREQS"; }
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
root_over_the_network() {
if egrep -qs '^/dev/(nbd|nd[a-z]|etherd/e)[^[:space:]]+[[:space:]]+/[[:space:]]' /etc/fstab; then
return 0
elif egrep -qs '^[^[:space:]#]+[[:space:]]+/[[:space:]]+nfs[234]?[[:space:]]' /etc/fstab; then
return 0
fi
return 1 # false
}
. /usr/share/initramfs-tools/hook-functions
# udevd uses unix domain sockets for communication
force_load unix
copy_exec /sbin/udevd /sbin
copy_exec /sbin/udevadm /sbin
mkdir -p $DESTDIR/etc/udev
cp -p /etc/udev/udev.conf $DESTDIR/etc/udev/
mkdir -p $DESTDIR/lib/udev/rules.d/
for rules in 50-udev-default.rules 60-persistent-storage.rules \
80-drivers.rules 91-permissions.rules \
64-md-raid.rules 60-persistent-storage-lvm.rules \
55-dm.rules 60-persistent-storage-dm.rules; do
if [ -e /etc/udev/rules.d/$rules ]; then
cp -p /etc/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
elif [ -e /lib/udev/rules.d/$rules ]; then
cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
fi
done
# try to autodetect the value of this configuration option
if [ -z "$NEED_PERSISTENT_NET" ] && root_over_the_network; then
NEED_PERSISTENT_NET='yes'
fi
# Copy the rules for persistent network interface names for the benefit of
# systems which need to boot over the network. If this is enabled then the
# initramfs must be rebuilt every time a new network interface is added.
# See #414287 for details.
case "$NEED_PERSISTENT_NET" in
YES|yes|Yes|Y|y)
if [ -e /etc/udev/rules.d/70-persistent-net.rules ]; then
cp -p /etc/udev/rules.d/70-persistent-net.rules $DESTDIR/lib/udev/rules.d/
fi
;;
esac
cp /lib/udev/hotplug.functions $DESTDIR/lib/udev/
for program in firmware.agent ata_id edd_id scsi_id; do
copy_exec /lib/udev/$program /lib/udev
done
copy_exec /sbin/blkid /sbin
if [ -x /lib/udev/vio_type ]; then
copy_exec /lib/udev/vio_type /lib/udev
fi
|
|
|
|
|
 |
slh
|
|
Post subject: RE: dpkg return error --> initramfs-tools
Posted: 14.09.2013, 20:27
|
|

Joined: 2010-08-25
Posts: 954
Status: Offline
|
|
I have no idea where this hook comes from, while the contents appear to be legit, all hooks in that directory are required to be formally part of packages (which this one isn't). While it may come from 3rd party or unpackaged software you may have installed, I would suggest to remove /usr/share/initramfs-tools/hooks/udev_era (maybe keep a backup, but move it out of /usr/) and then to run "apt-get -f install" and complete the dist-upgrade afterwards.
Given that this file really shouldn't be there, I'd suggest thoroughly audit your system for rogue software which might have caused further damage. |
|
|
|
|
 |
Barlafuss
|
|
Post subject: RE: dpkg return error --> initramfs-tools
Posted: 15.09.2013, 09:38
|
|

Joined: 2010-09-14
Posts: 65
Status: Offline
|
|
PERFECT, Your trick solved the issue. Thanks a lot slh .
May I receive any suggestion how to audit my system - no experience in that.
Best Regards,
Barlafuss |
|
|
|
|
 |
|