Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416219 - sys-apps/kmod is installed to /usr instead of /
Summary: sys-apps/kmod is installed to /usr instead of /
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-16 07:43 UTC by Mads Randstoft
Modified: 2024-02-06 22:52 UTC (History)
2 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 Mads Randstoft 2012-05-16 07:43:54 UTC
kmod application is placed inside /usr! On my system (and by definition any system that uses more than one partition for the system, so recommended by all documentation and reason) /usr is mounted on boot, again on my system (and many others) /usr is placed on a partition that needs modules loaded to be mounted (On my desktop system it is an lvm partition, on my servers it is a network based raid partition) My system does no longer boot, because init can't find modprobe (as it is a link to /usr/sbin/kmod which isn't available until modules are loaded and the partition mounted)

TL;DR; modprobe is a symlink to a place that is not part of a base unix system.

Reproducible: Always

Steps to Reproduce:
1. Install gentoo on a system where /usr is mounted via lvm
2. Install new kmod package
3. boot...
Actual Results:  
System booting into terminal with no available binaries to rescue the system

Expected Results:  
System ought to boot into a usable mode.

Pr. definition /usr /var /tmp /home are not part of a basic system. Linking from a core part of the system (in this case /sbin) into these non-std. parts is dangerous, and will in many cases result in an unbootable system.
Comment 1 Zac Medico gentoo-dev 2012-05-16 08:12:59 UTC
Maybe you can use busybox with USE=sep-usr enabled:

http://archives.gentoo.org/gentoo-dev/msg_978b2222cb87ec028fee65dc29eedbdb.xml
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-05-16 08:14:28 UTC
This bug most certainly will be closed as invalid.

Unfortunately there are people nowadays who think that a separate /usr partition is broken by design now having more and more applications that need libs being isntalled into /usr (like bluetooth stuff). As a result a bunch of RedHat people started to propose that all stuff being in /bin, /sbin, /lib* should be moved into /usr. Despite the fact that this is totally nuts and a complete waste of time and ressources they started to convince several upstream projects to make the installation target of their files defaulting to /usr even such essential stuff like kmod. Sadly more and more of our package maintainers blindly adopt these changes and ignore users still needing separate /usr partitions for whatever reason.

If you don't like this just take sys-apps/kmod from poly-c overlay and be happy with all binaries get installed into / rather than /usr again.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2012-05-16 08:17:51 UTC
You need an initramfs that mounts /usr before init if you want separate /usr with >=sys-fs/udev-180
The only bug in kmod is that not everything is moved to /usr yet, but it's a work in process

Take a look at sys-kernel/dracut and it's usrmount module to generate initramfs.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-05-16 08:32:28 UTC
Bug 416223 for tracking the migration rest of the way to /usr.
Comment 5 William Hubbs gentoo-dev 2012-05-16 15:17:11 UTC
You don't actually need an initramfs or to use any overlay.

If you look at sys-apps/busybox-1.20.0, you can use the sep-usr use flag
and follow the instructions when you enable this.

This will allow you to not use an initramfs if you do not want to use
one.
Comment 6 Mads Randstoft 2012-05-18 09:39:15 UTC
Why is the "Microsoft Windows" people winning here? Is it because there are more of them that it is decided that now it is a good thing to run everything on one partition and it should take a lot of work to run your system on a better setup than default?

One reason why I loathe running any Gentoo system with /usr on the root partition is that it causes Gentoo linux to self-destruct over time by normal use. Now I have to setup a service to run eclean every now and again (causing automated wait delays) because optherwise the root partition will fill up and the system will be unable to startup.

The same goes for /tmp and /var that are also prone to be filled up by user space applications...

I wonder when the same reasoning will put /home in a fixed position on a harddisk and the root partition will be changed to C: to be more familiar?
Comment 7 William Hubbs gentoo-dev 2012-05-18 17:51:09 UTC
Actually the reasons you give in your comment are good reasons for
moving things from / to /usr, along with the reasons given in the
document supporting this decision [1]. The / filesystem can be made very
small in this setup.

[1]
http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge
Comment 8 Mads Randstoft 2012-05-20 09:36:56 UTC
I am fully in support of moving anything that is not strictly needed for startup out of / it makes good sense. I am not in support of making /usr part of / though, as it makes little sense to me, to make / as small as possible, but them throwing in the huge /usr requirements in order to boot the system at all... As I said earlier, I find that very MS Windows like, where the system is needed to be installed on one disk with a minimum of 60GB space, not all systems I install gentoo on have 60GB local space and I just hate the thought that I now either have to "roll my own" or make a complete branch of gentoo that "actually works" :(
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2012-05-20 09:49:01 UTC
Both explanation and solution has been provided in this bug. 
If you wish to continue debating this, take it to the forums, mailing lists or IRC channels for example.