Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Sep 2007 05:58:33 +0400
From:      Yar Tikhiy <yar@comp.chem.msu.su>
To:        Julian Stacey <jhs@berklix.org>
Cc:        hackers@freebsd.org
Subject:   Re: Useful tools missing from /rescue
Message-ID:  <20070902015833.GA30502@comp.chem.msu.su>
In-Reply-To: <200709011240.l81CeTKd056036@fire.js.berklix.net>
References:  <20070901073440.GL85633@comp.chem.msu.su> <200709011240.l81CeTKd056036@fire.js.berklix.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 01, 2007 at 02:40:29PM +0200, Julian Stacey wrote:
> Reference:
> > From:		Yar Tikhiy <yar@comp.chem.msu.su> 
> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070902015833.GA30502>