[arch-projects] [mkinitcpio][PATCH 07/11] init: use util-linux's /bin/mount
Dave Reisner
d at falconindy.com
Sat Nov 12 10:19:01 EST 2011
On Sat, Nov 12, 2011 at 02:32:09PM +0100, Thomas Bächler wrote:
> Am 12.11.2011 03:55, schrieb Dave Reisner:
> > Providing this means we no longer need blkid for FS detection, as mount
> > will do this for us. Adds a slight bloat to the image, in exchange for a
> > huge convenience. Messaging is changed to assume that /bin/mount will
> > provide useful feedback for us on failure.
>
> Once we start going down this road (cp, mount, ...), wouldn't it be
> better to simply drop busybox?
>
Hmm... we're probably close to that point. In terms of size for the
tradeoff, we'd need (at a minimum) the following binaries to replace
busybox:
KB
/bin/bash 733896
/bin/mknod 31176
/bin/sleep 27048
/bin/mkdir 47688
/usr/bin/env 27064
/sbin/switch_root 24648
/bin/grep 134600 <-- id prefer to get rid of this
/usr/bin/stat 72456
/bin/umount 265568
Someone will throw tomatoes at me for using Bash, but Dash sucks, and
it makes a truly awful interactive shell.
Additionally, a lot of users would end up bringing in:
/usr/bin/setfont 39800
/usr/bin/kbd_mode 10400
cat, sed, rm, and cut are used in crypt/lvm/mdadm hooks. I can refactor
some of that out, but that seems to me like it's liable to break hooks
that I don't know about. I guess they can BYO via the BINARIES= declare
in the build function, but let's just consider having them as core for
funzies:
/bin/cat 47784
/bin/sed 69184
/bin/cut 39432
/bin/rm 55912
shutdown features necessitate cp
/bin/cp 121880
To make the ramfs useful for troubleshooting, add in:
/bin/ls 105832
/bin/vi 228096
Ditching busybox and adding in all of this brings in an additional
1.6MB before library dependencies...
/lib/libacl.so.1 31856
/lib/libattr.so.1 17248
/lib/libcap.so.2 17096
/lib/libdl.so.2 14704
/lib/libncursesw.so.5 378816
/lib/libpcre.so.0 371160 <- belongs to grep
/lib/libreadline.so.6 326762
...an additional 1.1MB. I point out that we should get rid of grep
because awk from FreeBSD is roughly the size of the grep binary, does
more, and has zero dependencies beyond libc. My pacman-dev hat wants
this in the repos anyways for easier testing of makepkg.
I don't have a problem with this -- in the end it'll make my life
easier.
dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20111112/1937b261/attachment-0001.asc>
More information about the arch-projects
mailing list