Date: Wed, 01 Dec 2004 18:03:05 -0600 From: "Kevin D. Kinsey, DaleCo, S.P." <kdk@daleco.biz> To: Trey Sizemore <trey@fastmail.fm> Cc: freebsd-questions@freebsd.org Subject: Re: How to edit file in single user mode Message-ID: <41AE5BB9.1000902@daleco.biz> In-Reply-To: <41AA663F.2030106@fastmail.fm> References: <41AA5AFC.2090902@fastmail.fm> <20041128201638.N66254@cactus.fi.uba.ar> <41AA663F.2030106@fastmail.fm>
next in thread | previous in thread | raw e-mail | index | archive | help
Trey Sizemore wrote: > Fernando Gleiser wrote: > >> On Sun, 28 Nov 2004, Trey Sizemore wrote: >> >> >> >>> I made a typo in rc.conf and now am able to boot only into single user >>> mode. I thought vi would be available to edit the file, but cannot >>> execute it (vi not found). How can I edit my rc.conf at this point/ >>> >> >> >> After you drop into single user, say the magic words: >> >> # mount -a >> >> that will mount all the filesystems and then vi will be available. >> >> >> Fer >> >> > D'oh....sorry. Dumb question, but thanks for answering anyway! {Sorry to come into this so late...} Not necessarily a dumb question. What if you can't mount /usr ? then you've even more trouble. You can learn to use ed(1), but that's like going back thirty years. Not that we hate anyone who was using computers back then ... There was some discussion on the lists (IIRC) a while back on the idea of building a small editor binary that you like (trying to remember some of the possibilities: zed, ved, led, sted, (but not ted), ee (already in the base system), pico, nano, nah, can't really remember :-< ) and cp'ing it to /bin in preparation for just such an emergency. With root partitions {generally} being a tad larger these days than in the elder times, it might be a feasible idea...I'm pretty sure *someone* out there has tried it. Come to think of it, I may. :-) Kevin Kinsey DaleCo, S.P.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41AE5BB9.1000902>