tags 503627 +patch thanks See also this discussion about possible solutions:
https://www.debian-administration.org/users/drgraefy/weblog/8 It would probably be best (most convenient for users and admins who are suddenly thrust into the unfamiliar initramfs environment) to just add *all* 42 lvm2 symlinks to the initramfs. If initramfs-tools was trying to build an extremely-minimal initramfs, these could be omitted to save the 836 bytes. But for general-purpose initrds, it'd be great to have the usual interface fully-available. The attached patch *should* do the trick, but when i test it, the symlinks that should be in the initramfs are getting automatically converted to full files, so it bloats the initramfs significantly. Looking at the standard initramfs images, i see that there are no symlinks in them at all. Is that a deliberate choice? If it is, why? --dkg
diff -ruN lvm2-2.02.39.base/debian/initramfs-tools/hooks/lvm2 lvm2-2.02.39/debian/initramfs-tools/hooks/lvm2
--- lvm2-2.02.39.base/debian/initramfs-tools/hooks/lvm2 2008-10-27 10:33:39.000000000 -0400
+++ lvm2-2.02.39/debian/initramfs-tools/hooks/lvm2 2008-10-27 10:40:43.000000000 -0400
@@ -20,7 +20,15 @@
. /usr/share/initramfs-tools/hook-functions
-copy_exec /sbin/vgchange /sbin
+copy_exec /sbin/lvm /sbin
+
+# transfer all the lvm2 symlinks as well:
+for sym in $( dpkg -L lvm2 | grep '^/sbin/'); do
+ if [ -L $sym ] && [ $(readlink $sym) == 'lvm' ]; then
+ sym=$(echo $sym | cut -f3 -d/)
+ ln -s lvm "${DESTDIR}/sbin/${sym}"
+ fi
+done
for x in dm_mod dm_snapshot dm_mirror; do
manual_add_modules ${x}
pgpn5Ksh6LAIV.pgp
Description: PGP signature

