Re: can't reboot after messing up my rc.conf file

2005-02-23 Thread Sandy Rutherford
 On Sun, 20 Feb 2005 06:48:33 -0800, 
 Loren M. Lang [EMAIL PROTECTED] said:

  On Thu, Feb 17, 2005 at 12:44:55AM -0800, Sandy Rutherford wrote:
   On Wed, 16 Feb 2005 20:02:02 -0600, 
   Jamie Novak [EMAIL PROTECTED] said:
  
   I may have missed something from the thread before I joined the list,
   but is there any reason you can't just mount the filesystems and use vi
   as you're used to? If you're getting far enough in the boot process to
   get an opportunity to interact with a shell, you should just be able to
   mount -a and vi whatever. (Or, if you want to play it safe (or if the
   system wasn't cleanly shutdown before), fsck and then mount -a)
  
  This should work fine. Although, depending on where he is in the boot
  process, / may be mounted read-only.  Do `mount -uw /' to make it
  read-write.
  
  The lesson here is that when editing any file that is even remotely
  connected to the boot process, _make_a_backup_copy_.  You can then
  simply mv the backup copy back into place should you mess up.

  Actually, Absolute BSD has a handy suggestion about using rcs for all
  important files in /etc/.  Maybe you should try looking into that.

I actually do both.  RCS is very usefull for unwinding changes to get
the system back to a previous state, should you realise that some of
your improvements weren't such a good idea afterall.  However, if
you are concerned that your changes might adversely affect the boot
process, then keeping your recovery plan as simple as possible is
highly recommended.  It doesn't get much simpler than `cp'.

Sandy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: can't reboot after messing up my rc.conf file

2005-02-20 Thread Loren M. Lang
On Thu, Feb 17, 2005 at 12:44:55AM -0800, Sandy Rutherford wrote:
  On Wed, 16 Feb 2005 20:02:02 -0600, 
  Jamie Novak [EMAIL PROTECTED] said:
 
   I may have missed something from the thread before I joined the list,
   but is there any reason you can't just mount the filesystems and use vi
   as you're used to? If you're getting far enough in the boot process to
   get an opportunity to interact with a shell, you should just be able to
   mount -a and vi whatever. (Or, if you want to play it safe (or if the
   system wasn't cleanly shutdown before), fsck and then mount -a)
 
 This should work fine. Although, depending on where he is in the boot
 process, / may be mounted read-only.  Do `mount -uw /' to make it
 read-write.
 
 The lesson here is that when editing any file that is even remotely
 connected to the boot process, _make_a_backup_copy_.  You can then
 simply mv the backup copy back into place should you mess up.

Actually, Absolute BSD has a handy suggestion about using rcs for all
important files in /etc/.  Maybe you should try looking into that.

 
 Sandy
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: can't reboot after messing up my rc.conf file

2005-02-17 Thread Sandy Rutherford
 On Wed, 16 Feb 2005 20:02:02 -0600, 
 Jamie Novak [EMAIL PROTECTED] said:

  I may have missed something from the thread before I joined the list,
  but is there any reason you can't just mount the filesystems and use vi
  as you're used to? If you're getting far enough in the boot process to
  get an opportunity to interact with a shell, you should just be able to
  mount -a and vi whatever. (Or, if you want to play it safe (or if the
  system wasn't cleanly shutdown before), fsck and then mount -a)

This should work fine. Although, depending on where he is in the boot
process, / may be mounted read-only.  Do `mount -uw /' to make it
read-write.

The lesson here is that when editing any file that is even remotely
connected to the boot process, _make_a_backup_copy_.  You can then
simply mv the backup copy back into place should you mess up.

Sandy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


can't reboot after messing up my rc.conf file

2005-02-16 Thread aklist_061666
Hi All:
I was editing my rc.conf file and left off a quote mark, and now when I try 
to reboot I get an error and am prompted to drop into shell to fix it.

The default prompt is /bin/sh, and if I hit return I get a prompt.
How can I edit the file while I'm in that prompt? VI doesn't work...is there 
another text editor I can use to fix the file?

TIA 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: can't reboot after messing up my rc.conf file

2005-02-16 Thread Kyle Mott
mount -a
vi /etc/rc.conf
Running fsck is your prerogative.

-Kyle Mott

aklist_061666 wrote:
Hi All:
I was editing my rc.conf file and left off a quote mark, and now when 
I try to reboot I get an error and am prompted to drop into shell to 
fix it.

The default prompt is /bin/sh, and if I hit return I get a prompt.
How can I edit the file while I'm in that prompt? VI doesn't work...is 
there another text editor I can use to fix the file?

TIA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: can't reboot after messing up my rc.conf file

2005-02-16 Thread Mike Jeays
On Wed, 2005-02-16 at 13:42, aklist_061666 wrote:
 Hi All:
 
 I was editing my rc.conf file and left off a quote mark, and now when I try 
 to reboot I get an error and am prompted to drop into shell to fix it.
 
 The default prompt is /bin/sh, and if I hit return I get a prompt.
 
 How can I edit the file while I'm in that prompt? VI doesn't work...is there 
 another text editor I can use to fix the file?
 
 TIA 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

/bin/ed

Be prepared with a printed manual and a wet towel for your head!

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: can't reboot after messing up my rc.conf file

2005-02-16 Thread Chris Hodgins
Mike Jeays wrote:
On Wed, 2005-02-16 at 13:42, aklist_061666 wrote:
Hi All:
I was editing my rc.conf file and left off a quote mark, and now when I try 
to reboot I get an error and am prompted to drop into shell to fix it.

The default prompt is /bin/sh, and if I hit return I get a prompt.
How can I edit the file while I'm in that prompt? VI doesn't work...is there 
another text editor I can use to fix the file?

TIA 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

/bin/ed
Be prepared with a printed manual and a wet towel for your head!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]
Or you could just simply:
# /bin/mv /etc/rc.conf /etc/rc.conf.bad
# /bin/echo variable=value  /etc/rc.conf
This will give you a nice new rc.conf that you can edit once you are up 
and running again.

HTH
Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: can't reboot after messing up my rc.conf file

2005-02-16 Thread Jamie Novak
I may have missed something from the thread before I joined the list,
but is there any reason you can't just mount the filesystems and use vi
as you're used to? If you're getting far enough in the boot process to
get an opportunity to interact with a shell, you should just be able to
mount -a and vi whatever. (Or, if you want to play it safe (or if the
system wasn't cleanly shutdown before), fsck and then mount -a)

Otherwise, Chris Hodgins' suggestion of mv'ing the old file out of the
way and echoing variables into a new one is probably what I'd do. I hate
ed.

On Wed, 2005-02-16 at 13:42, aklist_061666 wrote:

 Hi All:

 I was editing my rc.conf file and left off a quote mark, and now when
 I try to reboot I get an error and am prompted to drop into shell to
 fix it.

 The default prompt is /bin/sh, and if I hit return I get a prompt.

 How can I edit the file while I'm in that prompt? VI doesn't work...is
 there another text editor I can use to fix the file?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]