Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 416223

Summary: sys-apps/kmod[tools]: Create symlinks to /usr instead of /
Product: Gentoo Linux Reporter: Samuli Suominen (RETIRED) <ssuominen>
Component: Current packagesAssignee: udev maintainers <udev-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 426412, 426992    
Bug Blocks:    
Attachments: kmod-9999.ebuild.patch

Description Samuli Suominen (RETIRED) gentoo-dev 2012-05-16 08:30:21 UTC
Created attachment 311977 [details, diff]
kmod-9999.ebuild.patch

I suppose they are created now to / for backwards compability. Well, we shouldn't carry the bandage indefinately.

I suggest we patch the live ebuild first for testing, and go from there...
Comment 1 William Hubbs gentoo-dev 2012-05-16 15:53:50 UTC
I'm not comfortable with this patch. I believe there are things out
there that hard code the path to modprobe/lsmod/etc so this would
definitely break things.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2012-05-17 13:59:46 UTC
(In reply to comment #1)
> I'm not comfortable with this patch. I believe there are things out
> there that hard code the path to modprobe/lsmod/etc so this would
> definitely break things.

I bet a lot of reverse dependencies and scripts out there use the commands, but I doubt so many of them use them with hardcoded path
And how else are we going to find out them, if not by starting somewhere?
I miss the RESOLVED, LATER solution in bugzilla :-/
Comment 3 GenSan 2012-07-13 09:27:34 UTC
At startup I got:

 * Loading module dm-crypt ...
/etc/init.d/modules: line 59: /sbin/modprobe: No such file or directory
 * Failed to load dm-crypt
 [ !! ]
 * Autoloaded 0 module(s)
 * Checking local filesystems  ...

due to the /usr partition mounted later on ...

Moving all 
/usr/bin/kmod --> /bin/
/usr/lib64/libkmod* --> /lib64/
and rebuilding all symlinks, the error has gone.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-07-13 09:50:36 UTC
(In reply to comment #3)
> At startup I got:
> 
>  * Loading module dm-crypt ...
> /etc/init.d/modules: line 59: /sbin/modprobe: No such file or directory
>  * Failed to load dm-crypt
>  [ !! ]
>  * Autoloaded 0 module(s)
>  * Checking local filesystems  ...
> 
> due to the /usr partition mounted later on ...
> 
> Moving all 
> /usr/bin/kmod --> /bin/
> /usr/lib64/libkmod* --> /lib64/
> and rebuilding all symlinks, the error has gone.

Completely unrelated to this bug. You need to use initramfs for separate /usr which mounts /usr before init.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-07-13 09:57:10 UTC
Fixed in 9-r1 and 9999
Comment 6 Khayyam 2012-07-14 07:38:59 UTC
Having updated from sys-apps/kmod-9 to sys-apps/kmod-9-r1 yesterday I was suprised this morning to find that my dm-crypt /home wasn't mounted for the lack of modprobe/insmod ... infact the boot process was one failure after another (dmcrypt, alsasound, net.wlan0, etc).

/usr is not on a seperate partition and other than using kmod in place of module-init-tools, and openrc-0.10.x, @system is arch.

I question the wisdom of such a relocation on a -r bump .. and if there is some procedure the user need to follow for things to not go haywire then some warning should be in place.

Portage 2.1.10.65 (default/linux/x86/10.0, gcc-4.5.3, glibc-2.14.1-r3, 3.4.4-geek-gnu i686)
=================================================================
System uname: Linux-3.4.4-geek-gnu-i686-Genuine_Intel-R-_CPU_T2500_@_2.00GHz-with-gentoo-2.1
Timestamp of tree: Fri, 13 Jul 2012 13:45:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo pentoo init6 aporia-local
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.leaseweb.com/gentoo http://gentoo.tiscali.nl"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/pentoo /var/lib/layman/init6 /usr/local/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="acl acpi alsa berkdb bzip2 caps cli cracklib crypt cxx dri fbcon fortran gdbm gpm iconv ipv6 maildir mmx modules mudflap ncurses nptl opengl openmp pam pcre pppd readline session sse sse2 ssl tcpd threads truetype unicode usb vim-syntax x86 xorg zlib zsh-completion" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="caps crypt lvm" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2012-07-14 13:35:53 UTC
(In reply to comment #6)
> Having updated from sys-apps/kmod-9 to sys-apps/kmod-9-r1 yesterday I was
> suprised this morning to find that my dm-crypt /home wasn't mounted for the
> lack of modprobe/insmod ... infact the boot process was one failure after
> another (dmcrypt, alsasound, net.wlan0, etc).
> 
> /usr is not on a seperate partition and other than using kmod in place of
> module-init-tools, and openrc-0.10.x, @system is arch.
> 
> I question the wisdom of such a relocation on a -r bump .. and if there is
> some procedure the user need to follow for things to not go haywire then
> some warning should be in place.

use -r2