LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
LinkBack Search this Thread
Old 10-22-2005, 01:57 AM   #1
fraggelfraggel
LQ Newbie
 
Registered: Oct 2005
Posts: 8

Rep: Reputation: 0
Unhappy restore deleted rc.conf file


i'm running a NETBSD 1.6.2 system with i386 hardware, I by misstake made a overwrite of the file /etc/rc.conf so I lost all the information in it. Is there any way to replace the corrupt rc.conf file with a new one. Can I get the system to create a new one or is there a backup file somewhere that I can use???

/Fraggel
 
Old 10-22-2005, 11:15 AM   #2
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Not sure but you could always grab one of the net and put back in it the settings you had before. Or just create one from scratch.....thats just my two pennies though.
 
Old 10-22-2005, 11:58 AM   #3
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: FreeBSD, NetBSD
Posts: 1,446

Rep: Reputation: 46
Here is the file from one of my machines. It should give you what you need. Note, everything under the "add local overrides" line is for my personal system and may or may not apply to your needs. Customize it as you had originally done.

But the stuff above that is probably what you're most concerned about.

Code:
#       $NetBSD: rc.conf,v 1.96 2000/10/14 17:01:29 wiz Exp $
#
# see rc.conf(5) for more information.
#
# Use program=YES to enable program, NO to disable it. program_flags are
# passed to the program on the command line.
#

# Load the defaults in from /etc/defaults/rc.conf (if it's readable).
# These can be overridden below.
#
if [ -r /etc/defaults/rc.conf ]; then
        . /etc/defaults/rc.conf
fi

# If this is not set to YES, the system will drop into single-user mode.
#
rc_configured=YES

# Add local overrides below
#
wscons=YES
inetd=NO
sshd=YES
ifwatchd=YES
dhcpd=YES
dhcpd_flags="-q ex0"
named=YES
named_flags="-g nogroup -u nobody"
ipfilter=YES
ipnat=YES
 
Old 10-22-2005, 06:04 PM   #4
fraggelfraggel
LQ Newbie
 
Registered: Oct 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Almost fixed it

Thanks alot i have sushi that restored the file but still got problems like $wdogctl not set.

But I have lots more settings in my rc.conf then you do. My first time with netbsd and forum

Quote:
Originally posted by frob23
Here is the file from one of my machines. It should give you what you need. Note, everything under the "add local overrides" line is for my personal system and may or may not apply to your needs. Customize it as you had originally done.

But the stuff above that is probably what you're most concerned about.

Code:
#       $NetBSD: rc.conf,v 1.96 2000/10/14 17:01:29 wiz Exp $
#
# see rc.conf(5) for more information.
#
# Use program=YES to enable program, NO to disable it. program_flags are
# passed to the program on the command line.
#

# Load the defaults in from /etc/defaults/rc.conf (if it's readable).
# These can be overridden below.
#
if [ -r /etc/defaults/rc.conf ]; then
        . /etc/defaults/rc.conf
fi

# If this is not set to YES, the system will drop into single-user mode.
#
rc_configured=YES

# Add local overrides below
#
wscons=YES
inetd=NO
sshd=YES
ifwatchd=YES
dhcpd=YES
dhcpd_flags="-q ex0"
named=YES
named_flags="-g nogroup -u nobody"
ipfilter=YES
ipnat=YES
 
Old 10-22-2005, 06:22 PM   #5
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: FreeBSD, NetBSD
Posts: 1,446

Rep: Reputation: 46
Re: Almost fixed it

Quote:
Originally posted by fraggelfraggel
Thanks alot i have sushi that restored the file but still got problems like $wdogctl not set.

But I have lots more settings in my rc.conf then you do. My first time with netbsd and forum
Welcome to netbsd and the forums. Hopefully you find a system that's perfect for your needs.

Hmm, as to that error... try adding
Code:
wdogctl_flags="-u -p 30"
Or whatever is appropriate for your system. See the man page if you have doubts (man wdogctl). It looks like you're getting an error because the flags aren't set.

I am sure you have lots more settings than I do. That file is from my router. It's a box which just deals with the basic network services for my house. So it's kept minimal and only what I absolutely need running is on it. Don't think it's unusual that you have more.

Last edited by frob23; 10-22-2005 at 06:23 PM.
 
Old 10-22-2005, 07:39 PM   #6
fraggelfraggel
LQ Newbie
 
Registered: Oct 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Re: Re: Almost fixed it

I disabled it, dont know what it is for anyway. After some hours of hard work i finally got it up and running again.
Thanks again for all the help once again. Why can't you delete your own posts for do you know?

/fraggelfraggel

Quote:
Originally posted by frob23
Welcome to netbsd and the forums. Hopefully you find a system that's perfect for your needs.

Hmm, as to that error... try adding
Code:
wdogctl_flags="-u -p 30"
Or whatever is appropriate for your system. See the man page if you have doubts (man wdogctl). It looks like you're getting an error because the flags aren't set.

I am sure you have lots more settings than I do. That file is from my router. It's a box which just deals with the basic network services for my house. So it's kept minimal and only what I absolutely need running is on it. Don't think it's unusual that you have more.
 
Old 10-22-2005, 07:52 PM   #7
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: FreeBSD, NetBSD
Posts: 1,446

Rep: Reputation: 46
You can't delete posts because they are left to help others who may come after you. In this example, maybe someone will need a copy of the rc.conf file and can find it here without asking all over again.
 
Old 10-22-2005, 11:53 PM   #8
fraggelfraggel
LQ Newbie
 
Registered: Oct 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Mail lost

More trouble when you think it is all over I noticed that all my mails on the machine have gone missing. Might there be that there is some kind of link that I have forgot to type into rc.conf or program that i need to start that gets my PINE mail program to find where the mails are. I seriusly doubt that they have all vanished from my computer because I deleted rc.conf.

If you have any ideas or solutions to the problem I would be happy.

/fraggelfraggel
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
reinstalling windows deleted my grub master boot file; how do I restore it? sohmc Linux - General 3 01-12-2005 01:27 PM
How to restore a deleted file satimis Linux - Newbie 1 09-12-2003 04:18 AM
how to restore deleted files ? ilyes Linux - General 3 08-01-2003 07:13 AM
restore back deleted file edreddy Linux - General 4 07-19-2002 06:43 AM
How to restore a default smb.conf file glock19 Linux - General 7 12-22-2001 05:19 PM


All times are GMT -5. The time now is 08:24 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration