Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 191051 - Genkernel fails to create a initrd with LVM2 enabled
Summary: Genkernel fails to create a initrd with LVM2 enabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-02 13:09 UTC by Nicolas Lalevee
Modified: 2007-09-11 18:03 UTC (History)
0 users

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 Nicolas Lalevee 2007-09-02 13:09:18 UTC
I am not able to generate an initrd image with lvm2.

root@almeda /usr/src # genkernel --lvm2 --bootsplash all
* Gentoo Linux Genkernel; Version 3.4.8
* Running with options: --lvm2 --bootsplash all

* Linux Kernel 2.6.21-suspend2-r7 for x86...
* config: --no-clean is enabled; leaving the .config alone.
*         >> Compiling 2.6.21-suspend2-r7 bzImage...
*         >> Compiling 2.6.21-suspend2-r7 modules...
* Copying config for successful build to /etc/kernels/kernel-config-x86-2.6.21-suspend2-r7
* initrd: >> Initializing...
* LVM2: Adding support (using local static binaries)...
cp: ne peut créer le fichier régulier `/var/tmp/genkernel/30992.6803.8078.9806/initramfs-lvm2-temp/etc/lvm/': Aucun fichier ou répertoire de ce type
* ERROR: Could not copy over lvm.conf!

* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
*

Apparently, the bug was introduced in genkernel vesion 3.4.7 :
http://forums.gentoo.org/viewtopic-t-552123-highlight-copy+lvm+conf+genkernel.html

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-02 13:12:54 UTC
Please, set your locales to C when reporting bugs; we don't want errors in random languages. Thanks.
Comment 2 Nicolas Lalevee 2007-09-02 14:29:48 UTC
here it is :

root@almeda ~ # LC_ALL="C" genkernel --lvm2 --bootsplash all
* Gentoo Linux Genkernel; Version 3.4.8
* Running with options: --lvm2 --bootsplash all

* Linux Kernel 2.6.21-suspend2-r7 for x86...
* config: --no-clean is enabled; leaving the .config alone.
*         >> Compiling 2.6.21-suspend2-r7 bzImage...
*         >> Compiling 2.6.21-suspend2-r7 modules...
* Copying config for successful build to /etc/kernels/kernel-config-x86-2.6.21-suspend2-r7
* initrd: >> Initializing...
* LVM2: Adding support (using local static binaries)...
cp: cannot create regular file `/var/tmp/genkernel/6268.22801.26225.2201/initramfs-lvm2-temp/etc/lvm/': No such file or directory
* ERROR: Could not copy over lvm.conf!

* -- Grepping log... --

* initrd: >> Initializing...
* LVM2: Adding support (using local static binaries)...
* Gentoo Linux Genkernel; Version 3.4.8
* Running with options: --lvm2 --bootsplash all

* ERROR: Could not copy over lvm.conf!

* -- End log... --

* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
*


Is there any place where I can find the older genkernel so I can build my kernel ?
Comment 3 Nicolas Lalevee 2007-09-08 10:11:32 UTC
I finally found http://anonsvn.gentoo.org/repositories/genkernel/ (where there is no tag ?) and the cvs :
http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-kernel/genkernel/?hideattic=0

I will try theses.
Comment 4 Nicolas Lalevee 2007-09-08 10:17:30 UTC
I did a svn log, and it seems it has already been solved. So this bug might be a duplicate of #179480. I will test the last version of genkernel.
Comment 5 Nicolas Lalevee 2007-09-08 10:33:35 UTC
This finally works with genkernel version 3.4.9_pre2
Comment 6 Nicolas Lalevee 2007-09-08 23:24:47 UTC
in fact it builds correctly but I am not able to make it boot... I should do a report but I begin to waste too much time to compile my kernel.

Can we have a fix on the current stable version more than a fix on the unstable one ?
Comment 7 Nicolas Lalevee 2007-09-09 11:41:06 UTC
sorry for may last mad comment, but it was really a pain this time to compile my kernel. In fact it was not booting because the ramdisk_size wasn't enought big.

Finally I just manually edited the faulty gen_initrd.sh script accordingly to the "svn diff -c 518" :

Index: trunk/gen_initrd.sh
===================================================================
--- trunk/gen_initrd.sh (révision 517)
+++ trunk/gen_initrd.sh (révision 518)
@@ -193,7 +193,7 @@
 #                      ret=$?
 #                      if [ ${ret} != 0 ]
 #                      then
-                               cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/" ||
+                               cp /etc/lvm/lvm.conf "${TEMP}/initrd-temp/etc/lvm/" ||
                                        gen_die 'Could not copy over lvm.conf!'
 #                      else
 #                              gen_die 'Could not copy over lvm.conf!'
@@ -215,7 +215,7 @@
                                || gen_die 'Could not copy files for EVMS2!'
                        if [ -n "`ls /lib/libgcc_s*`" ]
                        then
-                               cp -a /lib/libgcc_s* "${TEMP}/initramfs-evms2-temp/lib" \
+                               cp -a /lib/libgcc_s* "${TEMP}/initrd-temp/lib" \
                                        || gen_die 'Could not copy files for EVMS2!'
                        fi
                        cp -a /lib/libc-* /lib/libc.* "${TEMP}/initrd-temp/lib" \
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2007-09-11 18:03:48 UTC
This is already fixed, then, so marking it as such.