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

Bug#496713: marked as done (initrd: cryptroot fails if the encrypted root is on usb-device)



Your message dated Wed, 27 Aug 2008 01:45:06 +0200
with message-id <20080826234506.GK2509@baikonur.stro.at>
and subject line Re: Bug#496713: initrd: cryptroot fails if the encrypted root is on usb-device
has caused the Debian Bug report #496713,
regarding initrd: cryptroot fails if the encrypted root is on usb-device
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
496713: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=496713
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: kernel
Version: lenny

The initrd - boot-skript

/scripts/local-top/cryptroot

fails, if the luks-encrypted root-filesystem is on an usb-device like an
usb-key or an external harddisk.

This happens, because the kernel-modules for usb are completely loaded
(so the bootscripts will continue) but the drivers need some additional
time to register such removable devices, which often are not up, when
the cryptroot-script is searching for them.

So you get the error message "cryptsetup: Source device /dev/sdaX not
found" and the mountroot() will not find the devicemapper to mount the
root-filesystem ...

The following code (based on the solution for the same problems with
not encrypted usb-devices in the function mountroot() in /scripts/local)
added to /scripts/local-top/cryptroot in front of the lines
"
        if [ ! -e $cryptsource ]; then
		echo "cryptsetup: Source device $cryptsource not found"
		return 1
	fi
"

solves the problem:


	# If the cryptsource not up yet, give it a little while
	# to deal with removable devices
	if [ ! -e $cryptsource ] ; then
		echo "Waiting for root file system ..."

		# Default delay is 180s
		if [ -z "${ROOTDELAY}" ]; then
			slumber=180
		else
			slumber=${ROOTDELAY}
		fi

		slumber=$(( ${slumber} * 10 ))
		while [ ! -e $cryptsource ]; do
			/bin/sleep 0.1
			slumber=$(( ${slumber} - 1 ))
			[ ${slumber} -gt 0 ] || break
		done

	fi



--- End Message ---
--- Begin Message ---
On Wed, Aug 27, 2008 at 01:11:44AM +0200, Markus Mandalka wrote:
> Package: kernel
> Version: lenny
> 
> The initrd - boot-skript
> 
> /scripts/local-top/cryptroot
> 
> fails, if the luks-encrypted root-filesystem is on an usb-device like an
> usb-key or an external harddisk.
> 
> This happens, because the kernel-modules for usb are completely loaded
> (so the bootscripts will continue) but the drivers need some additional
> time to register such removable devices, which often are not up, when
> the cryptroot-script is searching for them.
> 
> So you get the error message "cryptsetup: Source device /dev/sdaX not
> found" and the mountroot() will not find the devicemapper to mount the
> root-filesystem ...
> 
> The following code (based on the solution for the same problems with
> not encrypted usb-devices in the function mountroot() in /scripts/local)
> added to /scripts/local-top/cryptroot in front of the lines
> "
>         if [ ! -e $cryptsource ]; then
> 		echo "cryptsetup: Source device $cryptsource not found"
> 		return 1
> 	fi
> "
> 
> solves the problem:
> 
> 
> 	# If the cryptsource not up yet, give it a little while
> 	# to deal with removable devices
> 	if [ ! -e $cryptsource ] ; then
> 		echo "Waiting for root file system ..."
> 
> 		# Default delay is 180s
> 		if [ -z "${ROOTDELAY}" ]; then
> 			slumber=180
> 		else
> 			slumber=${ROOTDELAY}
> 		fi
> 
> 		slumber=$(( ${slumber} * 10 ))
> 		while [ ! -e $cryptsource ]; do
> 			/bin/sleep 0.1
> 			slumber=$(( ${slumber} - 1 ))
> 			[ ${slumber} -gt 0 ] || break
> 		done
> 
> 	fi

read the relevant release notes, just use the rootdelay=X
bootparam.

closing

-- 
maks


--- End Message ---

Reply to: