Hi, when using dracut (017-1) instead of initramfs-tools on a wheezy machine /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst creates and complains about a dangling symlink /initrd.img. This is because dracut creates a initrd file called initramfs-3.2.0-2-amd64.img. This is properly detected by update-grub but not by the postinst script of the linux-image package.
Is there a policy that the initrd must be called initrd.img-`uname -r`? Since grub handles different initrd file names (in /etc/grub.d/10_linux), I assume the postinst of the linux-image package should also handle a initrd called initramfs*.img. If dracut would use the same name for the initrd as initramfs-tools, then there are two programs in /etc/kernel/postinst.d which would write to the same file. So, IMO dracut must use another file name for its initrd and the postinst of linux-image should support initrd file names like initramfs...... What's your oppinion? Here's the log of a test on my wheezy machine without initramfs-tools installed, but using dracut 017-1. I've set debug=1 in the postinst script. This is what I did: rm /vmli* /initr* ls -l /vmlinu* /initr* /boot/vmlinu* /boot/initr* /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst configure ls -l /vmlinu* /initr* /boot/vmlinu* /boot/initr* /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst configure ls -l /vmlinu* /initr* /boot/vmlinu* /boot/initr* Script started on Tue 10 Apr 2012 06:12:36 PM CEST wheezy[~]# rm /vmli* /initr* wheezy[~]# ls -l /vmlinu* /initr* /boot/vmlinu* /boot/initr* -rw-r--r-- 1 root root 14130694 Apr 10 18:11 /boot/initramfs-3.2.0-2-amd64.img -rw-r--r-- 1 root root 2804816 Mar 20 20:35 /boot/vmlinuz-3.2.0-2-amd64 wheezy[~]# /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst configure Running depmod. image_magic: kimage=vmlinuz, image_dest=/ image_name=vmlinuz-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 449, <STDIN> line 2. handle_missing_link: kimage=vmlinuz, image_dest=/ image_name=vmlinuz-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 336, <STDIN> line 2. Test relative: testing /boot/ -> / at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 130, <STDIN> line 2. image_magic: kimage=initrd.img, image_dest=/ image_name=initrd.img-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 449, <STDIN> line 2. handle_missing_link: kimage=initrd.img, image_dest=/ image_name=initrd.img-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 336, <STDIN> line 2. Test relative: testing /boot/ -> / at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 130, <STDIN> line 2. Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dracut 3.2.0-2-amd64 /boot/vmlinuz-3.2.0-2-amd64 run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-2-amd64 /boot/vmlinuz-3.2.0-2-amd64 run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-2-amd64 /boot/vmlinuz-3.2.0-2-amd64 Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-2-amd64 Found initrd image: /boot/initramfs-3.2.0-2-amd64.img Found memtest86+ image: /boot/memtest86+.bin Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin done wheezy[~]# ls -l /vmlinu* /initr* /boot/vmlinu* /boot/initr* -rw-r--r-- 1 root root 14130547 Apr 10 18:13 /boot/initramfs-3.2.0-2-amd64.img -rw-r--r-- 1 root root 2804816 Mar 20 20:35 /boot/vmlinuz-3.2.0-2-amd64 lrwxrwxrwx 1 root root 30 Apr 10 18:12 /initrd.img -> /boot/initrd.img-3.2.0-2-amd64 lrwxrwxrwx 1 root root 26 Apr 10 18:12 /vmlinuz -> boot/vmlinuz-3.2.0-2-amd64 wheezy[~]# /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst configure Running depmod. image_magic: kimage=vmlinuz, image_dest=/ image_name=vmlinuz-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 449, <STDIN> line 2. DEBUG: There is a symlink for vmlinuz Move?: kimage=vmlinuz, image_dest=/, image_name=vmlinuz-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 185, <STDIN> line 2. DEBUG: OK. We found symlink, and we should have a symlink here. DEBUG: The link vmlinuz points to (boot/vmlinuz-3.2.0-2-amd64) DEBUG: (boot/vmlinuz-3.2.0-2-amd64) is really (/boot/vmlinuz-3.2.0-2-amd64) vmlinuz(/boot/vmlinuz-3.2.0-2-amd64 ) points to /boot/vmlinuz-3.2.0-2-amd64 (/boot/vmlinuz-3.2.0-2-amd64) -- doing nothing at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 268, <STDIN> line 2. image_magic: kimage=initrd.img, image_dest=/ image_name=initrd.img-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 449, <STDIN> line 2. DEBUG: There is a symlink for initrd.img Move?: kimage=initrd.img, image_dest=/, image_name=initrd.img-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 185, <STDIN> line 2. DEBUG: OK. We found symlink, and we should have a symlink here. The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-2-amd64 really_move_link: kimage=initrd.img, image_dest=/ image_name=initrd.img-3.2.0-2-amd64, src_dir=/boot/ at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 283, <STDIN> line 2. Test relative: testing /boot/ -> / at /var/lib/dpkg/info/linux-image-3.2.0-2-amd64.postinst line 130, <STDIN> line 2. Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dracut 3.2.0-2-amd64 /boot/vmlinuz-3.2.0-2-amd64 run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-2-amd64 /boot/vmlinuz-3.2.0-2-amd64 run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-2-amd64 /boot/vmlinuz-3.2.0-2-amd64 Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-2-amd64 Found initrd image: /boot/initramfs-3.2.0-2-amd64.img Found memtest86+ image: /boot/memtest86+.bin Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin done wheezy[~]# ls -l /vmlinu* /initr* /boot/vmlinu* /boot/initr* -rw-r--r-- 1 root root 14130951 Apr 10 18:13 /boot/initramfs-3.2.0-2-amd64.img -rw-r--r-- 1 root root 2804816 Mar 20 20:35 /boot/vmlinuz-3.2.0-2-amd64 lrwxrwxrwx 1 root root 30 Apr 10 18:13 /initrd.img -> /boot/initrd.img-3.2.0-2-amd64 lrwxrwxrwx 1 root root 30 Apr 10 18:12 /initrd.img.old -> /boot/initrd.img-3.2.0-2-amd64 lrwxrwxrwx 1 root root 26 Apr 10 18:12 /vmlinuz -> boot/vmlinuz-3.2.0-2-amd64 Script done on Tue 10 Apr 2012 06:14:01 PM CEST -- regards Thomas -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20356.27011.448201.954...@kueppers.informatik.uni-koeln.de