* [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell
@ 2005-04-22 13:38 Mike Frysinger
2005-04-22 13:51 ` Chris Gianelloni
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Mike Frysinger @ 2005-04-22 13:38 UTC (permalink / raw
To: gentoo-dev
i dont want to discuss the logistics of how this will be done just yet ...
the idea is to remove 'sash' from our system target and replace it with
busybox ... there are a few applets that sash implements and busybox does not
(chattr ed file lsattr printenv sum where), but i added chattr, lsattr,
printenv, and sum to busybox yesterday :) ... i've never heard of 'where' and
going by its behavior in sash, it's basically 'which' ... that leaves us with
'ed' and 'file' which i think we can ignore and be OK ...
for those of you who do not know, busybox is a single binary which implements
the functionality of most system utils ... it does not completely implement
some features, just the most common ones, but then again sash does the same
thing :)
details:
- busybox implements a *ton* more applets ... it can be configured to replace
over 100 system funcs while sash provides about 35 ...
- size wise, busybox would be larger, probably by about ~150k - ~200k
- busybox commands are transparent while sash requires you to prefix internal
commands with a '-' ... so running `cp` in busybox will use busybox's cp
while sash needs to run '-cp', and you can still execute the real cp by
doing /bin/cp in busybox
feedback !?
-mike
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell
2005-04-22 13:38 [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell Mike Frysinger
@ 2005-04-22 13:51 ` Chris Gianelloni
2005-04-22 14:03 ` Spider
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Chris Gianelloni @ 2005-04-22 13:51 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
On Fri, 2005-04-22 at 09:38 -0400, Mike Frysinger wrote:
> for those of you who do not know, busybox is a single binary which implements
> the functionality of most system utils ... it does not completely implement
> some features, just the most common ones, but then again sash does the same
> thing :)
>
> details:
> - busybox implements a *ton* more applets ... it can be configured to replace
> over 100 system funcs while sash provides about 35 ...
> - size wise, busybox would be larger, probably by about ~150k - ~200k
> - busybox commands are transparent while sash requires you to prefix internal
> commands with a '-' ... so running `cp` in busybox will use busybox's cp
> while sash needs to run '-cp', and you can still execute the real cp by
> doing /bin/cp in busybox
>
> feedback !?
Could this make it easier to use busybox for the actual root on a
LiveCD? If so, then I'm all for it.
--
Chris Gianelloni
Release Engineering - Strategic Lead/QA Manager
Games - Developer
Gentoo Linux
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell
2005-04-22 13:38 [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell Mike Frysinger
2005-04-22 13:51 ` Chris Gianelloni
@ 2005-04-22 14:03 ` Spider
2005-04-22 14:15 ` Ned Ludd
2005-04-22 14:17 ` Mike Frysinger
2005-04-22 18:08 ` Stelian Ionescu
2005-04-23 4:44 ` [gentoo-dev] " Duncan
3 siblings, 2 replies; 9+ messages in thread
From: Spider @ 2005-04-22 14:03 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
On Fri, 2005-04-22 at 09:38 -0400, Mike Frysinger wrote:
> i dont want to discuss the logistics of how this will be done just yet ...
>
> the idea is to remove 'sash' from our system target and replace it with
> busybox ... there are a few applets that sash implements and busybox does not
> (chattr ed file lsattr printenv sum where), but i added chattr, lsattr,
> printenv, and sum to busybox yesterday :) ... i've never heard of 'where' and
> going by its behavior in sash, it's basically 'which' ... that leaves us with
> 'ed' and 'file' which i think we can ignore and be OK ...
.....
> feedback !?
> -mike
Yes, Will you provide a migration phase?
That means, can you put busybox-shell to auto-conflict sash and
link /bin/sash to /bin/busybox-sh or what the binary is called?
Oh, and unless you have another editor as binary built into your shell,
don't remove ed. A "trusted" editor is good. Sash is seldom used for
"My system is haxxored" however its often used for "I fucked up glibc"
and an editor is a handy thing, even if its as obscure as "ed"
Otherwise, I'd suggest this is a "default change" for 2005.next rather
than a replacement "right now".
//Spider
--
begin .signature
Tortured users / Laughing in pain
See Microsoft KB Article Q265230 for more information.
end
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell
2005-04-22 14:03 ` Spider
@ 2005-04-22 14:15 ` Ned Ludd
2005-04-22 14:51 ` Spider
2005-04-22 14:17 ` Mike Frysinger
1 sibling, 1 reply; 9+ messages in thread
From: Ned Ludd @ 2005-04-22 14:15 UTC (permalink / raw
To: gentoo-dev
On Fri, 2005-04-22 at 16:03 +0200, Spider wrote:
> On Fri, 2005-04-22 at 09:38 -0400, Mike Frysinger wrote:
>> [STUFF]..
> Oh, and unless you have another editor as binary built into your shell,
> don't remove ed. A "trusted" editor is good. Sash is seldom used for
> "My system is haxxored" however its often used for "I fucked up glibc"
> and an editor is a handy thing, even if its as obscure as "ed"
busybox.static would provide a minimal vi editor.
A default compile should produce the following applets (give or take a
few based on what the new ebuild will provide)
[, addgroup, adduser, adjtimex, ar, arping, ash, awk, basename,
bunzip2, busybox, bzcat, cal, cat, chgrp, chmod, chown, chroot,
chvt, clear, cmp, cp, cpio, crond, crontab, cut, date, dc, dd,
deallocvt, delgroup, deluser, devfsd, df, dirname, dmesg, dos2unix,
dpkg, dpkg-deb, du, dumpkmap, dumpleases, echo, egrep, env, expr,
false, fbset, fdflush, fdformat, fdisk, fgrep, find, fold, free,
freeramdisk, fsck.minix, ftpget, ftpput, getopt, getty, grep,
gunzip, gzip, halt, hdparm, head, hexdump, hostid, hostname, httpd,
hush, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod,
install, ip, ipaddr, ipcalc, iplink, iproute, iptunnel, kill,
killall, klogd, lash, last, length, linuxrc, ln, loadfont, loadkmap,
logger, login, logname, logread, losetup, ls, lsmod, makedevs,
md5sum, mesg, mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp,
modprobe, more, mount, msh, mt, mv, nameif, nc, netstat, nslookup,
od, openvt, passwd, patch, pidof, ping, ping6, pipe_progress,
pivot_root, poweroff, printf, ps, pwd, rdate, readlink, realpath,
reboot, renice, reset, rm, rmdir, rmmod, route, rpm, rpm2cpio,
run-parts, rx, sed, seq, setkeycodes, sh, sha1sum, sleep, sort,
start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon,
sync, sysctl, syslogd, tail, tar, tee, telnet, telnetd, test,
tftp, time, top, touch, tr, traceroute, true, tty, udhcpc, udhcpd,
umount, uname, uncompress, uniq, unix2dos, unzip, uptime, usleep,
uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget,
which, who, whoami, xargs, yes, zcat
--
Ned Ludd <solar@gentoo.org>
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell
2005-04-22 14:03 ` Spider
2005-04-22 14:15 ` Ned Ludd
@ 2005-04-22 14:17 ` Mike Frysinger
1 sibling, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2005-04-22 14:17 UTC (permalink / raw
To: gentoo-dev
On Friday 22 April 2005 10:03 am, Spider wrote:
> Yes, Will you provide a migration phase?
>
> That means, can you put busybox-shell to auto-conflict sash and
> link /bin/sash to /bin/busybox-sh or what the binary is called?
could be done
> Oh, and unless you have another editor as binary built into your shell,
> don't remove ed. A "trusted" editor is good. Sash is seldom used for
> "My system is haxxored" however its often used for "I fucked up glibc"
> and an editor is a handy thing, even if its as obscure as "ed"
busybox comes with vi ... i could implement ed in busybox, i'd just rather not
have to ;)
-mike
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell
2005-04-22 14:15 ` Ned Ludd
@ 2005-04-22 14:51 ` Spider
0 siblings, 0 replies; 9+ messages in thread
From: Spider @ 2005-04-22 14:51 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]
On Fri, 2005-04-22 at 10:15 -0400, Ned Ludd wrote:
> On Fri, 2005-04-22 at 16:03 +0200, Spider wrote:
> > On Fri, 2005-04-22 at 09:38 -0400, Mike Frysinger wrote:
> >> [STUFF]..
>
>
> > Oh, and unless you have another editor as binary built into your shell,
> > don't remove ed. A "trusted" editor is good. Sash is seldom used for
> > "My system is haxxored" however its often used for "I fucked up glibc"
> > and an editor is a handy thing, even if its as obscure as "ed"
>
> busybox.static would provide a minimal vi editor.
>
> A default compile should produce the following applets (give or take a
> few based on what the new ebuild will provide)
>
<snip>
Yep, and the vi editor would be a very good choice as an builtin.
Especially since its far easier to use than Ed is.
( yes, this is an area I feel rather strongly about, its not a single
time that I've been in static shells doing system recovery after either
hardware,software or administrator failure. Having a good recovery
system on-disk is wonderful )
//Spider
--
begin .signature
Tortured users / Laughing in pain
See Microsoft KB Article Q265230 for more information.
end
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell
2005-04-22 13:38 [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell Mike Frysinger
2005-04-22 13:51 ` Chris Gianelloni
2005-04-22 14:03 ` Spider
@ 2005-04-22 18:08 ` Stelian Ionescu
2005-04-22 19:26 ` Mike Frysinger
2005-04-23 4:44 ` [gentoo-dev] " Duncan
3 siblings, 1 reply; 9+ messages in thread
From: Stelian Ionescu @ 2005-04-22 18:08 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 804 bytes --]
On Fri, Apr 22, 2005 at 09:38:47AM -0400, Mike Frysinger wrote:
>i dont want to discuss the logistics of how this will be done just yet ...
>
>the idea is to remove 'sash' from our system target and replace it with
>busybox ... there are a few applets that sash implements and busybox does not
>(chattr ed file lsattr printenv sum where), but i added chattr, lsattr,
>printenv, and sum to busybox yesterday :) ... i've never heard of 'where' and
>going by its behavior in sash, it's basically 'which' ... that leaves us with
>'ed' and 'file' which i think we can ignore and be OK ...
file can sometimes be very useful, for instance if I want to know the
major/minor numbers of a device. the same about stat
--
Stelian Ionescu aka fe[nl]ix
Quidquid latine dictum sit, altum viditur.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell
2005-04-22 18:08 ` Stelian Ionescu
@ 2005-04-22 19:26 ` Mike Frysinger
0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2005-04-22 19:26 UTC (permalink / raw
To: gentoo-dev
On Friday 22 April 2005 02:08 pm, Stelian Ionescu wrote:
> file can sometimes be very useful, for instance if I want to know the
> major/minor numbers of a device. the same about stat
ok ... well `ls -l` can give you the same exact info:
$ ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 Apr 22 15:00 /dev/null
and sash doesnt implement 'stat' ... so really file is not necessary for this
reason
i can implement stat in busybox, shouldnt be hard
-mike
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-dev] Re: Replace 'sash' with 'busybox' as our static rescue shell
2005-04-22 13:38 [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell Mike Frysinger
` (2 preceding siblings ...)
2005-04-22 18:08 ` Stelian Ionescu
@ 2005-04-23 4:44 ` Duncan
3 siblings, 0 replies; 9+ messages in thread
From: Duncan @ 2005-04-23 4:44 UTC (permalink / raw
To: gentoo-dev
Mike Frysinger posted <200504220938.47437.vapier@gentoo.org>, excerpted
below, on Fri, 22 Apr 2005 09:38:47 -0400:
> the idea is to remove 'sash' from our system target and replace it with
> busybox ...
That reminds me... I never /was/ able to get sash to compile here (~amd64,
originally installed as 2004.1, last tried again to compile sash as
2004.3, IIRC). I finally injected it, and continued on with the emerge
system...
Emergency shell? I have a total of four levels of hard drive backup, two
working and tested snapshots of both my root and /usr partitions, on each
of two different drives, which also contain independent LILO
installations, and separate /home partitions (only working and backup
drive snaps, not four snaps, of each of those). BTW, I've also a total
of 8 copies of my fstab and partition tables, two each on each of the two
roots on each drive, in case something happens to my working copies of
those. If those all fail at once, I suppose I'll be stuck booting from
LiveCD/DVD, but I hope to beat the odds on that happening. If it does,
I don't guess much of the system is likely to have survived to be
usable at all, anyway. =8^O
So... I'd say neither one is necessary in the system target.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-04-23 4:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-22 13:38 [gentoo-dev] Replace 'sash' with 'busybox' as our static rescue shell Mike Frysinger
2005-04-22 13:51 ` Chris Gianelloni
2005-04-22 14:03 ` Spider
2005-04-22 14:15 ` Ned Ludd
2005-04-22 14:51 ` Spider
2005-04-22 14:17 ` Mike Frysinger
2005-04-22 18:08 ` Stelian Ionescu
2005-04-22 19:26 ` Mike Frysinger
2005-04-23 4:44 ` [gentoo-dev] " Duncan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox