public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-dev] busybox[sep-usr] support for mounting /usr w/out hassle
@ 2012-04-30  2:00 99% Mike Frysinger
  0 siblings, 0 replies; 1+ results
From: Mike Frysinger @ 2012-04-30  2:00 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2292 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-04-30  2:00 99% [gentoo-dev] busybox[sep-usr] support for mounting /usr w/out hassle Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox