Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250330 - sys-kernel/genkernel-3.4.10.902: can not include /sbin/cryptsetup to initramfs
Summary: sys-kernel/genkernel-3.4.10.902: can not include /sbin/cryptsetup to initramfs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
: 250825 252684 253446 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-09 00:31 UTC by eddy
Modified: 2009-02-22 17:38 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eddy 2008-12-09 00:31:33 UTC
on trying to build a ramdisk with luks support genkernel says that it can not copy /sbin/cryptsetup to the initramfs temp directory.
 
after that you cannot boot from encrypted harddisks

solution is that in /usr/share/genkernel/gen_initramfs.sh is a spelling mistake in the function "append_luks()", the scipt trys th copy the cryptsetup binary to ${TEMP}/initramfs-aux-temp it sold be copyed to ${TEMP}/initramfs-luks-temp/

this patch fix the problem, it makes the nedded dirs and replace the spelling mistake.
apply it to /usr/share/genkernel/gen_initramfs.sh

289,290d288
<       mkdir -p "${TEMP}/initramfs-luks-temp/lib/bin"
<       mkdir -p "${TEMP}/initramfs-luks-temp/lib/sbin"
297,299c295,297
<                       rm -f "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
<                       cp /bin/cryptsetup "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
<                       chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
---
>                       rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
>                       cp /bin/cryptsetup ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
>                       chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup"
303,305c301,303
<                       rm -f "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
<                       cp /sbin/cryptsetup "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
<               chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
---
>                       rm -f ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
>                       cp /sbin/cryptsetup ${TEMP}/initramfs-aux-temp/sbin/cryptsetup
>               chmod +x "${TEMP}/initramfs-aux-temp/sbin/cryptsetup"



Reproducible: Always

Steps to Reproduce:
1.genkernel --luks ramdisk
2.
3.

Actual Results:  
...
*         >> Appending luks cpio data...
* Including LUKS support
cp: reguläre Datei „/var/tmp/genkernel/11374.21685.21961.31900/initramfs-aux-temp/sbin/cryptsetup“ kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
chmod: Zugriff auf „/var/tmp/genkernel/11374.21685.21961.31900/initramfs-aux-temp/sbin/cryptsetup“ nicht möglich: Datei oder Verzeichnis nicht gefunden
*         >> Appending modules cpio data...
...
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-09 04:44:28 UTC
Whoops. Fixed in git.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-13 15:40:32 UTC
*** Bug 250825 has been marked as a duplicate of this bug. ***
Comment 3 Christian Ludwig 2008-12-13 22:04:59 UTC
(In reply to comment #0)
> this patch fix the problem, it makes the nedded dirs and replace the spelling
> mistake.
> apply it to /usr/share/genkernel/gen_initramfs.sh
> 
> 289,290d288
> <       mkdir -p "${TEMP}/initramfs-luks-temp/lib/bin"
> <       mkdir -p "${TEMP}/initramfs-luks-temp/lib/sbin"

Actually we need the directory "${TEMP}/initramfs-luks-temp/sbin" to be created here, since we copy the cryptsetup binary into it a few lines below. Just another typo, I guess.
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-13 22:13:49 UTC
Fixed
Comment 5 dacook 2008-12-15 17:20:27 UTC
How about this version is either removed from portage or masked, since it's pretty obviously broken?  Nothing wastes my time like booting to a new kernel only to find the initrd was built with a documented-broken tool and can't decrypt the root filesystem.  Yes, ~arch should expect problems, but not persistent, documented brokenness.
Comment 6 Florian Streibelt 2008-12-25 16:20:14 UTC
I just wanted to try out Linus' Christmas present - but failed :|

It would be very nice if a new/working version of genkernel would be present in
portage soon, because I think many people will stumble upon this issue the next
days when they have free time to compile a new kernel.

btw: Happy holidays and merry grinding!
Comment 7 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-29 00:33:30 UTC
*** Bug 252684 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Gaffney (RETIRED) gentoo-dev 2009-01-04 21:34:38 UTC
*** Bug 253446 has been marked as a duplicate of this bug. ***
Comment 9 Mike Auty (RETIRED) gentoo-dev 2009-02-22 14:58:04 UTC
This version's now gone from the tree.  If 3.4.10.903 solves this problem, this bug can probably be closed...  5:)
Comment 10 Andrew Gaffney (RETIRED) gentoo-dev 2009-02-22 17:38:13 UTC
I usually wait until there's an *actual* release version that fixes the issue, but since it was an issue with a pre-release that's fixed in another pre-release, good enough for me...