FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 08-26-2008, 11:11 PM
Markus Mandalka
 
Default Bug#496713: initrd: cryptroot fails if the encrypted root is on usb-device

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



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-21-2008, 08:07 PM
Markus Mandalka
 
Default Bug#496713: initrd: cryptroot fails if the encrypted root is on usb-device

If you use rootdelay, the bootskripts will wait every time, even if all
is complete or they will stop waiting, even, if on slow systems it isn't.

Without another solution (this for example copied from mountroot, which
had the same problem which was solved without additional work for the
users like to setup a rootdelay) everybody who wants to run cryptroot
from usb (there might be more people in the future, since you can setup
that automaticly with the debian installer since debian etch, the
devices became cheaper and maybe more people will understand, that its
important to encrypt data, especially on mobile devices which get lost
very easy) would have to search this problems, edit bootparameters (too
complicated for some users) and change them to run a mobile device on
slower systems.

But some weeks ago other people requested the same thing in the package
cryptsetup. I realised too late, that the file cryptroot in initrd is
part of cryptsetup and not a standard script of debians initramdisk and
had not found the other open report. Sorry for the report in this
metapackage!

For people getting to this report/thread because of using a searchengine:

This issue is open on the wishlist of cryptsetup at #488271 and is
discussed there.

I'll post a quick and dirty workarround there. Maybe it will help
someone else, until one of the discussed solutions will be implemented
in the cryptsetup-package or/and in initrd.

So interested people will find more information at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488271 ...



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org