Lines 168-173
Link Here
|
168 |
nfsroot\=*) |
168 |
nfsroot\=*) |
169 |
NFSROOT=`parse_opt "${x}"` |
169 |
NFSROOT=`parse_opt "${x}"` |
170 |
;; |
170 |
;; |
|
|
171 |
luks_root\=*) |
172 |
LUKS_ROOT=`parse_opt "${x}"` |
173 |
;; |
171 |
esac |
174 |
esac |
172 |
done |
175 |
done |
173 |
|
176 |
|
Lines 211-219
Link Here
|
211 |
# Setup md device nodes if they dont exist |
214 |
# Setup md device nodes if they dont exist |
212 |
setup_md_device |
215 |
setup_md_device |
213 |
|
216 |
|
214 |
# Start EVMS |
217 |
# Scan volumes |
215 |
startVolumes |
218 |
startVolumes |
216 |
|
219 |
|
|
|
220 |
# Iinitialize LUKS root device |
221 |
startLUKS |
222 |
|
217 |
# Set up unionfs |
223 |
# Set up unionfs |
218 |
mkdir -p ${NEW_ROOT} |
224 |
mkdir -p ${NEW_ROOT} |
219 |
setup_unionfs |
225 |
setup_unionfs |
Lines 361-386
Link Here
|
361 |
then |
367 |
then |
362 |
got_good_root=1 |
368 |
got_good_root=1 |
363 |
|
369 |
|
364 |
#check if LUKS setup is needed |
|
|
365 |
elif [ `echo ${REAL_ROOT} | sed -e "s/\([^:]*\):.*/\1/"` = "luks" ] |
366 |
then |
367 |
LUKSdev=`echo ${REAL_ROOT} | sed -e "s/luks:\(.*\)/\1/"` |
368 |
if [ -e /sbin/cryptsetup ] |
369 |
then |
370 |
if cryptsetup isLuks ${LUKSdev} |
371 |
then |
372 |
good_msg "LUKS partition - opening $LUKSdev" |
373 |
cryptsetup luksOpen ${LUKSdev} root && |
374 |
REAL_ROOT=/dev/mapper/root && |
375 |
got_good_root=1 |
376 |
else |
377 |
bad_msg "${LUKSDEV} is not a LUKS partition" |
378 |
REAL_ROOT="" |
379 |
fi |
380 |
else |
381 |
bad_msg "This initrd does not support LUKS" |
382 |
REAL_ROOT="" |
383 |
fi |
384 |
else |
370 |
else |
385 |
bad_msg "Block device ${REAL_ROOT} is not a valid root device..." |
371 |
bad_msg "Block device ${REAL_ROOT} is not a valid root device..." |
386 |
REAL_ROOT="" |
372 |
REAL_ROOT="" |