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

Bug#541248: initramfs-tools: Hard to debug lvm issues in cryptroot script



reassign cryptsetup
stop

On Wed, Aug 12, 2009 at 07:14:00PM +0100, Robert Burrell Donkin wrote:
> Package: initramfs-tools
> Version: 0.92o
> Severity: normal
> Tags: patch
> 
> 
> The /usr/share/initramfs-tools/scripts/local-top/cryptroot script used
> with encrypted root does not print debugging information when checks fail.
> This makes it hard to debug initramfs failures. 
> 
> The following patch adds messages to the LVM section and enabled me
> to debug issues with legacy lvm on Lenny.
> 
> --- cryptroot	2009-08-12 09:03:58.000000000 +0100
> +++ /usr/share/initramfs-tools/scripts/local-top/cryptroot	2009-08-12 09:07:02.000000000 +0100
> @@ -124,12 +124,19 @@
>  	vg="${1#/dev/mapper/}"
>  
>  	# Sanity checks
> -	if [ ! -x /sbin/lvm ] || [ "$vg" = "$1" ]; then
> +	if [ ! -x /sbin/lvm ]; then
> +                message "lvm is not available"
> +		return 1
> +        fi
> +
> +        if [ "$vg" = "$1" ]; then
> +                message "Volume group name collision"
>  		return 1
>  	fi
>  
>  	# Make sure that the device contains at least one dash
>  	if [ "${vg%%-*}" = "$vg" ]; then
> +                message "Expected at least one dash in volumne group device name: $vg"
>  		return 1
>  	fi
> 

you should use echo or the log msg facility, see similar debug outputs.

anyway cryptroot is not shipt by initramfs-tools thus reassigning.



Reply to: