Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 May 2009 08:17:27 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Manish Jain <invalid.pointer@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to move vi to /bin
Message-ID:  <4A0D1707.10203@infracaninophile.co.uk>
In-Reply-To: <4A0D0FD6.4040107@gmail.com>
References:  <cb0fa7b70905130021t390bb560r4a1dd64ab3b2e79@mail.gmail.com>	<200905142019.56242.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> <4A0D0FD6.4040107@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



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