Re: FreeBSD-like linux distro?

2008-06-11 Thread Jon Hamilton

On Wed, June 11, 2008 04:54, Heikki Suonsivu wrote:
 I need to get something to run on x86 computers which do not contain
 math in hardware, and FreeBSD dropped non-math cpus long time ago. NetBSD
 did the same, so Linux seems to be the only possibility.

 So, the question:


 What is the linux distro which is closest to FreeBSD in terms of
 installation and use.  A linux with basic userland and ports(-like) system,
 and quick and easy install like FreeBSD ?

Heikki,

Gentoo (http://www.gentoo.org) is a pretty easy install and is the most
closely aligned Linux distribution I've seen to the build it from source
mentality.  It's gotten fancier over the years but still has at its core
the notion of building blocks and doesn't push binary package distribution
the way most seem to these days.  Whether it'll install on an FPU-less
system I don't know.  Might be worth a look.

Please do report back with what you ultimately find works; this is a
source of interest for me and I'm sure others.

-- 
Jon Hamilton
[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: syslogd not reading messages from a remote machine

2008-01-12 Thread Jon Hamilton
Jeffrey Goldberg [EMAIL PROTECTED], said on Sat Jan 12, 2008 [03:50:45 PM]:
} On Jan 11, 2008, at 9:51 AM, Andy Greenwood wrote:
} 
} I have recently set up a Fortigate-60 to run as a firewall/vpn on my  
} home network. I have a FreeBSD 7.0-prerelease machine sitting behind  
} it in the DMZ which is running ssh/web/etc. I'm trying to get the FG  
} to log to the BSD box's syslog. I have set up the necessary stuff on  
} the FG, and can send test logs from there to the bsd box. Running  
} tcpdump on the bsd [...]
} 
} So I know that the packets are getting to the machine. I've set up  
} syslogd to accept packets from 10.10.10.1/32 in rc.conf, and  
} confirmed that the FG's IP should be accepted [...]
} 
} 
} I've restarted syslogd after every change I've made, but no dice.  
} Can anyone shed some light on why these messages aren't logging and  
} what I need to do to fix it?

I didn't see the original thread, but I recently went through this myself.
It turns out that syslogd assumes/requires by default that the originating
packets come *from* port 514 as well as arriving *on* port 514.  In my case,
the remote device was sending from a high numbered port.  

To disable that behavior, just put -a 10.10.10.1/32:* in your syslogd_flags
and you should be good to go (if your problem was the same as mine :)

-- 

   Jon Hamilton 
   [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: is there a /bin/sh method to tell the ending of a file

2008-01-07 Thread Jon Hamilton
} On Mon, Jan 07, 2008 at 09:10:58PM -0800, Gary Kline wrote:
} Paul Procacci [EMAIL PROTECTED], said on Mon Jan 07, 2008 [11:34:08 PM]:
}  Hi All,
}  
}  Is there an easy way of determing whether a string//filename ends in
}  *.gz? using /bin/sh?  I spend around 20 minutes cobbling together 
}  scripts to burn ISO files last night.  Then blindly wasted one CD-R file 
that 
}  was gzipped. tar barfs on you,but cdrecord dev=foo.gz writes
}  exactly that.   I'd like to add a line that yells at me, then gunzips and 
does 
}  an MD5; then writes.   (In C, no prob; C lets me fly, but not /bin/sh.
}  But anyway, if any guru can clue me in, thanks. I think my brain is in Maui
}  for a few days.
}  

} Is this what you mean?
} 
} -
} #!/bin/sh
} 
} STRING=mystring.gz
} 
} if [ .gz = `echo \$STRING\ | sed -n 's/.*\(\.gz\)$/\1/p'` ]; then
}  echo test;
} fi
} 
} ---

Works (I assume) but perhaps easier to read and more native might be:

case $STRING in
*\.gz)
  echo Found .gz suffix
  ;;
*)
  echo Not a .gz suffix
  ;;
esac

Sh is a pretty versatile creature; I'm sure there are a thousand more ways
all of which work, and some of which will cause religious arguments for 
decades :)

-- 

   Jon Hamilton 
   [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: Home Automation?

2007-12-05 Thread Jon Hamilton
Jack Barnett [EMAIL PROTECTED], said on Wed Dec 05, 2007 [04:48:55 AM]:
} 
} Anyone know of any Home automation type of devices that work with FreeBSD?
} Basically all I need to do is to toggle a power outlet from within 
} FreeBSD (from off to on and vice-versa)

There's X-10 and its derivatives; it's a powerline communication protocol
which has pretty widely available plug-in modules (outlets/switches with
the receiver built-in are available too).  Most of the computer-side controllers
these days seem to be USB-based; my setup is so old it predates widespread
USB availability so I am not personally familiar with free software to drive
the newer generation of controllers.  There's also xtend which will drive a
plug-in card, but those are pretty antique these days and hard(ish) to find.

www.smarthome.com is one online source of X-10 compatable hardware online.
Hopefully someone else has/will share more current hardware experiences.

-- 

   Jon Hamilton 
   [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: disk drive serial number

2007-11-11 Thread Jon Hamilton
Josh Carroll [EMAIL PROTECTED], said on Sun Nov 11, 2007 [06:38:08 PM]:
}  is there a way to get the serial number from a drive from within the OS?  im
}  trying to audit the drives in my file server, but without pulling the thing
}  from the rack and cracking it open.  they are just standard sata drives, not
}  on any sort of raid controller (ie, i know 3ware cards are capable of 
pulling
}  the drive info).
} 
} Check dmesg (or /var/run/dmesg.boot). The serial number should show, e.g.:
} 
} ad8: 381553MB Seagate ST3400633AS 3.AAH at ata4-master SATA150

That's a model number, not a serial number.  

I'm not sure if there's a simpler way, but smartctl (from the smartmontools 
port/package) will display a disk's serial number.

[602] [EMAIL PROTECTED] tmp$ smartctl -a /dev/ad0 | grep -i serial
Serial Number:9QG386BV

There's probably a better way, but this should at least work.

-- 

   Jon Hamilton 
   [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: Help Failing Disk Problem

2007-11-05 Thread Jon Hamilton
James [EMAIL PROTECTED], said on Mon Nov 05, 2007 [03:16:46 PM]:
} On Mon, 2007-11-05 at 14:04 -0700, Warren Block wrote:
} 
}  On Mon, 5 Nov 2007, James wrote:
}  
}   On Mon, 2007-11-05 at 11:53 -0800, Sean Murphy wrote:
}  
}   I have a FreeBSD 6.2 Release box with a single ide that has user data
}   and the FreeBSD OS on a hard disk that is failing.  I need advice on the
}   best way to clone the entire disk (or at least the data) onto a larger
}   ide disk drive, then pull the failing disk and replace it with the
}   clone.  What is the best way in FreeBSD to do that?
}  
}   The best way is to do it regularly before the hard drive is failing.
}  
}   Given that you haven't done that, there're a few methods. I'm a big fan
}   of rsync,  which is the nectar of the gods, but a lot of folks seem to
}   prefer dd for this kind of thing.
}  
}  rsync is too high-level, and may not do exactly the right thing with 
}  links or sparse files or who knows what. 
} 
} rsync -cav takes cares of symlinks and all that just right. It's a
} beautiful thing.
} 
} Checksumming, too. Ah, bliss.

Reading the man page, I believe that will make copies instead of hard links
for files with more than one link.  By my reading, you'd have to specify -H 
in addition.  As others have pointed out, if you're using ACLs or other 
extended attributes, those may be lost as well.  

This is why I think _in principle_ using a tool which has as its sole purpose
in life the backup and restore, unmolested, of filesystems, is the best 
general approach to this problem.  Other tools may work too, but you have
to put a lot of thought and care into getting 473 of their 1692 command line
options right (made up numbers, obviously) and that's never good when you're
in the heat of the moment and your data is at stake.

} dump has the problem that a lot of tools have, though, including rsync.
} It creates a file list to start from. 
} 
} If the file names on the drive change during the dump, corruption can
} occur. At least on linux. I remember Torvalds ranting about it on a
} mailing list. I imagine FreeBSD suffers the same issue, though, as it's
} a pretty generic problem.

Use dump (or anything else, for that matter) on a snapshot.

Of course, all bets are off since the disk is already failing.  The common
case is that the OP may get most of the files off in tact; probably not all.
Backups are important if you care about your data.

-- 

   Jon Hamilton 
   [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: What's best way to copy a filesystem? [was: Re: slight emergency here...]

2007-10-28 Thread Jon Hamilton
Gary Kline [EMAIL PROTECTED], said on Sun Oct 28, 2007 [03:02:03 PM]:

}  At any rate, how do i as root, single user, cp -rp all of /var to
}  elsewhere (/storage) and rmdir /var, them mkdir /var and copy
}  everything back?? I've forgotten the cpio magic command. 
}  
}   The nutshelll of this posting could be: What's the best tool 
}   to copy a /FILESYSTEM to /storage/FILESYSTEM?

The best tool is the one you use successfully.  If you're really talking about
a whole filesystem, dump and restore may contain the least surprises in 
unusual situations:

$ newfs /dev/whatever
$ mount /dev/whatever /mnt
$ cd /dev/whatever
$ dump 0af - /old_filesystem | restore -rf -

Then delete /mnt/restoresymtable when it's all done.

Of course you can use tar, cpio, cpdup if you have it, or even cp.  At 
different points in time historically some of those have had problems with 
some situations like sparse files, extra hard links, symlinks, etc. 

-- 

   Jon Hamilton 
   [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: Belkin UPS installation confusion

2003-02-27 Thread Jon Hamilton
[EMAIL PROTECTED], said on Thu Feb 27, 2003 [10:42:40 AM]:
} I have a 400MHz IBM Intellistation E-Pro (FreeBSD 4.6) running on a Belkin Home 
} Office UPS (F6H659-SER), with the control cable plugged into the first serial port.  
} When I installed FreeBSD I had it install upsd, thinking that would allow FreeBSD to 
} shut down properly if the power went away.  Silly me.

I've been using nut (ports/sysutils/nut) with my Belkin F6C525-SER for some time
with good success.  I'd recommend giving that a try.

-- 

   Jon Hamilton 
   [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message