Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 146466 - genkernel changes linux/.config causing compile to fail. overwrites grub.conf with zero length file.
Summary: genkernel changes linux/.config causing compile to fail. overwrites grub.con...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-09-05 15:21 UTC by tla
Modified: 2007-01-04 09:20 UTC (History)
0 users

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


Attachments
genkernel output (genkernel-output.txt,40.39 KB, text/plain)
2006-09-05 15:29 UTC, tla
Details
genkernel /var/log/genkernel.log (genkernel.log,359.86 KB, text/plain)
2006-09-05 15:30 UTC, tla
Details
-r7 .config before genkernel runs (.config-r7.txt,44.55 KB, text/plain)
2006-09-05 15:31 UTC, tla
Details
-r7 .config after genkernel runs (.config-r7-genkernel.txt,48.94 KB, text/plain)
2006-09-05 15:31 UTC, tla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tla 2006-09-05 15:21:59 UTC
User-Agent:       Opera/9.01 (Windows NT 5.1; U; en)
Build Identifier: 

Always used genkernel.  Recently upgraded from gcc 3.x to 4.1.1 (followed 
gentoo guide, complete system recompile etc).
Upgrading from linux-2.6.17-gentoo-r4 to linux-2.6.17-gentoo-r7 caused the r7 
compile to fail.  Also /boot/grub/grub.conf was overwritten with a zero length 
file.
Looks as though genkernel is adding invalid entries to linux/.config.

Reproducible: Always

Steps to Reproduce:
1. genkernel --menuconfig --bootloader=grub all
2.
3.



Expected Results:  
Built kernel/ modules and installed binaries.  install grub.conf line for new 
kernel.

websvr # emerge --info
Portage 2.1-r2 (default-linux/x86/no-nptl, gcc-4.1.1, glibc-2.3.6-r4, 2.6.17-
gentoo-r4ipt i686)
=================================================================
System uname: 2.6.17-gentoo-r4ipt i686 Pentium III (Coppermine)
Gentoo Base System version 1.12.4
ccache version 2.3 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/
terminfo"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parrallel-fetch sandbox 
sfperms strict"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress 
--force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/
distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts cli crypt cups 
dlloader dri eds emboss encode foomaticdb fortran gdbm gif gnome gpm gstreamer 
gtk gtk2 imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod motif mp3 mpeg 
mysql ncurses nls ogg opengl oss pam pcre pdflib perl png pppd python qt3 qt4 
quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-
fonts type1-fonts vorbis xml xmms xorg xv zlib elibc_glibc 
input_devices_keyboard input_devices_mouse kernel_linux userland_GNU 
video_cards_i810 video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, 
LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 tla 2006-09-05 15:29:14 UTC
Created attachment 96120 [details]
genkernel output
Comment 2 tla 2006-09-05 15:30:30 UTC
Created attachment 96121 [details]
genkernel /var/log/genkernel.log
Comment 3 tla 2006-09-05 15:31:28 UTC
Created attachment 96122 [details]
-r7 .config before genkernel runs
Comment 4 tla 2006-09-05 15:31:58 UTC
Created attachment 96123 [details]
-r7 .config after genkernel runs
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-05 16:57:29 UTC
* initrd: >> Initializing...
/bin/tar: : Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: Error exit delayed from previous errors
* ERROR: Could not extract udev binary cache!

The problem is that tar isn't available on your system.  The extra options in .config have no bearing on the problem at hand.  First, you need to verify the functionality of your system, since there's not much we can do if your system doesn't have tar on it.  ;]
Comment 6 tla 2006-09-06 02:14:09 UTC
(In reply to comment #5)
> * initrd: >> Initializing...
> /bin/tar: : Cannot open: No such file or directory
> /bin/tar: Error is not recoverable: exiting now
> /bin/tar: Child returned status 2
> /bin/tar: Error exit delayed from previous errors
> * ERROR: Could not extract udev binary cache!
> 
> The problem is that tar isn't available on your system.  The extra options in
> .config have no bearing on the problem at hand.  First, you need to verify the
> functionality of your system, since there's not much we can do if your system
> doesn't have tar on it.  ;]

  That's strange - "which tar" reports /usr/bin/tar (GNU tar v1.15.1), so I do appear to have tar on the system....
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-09-06 03:49:16 UTC
(In reply to comment #6)
> > /bin/tar: : Cannot open: No such file or directory
> > /bin/tar: Error is not recoverable: exiting now
> > /bin/tar: Child returned status 2
> > /bin/tar: Error exit delayed from previous errors

>   That's strange - "which tar" reports /usr/bin/tar (GNU tar v1.15.1), so I do
> appear to have tar on the system....

Note that it wants /bin/tar. A dead symlink in /usr/bin won't do much good. ;)
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-06 12:16:04 UTC
inertia ~ # which tar
/usr/bin/tar
inertia ~ # ls -la /usr/bin/tar
lrwxrwxrwx 1 root root 8 Aug  2 07:57 /usr/bin/tar -> /bin/tar
inertia ~ # ls -la /bin/tar
-rwxr-xr-x 1 root root 285344 Aug  2 07:57 /bin/tar
inertia ~ # equery b /bin/tar
[ Searching for file(s) /bin/tar in *... ]
app-arch/tar-1.15.91 (/bin/tar)
inertia ~ #

Something is definitely out of whack with your system.
Comment 9 tla 2006-09-06 13:38:09 UTC
> Note that it wants /bin/tar. A dead symlink in /usr/bin won't do much good. ;)

Ok, I'm still confused:

websvr ~ # ls -la /bin/tar /usr/bin/tar
-rwxr-xr-x 1 root root 194656 Sep  3 13:52 /bin/tar
lrwxrwxrwx 1 root root      8 Sep  3 13:52 /usr/bin/tar -> /bin/tar

websvr ~ # file /bin/tar
/bin/tar: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped

websvr ~ # /bin/tar --version
tar (GNU tar) 1.15.1

websvr src # equery b /bin/tar
[ Searching for file(s) /bin/tar in *... ]
app-arch/tar-1.15.1-r1 (/bin/tar)

I tried the following:
cd /usr/src
rm linux
ln -s linux-2.6.17-gentoo-r4 linux
genkernel --menuconfig --bootloader=grub all

Result: kernel built OK and grub.conf updated.  No errors.  I assume this means that genkernel works OK.

I then tried the above again after soft linking linux -> linux-2.6.17-gentoo-r7.

Result:
* kernel: >> Making dependencies...
*         >> Compiling 2.6.17-gentoo-r7conexant bzImage...
*         >> Compiling 2.6.17-gentoo-r7conexant modules...
* Copying config for successful build to /etc/kernels/kernel-config-x86-2.6.17-gentoo-r7conexant
* initrd: >> Initializing...
/bin/tar: : Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: Error exit delayed from previous errors
* ERROR: Could not extract udev binary cache!

The error is in the "initrd" build phase.  This is easily reproduced with "genkernel initrd" that produces the tar error message.  The error is also related to the "--bootsplash" option as if I specify "--no-bootsplash" an initramfs image is built successfully.

Looking more closely, the error is produced in /usr/share/genkernel/gen_initrd.sh by the command:
/bin/tar -jxpf "${UDEV_BINCACHE}" -C "${TEMP}/initrd-temp"

UDEV_BINCACHE is commented out in /etc/genkernel.conf and is therefore not defined?  This would explain why the file (not the tar command) is not found?
Comment 10 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-06 13:58:08 UTC
You're using --bootsplash with a 2.6 kernel?

gen_initrd.sh isn't run by 2.6 kernels by default.  Instead, gen_initramfs.sh is run and an initramfs is actually created when you ask it to build an initrd.  By default, neither bootsplash nor gensplash are enabled (or they aren't supposed to be, anyway)...

I guess we need to figure out why it is even trying to build udev and not using mdev, instead.
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2006-12-27 09:57:22 UTC
OK.  This should be fixed in subversion with recent changes.  Please test 3.4.6 when it is released.  Also, genkernel should be making a backup of your grub.conf before it edits it.
Comment 12 Chris Gianelloni (RETIRED) gentoo-dev 2007-01-04 09:20:01 UTC
Fixed in 3.4.6