Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Development (http://www.linux-archive.org/gentoo-development/)
-   -   support for mounting /usr w/out hassle (http://www.linux-archive.org/gentoo-development/661115-support-mounting-usr-w-out-hassle.html)

Mike Frysinger 04-30-2012 02:00 AM

support for mounting /usr w/out hassle
 
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).

to use it, update your kernel command line (in grub.conf or whatever) with:
init=/ginit
if you want to use a different init from /sbin/init, then just do:
init=/ginit /some/other/init

this code does not require an initramfs, but if you happen to use one anyways,
it should be handled automatically. same goes for any other automatic mount
aspects of the boot process.

this also address the /usr-merge issue since busybox has all the programs it
executes built into itself (it's a multicall binary). this is where the
openrc early-init scripts failed (they still relied on things in /bin etc...).

this also keeps intact the rescue shell scenario. the new applet allows you
to execute other applets. so booting the kernel with a command line like so:
init=/ginit bb
will launch our standard static rescue shell. since it's static, you quite
literally don't need any other path in the system other than /.

finally, since the recent udev-mount init.d script is completely brain dead and
refuses to execute unless devtmpfs is enabled, this code will also
automatically mount+seed /dev (via mdev) if need be.

note: the automatic mounting of /usr applies only to filesystems that (1) the
kernel can natively mount (i.e. no module autoloading) and (2) do not require
external mount helpers (i.e. `mount.ntfs3g` or `mount.cifs`). i don't think
either of these are a big deal. if they are, well, use an initramfs :P.

this should address the council's requirement (sep-/usr w/out initramfs) while
allowing the general craziness to proceed w/out forking projects ourselves.

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. seems to work in my qemu setup,
and on the s390/s390x systems which really don't have a choice when it comes
to a sep-/usr (due to limitations in the s390 hardware env).
-mike

William Hubbs 04-30-2012 04:31 AM

support for mounting /usr w/out hassle
 
On Sun, Apr 29, 2012 at 10:00:26PM -0400, Mike Frysinger wrote:
> finally, since the recent udev-mount init.d script is completely brain dead and
> refuses to execute unless devtmpfs is enabled, this code will also
> automatically mount+seed /dev (via mdev) if need be.

The recent udev-mount script goes with >=udev-182 which *requires*
devtmpfs, so I don't see why you think the the udev-mount script is
braindead.

> this should address the council's requirement (sep-/usr w/out initramfs) while
> allowing the general craziness to proceed w/out forking projects ourselves.

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.

William

Mike Frysinger 04-30-2012 04:48 AM

support for mounting /usr w/out hassle
 
On Monday 30 April 2012 00:31:52 William Hubbs wrote:
> On Sun, Apr 29, 2012 at 10:00:26PM -0400, Mike Frysinger wrote:
> > finally, since the recent udev-mount init.d script is completely brain
> > dead and refuses to execute unless devtmpfs is enabled, this code will
> > also automatically mount+seed /dev (via mdev) if need be.
>
> The recent udev-mount script goes with >=udev-182 which *requires*
> devtmpfs, so I don't see why you think the the udev-mount script is
> braindead.

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.
-mike

Luca Barbato 04-30-2012 05:20 AM

support for mounting /usr w/out hassle
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/04/12 21:48, Mike Frysinger wrote:
>> The recent udev-mount script goes with >=udev-182 which *requires*
>> devtmpfs, so I don't see why you think the the udev-mount script is
>> braindead.
>
> 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.

Many already stated that regarding that version of udev, no reason to
restate it again.

lu

- --

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+eISMACgkQ6Ex4woTpDjSxkQCgpJr9Ipurwa VnmKUu6X169LRA
w70AoJ7D+PGd3ALftmNmko0Nqmc7icUN
=bI0z
-----END PGP SIGNATURE-----


All times are GMT. The time now is 09:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.