FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 04-30-2012, 05:28 AM
William Hubbs
 
Default support for mounting /usr w/out hassle

On Mon, Apr 30, 2012 at 12:48:55AM -0400, Mike Frysinger wrote:
> it leaves your system in a hard to recover state because you happened to
> forget to check a filesystem option (which ironically isn't under Filesystems
> in the kernel). it's piss-poor user facing behavior.

Here's the situation.

Udev-182 mandates that a devtmpfs be mounted on /dev.
Udev-mount attempts to do this, and if it can't, it fails.
Since udev-mount fails, udev has to fail.

I would rather have had >=udev-182 refuse to merge if you don't have
config_devtmpfs in your kernel, but I was informed that is not allowed
because of build hosts.

If there is another way to handle this I'm all ears.

Thanks,

William
 
Old 04-30-2012, 06:34 AM
Ulrich Mueller
 
Default support for mounting /usr w/out hassle

>>>>> On Sun, 29 Apr 2012, Mike Frysinger wrote:

> i've added a new USE=sep-usr flag to busybox. when enabled, this
> will install a static busybox at /ginit (and have the other busybox
> paths symlink to that so there's no overhead). this new applet has a
> hand written set of commands to automatically mount /dev /proc /sys
> /usr and seed /dev, and then execute the real init (defaulting to
> /sbin/init).

Shouldn't it fsck the /usr partition before mounting it? I don't see
that in ginit.c.

Ulrich
 
Old 04-30-2012, 08:05 AM
"Tony "Chainsaw" Vroon"
 
Default support for mounting /usr w/out hassle

On 30/04/12 05:31, William Hubbs wrote:
> Correction here; as far as I know the council did not mandate
> separate /usr without initramfs. They just said that separate /usr
> is a supported configuration.

Separate /usr is a supported configuration, which blocks the armwaving
about "oh just use an initramfs then" as a solution. As apparently
lessons about filesystem layout have been unlearned:
Binaries that are essential for system boot, and must be available in
single user mode go in /bin and /sbin, with their libraries in /lib.
This allows for /usr to be:
1) marked read-only for NFS mounts, which some of us rely on
2) inside of an LVM2 container, allowing for / to be (very) small
3) on a squashfs filesystem, in order to save space

My deployment relies on option 2, other sysadmins rely on option 1.
Some of our users are very happy with option 3.

Trying to second-guess my motivation, and trying to undo unanimous
council votes simply because your opinion is different, really has to
stop.

I feel a lot better about vapier's pragmatic approach then I do about
udev/systemd upstream's ability and motivation to support current
systems. If you had any doubts about whether udev was part of the
problem, consider what tarball you will have to extract it from in future.

Regards,
--
Tony Vroon
Server systems manager
London Internet Exchange Ltd, Trinity Court, Trinity Street,
Peterborough, PE1 1DA
Registered in England number 3137929
E-Mail: tony@linx.net
 
Old 04-30-2012, 10:35 AM
Maxim Kammerer
 
Default support for mounting /usr w/out hassle

On Mon, Apr 30, 2012 at 05:00, Mike Frysinger <vapier@gentoo.org> wrote:
> this is all in busybox-1.20.0 which is now in the tree. *if people want to try
> it out before i unmask it, that'd be great.

If you insist on calling other applets from C instead of using OS
functions, there is still no need to mount /proc and parse
/proc/mounts in order to find out whether a directory is a mount
point, since Busybox has a "mountpoint" applet (and of course, one
could stat the directory and its parent, and compare device IDs, but
again...).

--
Maxim Kammerer
Liberté Linux (discussion / support: http://dee.su/liberte-contribute)
 
Old 04-30-2012, 03:59 PM
Mike Frysinger
 
Default support for mounting /usr w/out hassle

On Monday 30 April 2012 01:28:58 William Hubbs wrote:
> On Mon, Apr 30, 2012 at 12:48:55AM -0400, Mike Frysinger wrote:
> > it leaves your system in a hard to recover state because you happened to
> > forget to check a filesystem option (which ironically isn't under
> > Filesystems in the kernel). it's piss-poor user facing behavior.
>
> Here's the situation.

the fact that the script leaves your system in a hard to recover state is what
i'm whining about, not that udev requires devtmpfs.

/dev/pts isn't created, thus devpts doesn't get mounted, thus you cannot log
in to your system to fix it. would also be trivial to run the all of three
commands so people could recover:
mount -t tmpfs dev /dev
busybox mdev -s
mkdir /dev/pts
we already have examples of the init scripts modifying /etc/issue to notify
login entry points that their system needs manual attention to recover.
-mike
 
Old 04-30-2012, 04:00 PM
Mike Frysinger
 
Default support for mounting /usr w/out hassle

On Monday 30 April 2012 02:34:18 Ulrich Mueller wrote:
> >>>>> On Sun, 29 Apr 2012, Mike Frysinger wrote:
> > i've added a new USE=sep-usr flag to busybox. when enabled, this
> > will install a static busybox at /ginit (and have the other busybox
> > paths symlink to that so there's no overhead). this new applet has a
> > hand written set of commands to automatically mount /dev /proc /sys
> > /usr and seed /dev, and then execute the real init (defaulting to
> > /sbin/init).
>
> Shouldn't it fsck the /usr partition before mounting it? I don't see
> that in ginit.c.

it mounts it read-only. fsck-ing is left to the normal init scripts.
-mike
 
Old 04-30-2012, 04:00 PM
Rich Freeman
 
Default support for mounting /usr w/out hassle

On Mon, Apr 30, 2012 at 4:05 AM, Tony "Chainsaw" Vroon
<chainsaw@gentoo.org> wrote:
> Binaries that are essential for system boot, and must be available in
> single user mode go in /bin and /sbin, with their libraries in /lib.
> This allows for /usr to be:
> 1) marked read-only for NFS mounts, which some of us rely on
> 2) inside of an LVM2 container, allowing for / to be (very) small
> 3) on a squashfs filesystem, in order to save space

These are all things easily supported with an initramfs. In fact,
initramfs-based solutions allow the same sorts of things to be done
with all the other filesystems and not just /usr.

> Trying to second-guess my motivation, and trying to undo unanimous
> council votes simply because your opinion is different, really has to
> stop.

I don't think anybody is trying to undo council votes - people are
just speculating as to what they voted on. The easiest solution is
for somebody to say "I'm John Smith, and I am speaking officially for
the council, and we agree that what was decided upon is X."

It seems pretty clear that everybody wants to support a separate /usr.
We even have multiple supported solutions, including an initramfs, a
use flag on busybox, and I believe somebody posted a script that can
be run during early boot to mount /usr. It sounds like the only thing
that isn't supported is "doing nothing" - but with Gentoo if you "do
nothing" you don't get an installed system that works on any
configuration.

>
> I feel a lot better about vapier's pragmatic approach then I do about
> udev/systemd upstream's ability and motivation to support current
> systems. If you had any doubts about whether udev was part of the
> problem, consider what tarball you will have to extract it from in future.

Well, if others feel differently about the direction udev is taking,
they can of course just fork it.

I can't say I'm terribly excited about the amount of vertical
integration going on. I don't run Gnome, and I don't run Unity. I
really do prefer the unix way.

However, I don't contribute much to those upstream projects, and I
don't see much value in telling a bunch of people who do that they are
doing it wrong. I don't like how Google develops Android in the dark,
or that they bundle 1GB of third-party stuff in their Chromium source
and distribute a favored binary-only derivative. However, I do like
that they're giving me all of that stuff essentially for free, and so
beyond the odd blog post I try not to give them too hard a time.

In the same way I think we need to give the maintainers of these
projects in Gentoo some slack, or join those projects and help them to
address your needs. It is a lot easier to tell others what to do than
to help make it happen, but a volunteer-based project like Gentoo
needs the latter more than the former.

Rich
 
Old 04-30-2012, 04:03 PM
Mike Frysinger
 
Default support for mounting /usr w/out hassle

On Monday 30 April 2012 06:35:20 Maxim Kammerer wrote:
> On Mon, Apr 30, 2012 at 05:00, Mike Frysinger wrote:
> > this is all in busybox-1.20.0 which is now in the tree. if people want
> > to try it out before i unmask it, that'd be great.
>
> If you insist on calling other applets from C instead of using OS
> functions

i don't know what you mean by "OS functions", but the whole point is that this
code *cannot* execute *any* external program by default. in a /usr-merged and
/usr-sep world, there will literally be no other programs in / to execute.

> there is still no need to mount /proc and parse
> /proc/mounts in order to find out whether a directory is a mount
> point, since Busybox has a "mountpoint" applet (and of course, one
> could stat the directory and its parent, and compare device IDs, but
> again...).

thanks, i'll take a look
-mike
 
Old 04-30-2012, 04:14 PM
Ulrich Mueller
 
Default support for mounting /usr w/out hassle

>>>>> On Mon, 30 Apr 2012, Mike Frysinger wrote:

> On Monday 30 April 2012 02:34:18 Ulrich Mueller wrote:
>> >>>>> On Sun, 29 Apr 2012, Mike Frysinger wrote:
>> > i've added a new USE=sep-usr flag to busybox. when enabled, this
>> > will install a static busybox at /ginit (and have the other busybox
>> > paths symlink to that so there's no overhead). this new applet has a
>> > hand written set of commands to automatically mount /dev /proc /sys
>> > /usr and seed /dev, and then execute the real init (defaulting to
>> > /sbin/init).
>>
>> Shouldn't it fsck the /usr partition before mounting it? I don't see
>> that in ginit.c.

> it mounts it read-only. fsck-ing is left to the normal init scripts.

Which doesn't work, at least not for ext{2,3,4}. e2fsck contains
special handling for the root fs, but it refuses to repair any other
mounted file system (even if mounted read-only).

Ulrich
 
Old 04-30-2012, 04:40 PM
Mike Frysinger
 
Default support for mounting /usr w/out hassle

On Monday 30 April 2012 12:14:19 Ulrich Mueller wrote:
> >>>>> On Mon, 30 Apr 2012, Mike Frysinger wrote:
> > On Monday 30 April 2012 02:34:18 Ulrich Mueller wrote:
> >> >>>>> On Sun, 29 Apr 2012, Mike Frysinger wrote:
> >> > i've added a new USE=sep-usr flag to busybox. when enabled, this
> >> > will install a static busybox at /ginit (and have the other busybox
> >> > paths symlink to that so there's no overhead). this new applet has a
> >> > hand written set of commands to automatically mount /dev /proc /sys
> >> > /usr and seed /dev, and then execute the real init (defaulting to
> >> > /sbin/init).
> >>
> >> Shouldn't it fsck the /usr partition before mounting it? I don't see
> >> that in ginit.c.
> >
> > it mounts it read-only. fsck-ing is left to the normal init scripts.
>
> Which doesn't work, at least not for ext{2,3,4}. e2fsck contains
> special handling for the root fs, but it refuses to repair any other
> mounted file system (even if mounted read-only).

i believe there's a bug open on the topic. it's not something i think belongs
in the pre-/usr code.
-mike
 

Thread Tools




All times are GMT. The time now is 06:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org