On 06-Jan-2001 John Beamon wrote:
<em>> Well, it happened. I installed a little firewall with a small drive
<em>> mounted as /var. It's been used a few times, and squid + squidguard's
<em>> already built itself a nest on there. The thing booted up today with a
<em>> HD failure. I cannot spot the drive in CMOS or in Linux, although dmesg
<em>> does mention the following error:
<em>>
<em>> "/dev/hdb a non-IDE drive CHS 1001/16/17" (CHS figures are correct,
<em>> spotted by the OS long after the BIOS failed to detect the drive.)
<em>>
<em>> The box hasn't been around long enough to get backed up. It's only a
<em>> few days old, and fresh off the bench. How does one rebuild a /var
<em>> partition? FWIW, it's a RH 6.2 install on a 486x33, 20MB.
Oh, that's always fun. I remember one time, a few years back, I
accidentally deleted /etc. After that, I made damn sure I aliased
cp/mv/rm to have -i ... although I'm not sure that's helped since I
now seem to habitually add the -f flag to 'em to get around the
prompts. Yep, manually rebuilding a UNIX system that's had a chunk
taken out of it is good and character-building.
Well, lets see...looking at /var...
There are a number of directories you'll need to make, and possibly
regenerate (or at least touch) some files.
For starters, you'll need to create:
/var/log
/var/run
/var/lock
ln -sfv /var/lock /var/locks (some rare unix proggies like this)
ln -sfv /var/log /var/adm (ditto)
/var/shm (if you use Linux 2.4, or a recent snapshot: they've
changed the kernel so shared memory is now it's own
filesystem. /var/shm is the suggested mount point)
<p>/var/tmp (a common, alternate tmp directory)
/var/spool (here's where it gets hairy -- at,cron,procmail,
deliver,sendmail,lpr all twiddle with things in here)
my /var/spool contains the following dirs:
/var/spool/atjobs
/var/spool/atspool
/var/spool/cron
/var/spool/locate (for locatedb, I guess)
/var/spool/lp0
/var/spool/lpd (printer stuff)
/var/spool/mail (important. Where sendmail/procmail
usually sticks your mail)
/var/spool/mqueue (sendmail's outgoing mail queue dir)
/var/spool/news (mine was empty, I guess that's where cnews
or INN might stuff some data. Maybe it was
Leafnode -- I messed with that, once)
/var/spool/postfix (ignore this. Debris left over from when I
experimented w/ Postfix mailer)
/var/spool/tmp (temp directories are always good :)
/var/spool/ttysnoop (erm...telnet snooper. may not need this)
/var/spool/uucp (UUCP stuff. May not strictly need these)
/var/spool/uucppublic
-
In /var/log -- you probably dont need to create any files here,
since your startup files and syslogd/klogd usually autocreate them
(check /etc/syslog.conf to see where it puts things)
Files in here are sometimes (depending on distro):
/var/log/messages
syslog
maillog
cron
faillog (shadow passwd stuff)
lastlog
btmp
wtmp
The directory /var/run is usually the place where daemons stick
files recording their PIDs (process ID numbers). The only other
file that's necessary here is "utmp"
/var/log/wtmp and /var/run/utmp are part of the way Linux/unix
knows who's logged into what terminal and when. these files need
to exist for "who", "wall", "write", "users" and probably talk/ntalk
to work.
-
Some miscellaneous directories you might need to create:
/var/cache
/var/cache/man (you manual program might use this dir)
/var/db (glibc2 keeps some .db files for certain services
-- i.e. group,passwd,services,shadow,protocols.
in order to regenerate these, you'd need the
db-Makefile and run "make -f db-Makefile all".
I just regenerated mine, but they were pretty
stale before, so they might not be 100% necessary)
/var/deliver (might need this if "deliver" is what /bin/mail or
sendmail uses as its delivery agent. I thought most
modern distros went to procmail by now)
/var/lib
/var/lib/misc
/var/lib/zoneinfo (a backup of the timezone pointer?
create a symlink to whatever your timezone is
in /usr/share/zoneinfo. The main TZ pointer is
/etc/localtime, so it should be the same as that one
if it matters at all)
/var/preserve (Elvis, and I think VIM keep backups of files currently
being edited here)
<p>-
That's really all I see. I seem to recall earlier versions of XFree86
put some stuff in /var/X11R6, but I blew that directory away long ago,
and subsequent installations didnt put anything back there.
<p><pant,pant> wow. I gotta take a nap now. :)
--
Mark Orr
[EMAIL PROTECTED]
<p><p>================================================
BRLUG - The Baton Rouge Linux User Group
Visit http://www.brlug.net for more information.
Send email to [EMAIL PROTECTED] to change
your subscription information.
================================================
<!-- body="end" -->
<hr noshade>
<ul>
<li><strong>Next message:</strong> Nathaniel B. Klumb: "Re: [brluglist] Meeting
Location"
<li><strong>Previous message:</strong> Dustin Puryear: "Re: [brluglist]
rebuilding a /var partition"
<li><strong>In reply to:</strong> John Beamon: "[brluglist] rebuilding a /var
partition"
<li><strong>Messages sorted by:</strong>
[ date ]
[ thread ]
[ subject ]
[ author ]
[ attachment ]
</ul>
<hr noshade>
<small>
<em>
This archive was generated by hypermail 2.1.2
: <em>Thu Sep 06 2001 - 11:10:49 CDT</em>
</em>
</small>
</body>
</html>