Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97378 - genkernel-3.1.6 fails to build initrd if /sbin is not in $PATH
Summary: genkernel-3.1.6 fails to build initrd if /sbin is not in $PATH
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-06-29 04:14 UTC by Alexander Skwar
Modified: 2005-07-01 08:59 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 Alexander Skwar 2005-06-29 04:14:55 UTC
genkernel-3.1.6 fails to build initrd if /sbin is not in $PATH

I'm using "sudo" to do everything that requires root access. Because of this, my normal user account does not contain /sbin or /usr/sbin in $PATH - and thus the $PATH of a "sudo'ed" programm also doesn't have those directories in $PATH.

I called "sudo genkernel all". At the end, I got the following error message:

/usr/share/genkernel/gen_initrd.sh: line 11: mke2fs: command not found
* Gentoo Linux Genkernel; Version 3.1.5

* ERROR: Could not format initrd-2.6.12-ck2-r1!

* -- End log... --


If I call "PATH=/sbin:$PATH sudo genkernel all", everything works. I still see this as an error of the program, because it makes assumptions (about what might be in the $PATH) without checking if those assumptions hold true.

The proper fix IMO would be to either call "/sbin/mke2fs" or to adjust $PATH as needed.

[12:25:42 vz6tml@exp01:~] $ epm -q genkernel
genkernel-3.1.6



Gentoo Base System version 1.6.12
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r0, 2.6.11-ck9.03.no-nfs-directio.no-nfs4.only-deadline-sched i686)
=================================================================
System uname: 2.6.11-ck9.03.no-nfs-directio.no-nfs4.only-deadline-sched i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.9
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.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://localhost/~vz6tml/gentoo-files/ http://cifs-srvr1.europe.delphiauto.net/~vz6tml/Misc._Software/Gentoo/ http://php2.ath.cx/~askwar/gentoo-files/ http://gentoo.phpquadrat.de/ http://localhost:60080/pub/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ http://localhost:60081/pub/Mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://localhost:60082/mirror/rsync.gentoo.org/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://localhost:60083/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://localhost:60084/ http://distfiles.gentoo.org/"
LANG="de_DE.UTF-8"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acl acpi apache2 artworkextra async audiofile avi bash-completion bcmath bzlib cap caps ccache cdr crypt cscope css cups curl curlwrappers divx4linux djbfft dvd dvdr eds encode ethereal exif fam flac foomaticdb ftp gd gdbm gif gimpprint gnome gnutls gphoto2 gtk gtk2 hal howl iconv imagemagick imlib imlib2 ithreads java javascript jbig jpeg jpeg2k kde kdeenablefinal kdexdeltas ldap libedit libwww lufsusermount lzw-tiff mad maildir mailwrapper matroska mbox mmap mmx mng mozcalendar mozdevelop mozilla moznoirc mozsvg mp3 mpeg ncurses nfs nis nls noantlr nobcel nobeanutils nobsh nocommonslogging nocommonsnet nodrm nojdepend nojoystick nojsch nojython nolog4j nooro noregexp norhino noxalan noxerces nptl offensive ogg oggvorbis pam parse-clocks pcntl pcre pdflib perl pic pie png posix ppds pwdb python qt quicktime quotes rdesktop readline real recode samba sasl sdl shared slang sndfile sockets spell sse sse2 ssl svg symlink sysvipc tcltk tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb videos vim vim-pager vim-with-x vorbis wmf xfs xine xml xml2 xscreensaver xv xvid yp zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Eric Edgar (RETIRED) gentoo-dev 2005-07-01 06:39:55 UTC
Added a PATH=
This will be in genkernel-3.2.0 when it comes out.
Comment 2 Alexander Skwar 2005-07-01 08:59:58 UTC
Great, thanks!