Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 100724 Details for
Bug 152441
Improved LUKS encrypted root support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch adding support for resuming from encrypted swap
genkernel-3.4.4.patch (text/plain), 2.78 KB, created by
bmgomail
on 2006-10-29 09:31:49 UTC
(
hide
)
Description:
patch adding support for resuming from encrypted swap
Filename:
MIME Type:
Creator:
bmgomail
Created:
2006-10-29 09:31:49 UTC
Size:
2.78 KB
patch
obsolete
>diff -ur genkernel-3.4.4.org/generic/initrd.scripts genkernel-3.4.4/generic/initrd.scripts >--- genkernel-3.4.4.org/generic/initrd.scripts 2006-10-26 00:53:04.000000000 +0200 >+++ genkernel-3.4.4/generic/initrd.scripts 2006-10-29 18:25:47.000000000 +0100 >@@ -549,35 +549,73 @@ > fi > } > >-startLUKS() { >- if [ -n "${LUKS_ROOT}" ] >- then >- if [ -e /sbin/cryptsetup ] >- then >- if cryptsetup isLuks ${LUKS_ROOT} >+# Open a LUKS device >+# $1 LUKS device >+# $2 LUKS name >+openLUKS() { >+ LUKS_DEVICE="$1" >+ LUKS_NAME="$2" >+ if [ -e /sbin/cryptsetup ] >+ then >+ while [ 1 ] >+ do >+ if [ "${LUKS_DEVICE}" = '' ] > then >- good_msg "Opening LUKS device ${LUKS_ROOT}" >- >- cryptsetup luksOpen ${LUKS_ROOT} root >- if [ ! "$?" -eq '0' ] >- then >- bad_msg "Failed open LUKS device ${LUKS_ROOT}" >- fi >- >- if [ -n "${REAL_ROOT}" ] >+ # LUKS device could not be opened. Prompt user for device. >+ bad_msg "The LUKS ${LUKS_NAME} block device is not detected." >+ echo " Please specify a ${LUKS_NAME} LUKS device to open, "q" to skip, or "shell" for a shell..." >+ echo -n "LUKS ${LUKS_NAME}() :: " >+ read LUKS_DEVICE >+ continue >+ elif [ "${LUKS_DEVICE}" = 'shell' ] >+ then >+ run_shell >+ >+ LUKS_DEVICE='' >+ continue >+ elif [ "${LUKS_DEVICE}" = 'q' ] >+ then >+ break >+ else >+ if cryptsetup isLuks ${LUKS_DEVICE} > then >- # Rescan volumes >- startVolumes >+ good_msg "Opening LUKS device ${LUKS_DEVICE}" >+ >+ cryptsetup luksOpen ${LUKS_DEVICE} ${LUKS_NAME} >+ if [ ! "$?" -eq '0' ] >+ then >+ bad_msg "Failed open LUKS device ${LUKS_DEVICE}" >+ else >+ break >+ fi > else >- REAL_ROOT="/dev/mapper/root" >+ bad_msg "The LUKS device ${LUKS_DEVICE} does not contain a LUKS header" > fi >- else >- bad_msg "The LUKS device ${LUKS_ROOT} does not contain a LUKS hearder" > fi >+ LUKS_DEVICE='' >+ done >+ else >+ bad_msg "The initrd does not support LUKS" >+ fi >+} >+ >+startLUKS() { >+ if [ -n "${LUKS_ROOT}" ] >+ then >+ openLUKS "${LUKS_ROOT}" "root" >+ if [ -n "${REAL_ROOT}" ] >+ then >+ # Rescan volumes >+ startVolumes > else >- bad_msg "The initrd does not support LUKS" >+ REAL_ROOT="/dev/mapper/root" > fi > fi >+ if [ -n "${LUKS_SWAP}" ] >+ then >+ openLUKS "${LUKS_SWAP}" "swap" >+ break >+ fi > } > > sdelay() { >diff -ur genkernel-3.4.4.org/generic/linuxrc genkernel-3.4.4/generic/linuxrc >--- genkernel-3.4.4.org/generic/linuxrc 2006-10-26 00:53:04.000000000 +0200 >+++ genkernel-3.4.4/generic/linuxrc 2006-10-29 17:38:02.000000000 +0100 >@@ -175,6 +175,9 @@ > crypt_root\=*) > LUKS_ROOT=`parse_opt "${x}"` > ;; >+ crypt_swap\=*) >+ LUKS_SWAP=`parse_opt "${x}"` >+ ;; > esac > done > >@@ -226,7 +229,7 @@ > # Scan volumes > startVolumes > >-# Iinitialize LUKS root device >+# Initialize LUKS root device > startLUKS > > # Set up unionfs
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 152441
:
100240
|
100335
|
100336
|
100405
|
100407
|
100724
|
100725