mkinitramfs does not use cpio -L (--dereference)

Bug #1072009 reported by Bela Lubkin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

This may be related to LP#327106, which was recommending to remove --dereference (but the resolution in that bug doesn't show it being implemented at that time). Problem is present in Ubuntu 11.10 and 12.04, all I have immediately handy at the moment to check; and appears to be the same in current 13.04 developmental source.

Consequence: initrd on my 11.10 and 12.04 systems have dangling symlinks:

$ xzcat /boot/initrd.img-3.2.0-32-generic | cpio -itv | grep '. -> /'
lrwxrwxrwx 1 root root 41 Mar 13 2012 etc/modprobe.d/blacklist-oss.conf -> /lib/linux-sound-base/noOSS.modprobe.conf
lrwxrwxrwx 1 root root 42 Jul 11 2011 etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf
lrwxrwxrwx 1 root root 40 Mar 13 2012 etc/ld.so.conf.d/i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf
lrwxrwxrwx 1 root root 12 Oct 19 02:50 sbin/mount.ntfs-3g -> /bin/ntfs-3g
lrwxrwxrwx 1 root root 12 Oct 19 02:50 sbin/mount.ntfs -> /bin/ntfs-3g

The `mount.ntfs` links are fine as /bin/ntfs-3g itself exists in the archive. The other three point to files which do not exist.

I'm not sure if any of them have a *practical* impact. But other symlinks could exist, depending on system configuration, user meddling etc.

LP#327106 included patch code which appears to completely fix this issue. It didn't just get rid of "--dereference", it replaced it with shell code to reach out and copy the contents of files which would otherwise have become dangling symlinks. Suggest revisiting that part of the patch (see https://launchpadlibrarian.net/22398738/mkinitramfs.diff)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.