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

Bug#812404: cp: failed to access '/tmp/user/0/mkinitramfs_2ypg84//bin/touch': Too many levels of symbolic links



Package: initramfs-tools
Version: 0.122
Severity: grave
Justification: renders package unusable



Setting up initramfs-tools-core (0.122) ...
Installing new version of config file /etc/initramfs-tools/initramfs.conf ...
Setting up initramfs-tools (0.122) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122) ...
update-initramfs: Generating /boot/initrd.img-4.3.0-1-amd64
cp: failed to access '/tmp/user/0/mkinitramfs_2ypg84//bin/touch': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/fsprotect failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.3.0-1-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initramfs-tools



# ls -al /tmp/user/0/mkinitramfs_Rfce4o/bin/
total 2172
drwxr-xr-x  2 root root    4096 Jan 23 10:53 .
drwxr-xr-x 11 root root    4096 Jan 23 10:53 ..
-rwxr-xr-x  1 root root 1837392 Jan 22 08:31 busybox
-rwxr-xr-x  1 root root    3963 Jan 10 18:58 cryptroot-unlock
-rwxr-xr-x  1 root root  211136 Nov  9 14:35 grep
-rwxr-xr-x  1 root root     244 May 13  2010 is_aufs
-rwxr-xr-x  1 root root  154696 Dec 20 19:02 kmod
lrwxrwxrwx  1 root root       7 Jan 23 10:53 sh -> busybox
lrwxrwxrwx  1 root root       5 Jan 23 10:53 touch -> touch
                                             ^^^^^^^^^^^^^^
That should probably be:

                                             touch -> busybox

I don't really understand what's creating the `touch' symlink.

Never mind that, I found two `touch' instances in the mkinitramfs script.
Those can also be replaced with redirections.  But, the correct shell
redirection replacement for `touch' is:

	>>filepath

not:

	>filepath

as the latter will also truncate the 'filepath'.

Here is a patch proposal:

--- mkinitramfs.orig	2016-01-18 21:05:05.000000000 +0100
+++ mkinitramfs	2016-01-23 12:18:26.970456642 +0100
@@ -98,7 +98,7 @@
 	usage
 fi

-touch "$outfile"
+>> "$outfile"
 outfile="$(readlink -f "$outfile")"

 # And by "version" we really mean path to kernel modules
@@ -273,7 +273,7 @@
 fi

 # fstab and mtab
-touch "${DESTDIR}/etc/fstab"
+>> "${DESTDIR}/etc/fstab"
 ln -s /proc/mounts "${DESTDIR}/etc/mtab"

 # module-init-tools



Still, that is not the problem cause.  The problem occurs somewhere in
or after `update-initramfs', in a copy operation.

Downgrading to version 0.120 for now.



-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 19M Dec 23 14:43 /boot/initrd.img-4.2.0-1-amd64
-rw-r--r-- 1 root root 20M Jan 23 10:57 /boot/initrd.img-4.3.0-1-amd64
-- /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.3.0-1-amd64 root=UUID=86271730-a611-4f51-a4d0-f0028b70b2ce ro cgroup_enable=memory swapaccount vga=795

...

-- /etc/initramfs-tools/modules

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
DEVICE=
NFSROOT=auto

-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no

-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:
reiserfsprogs

/usr/share/initramfs-tools/hooks:
bootcdinitramfshook
busybox
cryptgnupg
cryptkeyctl
cryptopenct
cryptopensc
cryptpassdev
cryptroot
cryptroot-unlock
dmsetup
fsck
fsprotect
fuse
keymap
klibc
kmod
lvm2
mdadm
ntfs_3g
resume
thermal
udev
v86d
zz-busybox
zz_nvidia-blacklists-nouveau


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.3.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages initramfs-tools depends on:
ii  busybox-static [busybox]  1:1.22.0-17
ii  cpio                      2.11+dfsg-4.1
ii  klibc-utils               2.0.4-7
ii  kmod                      22-1
ii  udev                      228-4+b1

Versions of packages initramfs-tools recommends:
ii  busybox-static [busybox]  1:1.22.0-17

Versions of packages initramfs-tools suggests:
ii  bash-completion  1:2.1-4.2

-- no debconf information


Reply to: