From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 2 01:59:19 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BA6116A417 for ; Sun, 2 Sep 2007 01:59:19 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id 9AF6913C459 for ; Sun, 2 Sep 2007 01:59:18 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l821waig031192; Sun, 2 Sep 2007 05:58:37 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l821wYqq031191; Sun, 2 Sep 2007 05:58:34 +0400 (MSD) (envelope-from yar) Date: Sun, 2 Sep 2007 05:58:33 +0400 From: Yar Tikhiy To: Julian Stacey Message-ID: <20070902015833.GA30502@comp.chem.msu.su> References: <20070901073440.GL85633@comp.chem.msu.su> <200709011240.l81CeTKd056036@fire.js.berklix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200709011240.l81CeTKd056036@fire.js.berklix.net> User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org Subject: Re: Useful tools missing from /rescue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2007 01:59:19 -0000 On Sat, Sep 01, 2007 at 02:40:29PM +0200, Julian Stacey wrote: > Reference: > > From: Yar Tikhiy > > Date: Sat, 1 Sep 2007 11:34:40 +0400 > > Message-id: <20070901073440.GL85633@comp.chem.msu.su> > > Yar Tikhiy wrote: > > Hi all, > > > > I've had to use /rescue recently and felt lack of a few basic tools > > in it, namely pgrep(1), head(1), tail(1), tee(1), and a text filter, > > e.g., sed(1). Well, in fact most functionality of pgrep(1), head(1), > > tail(1), and even tee(1) can be emulated if one has sed(1), but the > > tools are so tiny and convenient that it's a pity not to have them > > all handy during hard times. > > > > In addition, there are chflags and chmod in /rescue, but there's > > no chown in it, so the toolset is a bit incomplete. > > > > Would anyone mind if I add those tools to /rescue? The size growth > > will be rather small: > > > > -r-xr-xr-x 121 root wheel 3715096 1 ΣΕΞ 10:22 /mnt2/rescue.old/rescue > > -r-xr-xr-x 129 root wheel 3761828 1 ΣΕΞ 11:22 /mnt2/rescue/rescue > > Don't do it without approval of re@ (who might be too busy just now Thanks for the reminder. ;-) > anyway) It might blow the limit on the tight packed rescue floppy. > (& though desk workstations have CDs, lost of small boxes still > just have floppies for rescue) Best try to build a rescue floppy > yourself before adding bloat. If you meant the fixit floppy, it is built separately. The rescue(8) binary is already bigger than a floppy and it isn't supposed to fit on that media. > BTW I've never used pgrep thus superfluous to rescue. Others also > not really needed, merely nice. True rescue is just to fix FS at > which point you can mount other FS or CDROM or NFS etc for more > tools. Unlike a fixit floppy, rescue(8) was introduced mostly to help when shared libraries were damaged badly. In that case, to prevent system malfunction, you may want to kill daemons starting other binaries, e.g., cron(8) and sendmail(8), if you don't want to, or just cannot, drop into single-user mode immediately. Of course, rescue(8) is also of use in other recovery tasks if one is lucky enough to be able to mount / and too lazy to reach for a fixit CD. > Before anyone else might discuss which tools might be nice, I'd > suggest build yourself a FIXIT floppy, & see what space is left, & > what you'd have to chuck out to make space for what you want to > add. Again, fixit is built using a different configuration file, please see src/release/${TARGET_ARCH}/fixit_crunch.conf. -- Yar