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

Bug#511840: initramfs-tools: Initrd fails to find root device after boot into system following install - INCLUDED PATCH solves the problem.



reassign 511840 cryptsetup
stop

On Wed, Jan 14, 2009 at 11:47:45PM +0300, Pyotr Berezhkov wrote:
> Package: initramfs-tools
> Version: 0.92o
> Severity: important
> Tags: patch

well the script you are looking is not shipped by initramfs-tools
itself.
 
> 
> During reboot after an LVM/encrypted root install, the /init script in
> the initrd fails to find the root device.  /init is calculating the root
> major/minor numbers using a hex value supplied by Lilo to the kernel
> command line (the value turned out to be incorrect in my case), when we
> can easily forget about whatever Lilo thinks the root device is and just
> use the value of 'target' in /conf/conf.d/cryptroot, simplifying things
> greatly.

i'd guess that grub is much better tested as it is the default.
any special reason why you'd picked lilo.
the default encrypted root install is afaik very well tested.
 
> I've done just that in the following patch.  Using the param.conf
> facility, I set $ROOT right after cryptsetup sets up the encrypted root.
> The patch has been tested and works for me just fine.  Note that a
> separate patch will be necessary for the case of an _unencrypted_ LVM
> root mount.  I can send one along if you wish.

i'm not the mantainer of that boot script,
but the patch you'd sent in looks fundamentaly wrong.
 
> 	-PGB
> 
> --------------------------------- SNIP ------------------------------------
> diff --git a/scripts/local-top/cryptroot b/scripts/local-top/cryptroot
> index 56d1d63..c0b4d06 100755
> --- a/scripts/local-top/cryptroot
> +++ b/scripts/local-top/cryptroot
> @@ -264,6 +264,10 @@ setup_mapping()
>  		fi
>  
>  		message "cryptsetup: $crypttarget setup successfully"
> +		echo "ROOT=$NEWROOT" >> /conf/param.conf
> +		if [ -e "/dev/root" ]; then
> +			rm -f /dev/root
> +		fi
>  		break
>  	done
> 
> --------------------------------- SNIP ------------------------------------
> 

-- 
maks



Reply to: