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

Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs



On Thu, Feb 10, 2011 at 02:30:54PM +0100, Benedikt Spranger wrote:
> Am Thu, 10 Feb 2011 11:06:35 +0000
> schrieb maximilian attems <max@stro.at>:
> 
> > diff --git a/mkinitramfs b/mkinitramfs
> 
> Two minor nits:
> 1) $DESTDIR should be set before using it.
> 2) "$DESTDIR"/etc should exist.

not enough coffee this morning right, was meant to be done
*after* depmod run, there both "nits" are ok, added in maks/lib
branch see
http://git.debian.org/?p=kernel/initramfs-tools.git;a=shortlog;h=refs/heads/maks/lib
 
> changed your patch to
> ---8<---
> --- mkinitramfs.orig    2011-01-28 15:09:09.000000000 +0100
> +++ mkinitramfs 2011-02-10 12:32:14.335290358 +0100
> @@ -167,6 +167,12 @@
>  DESTDIR="$(mktemp -d ${TMPDIR:-/tmp}/mkinitramfs_XXXXXX)" || exit 1
>  chmod 755 "${DESTDIR}"
>  
> +# make sure that library links are correct and up to date
> +mkdir -p "$DESTDIR"/etc
> +cp -ar /etc/ld.so.conf* "$DESTDIR"/etc
> +ldconfig -r "$DESTDIR" || [[ $UID != "0" ]] && \
> +         echo "ldconfig might need uid=0 (root) for chroot()" >2
> +
>  # do not execute cache_run_scripts() if mounted with noexec
>  NOEXEC=""
>  fs=$(df -P $DESTDIR | tail -1 | awk '{print $6}')
> ---8<---
> 
> $ lsinitramfs /boot/initrd.img-2.6.32-5-686
> /boot/initrd.img-2.6.32-5-686
> .
> etc
> etc/ld.so.conf
> etc/ld.so.conf.d
> etc/ld.so.conf.d/i486-linux-gnu.conf
> etc/ld.so.conf.d/libc.conf
> etc/ld.so.cache
> etc/modprobe.d
> etc/modprobe.d/aliases.conf
> ...
> 
> Sadly the generated initramfs has the same problem.

which would be what, can we have the error message please?
(if not possible to keep logging netconsole comes handy).

does lvm work (pvscan, vgscan, lvscan, ..)?

thank you

-- 
maks



Reply to: