Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 152441 | Differences between
and this patch

Collapse All | Expand All

(-)linuxrc (-21 / +18 lines)
Lines 168-173 Link Here
168
		nfsroot\=*)
168
		nfsroot\=*)
169
			NFSROOT=`parse_opt "${x}"`
169
			NFSROOT=`parse_opt "${x}"`
170
		;;
170
		;;
171
		crypt_root\=*)
172
			CRYPT_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 encrypted root device
221
if [ -n "${CRYPT_ROOT}" ]
222
then
223
	cryptsetup luksOpen ${CRYPT_ROOT} root || exit -1
224
225
	if [ -n "${REAL_ROOT}" ]
226
	then
227
		# Rescan volumes
228
		startVolumes
229
	else
230
		REAL_ROOT="/dev/mapper/root"
231
	fi
232
fi
233
217
# Set up unionfs
234
# Set up unionfs
218
mkdir -p ${NEW_ROOT}
235
mkdir -p ${NEW_ROOT}
219
setup_unionfs
236
setup_unionfs
Lines 361-386 Link Here
361
		then
378
		then
362
			got_good_root=1
379
			got_good_root=1
363
380
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
381
		else
385
			bad_msg "Block device ${REAL_ROOT} is not a valid root device..."
382
			bad_msg "Block device ${REAL_ROOT} is not a valid root device..."
386
			REAL_ROOT=""
383
			REAL_ROOT=""

Return to bug 152441