Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
absurd and long /usr discussion on gentoo-dev
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
VoidMage
Advocate
Advocate


Joined: 14 Oct 2006
Posts: 4810

PostPosted: Sat Apr 28, 2012 2:56 pm    Post subject: Reply with quote

@genstorm: that quote is a bit imprecise - there's no difference between separate /usr and separate /var.
It comes down to a simple thing: if a tool used in an udev rule needs something that's on /usr / /var/ / etc., if the location is a separate partition, it needs to be mounted before udev runs.
Back to top
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2241
Location: Austria

PostPosted: Sat Apr 28, 2012 5:50 pm    Post subject: Reply with quote

Maybe I'm completely dumb now, but shouldn't udev be able to mount /var on demand, then apply the udev rule?
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
VoidMage
Advocate
Advocate


Joined: 14 Oct 2006
Posts: 4810

PostPosted: Sat Apr 28, 2012 7:25 pm    Post subject: Reply with quote

That's just the thing - it's not udev's job.
Early mounts, if not dealt with by initramfs, lie in the domain of init system, whether openrc, systemd or otherwise.
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 360

PostPosted: Wed May 02, 2012 3:26 pm    Post subject: Reply with quote

My two cents to this ill-considered change. I think the idea to split udev into 2 parts as previous discussed (early stage and late stage) is the right way.
The late stage is possible by
Code:
udevadm trigger


The early stage needs a patch in udev to support "noexec" before the trigger request is called. Like --exec-delay but without a timer. Or it is possible to use --children-max=0 for this case and to change the value in late stage before trigger event?

Also like the pseudo-code:

udev-early:
Code:
udevd --children-max=0



udev-late:
Code:

udevadm control --children-max=256 # Or other value
udevadm trigger
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Thu May 03, 2012 6:24 am    Post subject: Reply with quote

dunno, but i just dropped udev for mdev. no issues aside from a)needing to add a few bits to /etc/conf.d/modules, b)setting up an xorg.conf. Both of which were painless.

Now is where I grab my popcorn and watch for a bit, until this becomes a clusterfuck 6 months from now and they change their minds.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 2156

PostPosted: Thu May 03, 2012 11:52 pm    Post subject: Reply with quote

cach0rr0 wrote:
dunno, but i just dropped udev for mdev.


Code:
~ $ emerge -ptv mdev

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "mdev".

emerge: searching for similar names...
emerge: Maybe you meant any of these: sys-libs/mtdev, sys-fs/udev, sys-apps/makedev?

 * IMPORTANT: 7 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.



(I've read all of the news items, just not on this system. When you have 6 systems running Gentoo...)
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2063

PostPosted: Fri May 04, 2012 12:02 am    Post subject: Reply with quote

@depontius, 'USE=mdev emerge busybox', as can be seen by a look at virtual/dev-manager.
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Fri May 04, 2012 2:36 am    Post subject: Reply with quote

depontius wrote:

(I've read all of the news items, just not on this system. When you have 6 systems running Gentoo...)


doubt it'd be in a news item since it isn't really "the" path forward. Just something I took on out of spite - and havent regretted.

https://wiki.gentoo.org/wiki/Mdev

Basically, mask udev, set USE="-udev" in make.conf (and package.use if you have any USE="udev" in there), emerge busybox with USE="mdev", rebuild world with USE="-udev", set up xorg.conf (if applicable), set up /etc/conf.d/modules, nuke udev from rc, add mdev to rc, make sure devtmpfs and devtmpfs mount are both enabled in the kernel (built-in of course), good to go.

That's the short version of course. I haven't tried this on my systems with more...esoteric setups...but for my laptops so far so good.

My initial cosmetic hiccups:
-my xorg.conf was incorrect, so i had no keyboard or mouse in X. Since i had xdm in the default runlevel, and didnt set the ability to interactive rc, i had to boot to sysrescuecd, nuke xdm from default runlevel.
-modules that had been getting loaded automatically weren't loaded, including iwlwifi and psmouse. I added these to /etc/conf.d/modules and the problem was solved
-my battery monitor app (batti) depended on upower, so i had to torch it. Havent found a good replacement, ill probably just write a script to send me a libnotify balloon when battery is low
-I'd been using evdev for keyboard and mouse. Without udev the keyboard worked, but not the mouse, so i changed xorg.conf to use 'mouse' driver. Started X, still no mouse, noticed an Xorg.0.log entry that said 'no module named mouse' or similar. Emerge xf86-input-mouse, problem solved.

Not something I'd try if i used gnome or kde, but since a while back I did the "screw this, ill just use fluxbox, it never breaks", no issues on fluxbox.

YMMV, good luck if you make this move.

EDIT: s/XDM/xdm/ - XDM is in my gun bag, xdm is in my default runlevel
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
der bastler
Apprentice
Apprentice


Joined: 13 Apr 2003
Posts: 222

PostPosted: Tue May 08, 2012 6:01 pm    Post subject: Reply with quote

A binary log? Well, that would nuke my current event-based stateless automation approach on my ThinkPad...
_________________
Tempus fugit.
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Tue May 08, 2012 7:45 pm    Post subject: Reply with quote

der bastler wrote:
A binary log? Well, that would nuke my current event-based stateless automation approach on my ThinkPad...


also break virtually every existing SIEM product on the market
break every log aggregation/analytics product on the market
and just all around really piss off sysadmins and devs who don't want the Good Idea Fairy fucking around with their plain old text logs.

a wise man once said, "play stupid games, win stupid prizes" - welcome to systemd, where servers do not exist, only Gnome-based netbooks
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
miket
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2007
Posts: 97
Location: Gainesville, FL, USA

PostPosted: Wed May 09, 2012 4:54 am    Post subject: Reply with quote

Here's a tragicomic corner case:

I use Linux Containers on one machine and I have KDE 4.8 on one of the guests. It runs great--with X forwarding (using Xephyr for the whole desktop or over SSH for a window)--or I could use VPN. What I can't use on the guest is evdev. I have to have udev installed on the guest because of dependencies, but it is completely quiescent. It would be handy if it *could* receive some events, especially for the enumeration of devices made visible to the guest, but that's not where the Funtimes crowd wants to spread its love. We see lots of effort to support multiseat configurations, but I have ZERO interest in that. (My suspicion is that the entire effort behind all those Kits had multiseat as their main motivation.)

The funny thing is that I have read lots of insistent messages in the Debian mailing lists about how Linux is moving to being event-centric. This somehow is the justification for going to an event-driven init and moving udev into the init system. The thing is that inside of containers an event-driven init could never get you past go.

So there. I have an uneventful KDE in that LXC guest. I can watch TV on it, though.
Back to top
View user's profile Send private message
der bastler
Apprentice
Apprentice


Joined: 13 Apr 2003
Posts: 222

PostPosted: Wed May 09, 2012 4:51 pm    Post subject: Reply with quote

cach0rr0 wrote:
also break virtually every existing SIEM product on the market
break every log aggregation/analytics product on the market
and just all around really piss off sysadmins and devs who don't want the Good Idea Fairy fucking around with their plain old text logs.

a wise man once said, "play stupid games, win stupid prizes" - welcome to systemd, where servers do not exist, only Gnome-based netbooks


Then we need a new system. It annoys me to have acpid running just to route events to metalog to my managing script. Afaik after all it (udev, acpid, syslog) comes down to the sophisticated usage of netlink...

Well, give me some time (years would be fine ;-)), I'll think of something. In any case I need some sort of application scenario for my PhD thesis...
_________________
Tempus fugit.
Back to top
View user's profile Send private message
Yamakuzure
l33t
l33t


Joined: 21 Jun 2006
Posts: 951
Location: Bardowick, Germany

PostPosted: Mon May 14, 2012 6:12 pm    Post subject: Reply with quote

Nice discussion so far.

A while back I have migrated /usr back into / on my gentoo machines. Since then all troubles are gone and I can stay being "initrd-free". Fine.
After that I took a closer look at where I am working.
In this whole company and all customers we work at (That's about 50 desktops, 200 Servers, several Main Frames, dozens of Linux-driven NAS-Filers) my two gentoo boxes were the only ones with separate /usr partitions. (All servers are either AIX or Debian based) So I do ask myself, why so many people keep telling me that a separate /usr partition would be mandatory on servers. I've never seen one in reality. (Note: All those servers have nothing to do with internet business, maybe that's the reason?)

Of course I have parts within /usr that are not relevant to the boot process and simply put somewhere else, like /usr/portage or /usr/lib/debug. (And some other folders.) Some are symlinked somewhere that's available after mounting what's in fstab, or are simple mounts, like /usr/portage which resides on a reasonably sized ext2 partition. (That's just an example)

Instead of discussing whether having /usr on the the root partition is a good idea or not, I most often find myself thinking about how to unclutter /usr in general. this folders stuffed to the rim, no matter on which partition it resides.

But back to the topic, my real question is: Why is it such a good thing to have /usr on a separate partition? What is the reason? And I do not mean any "freeedom-of-choice"-issue (I'd agree with that anyway) but the practical view. What's the advantage?
_________________
I *do* know that I easily aggravate people due to my condensed writing. Rule of thumb: If I wrote anything that can be understood in two different ways, and one way offends you, then I meant the other! ;)
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2063

PostPosted: Mon May 14, 2012 11:54 pm    Post subject: Reply with quote

Yamakuzure wrote:
But back to the topic, my real question is: Why is it such a good thing to have /usr on a separate partition? What is the reason? And I do not mean any "freeedom-of-choice"-issue (I'd agree with that anyway) but the practical view. What's the advantage?
Again,
- read-only mounts
- shared across systems via NFS or something
- on a seperate local disk for whatever reason (SSD, built-in encryption, ...)
- snapshotting, revision control
- tradition
- because it's always been possible and (at least in Gentoo) it's been advised to
- 'cause Stone Cold said so
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Tue May 15, 2012 1:52 am    Post subject: Reply with quote

Yamakuzure wrote:

Instead of discussing whether having /usr on the the root partition is a good idea or not, I most often find myself thinking about how to unclutter /usr in general. this folders stuffed to the rim, no matter on which partition it resides.


let's look at it from the opposite angle. Is there any reason to throw absolutely everything and its mother onto the root partition?

"yes, to placate systemd" is not an acceptable answer.

There is no reason i shouldn't be able to bootstrap from root and mount /usr via e.g. NFS
The idea that it is impossible to boot without access to /usr is, well, silly
there are also different mount options that make sense for things under /usr that don't necessarily make sense elsewhere.

among other things.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Dont Panic
Guru
Guru


Joined: 20 Jun 2007
Posts: 317
Location: SouthEast U.S.A.

PostPosted: Tue May 15, 2012 5:22 am    Post subject: Reply with quote

It's interesting how the Linux kernel project team seems to zealously protects backward compatibility, while other core projects seem to cast it to the wind.
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Tue May 15, 2012 8:56 am    Post subject: Reply with quote

Dont Panic wrote:
It's interesting how the Linux kernel project team seems to zealously protects backward compatibility, while other core projects seem to cast it to the wind.


the kernel is, by all accounts, overseen by grown-ups.
it is run and managed by grown-ups
they know the people making them money are grown-ups
and they have the good sense not to piss off the people making them money, while the peanut gallery steps all over their own dicks trying to mold everything around super mega fast bootup for GnomeOS. Where the kernel seems to be managed by engineers, often times it seems like marketing people took a wrong turn at the water cooler, and ended up in the engineering section. Not so with the kernel team

(yes, ive seen some of the more childish rants by kernel overlords, but alas they are the exception, not the rule)

PS: any gentoo devs reading this, that's not directed at you guys. I know you are playing the hands you're dealt by some of these idiots upstream - and commend you all for it!
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4735

PostPosted: Tue May 15, 2012 9:03 am    Post subject: Reply with quote

this is indeed a topic to watch as I'm in the same boat when it come to lvm, raid on root and separate /var. not mo mention the comments here :lol:

all in all, as I've said in another thread, forcing initrd is an abomination that should be vanquished.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1633

PostPosted: Tue May 15, 2012 1:28 pm    Post subject: Reply with quote

avx wrote:
Yamakuzure wrote:
But back to the topic, my real question is: Why is it such a good thing to have /usr on a separate partition? What is the reason? And I do not mean any "freeedom-of-choice"-issue (I'd agree with that anyway) but the practical view. What's the advantage?
Again,
- read-only mounts
- shared across systems via NFS or something
- on a seperate local disk for whatever reason (SSD, built-in encryption, ...)
- snapshotting, revision control
- tradition
- because it's always been possible and (at least in Gentoo) it's been advised to
- 'cause Stone Cold said so


Aren't you basically agreeing with Lennart with all except the last 3 points? :twisted:

Lennart wrote:
j) having all static, distribution-provided, sharable OS stuff in a single dir
in /usr simplifies read-only setups drastically. I think we should
ensure that having the OS itself read-only is something that works
right-away without having to enable special modes that do this which
involves a ton of less-than-beautiful hacks. Being able to make the
libc and other core libraries fully read-only without also having to
make /etc read-only and without having to add a junkload of r/o bind
mounts is highly desirable.

k) having all static, distro-specific, sharable OS in a single dir
makes snapshots of the OS independetly of its state and configuration
truly atomic. In a btrfs world doing 5 snapshots of /lib, /lib64,
/bin, /sbin and /usr instead of just one is not atomic, and hence
racy, and ugly, and boooh!

l) having a clear separation between sharable data
(i.e. /usr) and everything else is highly desirable for
network setups, and for container setups.

_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
ulenrich
Guru
Guru


Joined: 10 Oct 2010
Posts: 464

PostPosted: Tue May 15, 2012 2:32 pm    Post subject: Reply with quote

Etal wrote:
avx wrote:
Yamakuzure wrote:
But back to the topic, my real question is: Why is it such a good thing to have /usr on a separate partition? What is the reason? And I do not mean any "freeedom-of-choice"-issue (I'd agree with that anyway) but the practical view. What's the advantage?
Again,
- read-only mounts
- shared across systems via NFS or something
- on a seperate local disk for whatever reason (SSD, built-in encryption, ...)
- snapshotting, revision control
- tradition
- because it's always been possible and (at least in Gentoo) it's been advised to
- 'cause Stone Cold said so


Aren't you basically agreeing with Lennart with all except the last 3 points? :twisted:

Lennart wrote:
j) having all static, distribution-provided, sharable OS stuff in a single dir
in /usr simplifies read-only setups drastically. I think we should
ensure that having the OS itself read-only is something that works
right-away without having to enable special modes that do this which
involves a ton of less-than-beautiful hacks. Being able to make the
libc and other core libraries fully read-only without also having to
make /etc read-only and without having to add a junkload of r/o bind
mounts is highly desirable.

k) having all static, distro-specific, sharable OS in a single dir
makes snapshots of the OS independetly of its state and configuration
truly atomic. In a btrfs world doing 5 snapshots of /lib, /lib64,
/bin, /sbin and /usr instead of just one is not atomic, and hence
racy, and ugly, and boooh!

l) having a clear separation between sharable data
(i.e. /usr) and everything else is highly desirable for
network setups, and for container setups.
Yeah! I think of a future 20 years from now, when we want to have some primitive artificial intelligence. (Do you remember what ibm has done with these sony-ps3 cores: easy interconnectable)

If we have little these embded servers all over the place, because everything needs software for driving sensors. Sometimes we want to utilize that thousand servers to give us some advanced answers...
_________________
fun2gen2
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2063

PostPosted: Tue May 15, 2012 2:35 pm    Post subject: Reply with quote

Etal wrote:
Aren't you basically agreeing with Lennart with all except the last 3 points? :twisted:
Well, these are just the goals, question is, how to approach them.

Ie, politics, goal: lower the rate of unemployment

my solution: more education, create jobs, ...
Lennart's solution: throw some grenades under bridges

While both solutions work, there's a "slight" difference in humanity and sanity.
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
ulenrich
Guru
Guru


Joined: 10 Oct 2010
Posts: 464

PostPosted: Tue May 15, 2012 3:02 pm    Post subject: Reply with quote

please stop stupid Lennart bashings ...
- He plays well in a team, his systemd mailing list is a very productive.
- His first puleseaudio project might have been used early. But that piece of shit just reached level pulseaudio-2 and development of it is accelerating.
- The total-distro /usr move is Red Hat initiated, in their commercial interest. And followed by SUSE and others.
- As Gentoo maintainers stated this move is feasable by utilizing busybox or initrd.

So, what :)
_________________
fun2gen2
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4735

PostPosted: Tue May 15, 2012 6:03 pm    Post subject: Reply with quote

ulenrich wrote:
please stop stupid Lennart bashings ...
- He plays well in a team, his systemd mailing list is a very productive.
- His first puleseaudio project might have been used early. But that piece of shit just reached level pulseaudio-2 and development of it is accelerating.
- The total-distro /usr move is Red Hat initiated, in their commercial interest. And followed by SUSE and others.
- As Gentoo maintainers stated this move is feasable by utilizing busybox or initrd.

So, what :)


that doesn't means he's approach is the right one.

anyway, what's wrong with stevel's early mount scripts?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1633

PostPosted: Tue May 15, 2012 6:28 pm    Post subject: Reply with quote

vapier created busybox[sep-usr] that can mount /usr before starting init, so from my understanding they're not even needed anymore.
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Tue May 15, 2012 7:39 pm    Post subject: Reply with quote

DaggyStyle wrote:
ulenrich wrote:
please stop stupid Lennart bashings ...
- He plays well in a team, his systemd mailing list is a very productive.
- His first puleseaudio project might have been used early. But that piece of shit just reached level pulseaudio-2 and development of it is accelerating.
- The total-distro /usr move is Red Hat initiated, in their commercial interest. And followed by SUSE and others.
- As Gentoo maintainers stated this move is feasable by utilizing busybox or initrd.

So, what :)


that doesn't means he's approach is the right one.


I read ulenrich's post as sarcasm. Could be wrong.
If nothing else, because the Lennart "bashings" are therapeutic, hilarious, and accurate.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum