Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 80117 Details for
Bug 123305
LUKS support for genkernel
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patched patch for LUKS support in genkernel.
genkernel.diff (text/plain), 3.33 KB, created by
Clemens Fruhwirth
on 2006-02-18 11:17:58 UTC
(
hide
)
Description:
patched patch for LUKS support in genkernel.
Filename:
MIME Type:
Creator:
Clemens Fruhwirth
Created:
2006-02-18 11:17:58 UTC
Size:
3.33 KB
patch
obsolete
>--- /i686/usr/share/genkernel/gen_initramfs.sh 2006-02-18 09:01:51.000000000 +0100 >+++ /x86_64/usr/share/genkernel/gen_initramfs.sh 2006-02-18 19:55:18.040974750 +0100 >@@ -317,6 +317,12 @@ > done > } > >+# check for static linked file with objdump >+is_static() { >+ objdump -T $1 2>&1 | grep "not a dynamic object" > /dev/null >+ return $? >+} >+ > create_initramfs_modules() { > local group > local group_modules >@@ -368,6 +374,7 @@ > fi > mkdir -p "${TEMP}/initramfs-aux-temp/etc" > mkdir -p "${TEMP}/initramfs-aux-temp/sbin" >+ mkdir -p "${TEMP}/initramfs-aux-temp/bin" > if [ -f "${CMD_LINUXRC}" ] > then > cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init" >@@ -430,6 +437,14 @@ > chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.scripts" > chmod +x "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" > chmod +x "${TEMP}/initramfs-aux-temp/sbin/modprobe" >+ >+ if [ "${LUKS}" = '1' ] >+ then >+ is_static /bin/cryptsetup || gen_die "LUKS support requires static cryptsetup-luks. USE=-dynamic emerge cryptsetup-luks" >+ rm -f ${TEMP}/initramfs-aux-temp/bin/cryptsetup >+ cp /bin/cryptsetup ${TEMP}/initramfs-aux-temp/bin/cryptsetup >+ fi >+ > cd "${TEMP}/initramfs-aux-temp/" > find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-aux.cpio.gz > rm -r "${TEMP}/initramfs-aux-temp/" >--- /i686/usr/share/genkernel/gen_initrd.sh 2006-02-18 09:01:51.000000000 +0100 >+++ /x86_64/usr/share/genkernel/gen_initrd.sh 2006-02-18 20:01:05.898714500 +0100 >@@ -1,5 +1,11 @@ > #!/bin/bash > >+# check for static linked file with objdump >+is_static() { >+ objdump -T $1 2>&1 | grep "not a dynamic object" > /dev/null >+ return $? >+} >+ > # create_initrd_loop(size) > create_initrd_loop() { > local inodes >@@ -212,6 +218,14 @@ > ln ${TEMP}/initrd-temp/bin/busybox ${TEMP}/initrd-temp/bin/$i || > gen_die "Busybox error: could not link ${i}!" > done >+ >+ # LUKS >+ if [ "${LUKS}" = '1' ] >+ then >+ is_static /bin/cryptsetup || gen_die "LUKS support requires static cryptsetup-luks. USE=-dynamic emerge cryptsetup-luks" >+ rm -f ${TEMP}/initramfs-aux-temp/bin/cryptsetup >+ cp /bin/cryptsetup ${TEMP}/initramfs-aux-temp/bin/cryptsetup >+ fi > } > > print_list() >--- /i686/usr/share/genkernel/generic/linuxrc 2006-02-18 09:01:51.000000000 +0100 >+++ /x86_64/usr/share/genkernel/generic/linuxrc 2006-02-18 20:04:10.002220250 +0100 >@@ -385,6 +385,25 @@ > elif [ -b "${REAL_ROOT}" ] || [ "${REAL_ROOT}" = "/dev/nfs" ] > then > got_good_root=1 >+ elif [ `echo ${REAL_ROOT} | sed -e "s/\([^:]*\):.*/\1/"` = "luks" ] >+ then >+ LUKSdev=`echo ${REAL_ROOT} | sed -e "s/luks:\(.*\)/\1/"` >+ if [ -e /bin/cryptsetup ] >+ then >+ if cryptsetup isLuks ${LUKSdev} >+ then >+ echo "LUKS partition - opening $LUKSdev" >+ cryptsetup luksOpen ${LUKSdev} root && >+ REAL_ROOT=/dev/mapper/root && >+ got_good_root=1 >+ else >+ echo "${LUKSDEV} is not a LUKS partition" >+ REAL_ROOT="" >+ fi >+ else >+ echo "This initrd does not support LUKS" >+ REAL_ROOT="" >+ fi > else > bad_msg "Block device ${REAL_ROOT} is not a valid root device..." > REAL_ROOT="" >--- /tmp/genkernel.conf 2006-02-18 20:06:28.094850500 +0100 >+++ /x86_64/etc/genkernel.conf 2006-02-17 08:33:48.000000000 +0100 >@@ -33,6 +33,9 @@ > # Add new kernel to grub? > # BOOTLOADER="grub" > >+# Add LUKS support? >+LUKS="1" >+ > # Add UDEV support? > UDEV="1" >
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 123305
: 80117