From owner-freebsd-questions@FreeBSD.ORG Fri May 15 07:17:43 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A61F106566B for ; Fri, 15 May 2009 07:17:43 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2D48FC1A for ; Fri, 15 May 2009 07:17:42 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id n4F7HXEB010304; Fri, 15 May 2009 08:17:34 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.2 smtp.infracaninophile.co.uk n4F7HXEB010304 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1242371854; bh=MdvVlF1KqvzLlN2rxLhNkV5MMdzP7G+SVs3cInSVVOo=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4A0D1707.10203@infracaninophile.co.uk>|Date:=20Fri ,=2015=20May=202009=2008:17:27=20+0100|From:=20Matthew=20Seaman=20 |Organization:=20Infracaninophile |User-Agent:=20Thunderbird=202.0.0.21=20(X11/20090420)|MIME-Versio n:=201.0|To:=20Manish=20Jain=20|CC:=20M el=20Flynn=20,=20=0 D=0A=20freebsd-questions@freebsd.org|Subject:=20Re:=20How=20to=20m ove=20vi=20to=20/bin|References:=20=09<200905142019.56242.mel.flynn+fbsd .questions@mailing.thruhere.net>=20<4A0D0FD6.4040107@gmail.com>|In -Reply-To:=20<4A0D0FD6.4040107@gmail.com>|X-Enigmail-Version:=200. 95.6|Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha256=3B= 0D=0A=20protocol=3D"application/pgp-signature"=3B=0D=0A=20boundary =3D"------------enigE816D9F6A064B1C172256B24"; b=ynM8cjwwfBZbkpSo37ammW+uBiQDOV1Ovf9+hwmngaxTniK4DKKFoKXmK394QI+/F 7zyUryvL+mNIDcUMABIM6LOwYmWCHJxkSGY5N3ZwHDekQN2YWxAQ8oBxEcFlYGH9ol HS7+5TOtqqzUZMQ7TFS4sJHq9wsRuWeA9SrY9X9c= X-Authentication-Warning: happy-idiot-talk.infracaninophile.co.uk: Host localhost [IPv6:::1] claimed to be happy-idiot-talk.infracaninophile.co.uk Message-ID: <4A0D1707.10203@infracaninophile.co.uk> Date: Fri, 15 May 2009 08:17:27 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.21 (X11/20090420) MIME-Version: 1.0 To: Manish Jain References: <200905142019.56242.mel.flynn+fbsd.questions@mailing.thruhere.net> <4A0D0FD6.4040107@gmail.com> In-Reply-To: <4A0D0FD6.4040107@gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE816D9F6A064B1C172256B24" X-Virus-Scanned: clamav-milter 0.95.1 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: How to move vi to /bin X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2009 07:17:43 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE816D9F6A064B1C172256B24 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Manish Jain wrote: > Mel Flynn wrote: >> On Wednesday 13 May 2009 09:21:46 manish jain wrote: >> >>> I want to move vi to /bin so that I have an editor available in >>> single-user mode. >> >> The only reason to need an editor and not have /usr and /var available= =20 >> is to edit /etc/fstab. It is trivial to spot errors with /rescue/cat=20 >> and fix with /rescue/sed, without having to worry about a terminal. >> >> In all other cases: >> fsck -p >> /etc/rc.d/mountcritlocal start >> /etc/rc.d/ldconfig start >> >> And one can use any editor one would want. Don't forget to export or=20 >> setenv TERM to cons25 from 'dumb'. >> >=20 > From all the discussion I have walked through on the issue of where to= =20 > place vi, it does appear FreeBSD has a skewed policy on the issue. Ther= e=20 > are plenty of reasons you might need access an editor in single-user=20 > mode - editing fstab is just one. Having to use the workarounds=20 > suggested in place of vi is not so good, and manually moving vi to /bin= =20 > is not simply a matter of 'mv /usr/bin/vi /bin/'. >=20 > One of the things I would dearly like to see in a future release is vi = > being placed under /bin. >=20 There is an alternative means of achieving the same effect which I have b= een occasionally known to advocate on this and other lists: the all-in-one pa= rtition layout. Simply put, when installing the system instead of creating separa= te /, /usr, /var etc. etc. partitions, you create only two partitions: a swap a= rea and (covering all the rest of the disk) one big partition mounted at /. This means that in single user mode, dynamically linked programs like vi(= 1) are available as normal. It's easy to implement and it works well. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enigE816D9F6A064B1C172256B24 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkoNFw0ACgkQ8Mjk52CukIw2VACghUdzjJtcR3Y+BLPtqe4ggYsk gmYAn29/TYMo1ukWVTm6Up77zuwjE/pq =4MQg -----END PGP SIGNATURE----- --------------enigE816D9F6A064B1C172256B24--