Re: Installing Samba : FreeBSD Vs Linux ?

2008-10-17 Thread Jeremy Chadwick
On Fri, Oct 17, 2008 at 05:13:45PM +0100, Charles Mason wrote:
> From what I have seen, both are perfectly capable and since its samba
> that will be doing most of the actual work its probably doesn't matter
> that much. Of course the next question if he goes with Linux, is which
> distro. Perhaps the question should be FreeBSD v Red Hat v Ubuntu v
> SUSE v latest flavour of the month. Since keeping it patched is
> essential, these sorts of admin features do matter.

And did this bug ever get addressed?  If so, when/what commit?

http://www.vnode.ch/fixing_seekdir

The workaround is very, very painful when it comes to directories which
have many files.  That workaround is to disable the name cache entirely
in Samba:

  directory name cache size = 0

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: bsdlabel partiton c error message on new install

2008-10-17 Thread Jeremy Chadwick
On Fri, Oct 17, 2008 at 03:38:08PM +0100, andys wrote:
> Well its a strange one, cos mostly the free space is where it should be, 
> the difference between the current partition c and the whole disk is very 
> small :S. So to remedy this can I just update the size of partion c? Or 
> am I in more trouble than that?

I don't have an answer.  Someone more familiar with the aspects of
bsdlabel and labelling will have to answer your question.

You should consider re-asking your original question on freebsd-fs.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: bsdlabel partiton c error message on new install

2008-10-17 Thread Jeremy Chadwick
On Fri, Oct 17, 2008 at 03:20:54PM +0100, andys wrote:
> HiJeremy, 
>
> yep I understand what its complaining about I just dont understand how 
> that could be wrong after doing a fresh install. The reason I was looking 
> is because we left some space unallocated and I need to create a new 
> slice or however you call it in BSD... 

It sounds to me that someone "left some space" in the wrong part of the
sysinstall process then -- they should have left some space for slices,
when in fact it appears they left some space for actual partitions.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: bsdlabel partiton c error message on new install

2008-10-17 Thread Jeremy Chadwick
On Fri, Oct 17, 2008 at 02:13:45PM +0200, andys wrote:
> Hi, 
>
> on a newly installed FreeBSD 7.0 system on a dell 1950 server I see the  
> following error from bsdlabel. Is there any known issues with this or is 
> the only reasonable explanation that I have managed to mess it up without 
> even knowing? :P And should I manually change the partition c to fix the 
> prob? Is this safe to do? 
>
> bsdlabel -A /dev/da0s1
> # /dev/da0s1:
> type: SCSI
> disk: da0s1
> label:
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 17750
> sectors/unit: 285155328
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0   # milliseconds
> track-to-track seek: 0  # milliseconds
> drivedata: 0 
>
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
> a: 2097152004.2BSD 2048 16384 28552
> b: 20971520 75497472  swap
> c: 2851536870unused0 0 # "raw" part, 
> don't edit
> d: 20971520 209715204.2BSD 2048 16384 28552
> e: 20971520 419430404.2BSD 2048 16384 28552
> f: 12582912 629145604.2BSD 2048 16384 28552
> bsdlabel: partition c doesn't cover the whole unit!
> bsdlabel: An incorrect partition c may cause problems for standard system 
> utilities 

It's complaining that 285153687 (see "c" partition) does not equal
285155328 (see "sectors/unit" up top).

> thanks for any advice, Im not really confident with the FreeBSD disk  
> management as I havent used it much, 

I'm left wondering why you're messing around with bsdlabel on a FreeBSD
install in the first place.  :-)

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: IPFW UID match questions

2008-10-16 Thread Jeremy Chadwick
On Fri, Oct 17, 2008 at 09:10:05AM +0700, Kalpin Erlangga Silaen wrote:
> Dear all,
> 
> I tried to implement IPFW rules like below on my shell server:
> 
> /sbin/ipfw -q add 18600 allow tcp from any to personal_ip in
> /sbin/ipfw -q add 18650 allow tcp from personal_ip to any out uid kalpin
> /sbin/ipfw -q add 18660 allow tcp from personal_ip to any out uid root
> /sbin/ipfw -q add 18670 allow tcp from personal_ip to any out uid nobody
> /sbin/ipfw -q add 18700 deny tcp from personal_ip to any out
> 
> I hope with this rule, only user kalpin could be use the vhost
> personal_ip. Below is brief description
> 
> line 1 will allow all tcp incoming packets into personal_ip
> line 2 will allow tcp outgoing packets from personal_ip to anywhere if
> match uid kalpin
> line 3 same with line 2 if match uid root (to response identd request
> from IRC Network if identd run as root)
> line 4 same with line 3 if match uid nobody (to response identd request
> from IRC Network if identd run as fall into nobody)
> line 5 will deny all tcp outgoing packets
> 
> But, IRC Network still could not get ident response from my server. If I
> removed line 5, then IRC Network get identd response. My identd process is:
> 
> root 63932 0.0 0.1 3136 1028 ?? Ss 1:46AM 0:00.03
> /usr/local/sbin/oidentd -C /usr/local/etc/oidentd.conf
> 
> Is there anything else should be done to fix this problem?

The problem is that you're not allowing incoming connections to
personal_ip on TCP port 113 (ident/auth).  Add this rule:

/sbin/ipfw -q add 18680 allow tcp from personal_ip 113 to any out

You can also replace "113" with "auth" or "ident" if you want (see
/etc/services).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD and Nagios - permissions

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 11:36:51PM +0200, Per olof Ljungmark wrote:
> Mel wrote:
>> On Thursday 16 October 2008 22:07:43 Per olof Ljungmark wrote:
>>> Per olof Ljungmark wrote:
>>>> Daniel Bye wrote:
>>>>> On Thu, Oct 16, 2008 at 12:05:01PM +0100, Daniel Bye wrote:
>>>>>> It is possible to configure sudo to run only exactly the required
>>>>>> command
>>>>>> (including arguments) precisely to guard against this type of abuse -
>>>>>> I use it extensively in my own nagios setup.
>>>>>>
>>>>>> This Cmnd_Alias in sudoers will do the trick:
>>>>>>
>>>>>> Cmnd_Alias NAGIOS_CMNDS = /sbin/camcontrol inquiry da0
>>>>>>
>>>>>> man sudoers for more information about what you can do with sudo.
>>>>> I just realised this example is woefully incomplete - apologies for
>>>>> that.
>>>>>
>>>>> There are a few ways you can set up /usr/local/etc/sudoers (make sure
>>>>> you use visudo to edit it, as it will catch any syntax errors for you,
>>>>> thus helping somewhat to prevent breaking your setup).
>>>>>
>>>>> The simplest case will just be to allow nagios to run the command, as
>>>>> root,
>>>>> without a password:
>>>>>
>>>>> nagios ALL=(root) NOPASSWD: /sbin/camcontrol inquiry da0
>>>>>
>>>>> If, as is quite possible, nagios should be able to run more than just
>>>>> that one command, you can define a Cmnd_Alias, as above. To include more
>>>>> than one command in the alias, simply separate them with a comma. You
>>>>> can use `\' to escape newlines and make your file a little easier to
>>>>> read:
>>>>>
>>>>> Cmnd_Alias NAGIOS_CMNDS = /sbin/camcontrol inquiry da0 \
>>>>>   /sbin/camcontrol inquiry da1
>>>>>
>>>>> and so on. Now, to use that alias, set the user's permissions to
>>>>>
>>>>> nagios ALL=(root) NOPASSWD: NAGIOS_CMNDS
>>  
>>
>>> For the records, even this won't work because nagois needs access to
>>> /dev/xpt0 as well and once there sudo can't help.
>>>
>>> sudo -u nagios /sbin/camcontrol inquiry da0
>>> camcontrol: cam_lookup_pass: couldn't open /dev/xpt0
>>> cam_lookup_pass: Permission denied
>>
>> The idea is to let this be run as root, tho personally, I'd put nagios 
>> in a group that can rw /dev/xpt0, /dev/pass0 and /dev/da0, setup 
>> devfs.rules properly and the let it execute a script that does the 
>> inquiry and the inquiry only.
>>
>> On a related note, it would be a 'nice to have', if the more dangerous  
>> commands of camcontrol had a sysctl knob that only allows them to be 
>> executed only as root.
>
> But... the command "/sbin/camcontrol inquiry da0" IS run as root through  
> the setup in sudoers above, but it is not enough or I'm overseeing  
> something. Anyway, I've already decided to scrap the sudo idea, too  
> kludgy for me.

Scrapping it is fine, but you still aren't understanding how to use
sudo.

The -u flag tells sudo what UID to switch to.  Meaning, your above
command (sudo -u nagios /sbin/camcontrol...) tells the system "run
/sbin/camcontrol as user nagios".  This **does not** tell the system
to run /sbin/camcontrol as user root.

For example, let's say you're logged in as user nagios (or running
commands as user nagios):

[EMAIL PROTECTED] sudo -u nagios whoami
nagios
[EMAIL PROTECTED]

This obviously isn't what you want -- this tells sudo to switch to
UID nagios (you already ARE this user!) and run the "whoami" command.

But this IS what you want:

[EMAIL PROTECTED] sudo whoami
root
[EMAIL PROTECTED]

You'll need to use visudo(8) to configure sudo to 1) permit user
"nagios" to use sudo (and switch to UID root), and 2) to ONLY RUN
/sbin/camcontrol when sudo is run, otherwise someone could do:

[EMAIL PROTECTED] sudo rm -fr /

You get the point now, I'm sure.

> The idea of running nagios with rw access to the devices is not very  
> appealing either as Jeremy pointed out.
>
> I will start from square one with a different approach that I need to  
> dream up tomorrow.

I must again point out that using a C-based wrapper is a much
better idea, especially if this is the only command you need to
run as root.

The wrapper is a 15-20 line C program, if that, and will only run
one command: /sbin/camcontrol inquiry da0.  It can't be used to do
anything else.

If you really want someone to write this for you, I will do it.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Printing to a Lanier LD160c does not work

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 08:36:42PM +, [EMAIL PROTECTED] wrote:
> I am trying to setup a Lanier LD160c (admincolor) that has a network 
> interface.  I am new to FreeBSD and tried to follow the handbook.  I am able 
> to print to a HP 5SI (corp-admin) with no problems.  There are no errors in 
> the lpd-errs and the file is drained from the queue, but the printer does not 
> print anything.  And this is a working printer to Windows. 
> lpr -P admincolor testfile.txt 
> 
> printcap: 
> corp-admin|hp|laserjet|Hewlett Packard LaserJet 5Si:\ 
> :lp=\ 
> :sd=/var/spool/output/corp-admin:rm=corp-admin:\ 
> :lf=/var/log/lpd-errs:\ 
> :if=/usr/local/libexec/crlfilter:sh:tr=\f:mx#0: 
> 
> admincolor|hp|laserjet|LANIER LD160c RPCS:\ 
> :lp=\ 
> :sd=/var/spool/output/admincolor:rm=admincolor:\ 
> :lf=/var/log/lpd-errs: 

If this printer is hooked up on the network (e.g. via Ethernet), I
believe you need to set the lp variable to the hostname or IP address of
the printer, e.g.:

admincolor|hp|laserjet|LANIER LD160c RPCS:\ 
:lp=192.168.1.100\
:sd=/var/spool/output/admincolor:rm=admincolor:\
:lf=/var/log/lpd-errs:

I think this also makes the assumption that the printer knows how to
speak the LPR protocol.  If it listens on a custom port, you can use
[EMAIL PROTECTED] instead.  See the printcap(5) man page, I guess.

P.S. -- I've never done this, it's just something I remember from
old days.  :-)

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: I've just found a new and interesting spam source - legitimate bounce messages

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 05:38:07PM +0100, RW wrote:
> On Thu, 16 Oct 2008 08:54:55 -0700 (PDT)
> Luke Dean <[EMAIL PROTECTED]> wrote:
> 
> > 
> > 
> > On Thu, 16 Oct 2008, Matthew Seaman wrote:
> > 
> > > Until the wonderful day that the entire internet abides by these
> > > rules[*], use
> > > of technologies like SPF and DKIM can discourage but not entirely
> > > prevent the spammers from joe-jobbing you.
> > 
> > I just started getting these bouncebacks en masse this week.
> > My mail provider publishes SPF records.
> 
> SPF increases the probability of spam being rejected at the smtp
> level at MX servers, so my expectation would be that it would exacerbate
> backscatter not improve it. 

Just a side comment for added clarity: this ultimately depends on how
the mail server administrator implemented SPF.  For example, our mail
servers *do not* do SPF lookups at the SMTP level (e.g. in postfix)
because 1) the added complexity is not worth it, and 2) spammers are
now hijacking DNS.

Instead, our servers use SPF in SpamAssassin, subtracting from
the spam probability score if an SPF record is found and matches
appropriately.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: open-vm-tools no more in ports

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 11:49:35AM -0300, [EMAIL PROTECTED] wrote:
> Hi all,
> 
>   This open-vm-tools isn't in 7.0 ports. Anyone know why? 

The ports tree does not have "versions", so I don't know what "7.0
ports" means for certain -- but I think you're saying "When I installed
FreeBSD 7.0 and I chose to install ports in the distributions I wanted,
there was no open-vm-tools".

Let's see if we can find out when it was added:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/emulators/open-vm-tools/Makefile

...says March 28th of this year:

Revision 1.1
Fri Mar 28 13:30:31 2008 UTC (6 months, 2 weeks ago) by mbr

Please update your ports tree using csup.  And if you DID install a
copy of the ports tree during your FreeBSD install, you need to be
aware that you must "adopt" the tree.  The "adoption" process is
described on the CVSup site, but applies to the csup tool as well.

http://www.cvsup.org/faq.html#caniadopt

Also note this applies to "src", if you installed that too.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: I've just found a new and interesting spam source - legitimate bounce messages

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 09:01:02AM -0500, [EMAIL PROTECTED] wrote:
> In the last hour, I've received over 200 legitimate bounce messages from 
> email services as a result of someone having used or worse is using my 
> email address in spam from multiple windows machines and ip addresses.  
> The end result is that I am getting the bounce messages.  I'm sure that 
> others on this list have experienced the problem and maybe have a 
> solution that I don't have.
>
> The messages are allowed through my obspamd/pf and pf smtp bruteforce  
> blocking rules because they are completely legit.
>
> I guess the work around is to filter them on incoming together with our 
> local bounce messaages util the spammers get tired of my address.

The term coined for this type of mail is "backscatter".

There is no easy solution for this.  The backscatter article on
postfix.org, for example, caused our mail servers to start rejecting
mail that was generated from PHP scripts and CGIs on our own systems,
which makes no sense.  The article:

http://www.postfix.org/BACKSCATTER_README.html

If the backscatter is all directed to a single Email address (rather
than a series of addresses, e.g. [EMAIL PROTECTED], and
you have [EMAIL PROTECTED] accepted), then a solution is to reject
mail with an RCPT TO of an account or virtual address that does not
exist on your machine.

This, of course, has a wonderful side effect: spammers now have a way to
detect what Email addresses on your box legitimately accept mail, thus
once they find one which never gets a bounceback, will start pounding
that address to kingdom come.

Let me know if you do find a reliable, decent solution that does not
involve SPF or postfix header_checks or body_checks.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: How to get my Dad's Win2k system to access internet through my FreeBSD 6.2 system

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 09:29:04PM +1000, Da Rock wrote:
> 
> On Thu, 2008-10-16 at 06:54 -0400, Michael Powell wrote:
> > Da Rock wrote:
> > 
> > [snip] 
> > > I'm assuming the problem with double nat'ing is the confusion in packet
> > > traffic. So if the OP is using his ADSL modem to connect to the net,
> > > then it could be safe to assume the public IP would be to the modem
> > > itself, and not his box (barring the possible use of USB), so then the
> > > nat'ing would already be done. Therefore, the best and easiest way would
> > > be to simply bridge his interfaces- correct? Less overheads, etc, plus
> > > simplicity of setup.
> > >
> > 
> > There is another option, a variant of which I use. My el cheapo deluxe DSL
> > modem has really crappy broken firewall and DNS implementations. Wireshark
> > showed Windows Messenger service spam leaking past and as soon as I saw
> > that I assumed it was probably the tip of the iceberg.
> > 
> > You can also bridge the modem (disabling it's NAT as well). In a fully
> > bridged configuration your FreeBSD gateway will have to perform PPPoE
> > handshake and login as well. 
> > 
> 
> Setting up the modem itself this way can be tricky at times, depending
> on the model and the service. One gotcha with this method can be if your
> ISP is using heartbeat, and so you'll have to either script yourself or
> find one that suits.
> 
> > I use a second option called split-bridge, which they have named "IP
> > Passthrough". This allows the DSL modem to be responsible for the PPPoE
> > session. It works by passing the WAN public IP to the Internet facing NIC
> > in my FreeBSD box via DHCP. So, while my interior LAN NIC is static, my
> > outside NIC is ifconfig_xl0="DHCP". It gets assigned whatever IP Verizon
> > sends.
> > 
> 
> Is this also called IP spoofing?

No, this is **NOT** IP spoofing.

What Michael's describing is a feature many DSL modems offer.  There is
no official term for what it is, since DSL modems are supposed to be
bridges (layer 2 devices), but in fact this feature causes the modem to
act like something that sits between layer 2 and layer 3 -- yet is not a
router.  Different modems call it something different.

If you enable this feature, what happens is this:

The modem requires you to access its administrative web page.  You
insert your PPPoE Username and Password (which it saves to
NVRAM/EEPROM), and click Connect.  The DSL modem then continues to do
the PPPoE encapsulation, so that your FreeBSD box, Windows box, or
whatever (that's connected to the DSL modem on the LAN port) does not
have to.

The modem is given an IP address as part of the PPPoE hand-off.  That IP
address is, of course, a public Internet IP.  The modem also enables use
of a DHCP server, so that a machine connect to its LAN port can do a
DHCP request and get an IP address -- but here's the kicker.

The IP address the modem returns to the machine on the LAN is the
public IP address the ISP gave the modem via PPPoE.

"So how does this work?"  All network I/O between the LAN port and
the modem itself is done at layer 2 past that point -- meaning, the
modem acts "almost purely" as a bridge from that point forward: but
it still does the PPPoE encapsulation for you.  So, like I said,
the modem acts like a device that sits between layer 2 and layer 3.

Does this make more sense?

The reason this feature is HIGHLY desired is because not all PPPoE
implementations are compatible with an ISPs implementation.  It is
*always* best to use whatever equipment they give you or guarantee
works with them; using your own, or some other PPPoE daemon/method,
can result in lots of trouble.

I've personally used this method, I might add.  I can give you
reference material on how to set it up and use it, over at
dslreports.com.  Lots of DSL modems these days offer said feature.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Breach of Contract Reported for FREEBSD.ORG

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 07:15:35AM -0400, Michael Powell wrote:
> David G Lawrence wrote:
> 
> >> Dear Customer,
> >> 
> >> It has been brought to our attention that some or all of the information
> >> associated with your domain name FREEBSD.ORG is outdated or incorrect.
> >> These types of complaints are brought to our attention in one of two
> >> ways.
> >> 
> >> The most common type of complaint is received from the Internet
> >> Corporation for Assigned Names and Numbers (ICANN). ICANN is the
> >> non-profit corporation responsible for accrediting domain name
> >> registrars. ICANN requires domain name registration customers to keep
> >> their account information current. ICANN mandates that outdated contact
> >> information can be grounds for domain name cancellation.
> > 
> > Michelle,
> > 
> >The registration information for freebsd.org is correct. The only thing
> > that is out of date is one of the email addresses ([EMAIL PROTECTED]), 
> > which I
> > have tried to change, but have been unable to due to a problem with the
> > Network Solutions website.
> >I don't know who reported that the information was incorrect, but they
> > are mistaken. I will additionally follow up in the other ways mentioned
> > in your message.
> > 
> [snip]
> 
> ICANN requires registrars to verify the domain info once a year. I just went
> through this with GoDaddy. I think the registrars see this as an
> opportunity to market services. Different registrars bungle their marketing
> effort in different ways. GoDaddy sent me instructions on what to do in
> order to correct errors, but had absolutely nothing on how to proceed if
> the information was correct. So I viewed this as something they could take
> advantage of in order to get me to their site for a "hard sell" campaign.

So how do you folks who comply with ICANN's requirement deal with this?
http://blog.forret.com/2004/12/domain-registry-of-america-scam/ -- This
organisation is now known as "Domain Renewal Group", by the way.

I'm quite interested in knowing; it might be tolerable if you've only
one domain, but if you're a hosting provider and have 100?

Let me know.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD and Nagios - permissions

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 09:17:58PM +1100, Edwin Groothuis wrote:
> > The nrpe daemon that handles the script runs as the "nagios" user and
> > the command needed is camcontrol:
> 
> First lines of the check_ciss.sh command:
> 
> #!/bin/sh
> 
> if [ $(whoami) != "root" ]; then
>   sudo $*
> fi
> 
> And allow in sudoerrs.conf the nagios user to run the check_ciss.sh
> command without passwords.
> 
> Works fine here for years :-)

Wow... all I can say.  Wow.  This is a *humongous* security hole.

So what happens when someone finds a security hole in Nagios, allowing
them to modify files or run checks with arguments of their choice?

For a good time:

check_ciss.sh camcontrol format da0 -y

Yeah, uh, that script should be nuked.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Auto Backup Data and Delete for Account Expired

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 03:17:14PM +0700, Kalpin Erlangga Silaen wrote:
> Dear all,
> 
> is there any routines to check if some accounts expire then system would
> like to do backup all data to certain directory and then delete the account.
> 
> Any help would be appreciate.

You sent this mail to the list yesterday.  We saw it.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD and Nagios - permissions

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 09:32:02AM +0200, Per olof Ljungmark wrote:
> Hi,
> 
> I'm implementing a shell script as a Nagios plugin to check the status
> of the ciss(4) driver. However, there is a permission problem that I am
> not sure about the best way to get around in FreeBSD (7-STABLE).
> 
> The nrpe daemon that handles the script runs as the "nagios" user and
> the command needed is camcontrol:
> 
> camcontrol inquiry da0
> 
> The nagios user does not have a shell by default in FreeBSD:
> nagios:*:181:181::0:0:Nagios pseudo-user:/var/spool/nagios:/usr/sbin/nologin
> so the script will obviously fail.

I cease to see what the users' shell has to do with the problem.  A
shell being set to /usr/sbin/nologin *does not* mean they cannot run
shell scripts, it just means one cannot log in as that user.

I think the problem is probably more along the lines of: you can't
run camcontrol as user "nagios", because root access is required to
communicate with CAM (open /dev/xptX).

> I would assume there are several ways to get around this and would
> welcome "best practice" suggestions on how.

Two recommendations:

1) Write wrapper program (this requires C) which calls "camcontrol
inquiry da0".  The wrapper binary should be owned by root:nagios,
and perms should be 4710 (so that individuals in the "nagios" group
can run the binary, but no one else).  This C program is very, very
simple.

2) Use "sudo" and set up a ***VERY*** restrictive command list for user
"nagios", meaning, only allowed to run /sbin/camcontrol.  I DO NOT
recommend this method, as it's possible for someone to use nagios to
run something like "camcontrol reset" or "camcontrol eject" as root,
or even worse, "camcontrol cmd" (could induce a low-level format of
one of your disks),

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Interrupt storm detected on "irq10:"; throttling interrupt source

2008-10-16 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 03:23:33PM +0800, nazir wrote:
> On Thu, Oct 16, 2008 at 12:20 PM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> > On Wed, Oct 15, 2008 at 06:17:56PM -0700, mdh wrote:
> >> --- On Wed, 10/15/08, nazir <[EMAIL PROTECTED]> wrote:
> >> > From: nazir <[EMAIL PROTECTED]>
> >> > Subject: Interrupt storm detected on "irq10:"; throttling interrupt 
> >> > source
> >> > To: freebsd-questions@freebsd.org
> >> > Date: Wednesday, October 15, 2008, 8:44 PM
> >> > Hi,
> >> >
> >> > I'm getting these on my HP-DL165 AMD Quad Qore
> >> >
> >> > interrupt storm detected on "irq10:"; throttling
> >> > interrupt source
> >>
> >> What is on IRQ 10?  You can determine this via the command:
> >> `dmesg |grep irq` then look for the line for IRQ 10 which specifies what 
> >> device is there.  It could be a driver problem, or it could be that the 
> >> hardware there is bunk.
> >> - mdh
> >
> > vmstat -i output would also come in handy here.
> 
> # vmstat -i
> interrupt  total   rate
> irq1: atkbd0  30  0
> irq10: ohci0 ohci+   8265418989
> irq33: mpt049348  5
> irq40: bge075482  9
> cpu0: timer 16431874   1968
> cpu2: timer 16424530   1967
> cpu3: timer 16424557   1967
> cpu1: timer 16424557   1967
> cpu4: timer 16424556   1967
> cpu6: timer 16424540   1967
> cpu7: timer 16424521   1967
> cpu5: timer 16424556   1967
> Total  139793969  16743

Can you provide full output of "dmesg"?  It appears you have an OCHI USB
controller that is going crazy with interrupts, but there may be
more devices attached to IRQ 10 which could be responsible (I think
that's what the "+" indicates).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Interrupt storm detected on "irq10:"; throttling interrupt source

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 06:17:56PM -0700, mdh wrote:
> --- On Wed, 10/15/08, nazir <[EMAIL PROTECTED]> wrote:
> > From: nazir <[EMAIL PROTECTED]>
> > Subject: Interrupt storm detected on "irq10:"; throttling interrupt source
> > To: freebsd-questions@freebsd.org
> > Date: Wednesday, October 15, 2008, 8:44 PM
> > Hi,
> > 
> > I'm getting these on my HP-DL165 AMD Quad Qore
> > 
> > interrupt storm detected on "irq10:"; throttling
> > interrupt source
> 
> What is on IRQ 10?  You can determine this via the command:
> `dmesg |grep irq` then look for the line for IRQ 10 which specifies what 
> device is there.  It could be a driver problem, or it could be that the 
> hardware there is bunk.  
> - mdh

vmstat -i output would also come in handy here.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: How to get my Dad's Win2k system to access internet through my FreeBSD 6.2 system

2008-10-15 Thread Jeremy Chadwick
On Thu, Oct 16, 2008 at 10:15:49AM +1000, Da Rock wrote:
> 
> On Wed, 2008-10-15 at 04:10 -0700, Jeremy Chadwick wrote:
> > On Wed, Oct 15, 2008 at 08:40:48PM +1000, Da Rock wrote:
> > > 
> > > On Tue, 2008-10-14 at 06:46 -0400, Michael Powell wrote:
> > > > Jeremy Chadwick wrote:
> > > > 
> > > > > On Tue, Oct 14, 2008 at 04:55:11AM -0400, Michael Powell wrote:
> > > > [snip] 
> > > > >> Next, you will want to configure your FreeBSD machine as a NAT 
> > > > >> gateway.
> > > > >> In your /etc/rc.conf you will want something like 
> > > > >> gateway_enable="YES"
> > > > >> and some form of firewall initialization[1]. The gateway_enable is 
> > > > >> what
> > > > >> allows the forwarding of packets between your rl0 and your rl1, but 
> > > > >> the
> > > > >> activation of NAT functionality is usually a function contained 
> > > > >> within a
> > > > >> firewall. So conceptually, the firewall will be "in between" rl0 and 
> > > > >> rl1.
> > > > >> 
> > > > >> There are three different firewalls you can choose from. Configuring 
> > > > >> the
> > > > >> firewall is usually where the inexperienced get stuck. This subject
> > > > >> material is beyond the scope of this missive, and you would do well 
> > > > >> to
> > > > >> start reading in the Handbook. But essentially, when you configure 
> > > > >> NAT in
> > > > >> the firewall your rl0 (connected to the ISP) will be assigned a 
> > > > >> "Public"
> > > > >> IP address and the NAT function will translate between "Public" and
> > > > >> "Private".
> > > > 
> > > > With respect to "NAT", the caveat here is the assumption that your 
> > > > DSL/Cable
> > > > modem is *not* already performing NAT. The situation you do not want to 
> > > > get
> > > > into is having *two* NATs. The content herein is assuming that the 
> > > > external
> > > > (rl0) interface is getting assigned a "Public" IP from the ISP. 
> > > >  
> > > 
> > > If this is the case wouldn't the OP set router_enable=YES instead of
> > > gateway?
> > 
> > No.  router_enable causes routed(8) to run, which allows for
> > announcements and withdraws of network routes via RIPv1/v2.  This is
> > something completely different than forwarding packets.
> > 
> > What the OP wants is to route packets from his private LAN (e.g.
> > 192.168.0.0/16) on to the Internet using NAT.  That means he has to have
> > a NAT gateway of some kind that forwards and translates packets.  That
> > means he needs gateway_enable="yes", which allows IPv4 forwarding
> > to happen "through" the FreeBSD box.  In layman's terms, it allows
> > the FreeBSD box to be used a "Gateway" for other computers which
> > are connected to it directly.
> > 
> 
> Ok, then. So it would be gateway_enable, but no nat_enable? (To avoid
> double nat'ing)

Do you mean firewall_nat_enable, natd_enable, or ipnat_enable?  :-)
See /etc/defaults/rc.conf.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: RAID 5 - serious problem

2008-10-15 Thread Jeremy Chadwick
u wrote!  For some reason I thought
you were advocating *not* performing full level-0 backups.  :-)

> > NCQ will not necessarily improve write performance.
> 
> I doubt it will help if you have the disk's write cache turned on.
> I'm pretty sure it will help with write cache turned off.

One thing I haven't tested or experimented with is disabling write
caching on a drive that has NCQ.  Since FreeBSD lacks NCQ right now, we
could test this on Linux to see what the I/O difference is (I'm talking
purely from a dd or bonnie++ perspective).

I can do said testing if need be (on Linux, with disks that do NCQ).

> > I believe Andrey Elsukov is working on getting NCQ support working when
> > AHCI is in use (assuming I remember correctly).
> 
> I look forward to having NCQ available.  Write performance without it
> is really pathetic.

Hearing you on FM!

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: [Fwd: Suhosin Segmentation Fault]

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 10:01:13PM +0200, Alain Wolf wrote:
> On 15.10.2008 20:55, Jeremy Chadwick wrote:
> > On Wed, Oct 15, 2008 at 07:25:08PM +0200, Alain Wolf wrote:
> >> Not much return on freebsd-isp.
> >> I try again here on freebsd-questions.
> >>
> >>  Original-Nachricht 
> >> Betreff: Suhosin Segmentation Fault
> >> Datum: Mon, 13 Oct 2008 09:49:09 +0200
> >> Von: Alain Wolf <[EMAIL PROTECTED]>
> >> An: [EMAIL PROTECTED]
> >> Newsgruppen: gmane.os.freebsd.isp
> >>
> >> After upgrading FreeBSD from 6.3-p3 to 6.3-p5 on our server, all
> >> websites just display a blank page and every HTTP request created a line
> >> as follows in the logs:
> >>
> >> child pid 80326 exit signal Segmentation fault (11)
> >>
> >> This same problem happened on another server a few months ago after the
> >> upgrade from 6.3-p3 to 6.3-p4, but after a rebuild of all FreeBSD ports
> >> all went back to normal. However several rebuilds of all ports did not
> >> solve the problem on this one.
> >>
> >> To narrow down the problem: After disabling the PHP module in Apache the
> >> problem disappears.
> >>
> >> Re-enabling PHP, but disabling the Suhosin extension also works fine.
> >>
> >> The trick found in this  forum, to load the Suhosin extension before all
> >> other PHP extensions in /usr/local/etc/php/extensions.ini does not help.
> >> In fact not loading any extension at all except Suhosin creates the
> >> segfault errors.
> > 
> > Suhosin is not an extension you load in extensions.ini; it's a patch
> > applied to the core of PHP.
> 
> Suhosin is *both*. A patch for php and a extension module for PHP.
> 
> >From http://www.hardened-php.net/suhosin/index.html:
> Suhosin comes in two independent parts, that can be used separately or
> in combination. The first part is a small patch against the PHP core,
> that implements a few low-level protections against bufferoverflows or
> format string vulnerabilities and the second part is a powerful PHP
> extension that implements all the other protections.

Except their own website contradicts themselves in many other places,
including on their forums *and* in other documentation.  I can refer you
to some documentation of theirs that states "Suhosin extension sometimes
causes other extensions to crash because they try to access internal
variables wrongly".

You are supposed to use one or the other: the patch, or the extension.
You've probably read my other mail by now, so you know that I advocate
use of the patch.

> The suhosin patch works fine on our servers. But the extension does not.

So disable it and use only the patch -- problem solved.

I'm CC'ing ale@ on this thread, because he's probably not on -questions,
and this has now become a -ports thing.  He can comment on what to do
about these crashes.

I'm of the opinion that security/php-suhosin should be nuked, especially
if the patch works fine for everyone but the extension causes problems.

> > The extension ordering problem, however, has been thoroughly discussed
> > on -ports in the past.  It happens to some and not others.  There is no
> > guaranteed way to determine what works and what doesn't.  You have to
> > literally enable line-by-line until you figure out which one is causing
> > the problem.
> 
> I tried enabling and disabling extensions. All of them work, as long as
> suhosin.so is not loaded. Regardless of the order.
> 
> If I disable all other extensions and load only suhosin.so in
> /usr/local/etc/php/extensions.ini the apache processes are still crashing.
> 
> > 
> > You can also try building lang/php5 with DEBUG enabled and then when PHP
> > segfaults, run gdb on the coredump and see if you can get a coherent
> > backtrace (sometimes difficult with Apache in the way) to see what sort
> > of functions are causing the crash; often each extension has its own
> > function names, so that might give you some clues.
> Hard for me, as this disrupts customer services. We are running without
> the extensions for now.
> 
> > 
> >> PHP (cli) seems to run fine at all times when called from the command-line.
> > 
> > Now that's very interesting, given as the CLI version also loads all the
> > extensions listed in extensions.ini.
> > 
> > Can you post your /usr/local/etc/php/extensions.ini?  You didn't list
> > off what extensions you have installed.
> > 
> 
> cat /usr/local/etc/php/extensions.ini
> extension=gd.so
> extension=ctype.so
> extension=pcre.

Re: Under heavy load internet gets killed, only a reboot can bring it back up

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 10:02:46PM +0200, Aniruddha wrote:
> On Wed, 2008-10-15 at 11:49 -0700, Jeremy Chadwick wrote:
> > How exactly did you download the URLs I gave you?
> > 
> > Can you show me what's on line 241 of if_msk.c?
> > 
> > A 'grep ^#include if_msk.c' for me returns lines which only include
> > filenames surrounded with "" or <>.
>  
>  I downloaded the files this way:
> 
> wget 
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/msk/if_msk.c?rev=1.34;content-type=text%2Fplain

This is wrong.  Your shell has interpreted variables in the URL, and you
ended up downloading the wrong URL, which caused HTML and other things
to appear in the file.  Is this your first time using UNIX?  This is a
little surprising.

You need to do (note the apostrophes, DO NOT use double-quotes):

$ wget -O if_msk.c 
'http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/msk/if_msk.c?rev=1.34;content-type=text%2Fplain'

And be sure to do the same for the include file (change the -O argument,
obviously).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: [Fwd: Suhosin Segmentation Fault]

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 02:47:00PM -0500, Matt wrote:
> On Wed, Oct 15, 2008 at 2:35 PM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> > On Wed, Oct 15, 2008 at 08:26:09PM +0100, Matthew Seaman wrote:
> >> Jeremy Chadwick wrote:
> >>
> >>> Suhosin is not an extension you load in extensions.ini; it's a patch
> >>> applied to the core of PHP.
> >>
> >> % grep suhosin /usr/local/etc/php/extensions.ini
> >> extension=suhosin.so
> >>
> >> It's both a set of patches to the PHP core, and a loadable module.
> >>
> >>   Cheers,
> >>
> >>   Matthew
> >
> > Are you sure?
> 
> Yes - the suhosin extension is located in the ports tree at:
> /usr/ports/security/php-suhosin
> 
> Install instructions are at:
> http://www.hardened-php.net/suhosin/how_to_install_or_upgrade.html#installing_the_extension
> 
> It's been a while since I've looked at the suhosin options and I can't
> remember what the differences are between the extension and the
> core-php patch.

Deep within their forums, I found an answer in a thread.  The thread
pointed me to this:

http://www.hardened-php.net/suhosin/a_feature_list.html

"Engine Protection" is not available in security/php-suhosin.  Seems to
me that the benefits of using the patch version easily outweigh that of
the extension version, solely for protection against formatted string
vulnerabilities.

I also found this amusing tidbit, which is a sticky post on their forum:

http://forum.hardened-php.net/viewtopic.php?id=122

That sticky also states that pspell.so will cause Suhosin to crash,
advocating that pspell.so must come last in extension.so, but then also
advocates simply not using pspell at all.  I'm sure that does nothing
but confuse users.

Seems the OP has also posted there:

http://forum.hardened-php.net/viewtopic.php?id=501

It would be interesting to know if the segfaults people experience are
specific to the extension version of Suhosin.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: [Fwd: Suhosin Segmentation Fault]

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 08:26:09PM +0100, Matthew Seaman wrote:
> Jeremy Chadwick wrote:
>
>> Suhosin is not an extension you load in extensions.ini; it's a patch
>> applied to the core of PHP.
>
> % grep suhosin /usr/local/etc/php/extensions.ini
> extension=suhosin.so
>
> It's both a set of patches to the PHP core, and a loadable module.
>
>   Cheers,
>
>   Matthew

Are you sure?

# find /usr/local/lib/php -name "*suhosin*" -ls
#

# grep -i suhosin /var/db/ports/php5/options
WITH_SUHOSIN=true

# grep -i suhosin /usr/local/etc/php/extensions.ini
#

# pkg_version -v | grep php5
php5-5.2.6_2=   up-to-date with port
php5-extensions-1.1 =   up-to-date with port
php5-mysql-5.2.6_2  =   up-to-date with port
php5-pcre-5.2.6_2   =   up-to-date with port
php5-simplexml-5.2.6_2  =   up-to-date with port

# grep -i php5 /usr/local/etc/apache22/httpd.conf
LoadModule php5_modulelibexec/apache22/libphp5.so

# php -i | grep -i suhosin
This server is protected with the Suhosin Patch 0.9.6.2
suhosin.log.phpscript => 0 => 0
suhosin.log.phpscript.is_safe => Off => Off
suhosin.log.phpscript.name => no value => no value
suhosin.log.sapi => no value => no value
suhosin.log.script => no value => no value
suhosin.log.script.name => no value => no value
suhosin.log.syslog => no value => no value
suhosin.log.syslog.facility => no value => no value
suhosin.log.syslog.priority => no value => no value
suhosin.log.use-x-forwarded-for => Off => Off

:-)

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: [Fwd: Suhosin Segmentation Fault]

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 07:25:08PM +0200, Alain Wolf wrote:
> Not much return on freebsd-isp.
> I try again here on freebsd-questions.
> 
>  Original-Nachricht 
> Betreff: Suhosin Segmentation Fault
> Datum: Mon, 13 Oct 2008 09:49:09 +0200
> Von: Alain Wolf <[EMAIL PROTECTED]>
> An: [EMAIL PROTECTED]
> Newsgruppen: gmane.os.freebsd.isp
> 
> After upgrading FreeBSD from 6.3-p3 to 6.3-p5 on our server, all
> websites just display a blank page and every HTTP request created a line
> as follows in the logs:
> 
> child pid 80326 exit signal Segmentation fault (11)
> 
> This same problem happened on another server a few months ago after the
> upgrade from 6.3-p3 to 6.3-p4, but after a rebuild of all FreeBSD ports
> all went back to normal. However several rebuilds of all ports did not
> solve the problem on this one.
> 
> To narrow down the problem: After disabling the PHP module in Apache the
> problem disappears.
> 
> Re-enabling PHP, but disabling the Suhosin extension also works fine.
> 
> The trick found in this  forum, to load the Suhosin extension before all
> other PHP extensions in /usr/local/etc/php/extensions.ini does not help.
> In fact not loading any extension at all except Suhosin creates the
> segfault errors.

Suhosin is not an extension you load in extensions.ini; it's a patch
applied to the core of PHP.

The extension ordering problem, however, has been thoroughly discussed
on -ports in the past.  It happens to some and not others.  There is no
guaranteed way to determine what works and what doesn't.  You have to
literally enable line-by-line until you figure out which one is causing
the problem.

You can also try building lang/php5 with DEBUG enabled and then when PHP
segfaults, run gdb on the coredump and see if you can get a coherent
backtrace (sometimes difficult with Apache in the way) to see what sort
of functions are causing the crash; often each extension has its own
function names, so that might give you some clues.

> PHP (cli) seems to run fine at all times when called from the command-line.

Now that's very interesting, given as the CLI version also loads all the
extensions listed in extensions.ini.

Can you post your /usr/local/etc/php/extensions.ini?  You didn't list
off what extensions you have installed.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Under heavy load internet gets killed, only a reboot can bring it back up

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 07:26:36PM +0200, Aniruddha wrote:
> On Wed, 2008-10-15 at 07:43 -0700, Jeremy Chadwick wrote:
> > Now you need to rebuild the kernel and install the kernel.  In this
> > scenario, when building the kernel DO NOT use any "-j" flags, as if the
> > driver doesn't build, you'll be scrolling back through pages of data to
> > try and find out why.
> > 
> > If the build doesn't occur successfully, paste the errors you get
> > here and one of us can try to figure out why.
> > 
> > Otherwise, installkernel and reboot.  You should not need to build world
> > for this.
> 
> Thanks for the extensive description. Unfortunately I got the following
> error:
>
> > param inline-unit-growth=100 --param large-function-growth=1000  
> > -mno-align-long
> > -strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse 
> > -mno-sse2 -m
> > no-sse3 -ffreestanding
> > /usr/src/sys/dev/msk/if_msk.c:241:10: error: #include expects "FILENAME" or 
> > 

How exactly did you download the URLs I gave you?

Can you show me what's on line 241 of if_msk.c?

A 'grep ^#include if_msk.c' for me returns lines which only include
filenames surrounded with "" or <>.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: RAID 5 - serious problem

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 10:14:42AM +0100, Dieter wrote:
> > FreeBSD 7.0-Release
> > Intel D975XBX2 motherboard (Intel Matrix Storage Technology)
> > 3 WD Raptor 74 GB in a RAID 5 array
> > 1 WD Raptor 150 GB as a standalone disk
> > / and /var mounted on the standalone,, /usr on the RAID 5
> > I believe what happened was that one of the disks didn't respond for such a
> > long time, that is was marked "bad". And afterwards the same thing happened
> > for the other disks. When I try to boot the system, all three disks are
> > marked "Offline".
> 
> > I am very desperate not to lose my data,
> 
> In that case, step one is to use dd(1) to make a bit-for-bit copy of the
> three drives to some trusted media.  Since they are marked bad/offline,
> you might need to move them to a controller that doesn't know anything
> about RAID.  (Note that there is risk here, and in almost anything you do
> at this point.)  Once you have this bit-for-bit backup, you can run any
> experiment you like to attempt to recover your data.  If the experiment
> goes bad, you can dd the exact original contents back using dd, then
> try a different experiment.  While you're at it, make a normal backup
> using dump(8) or whatever you normally use, of / and /var.  Once you have
> *everything* backed up, you can do risky experiments like booting linux.
> 
> My personal approach to avoiding data loss is (a) avoid buggy things like
> inthell and linux.

Interesting, being as we have another thread going as of late that seems
to link transparent data loss with AMD AM2-based systems with certain
models of Adaptec and possibly LSI Logic controller cards.  I like Intel
as much as I like AMD -- but it's important to remember that it's
becoming more and more difficult to provide "flawless" stability on
things as the complexities increase.

And I have no idea what your beef is with Linux.  If the OP is
successfully able to bring his array on-line using Linux, I would think
that says something about the state of things in FreeBSD, would you
agree?  Both OSes have their pros and cons.

> (b) FFS with softdeps and the disk write cache turned off,

This has been fully discussed by developers, particularly Matt Dillon.
I can point you to a thread discussing why doing this is not only silly,
but a bad idea.  And if you'd like, I can show you just how bad the
performance is on disks with WC disabled using UFS2 + softupdates.  When
I say bad, I'm serious -- we're talking horrid.  And yes, I have tried
it -- see PR 127717 for evidence that I *have* tried it.  :-)

There *may* be advantages to disabling a disk's write cache when using a
hardware RAID controller that offers its own on-board cache (DIMMs,
etc.), but that cache should be battery-backed for safety reasons.

> (c) full backups.

I'm curious what your logic is here too -- this one is debatable, so I'd
like to hear your view.

> I don't have enough ports to run RAID.  :-(  The downside is that
> FreeBSD doesn't have NCQ support yet (when? when? when?) so writes are
> slow.  :-(

NCQ will not necessarily improve write performance.  There have been
numerous studies done proving this fact, and I can point you to those as
well.  TCQ, on the other hand, does offer performance benefits when
there are a large number of simultaneous transactions occurring (think:
it's more like SCSI's command queueing).

I believe Andrey Elsukov is working on getting NCQ support working when
AHCI is in use (assuming I remember correctly).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Under heavy load internet gets killed, only a reboot can bring it back up

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 04:24:21PM +0200, Aniruddha wrote:
> On Wed, 2008-10-15 at 21:09 +0900, PYUN Yong-Hyeon wrote:
> > This controller is known to buggy one. See below.
> > 
> > [...]
> > 
> >  > > Trying to mount root from ufs:/dev/ad16s3a
> >  > > WARNING: / was not properly dismounted
> >  > > GEOM_LABEL: Label ext2fs/home removed.
> >  > > GEOM_LABEL: Label ext2fs/data removed.
> >  > > mskc0: Uncorrectable PCI Express error
> >  > > mskc0: Uncorrectable PCI Express error
> >  > 
> >  > Those errors at the end of your dmesg don't look good; could be the sign
> >  > of a NIC or motherboard that's going bad, or possibly a very strange
> >  > driver problem.
> > 
> > I guess the message above could be safely ignored.
> > 
> >  > 
> >  > Adding Yong-Hyeon PYUN to this thread, since he helps maintain the
> >  > msk(4) driver.  Yong-Hyeon, do you know of any conditions where heavy
> >  > network I/O could cause msk(4) to lock up or stop transmitting traffic,
> >  > or possibly hard-lock on ifconfig down/up?
> >  > 
> > 
> > I think workaround for the controller bug was committed to HEAD(SVN
> > r183346). To original poster, would you try latest if_msk.c from
> > HEAD?(Just copy if_msk.c/if_mskreg.h from HEAD to your box.)
> > 
> 
> You got to help me a little bit here. How do I achieve this? Btw I am
> running FreeBSD 7.1 BETA. Doesn't that mean the fix is already applied?

FreeBSD 7.1-BETA == RELENG_7 in CVS tag terms.
FreeBSD 8.0 == CURRENT == HEAD in CVS tag terms.

You need to download the data at the below links and save the output
in files shown on the left:

   if_msk.c -- 
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/msk/if_msk.c?rev=1.34;content-type=text%2Fplain
if_mskreg.h -- 
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/msk/if_mskreg.h?rev=1.13;content-type=text%2Fplain

These are the msk(4) Ethernet driver in CURRENT.

*DO NOT* visit those web pages in a browser then copy/paste the output
into a file.  Use a tool like fetch(1) or wget(1) to do the work for you.
It's not hard.

Once you have those two files, you will need to replace your existing
driver code with the new files.  First make backups:

$ cd /usr/src/sys/dev/msk
$ cp -p if_msk.c if_msk.c.orig
$ cp -p if_mskreg.h if_mskreg.h.orig

Now replace the old code with the new:

$ cd /wherever/you/downloaded/the/files
$ mv if_msk.c /usr/src/sys/dev/msk
$ mv if_mskreg.h /usr/src/sys/dev/msk

Now you need to rebuild the kernel and install the kernel.  In this
scenario, when building the kernel DO NOT use any "-j" flags, as if the
driver doesn't build, you'll be scrolling back through pages of data to
try and find out why.

If the build doesn't occur successfully, paste the errors you get
here and one of us can try to figure out why.

Otherwise, installkernel and reboot.  You should not need to build world
for this.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: RAID 5 - serious problem

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 03:51:19PM +0200, Jon Theil Nielsen wrote:
> 2008/10/15 Jeremy Chadwick <[EMAIL PROTECTED]>
> 
> > On Wed, Oct 15, 2008 at 02:32:25PM +0200, Jon Theil Nielsen wrote:
> > > Dear list,
> > >
> > > Something happened that I don't think should be possible. I "lost" all
> > three
> > > disks in my RAID 5 array simultaneously after approx. two years without
> > any
> > > problem. And I fear I will never see my data again. But I really hope
> > some
> > > of you clever persons can give me some hints. My system is:
> > > FreeBSD 7.0-Release
> > > Intel D975XBX2 motherboard (Intel Matrix Storage Technology)
> >
> > Are you using the Matrix Storage Technology?  If so, immediately stop.
> > FreeBSD's support for this is very, very bad, and will nearly guarantee
> > data loss.  There are many of us who have tried it, and it's known to
> > be buggy on FreeBSD.
> >
> > http://wiki.freebsd.org/JeremyChadwick/ATA_issues_and_troubleshooting
> >
> > I recommend you stop using this feature and start using ZFS or gvinum
> > for what you need.
> >
> > > 3 WD Raptor 74 GB in a RAID 5 array
> > > 1 WD Raptor 150 GB as a standalone disk
> > > / and /var mounted on the standalone,, /usr on the RAID 5
> > > I believe what happened was that one of the disks didn't respond for such
> > a
> > > long time, that is was marked "bad". And afterwards the same thing
> > happened
> > > for the other disks. When I try to boot the system, all three disks are
> > > marked "Offline".
> > > The BIOS utility for the host controller has no option to force the disks
> > > back online.
> > > I have another machine with a S5000XVN board and Intel Embedded Server
> > RAID
> > > Technology II. The BIOS configuration utility on this board has the
> > option
> > > to force offline drives back online.
> >
> > Any "embedded" RAID is usually BIOS RAID managed by either a "software
> > RAID IC" (e.g. an IC on the motherboard that handles LBA/CHS addressing
> > for creating a pseudo-array, but the OS still does all of the management
> > and does not off-load anything).
> >
> > > I am very desperate not to lose my data, so I don't know if I dare moving
> > > the drives to the other machine and try to make them online again. Do you
> > > think I should try?
> >
> > No, but you might not have any choice.  It honestly sounds like the
> > metadata on your disks is in a bad state.
> >
> > I would recommend you try booting Linux, since their support for
> > MatrixRAID is significantly better/more advanced.  Ideally, you should
> > be able to bring the RAID members back online using their tools, then
> > reboot into FreeBSD and cross your fingers that your data becomes
> > accessible.  Once accessible, offload it somewhere immediately, and
> > follow my above recommendations.
> >
> > > In general, are there any procedures I can try to recover my RAID array?
> > Or
> > > is the offline status definitive ? and all data definitely lost? I guess
> > > some specialized companies have the expertise to recover lost data from a
> > > broken RAID array, but I don't know. And I don't know the price of such a
> > > service.
> > > I would really, really appreciate any kind of help.
> > > I have backups of most user data, but not of the system configuration
> > (and
> > > maybe even not the databases).  This is of course pretty stupid. In the
> > > future, I will not rely on RAID 5 as a foolproof solution?
> >
> > RAID 5 is a fine solution, but you have learned a very valuable lesson,
> > one which I will enclose in asterisks to make it crystal clear: ***RAID
> > DOES NOT REPLACE BACKUPS***.  Repeat this mantra over and over until you
> > accept it.  :-)
> >
> > --
> > | Jeremy Chadwickjdc at parodius.com |
> > | Parodius Networking   http://www.parodius.com/ |
> > | UNIX Systems Administrator  Mountain View, CA, USA |
> > | Making life hard for others since 1977.  PGP: 4BD6C0CB |
> >
> > Hi Jeremy,
> 
> Thanks for your advice. As I understand you, the best bet is to boot from
> Linux and try to repair.

> And that trying with my other controller might be the second best.

You risk corrupting or losing the metadata using another controller.
The two controllers are *not* identical; jus

Re: RAID 5 - serious problem

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 02:32:25PM +0200, Jon Theil Nielsen wrote:
> Dear list,
> 
> Something happened that I don't think should be possible. I "lost" all three
> disks in my RAID 5 array simultaneously after approx. two years without any
> problem. And I fear I will never see my data again. But I really hope some
> of you clever persons can give me some hints. My system is:
> FreeBSD 7.0-Release
> Intel D975XBX2 motherboard (Intel Matrix Storage Technology)

Are you using the Matrix Storage Technology?  If so, immediately stop.
FreeBSD's support for this is very, very bad, and will nearly guarantee
data loss.  There are many of us who have tried it, and it's known to
be buggy on FreeBSD.

http://wiki.freebsd.org/JeremyChadwick/ATA_issues_and_troubleshooting

I recommend you stop using this feature and start using ZFS or gvinum
for what you need.

> 3 WD Raptor 74 GB in a RAID 5 array
> 1 WD Raptor 150 GB as a standalone disk
> / and /var mounted on the standalone,, /usr on the RAID 5
> I believe what happened was that one of the disks didn't respond for such a
> long time, that is was marked "bad". And afterwards the same thing happened
> for the other disks. When I try to boot the system, all three disks are
> marked "Offline".
> The BIOS utility for the host controller has no option to force the disks
> back online.
> I have another machine with a S5000XVN board and Intel Embedded Server RAID
> Technology II. The BIOS configuration utility on this board has the option
> to force offline drives back online.

Any "embedded" RAID is usually BIOS RAID managed by either a "software
RAID IC" (e.g. an IC on the motherboard that handles LBA/CHS addressing
for creating a pseudo-array, but the OS still does all of the management
and does not off-load anything).

> I am very desperate not to lose my data, so I don't know if I dare moving
> the drives to the other machine and try to make them online again. Do you
> think I should try?

No, but you might not have any choice.  It honestly sounds like the
metadata on your disks is in a bad state.

I would recommend you try booting Linux, since their support for
MatrixRAID is significantly better/more advanced.  Ideally, you should
be able to bring the RAID members back online using their tools, then
reboot into FreeBSD and cross your fingers that your data becomes
accessible.  Once accessible, offload it somewhere immediately, and
follow my above recommendations.

> In general, are there any procedures I can try to recover my RAID array? Or
> is the offline status definitive ? and all data definitely lost? I guess
> some specialized companies have the expertise to recover lost data from a
> broken RAID array, but I don't know. And I don't know the price of such a
> service.
> I would really, really appreciate any kind of help.
> I have backups of most user data, but not of the system configuration (and
> maybe even not the databases).  This is of course pretty stupid. In the
> future, I will not rely on RAID 5 as a foolproof solution?

RAID 5 is a fine solution, but you have learned a very valuable lesson,
one which I will enclose in asterisks to make it crystal clear: ***RAID
DOES NOT REPLACE BACKUPS***.  Repeat this mantra over and over until you
accept it.  :-)

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Under heavy load internet gets killed, only a reboot can bring it back up

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 09:09:11PM +0900, PYUN Yong-Hyeon wrote:
> On Wed, Oct 15, 2008 at 04:31:01AM -0700, Jeremy Chadwick wrote:
>  > On Wed, Oct 15, 2008 at 01:17:58PM +0200, Aniruddha wrote:
>  > > On Wed, 2008-10-15 at 00:26 -0700, Jeremy Chadwick wrote:
>  > > > On Wed, Oct 15, 2008 at 09:13:00AM +0200, Aniruddha wrote:
>  > > > > Each time  my internet connection is under heavy lead it gets killed
>  > > > > after a minute of 10. I tried the following commands to get the 
> internet
>  > > > > back up, but nothing helped:
>  > > > > 
>  > > > > /etc/rc.d/netif restart
>  > > > > ifconfig mynic down
>  > > > > ifconfig mynic up
>  > > > > 
>  > > > > Even worse the last time I issued a '/etc/rc.d/netif restart' my 
> whole
>  > > > > system hardlocked (wasn't responding to capslock presses). So far the
>  > > > > only solution has been te reboot the computer. Is there any way I can
>  > > > > prevent my internet connection from getting killed? How do I get it 
> back
>  > > > > up after it has been killed? Thanks in advance!
>  > > > 
>  > > > What network card are you using?  Can you provide output from the
>  > > > following commands?
>  > > > 
>  > > > dmesg
>  > > > vmstat -i
>  > > > netstat -in
>  > > > 
>  > > I have a Marvell Yukon onboard nic.
>  > > 
>  > > 
>  > > Here's the output:
>  > > 
>  > > netstat -in
>  > > 
>  > > NameMtu Network   Address  Ipkts IerrsOpkts
>  > > Oerrs  Coll
>  > > msk0   1500  29 0   25 0 0
>  > > msk0   1500 :0 -5 - -
>  > > msk0   1500 192.168.2.0/2 192.168.2.111  16 -   14 -
>  > > -
>  > > fwe0*  1500   0 00 0 0
>  > > fwip0  1500   0 00 0 0
>  > > lo0   163840 00
>  > > 0 0
>  > > lo0   16384 ::1/128   ::1  0 -0
>  > > - -
>  > > lo0   16384 ::1/64 0 -0 - -
>  > > lo0   16384 127.0.0.0/8   127.0.0.10 -0
>  > > - -
>  > 
>  > This looks okay.  I see no interface errors, which is good.
>  > 
>  > > vmstat -i
>  > > interrupt  total   rate
>  > > irq17: atapci0+   13  0
>  > > irq18: atapci1+ 1045  5
>  > > irq20: uhci0 ehci0 13462 69
>  > > irq21: fwohci0 3  0
>  > > irq23: atapci3102718529
>  > > cpu0: timer   386229   1990
>  > > irq256: mskc0 46  0
>  > > cpu1: timer   376453   1940
>  > > Total 879969   4535
>  > 
>  > msk(4) appears to be using MSI/MSI-X here.
>  > 
>  > One thing worth trying would be to disable MSI/MSI-X.  You can disable
>  > these by adding the following to your /boot/loader.conf :
>  > 
>  > hw.pci.enable_msix="0"
>  > hw.pci.enable_msi="0"
> 
> The command above will disable all MSI/MSIX capability of box.
> If the intention is to disable MSI feature of Marvell network
> controller add "hw.msk.msi_disable="1" to /boot/loader.conf.
> But I don't think you need to disable MSI capability unless you
> have buggy PCI bridges. Without MSI msk(4) would normally share 
> interrupts with other devices(e.g. USB).

Based on your below conclusion (about this particular Marvell NIC and/or
PHY being buggy), I don't think disabling MSI/MSI-X will do any good.

>  > > mskc0:  port 0xb800-0xb8ff mem 
> 0xff8fc000-0xff8f irq 19 at device 0.0 on pci3
>  > > msk0:  on mskc0
>  > > msk0: Ethernet address: 00:1e:8c:5a:62:da
>  > > miibus0:  on msk0
>  > > e1000phy0:  PHY 0 on miibus0
>  > > e1000phy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 
> 1000baseTX-FDX, auto
>  > > mskc0: [FILTER]
> 
> This controller is known to buggy one. See below.
> 
>  > Adding Yong-Hyeon PYUN to this thread, since he helps maintain the
>  > msk(4) driver.  Yong-Hyeon, do you know of any conditions where heavy
>  > network I/O could cause msk(4) to lock up or stop transmitting traffic,
>  > or possibly hard-lock on ifconfig down/up?
>  > 
> 
> I think workaround for the controller bug was committed to HEAD(SVN
> r183346). To original poster, would you try latest if_msk.c from
> HEAD?(Just copy if_msk.c/if_mskreg.h from HEAD to your box.)

As usual, thanks much for the explanation.  :-)

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Under heavy load internet gets killed, only a reboot can bring it back up

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 01:40:45PM +0200, Wojciech Puchar wrote:
>>
>> One thing worth trying would be to disable MSI/MSI-X.  You can disable
>> these by adding the following to your /boot/loader.conf :
>>
>> hw.pci.enable_msix="0"
>> hw.pci.enable_msi="0"
>
> what's wrong in MSI interrupts?

Nothing -- but there are known compatibility problems with MSI/MSI-X on
some boards.  I remember reading about this with regards to em(4) not
too long ago.  It's worth ruling out, especially since his problem is
reproducible (if disabling MSI doesn't fix the problem, he can simply
remove those two loader.conf variables and we've ruled out one
possibility).

>>> mskc0: Uncorrectable PCI Express error
>>> mskc0: Uncorrectable PCI Express error
>>
>> Those errors at the end of your dmesg don't look good; could be the sign
>> of a NIC or motherboard that's going bad, or possibly a very strange
>> driver problem.
>
> or just connectors should be cleaner or card isn't fitted well - contact  
> problems.

I'm under the impression his NIC is on-board, not a physical PCI-E card.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Under heavy load internet gets killed, only a reboot can bring it back up

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 01:17:58PM +0200, Aniruddha wrote:
> On Wed, 2008-10-15 at 00:26 -0700, Jeremy Chadwick wrote:
> > On Wed, Oct 15, 2008 at 09:13:00AM +0200, Aniruddha wrote:
> > > Each time  my internet connection is under heavy lead it gets killed
> > > after a minute of 10. I tried the following commands to get the internet
> > > back up, but nothing helped:
> > > 
> > > /etc/rc.d/netif restart
> > > ifconfig mynic down
> > > ifconfig mynic up
> > > 
> > > Even worse the last time I issued a '/etc/rc.d/netif restart' my whole
> > > system hardlocked (wasn't responding to capslock presses). So far the
> > > only solution has been te reboot the computer. Is there any way I can
> > > prevent my internet connection from getting killed? How do I get it back
> > > up after it has been killed? Thanks in advance!
> > 
> > What network card are you using?  Can you provide output from the
> > following commands?
> > 
> > dmesg
> > vmstat -i
> > netstat -in
> > 
> I have a Marvell Yukon onboard nic.
> 
> 
> Here's the output:
> 
> netstat -in
> 
> NameMtu Network   Address  Ipkts IerrsOpkts
> Oerrs  Coll
> msk0   1500  29 0   25 0 0
> msk0   1500 :0 -5 - -
> msk0   1500 192.168.2.0/2 192.168.2.111  16 -   14 -
> -
> fwe0*  1500   0 00 0 0
> fwip0  1500   0 00 0 0
> lo0   163840 00
> 0 0
> lo0   16384 ::1/128   ::1  0 -0
> - -
> lo0   16384 ::1/64 0 -0 - -
> lo0   16384 127.0.0.0/8   127.0.0.10 -0
> - -

This looks okay.  I see no interface errors, which is good.

> vmstat -i
> interrupt  total   rate
> irq17: atapci0+   13  0
> irq18: atapci1+ 1045  5
> irq20: uhci0 ehci0 13462 69
> irq21: fwohci0 3  0
> irq23: atapci3102718529
> cpu0: timer   386229   1990
> irq256: mskc0 46  0
> cpu1: timer   376453   1940
> Total 879969   4535

msk(4) appears to be using MSI/MSI-X here.

One thing worth trying would be to disable MSI/MSI-X.  You can disable
these by adding the following to your /boot/loader.conf :

hw.pci.enable_msix="0"
hw.pci.enable_msi="0"

> Copyright (c) 1992-2008 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
>   The Regents of the University of California. All rights reserved.
> FreeBSD is a registered trademark of The FreeBSD Foundation.
> FreeBSD 7.1-BETA #0: Sun Sep  7 13:49:18 UTC 2008
> [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC
> Timecounter "i8254" frequency 1193182 Hz quality 0
> CPU: Intel(R) Core(TM)2 Duo CPU E8400  @ 3.00GHz (3001.18-MHz 686-class 
> CPU)
>   Origin = "GenuineIntel"  Id = 0x10676  Stepping = 6
>   
> Features=0xbfebfbff
>   
> Features2=0x8e3fd>
>   AMD Features=0x2000
>   AMD Features2=0x1
>   Cores per package: 2
> real memory  = 3220701184 (3071 MB)
> avail memory = 3146145792 (3000 MB)
> ACPI APIC Table: 
> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
>  cpu0 (BSP): APIC ID:  0
>  cpu1 (AP): APIC ID:  1
> ioapic0  irqs 0-23 on motherboard
> kbd1 at kbdmux0
> ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
> acpi0:  on motherboard
> acpi0: [ITHREAD]
> acpi0: Power Button (fixed)
> acpi0: reservation of 0, a (3) failed
> acpi0: reservation of 10, bff0 (3) failed
> Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
> acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
> pcib0:  port 0xcf8-0xcff on acpi0
> pci0:  on pcib0
> pcib1:  irq 16 at device 1.0 on pci0
> pci5:  on pcib1
> vgapci0:  port 0xc800-0xc8ff mem 
> 0xd000-0xdfff,0xff9f-0xff9f irq 16 at device 0.0 on pci5
> pci5:  at device 0.1 (no driver attached)
> pci0:  at device 27.0 (no driver attached)
> pcib2:  irq 16 at device 28.0 on pci0
> pci4:  on pcib2
> pcib3:  irq 19 at device 28.3 on pci0
> pci3:  on pcib3
> mskc0:  port 0xb800-0xb8ff mem 
> 0xff8fc000-0xff8f irq 19 at device 0.0 on pci3
> msk0:  on mskc0
> msk0: Ethernet address: 00:1e:8c:5a:62:da
> miibus0

Re: Compiling curl 7.19

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 12:39:25PM +0200, Artifex Maximus wrote:
> On Wed, Oct 15, 2008 at 10:32 AM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> > On Wed, Oct 15, 2008 at 10:02:44AM +0200, Artifex Maximus wrote:
> >> I would like to upgrade my curl to the latest 7.19.0 version because
> >> it is fixes some problems that 7.18.0 has. I would like to upgrade via
> >> ports system for future "compatibility". I have written to the port
> >> maintainer a week ago but no change.
> > The ports maintainer timeout is 2 weeks for PRs; I'm not sure if you
> > opened a PR on this request or not.  With a PR, the maintainer needs to
> > reply within 2 weeks.
> I see and I do not know that. I wrote to him directly not through PR.

Then AFAIK, the "timeout" does not apply.  If you'd like to open a PR on
for this upgrade, that would be ideal.  Let me know the PR number so
that in the case roam@ is busy, I can do it.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Testing - my emails don't seem to be getting through

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 10:24:27AM +1000, Da Rock wrote:
> I've been getting a lot of rejections: Helo command rejected: Host not
> found (in reply to RCPT TO command). So now I'm running a test to see if
> this one will get through.

I do not know why on earth you are testing this crap using a public
mailing list, rather than mailing an account at Gmail or Hotmail
or some such.  Sorry to sound sour about it, but it's rude.

The error you're receiving would be because your mail server during the
SMTP handshake is saying "HELO i.am.bob" and the remote SMTP server
attempts to resolve i.am.bob but cannot.  By "i.am.bob", I *literally*
mean "i.am.bob".  If you're forwarding mail around on a private network
on your LAN, your computer probably thinks its hostname is
"myfreebsdbox.my.lan", which isn't a publicly-resolvable hostname.

There are ways in sendmail and postfix to solve this problem.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: How to get my Dad's Win2k system to access internet through my FreeBSD 6.2 system

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 08:40:48PM +1000, Da Rock wrote:
> 
> On Tue, 2008-10-14 at 06:46 -0400, Michael Powell wrote:
> > Jeremy Chadwick wrote:
> > 
> > > On Tue, Oct 14, 2008 at 04:55:11AM -0400, Michael Powell wrote:
> > [snip] 
> > >> Next, you will want to configure your FreeBSD machine as a NAT gateway.
> > >> In your /etc/rc.conf you will want something like gateway_enable="YES"
> > >> and some form of firewall initialization[1]. The gateway_enable is what
> > >> allows the forwarding of packets between your rl0 and your rl1, but the
> > >> activation of NAT functionality is usually a function contained within a
> > >> firewall. So conceptually, the firewall will be "in between" rl0 and rl1.
> > >> 
> > >> There are three different firewalls you can choose from. Configuring the
> > >> firewall is usually where the inexperienced get stuck. This subject
> > >> material is beyond the scope of this missive, and you would do well to
> > >> start reading in the Handbook. But essentially, when you configure NAT in
> > >> the firewall your rl0 (connected to the ISP) will be assigned a "Public"
> > >> IP address and the NAT function will translate between "Public" and
> > >> "Private".
> > 
> > With respect to "NAT", the caveat here is the assumption that your DSL/Cable
> > modem is *not* already performing NAT. The situation you do not want to get
> > into is having *two* NATs. The content herein is assuming that the external
> > (rl0) interface is getting assigned a "Public" IP from the ISP. 
> >  
> 
> If this is the case wouldn't the OP set router_enable=YES instead of
> gateway?

No.  router_enable causes routed(8) to run, which allows for
announcements and withdraws of network routes via RIPv1/v2.  This is
something completely different than forwarding packets.

What the OP wants is to route packets from his private LAN (e.g.
192.168.0.0/16) on to the Internet using NAT.  That means he has to have
a NAT gateway of some kind that forwards and translates packets.  That
means he needs gateway_enable="yes", which allows IPv4 forwarding
to happen "through" the FreeBSD box.  In layman's terms, it allows
the FreeBSD box to be used a "Gateway" for other computers which
are connected to it directly.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Compiling curl 7.19

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 10:02:44AM +0200, Artifex Maximus wrote:
> Hello!
> 
> I would like to upgrade my curl to the latest 7.19.0 version because
> it is fixes some problems that 7.18.0 has. I would like to upgrade via
> ports system for future "compatibility". I have written to the port
> maintainer a week ago but no change.

The ports maintainer timeout is 2 weeks for PRs; I'm not sure if you
opened a PR on this request or not.  With a PR, the maintainer needs to
reply within 2 weeks.

> Is anyone have a folder ftp/curl for 7.19.0 with patches? I have tried
> to "adjust" 7.18.0 ftp/curl patches but I got errors. Although Curl
> 7.19.0 is successfully compiled without patches, I am not sure that
> version is fully working because some patches change system function
> calls.

I'll see about getting this port updated assuming roam@ doesn't have the
time.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Under heavy load internet gets killed, only a reboot can bring it back up

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 09:13:00AM +0200, Aniruddha wrote:
> Each time  my internet connection is under heavy lead it gets killed
> after a minute of 10. I tried the following commands to get the internet
> back up, but nothing helped:
> 
> /etc/rc.d/netif restart
> ifconfig mynic down
> ifconfig mynic up
> 
> Even worse the last time I issued a '/etc/rc.d/netif restart' my whole
> system hardlocked (wasn't responding to capslock presses). So far the
> only solution has been te reboot the computer. Is there any way I can
> prevent my internet connection from getting killed? How do I get it back
> up after it has been killed? Thanks in advance!

What network card are you using?  Can you provide output from the
following commands?

dmesg
vmstat -i
netstat -in

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD do dbus & hal work?

2008-10-15 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 09:03:00AM +0200, Aniruddha wrote:
> On Tue, 2008-10-14 at 23:43 -0700, Jeremy Chadwick wrote:
> > > Thanks, I followed the faq to the letter and it show a dialog when I
> > > insert a USB stick. Unfortunately when I insert an sdcard still nothing
> > > happens.
> > 
> > Can anyone confirm that dbus and/or hald have anything to do with this?
> > (I thought those were specific to X...)
> > 
> > When attaching a USB device to a USB port, the kernel will notice the
> > device has been added and will do the proper enumeration.  For example,
> > when adding a USB hard disk or a USB pen drive, a umass device will be
> > found, then a daX device should be created (which is what you use to
> > access the disk; USB storage devices appear as SCSI disks).
> > 
> > But in the case of a USB device that's already attached to the bus, e.g.
> > one of those 7-in-1 card readers, I cannot see how adding a SD/MMC card
> > would cause the hard disk to suddenly show up.
> > 
> > You would need to run "camcontrol rescan 0", to cause the device to be
> > re-scanned for any media which was inserted.
> 
> Thanks for the quick and extensive answer. I'll check the exact behavior of  
> the 7-in-1 card reader somewhat more.

The card reader is already attached to the USB bus once the kernel
loads.  To find actual inserted/removed media, you will need to
do the camcontrol command I listed off.

Also: ALWAYS be sure to use "umount" to unmount the filesystems *BEFORE*
removing the media.  Not doing so will result in a kernel panic.
Consider yourself warned.

Supposedly this has been fixed in CURRENT/HEAD.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD do dbus & hal work?

2008-10-14 Thread Jeremy Chadwick
On Wed, Oct 15, 2008 at 08:36:39AM +0200, Aniruddha wrote:
> On Tue, 2008-10-14 at 12:14 +0200, Dominique Goncalves wrote:
> > Hi,
> > 
> > On Tue, Oct 14, 2008 at 12:03 AM, Aniruddha <[EMAIL PROTECTED]> wrote:
> > > I'm trying to mount (USB) devices in KDE/Gnome automagically through
> > > dbus and hal. I added the following lines to /etc/rc.conf:
> > >
> > > dbus_enable="YES"
> > > hald_enable="YES"
> > >
> > > Unfortunately when I insert an USB (NTFS formatted) nothing happens.
> > > When I insert a (fat) sdcard  in my cardreader still nothing happens.
> > > I do think I'm missing something obvious, who know what it is?
> > 
> > Do a 'tail -f /var/log/messages' then insert your sd card and see
> > what's going on.
> > 
> > The HAL faq may be useful http://www.freebsd.org/gnome/docs/halfaq.html.
> > 
> 
> Thanks, I followed the faq to the letter and it show a dialog when I
> insert a USB stick. Unfortunately when I insert an sdcard still nothing
> happens.

Can anyone confirm that dbus and/or hald have anything to do with this?
(I thought those were specific to X...)

When attaching a USB device to a USB port, the kernel will notice the
device has been added and will do the proper enumeration.  For example,
when adding a USB hard disk or a USB pen drive, a umass device will be
found, then a daX device should be created (which is what you use to
access the disk; USB storage devices appear as SCSI disks).

But in the case of a USB device that's already attached to the bus, e.g.
one of those 7-in-1 card readers, I cannot see how adding a SD/MMC card
would cause the hard disk to suddenly show up.

You would need to run "camcontrol rescan 0", to cause the device to be
re-scanned for any media which was inserted.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
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 login as root after changing the shell to bash

2008-10-14 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 03:20:24PM -0400, Jerry McAllister wrote:
> On Tue, Oct 14, 2008 at 08:28:13PM +0200, Aniruddha wrote:
> 
> > I tried to change the root's shell to bash. I used this command: 'chsh
> > -s /usr/local/bin/bash'. Prior to changing the shell for root I did it
> > for my user account using the same command without problems.
> > Unfortunately after a reboot I can't login as root anymore because my
> > system can't find /usr/local/bin/bash. How can I fix this? I tried
> > booting the freesbie cd but this wouldn't boot :(. Thanks in  advance!
> 
> Sounds like /usr/local/bin is either not in the path for root or
> that the /usr or /usr/local file system is not mounted - which would
> be true in a single user boot.
> 
> You should never change root's shell.   It is doable if you move
> some files around, but it is too likely that you will come up with
> a situation like this where the alternate shell is not available.
> 
> You can try coming up in 'single user' mode.
> Older systems required you to hit the space bar within the countdown.
> Newer ones require you to select the right option from a menu.  I think
> it is '4' but don't want to reboot at the minute to check.
> 
> It will ask you which shell you want.   Just take the default (eg hit ENTER).
> Then remount /   by doing:
>   mount -u /
> Then edit /etc/passwd using the vipw(8) utility - just type: 
>   vipw

Note that he'll need to mount /var and /tmp for vi to work.  Has to do
with use of temporary files being placed in /tmp, and recovery files
using /var/tmp/vi.recover.

It's usually best to just do:

# mount -a
# mount -o rw -u /

Which under ideal circumstances should take care of everything.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
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 login as root after changing the shell to bash

2008-10-14 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 09:17:38PM +0200, Aniruddha wrote:
> On Tue, 2008-10-14 at 11:37 -0700, Jeremy Chadwick wrote:
> > On Tue, Oct 14, 2008 at 08:28:13PM +0200, Aniruddha wrote:
> > > I tried to change the root's shell to bash. I used this command: 'chsh
> > > -s /usr/local/bin/bash'. Prior to changing the shell for root I did it
> > > for my user account using the same command without problems.
> > > Unfortunately after a reboot I can't login as root anymore because my
> > > system can't find /usr/local/bin/bash.
> > 
> > I can't explain why your systems says it can't find /usr/local/bin/bash.
> > I would assume you also cannot log in as yourself.
> 
> Thanks for your help! I changed the default shell back to /bin/csh but I
> still can't login as root?! I get the same message (can't
> find /bin/csh).

I can't explain this.  Possibly there's a permissions or ownership
problem on the / directory (ls -ld / will show you that)?  I've no idea;
sounds odd.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
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 login as root after changing the shell to bash

2008-10-14 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 08:28:13PM +0200, Aniruddha wrote:
> I tried to change the root's shell to bash. I used this command: 'chsh
> -s /usr/local/bin/bash'. Prior to changing the shell for root I did it
> for my user account using the same command without problems.
> Unfortunately after a reboot I can't login as root anymore because my
> system can't find /usr/local/bin/bash.

I can't explain why your systems says it can't find /usr/local/bin/bash.
I would assume you also cannot log in as yourself.

You should not change root's shell.  I believe this has been discussed
many times in the past on lists -- you should use tools like sudo or su2
to change UIDs.  Both of those tools will allow you to take on root
credentials while using the shell of your user account (bash).

> How can I fix this? I tried booting the freesbie cd but this
> wouldn't boot :(. Thanks in  advance!

You'll need to boot your machine and at the FreeBSD boot menu, choose
option 4 for single-user mode.  You'll eventually be dropped into a
simple /bin/sh prompt.  You'll need to do "mount -a", then use "vipw" to
edit all of the fields in /etc/master.passwd -- specifically, change
root's shell back to /bin/csh.  Write the file, exit vipw, and reboot
the system.  You should be up and working after that.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: mktime() output not the same as the date utility

2008-10-14 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 12:43:54PM -0400, Mark B. wrote:
> I can't figure out from the man pages why
> mktime() is giving a different result than date -f.
> Both strptime and mktime are supposed to use the
> local timezone, as does date.
> 
> The output of date is correct; mktime() is an hour later.
>
> What am I missing here?

I'm betting it's due to DST

I believe you have to do the math yourself if tm_isdst is non-zero.
Otherwise, consider using functions like ctime() and others (which are
also POSIX compliant).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Problems with portupgrade or db

2008-10-14 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 05:18:36PM +0200, Marco Beishuizen wrote:
> On Tue, 14 Oct 2008 08:06:46 -0700 (PDT)
> mdh <[EMAIL PROTECTED]> wrote:
> 
> > Have you tried installing db42 from ports manually?  ie:
> > (cd /usr/ports/databases/db42 && make deinstall && make clean && make
> > install && make clean)
> > 
> > If that doesn't work, perhaps try installing the db42 pkg from the
> > FreeBSD ftp servers?  Personally, I try to stay away from portupgrade
> > or anything else that comes around claiming to make something easier
> > that's already easy enough.  ;)
> > 
> > - mdh
> 
> Yes, I did try to install it manually but that results in:
> ...
> ===>  Extracting for db42-4.2.52_5
> => MD5 Checksum mismatch for bdb/db-4.2.52.tar.gz.
> => SHA256 Checksum mismatch for bdb/db-4.2.52.tar.gz.
> => MD5 Checksum OK for bdb/patch.4.2.52.1.
> => SHA256 Checksum OK for bdb/patch.4.2.52.1.
> => MD5 Checksum OK for bdb/patch.4.2.52.2.
> => SHA256 Checksum OK for bdb/patch.4.2.52.2.
> => MD5 Checksum OK for bdb/patch.4.2.52.3.
> => SHA256 Checksum OK for bdb/patch.4.2.52.3.
> => MD5 Checksum OK for bdb/patch.4.2.52.4.
> => SHA256 Checksum OK for bdb/patch.4.2.52.4.
> => MD5 Checksum OK for bdb/patch.4.2.52.5.
> => SHA256 Checksum OK for bdb/patch.4.2.52.5.
> ===>  Refetch for 1 more times files: bdb/db-4.2.52.tar.gz
> bdb/db-4.2.52.tar.gz => db-4.2.52.tar.gz doesn't seem to exist
> in /usr/ports/distfiles/bdb. => Attempting to fetch from
> http://download-east.oracle.com/berkeley-db/. fetch:
> http://download-east.oracle.com/berkeley-db/db-4.2.52.tar.gz: Requested
> Range Not Satisfiable => Attempting to fetch from
> http://download-west.oracle.com/berkeley-db/. fetch:
> http://download-west.oracle.com/berkeley-db/db-4.2.52.tar.gz: Requested
> Range Not Satisfiable => Attempting to fetch from
> http://download-uk.oracle.com/berkeley-db/. fetch:
> http://download-uk.oracle.com/berkeley-db/db-4.2.52.tar.gz: Requested
> Range Not Satisfiable => Attempting to fetch from
> ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/bdb/. fetch:
> db-4.2.52.tar.gz: local modification time does not match remote =>
> Couldn't fetch it - please try to retrieve this => port manually
> into /usr/ports/distfiles/bdb and try again. *** Error code 1
> 
> Stop in /usr/ports/databases/db42.
> *** Error code 1
> 
> Stop in /usr/ports/databases/db42.
> ...
> 
> The package is already present in /usr/ports/distfiles/bdb and when I
> download it manually I get the error above.

The "Range Not Satisfiable" errors are because your db-4.2.52.tar.gz is
of an incorrect size (probably larger than what's on the source site).
The last error (talking about modification time) could indicate that you
have a clock which is severely skewed or incorrect in some way.

Otherwise, if you're *absolutely 100% positive* all is well, then the
issue could be one of the following:

1) The db-4.2.52.tar.gz tarball on the distribution sites has changed,
2) There is a proxy server between you and the distribution site which
   is caching data and returning bad stuff,
3) You're experiencing underlying corruption going on (network or disk),
4) Your ports tree is outdated or broken (some pieces are out of date
   while others are correct).

Here's some evidence that things are indeed working (on my systems)
how you'd expect -- everything matches up perfectly:

$ wget -q http://download-east.oracle.com/berkeley-db/db-4.2.52.tar.gz

$ md5 db-4.2.52.tar.gz
MD5 (db-4.2.52.tar.gz) = 8b5cff6eb83972afdd8e0b821703c33c

$ grep db-4.2.52.tar.gz /usr/ports/databases/db42/distinfo
MD5 (bdb/db-4.2.52.tar.gz) = 8b5cff6eb83972afdd8e0b821703c33c
SHA256 (bdb/db-4.2.52.tar.gz) = 
f4bddd8d1b4cde0daf5e13e3493ed62a25b736b0bf258e1d929e47bc6a82a28c
SIZE (bdb/db-4.2.52.tar.gz) = 3919271

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: An endian error

2008-10-14 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 05:00:26AM -0700, Unga wrote:
> Hi all
> 
> I'm trying to compile RELENG_7 kernel on i386.
> 
> The "make buildkernel" develops an endian related error:

I cannot reproduce this error on any of our i386 boxes or our amd64
boxes.

Is this kernel being built with the new gcc you've been messing around
with in other threads?  I have to ask that question, for obvious
reasons.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: How to get my Dad's Win2k system to access internet through my FreeBSD 6.2 system

2008-10-14 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 06:46:10AM -0400, Michael Powell wrote:
> Jeremy Chadwick wrote:
> 
> > On Tue, Oct 14, 2008 at 04:55:11AM -0400, Michael Powell wrote:
> [snip] 
> >> Next, you will want to configure your FreeBSD machine as a NAT gateway.
> >> In your /etc/rc.conf you will want something like gateway_enable="YES"
> >> and some form of firewall initialization[1]. The gateway_enable is what
> >> allows the forwarding of packets between your rl0 and your rl1, but the
> >> activation of NAT functionality is usually a function contained within a
> >> firewall. So conceptually, the firewall will be "in between" rl0 and rl1.
> >> 
> >> There are three different firewalls you can choose from. Configuring the
> >> firewall is usually where the inexperienced get stuck. This subject
> >> material is beyond the scope of this missive, and you would do well to
> >> start reading in the Handbook. But essentially, when you configure NAT in
> >> the firewall your rl0 (connected to the ISP) will be assigned a "Public"
> >> IP address and the NAT function will translate between "Public" and
> >> "Private".
> 
> With respect to "NAT", the caveat here is the assumption that your DSL/Cable
> modem is *not* already performing NAT. The situation you do not want to get
> into is having *two* NATs. The content herein is assuming that the external
> (rl0) interface is getting assigned a "Public" IP from the ISP. 
>  
> [snip]
> > 
> > Doesn't he need to also set sysctl net.inet.ip.forwarding=1 for his
> > box to act as a gateway?  Or is this handled by the NAT portion?
> > 
> The gateway_enable="YES" in /etc/rc.conf sets this.

Right, but it wasn't in your /etc/rc.conf example (see your mail), so I
figured the OP would come back saying "Okay I did what you said but it
still doesn't work!"

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: How to get my Dad's Win2k system to access internet through my FreeBSD 6.2 system

2008-10-14 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 04:55:11AM -0400, Michael Powell wrote:
> Manish Jain wrote:
> 
> > 
> > Hi,
> > 
> > I am poor at networking and need a little bit of help. My dad has a
> > Windows 2000 machine with a network card but does not have a connection
> > to the internet. My freebsd 6.2 box is connected to the internet and has
> > 2 network cards, rl0 and rl1. rl0 connects to the ISP and rl1 is
> > directly connected via a long Ethernet cable to the NIC on my dad's
> > machine. While I can access the internet easily, I want my dad to be
> > able to connect to the internet with my freebsd box serving as the
> > gateway. Can anyone please explain to me in easy steps how to accomplish
> > this ?
> > 
> 
> Although to many old-timers this is easily achieved, to someone new to
> networking it is difficult to explain it in "easy steps". It involves a set
> of pieces that have to fit together correctly in order to work. You will
> need to do some proper reading on the underlying concepts first.
> 
> First, establish that there exists basic network connectivity between your
> machine and your dads. You may need to use a crossover cable. You will want
> to assign a static IP address in the "Private" IP space range to your rl1
> interface. This is also known as RFC 1918. You will also want to manually
> configure a static IP on your dad's machine that is in the same network,
> instead of allowing it to come up on the link.local of 169.254.x.x. An
> example would be your rl1 == 192.168.10.1 netmask 255.255.255.0 and your
> dad's machine == 192.168.10.2 netmask 255.255.255.0. For DNS at this stage
> you can use hosts files on each host for name resolution. Ensure that each
> machine can be ping'd by the other.
> 
> Next, you will want to configure your FreeBSD machine as a NAT gateway. In
> your /etc/rc.conf you will want something like gateway_enable="YES" and
> some form of firewall initialization[1]. The gateway_enable is what allows
> the forwarding of packets between your rl0 and your rl1, but the activation
> of NAT functionality is usually a function contained within a firewall. So
> conceptually, the firewall will be "in between" rl0 and rl1.
> 
> There are three different firewalls you can choose from. Configuring the
> firewall is usually where the inexperienced get stuck. This subject
> material is beyond the scope of this missive, and you would do well to
> start reading in the Handbook. But essentially, when you configure NAT in
> the firewall your rl0 (connected to the ISP) will be assigned a "Public" IP
> address and the NAT function will translate between "Public" and "Private".
> 
> The next sticky point that will happen, should you get this far, is name
> resolution. You will want to place the IP addresses of the name servers of
> your ISP in your /etc/resolv.conf. You will also want to enter these into
> the TCP configuration of your dad's machine. In addition, on your dad's
> machine you will enter the IP address you used on your rl1 as the "default
> route".
> 
> The subject is much too broad for exhaustive coverage here. If your
> DSL/Cable modem has router ports on it, it might just be easier to plug
> your dad's machine up there and forget about all of this. Much reading will
> be required of you, and once you know most of it then you will know what
> specific questions to ask when you encounter sticking points. This is
> intended only as a very generic form of overview.
> 
> -Mike
> 
> [1] For example, a couple of lines from my /etc/rc.conf:
> 
> pf_enable="YES"
> pf_rules="/etc/pf.conf"
> pf_flags="-e"
> pflog_enable="YES"
> pflog_logfile="/var/log/pflog"
> pflog_flags=""
> 
> and the NAT line from my /etc/pf.conf:
> 
> nat on $ExtIF inet from $INTERNAL to any -> ($ExtIF)
> 
> Please note that these are for illustrative purposes only, and by themselves
> will do nothing for your specific situation. There is much more that you
> will have to dig out of the documentation, understand, and configure
> appropriately.

Doesn't he need to also set sysctl net.inet.ip.forwarding=1 for his
box to act as a gateway?  Or is this handled by the NAT portion?

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD 7 and ESXi

2008-10-13 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 02:44:13AM -0300, [EMAIL PROTECTED] wrote:
> On Mon, 13 Oct 2008, Jeremy Chadwick wrote:
> 
> |On Tue, Oct 14, 2008 at 02:04:07AM -0300, [EMAIL PROTECTED] wrote:
> |> Jeremy,
> |> 
> |> On Mon, 13 Oct 2008, Jeremy Chadwick wrote:
> |> 
> |> |On Tue, Oct 14, 2008 at 12:54:26AM -0300, [EMAIL PROTECTED] wrote:
> |> |> I'm facing some problems trying to install a FreeBSD 
> |> |> 7.0-RELEASE-amd64, on a Dell PE 2950III, dual Xeon Quad core, 8GB RAM.
> |> |> After (FBSD) boot menu count down, it shows a dump of the CPU 
> |> |> registers and a message: BTX Halted. No matter what is changed in VM 
> |> |> setup.
> |> |
> |> |Can you please download the 7.1-BETA2 ISO and try it instead?  There
> |> |have been changes to the FreeBSD boot loader between 7.0-RELEASE and
> |> |7.1-BETA2 which may improve things for you.  The 7.1-BETA2 ISOs are
> |> |available here:
> |> 
> |>The same behavior with 7.1-BETA2.
> |
> |I'm not sure what to do at this point, or what to tell you, since the
> |kernel can't even load.
> |
> |Are you installing this off of CD, and is the CD drive hooked up to
> |the PC via ATA/SATA (rather than USB or something else)?
> 
>   It's a bit more complicated, since, for some reason the Vmware 
> client is unable to boot the VM from CD on the host server. It's 
> booting an ISO image on the client machine.
>   I already read something saying that it's a known issue of the 
> ESXi.
>   Without the virtulization layer, the amd64 CD boots without 
> problems in this machine. 

Ah, so the truth comes out... :-)

Have you brought this fact up with the VMware folks?  They're quite a
nice bunch, I wouldn't be surprised if they provided a hotfix for you
for this problem.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD 7 and ESXi

2008-10-13 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 02:04:07AM -0300, [EMAIL PROTECTED] wrote:
> Jeremy,
> 
> On Mon, 13 Oct 2008, Jeremy Chadwick wrote:
> 
> |On Tue, Oct 14, 2008 at 12:54:26AM -0300, [EMAIL PROTECTED] wrote:
> |>I'm facing some problems trying to install a FreeBSD 
> |> 7.0-RELEASE-amd64, on a Dell PE 2950III, dual Xeon Quad core, 8GB RAM.
> |>After (FBSD) boot menu count down, it shows a dump of the CPU 
> |> registers and a message: BTX Halted. No matter what is changed in VM 
> |> setup.
> |
> |Can you please download the 7.1-BETA2 ISO and try it instead?  There
> |have been changes to the FreeBSD boot loader between 7.0-RELEASE and
> |7.1-BETA2 which may improve things for you.  The 7.1-BETA2 ISOs are
> |available here:
> 
>   The same behavior with 7.1-BETA2.

I'm not sure what to do at this point, or what to tell you, since the
kernel can't even load.

Are you installing this off of CD, and is the CD drive hooked up to
the PC via ATA/SATA (rather than USB or something else)?

John Baldwin might have some ideas, but debugging this is going to be
difficult because you're wanting to use amd64 but the only way to get a
usable box is under i386.

> |>It does not happen with i386 version.
> |>Which is the best release to install in this box? Should I go 
> |> ahead with i386?
> |
> |If this is going to be a desktop box and uses an nVidia video card,
> |you should stay with i386 (if I remember correctly there are no
> |working amd64 nVidia drivers).
> 
>   It'll be a production server, not a desktop. 
> 
> |This won't allow you to use the full 8GB of RAM you have installed,
> |though, without building a custom kernel with PAE support (and there are
> |known compatibility problems between PAE and certain kernel drivers).
> |It's strongly recommended you stick with amd64 if at all possible.
> 
>   In fact I'll not give the entire memory to this virtual machine. 
> But I would like to use the full resources of 64bits CPU capacity.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD 7 and ESXi

2008-10-13 Thread Jeremy Chadwick
On Tue, Oct 14, 2008 at 12:54:26AM -0300, [EMAIL PROTECTED] wrote:
>   I'm facing some problems trying to install a FreeBSD 
> 7.0-RELEASE-amd64, on a Dell PE 2950III, dual Xeon Quad core, 8GB RAM.
>   After (FBSD) boot menu count down, it shows a dump of the CPU 
> registers and a message: BTX Halted. No matter what is changed in VM 
> setup.

Can you please download the 7.1-BETA2 ISO and try it instead?  There
have been changes to the FreeBSD boot loader between 7.0-RELEASE and
7.1-BETA2 which may improve things for you.  The 7.1-BETA2 ISOs are
available here:

ftp://ftp4.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/7.1/

You can see the changes at the below Wiki (see very bottom of page):

http://wiki.freebsd.org/JeremyChadwick/Commonly_reported_issues

>   It does not happen with i386 version.
>   Which is the best release to install in this box? Should I go 
> ahead with i386?

If this is going to be a desktop box and uses an nVidia video card,
you should stay with i386 (if I remember correctly there are no
working amd64 nVidia drivers).

This won't allow you to use the full 8GB of RAM you have installed,
though, without building a custom kernel with PAE support (and there are
known compatibility problems between PAE and certain kernel drivers).
It's strongly recommended you stick with amd64 if at all possible.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: FreeBSD 7 and ESXi

2008-10-13 Thread Jeremy Chadwick
On Mon, Oct 13, 2008 at 08:58:00PM -0700, Brian wrote:
> [EMAIL PROTECTED] wrote:
>> Hi all,
>>
>>  I'm facing some problems trying to install a FreeBSD  
>> 7.0-RELEASE-amd64, on a Dell PE 2950III, dual Xeon Quad core, 8GB RAM.
>>  After (FBSD) boot menu count down, it shows a dump of the CPU  
>> registers and a message: BTX Halted. No matter what is changed in VM  
>> setup.
>>  It does not happen with i386 version.
>>  Which is the best release to install in this box? Should I go ahead 
>> with i386?
>>  
>> Thank you,
>
>
> With 8 gigs of ram that really isn't an option, 4 gigs or more requires  
> a 64 bit OS.

Well he already tried amd64 and received a panic in the bootloader.  :-)
I think I know what might be causing that.

Also, he does have the option of using i386 PAE to address more memory
while in x86 mode, but ideally he should be running amd64.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Sysinstall colors

2008-10-13 Thread Jeremy Chadwick
On Mon, Oct 13, 2008 at 09:42:04PM +0200, [EMAIL PROTECTED] wrote:
> After some trial and error, I put
>
> XTerm*color7:  #bebebe
>
> in my .Xdefaults. Now the yellow sysinstall font is much more legible  
> inside an xterm. This works for both xterm and rxvt. The rxvt man page  
> proved very useful.
>
> Now I have solved my problem but other users may experience the same  
> problem. Is it possible to modify sysinstall so that it uses a darker  
> background gray when run inside xterm?

I'm not sure this is desirable or recommendable.  There are some
terminal emulation programs -- specifically, PuTTY -- which emulate
TERM=xterm.  The RGB colours in PuTTY look just fine: quite legible.

The key problem here is this: there are no more darker grey backgrounds
available with the limited colour set available.  You get one grey bg --
sequence \e[47m; -- and that's it.  If you want other colours, you have
to have a 256-colour xterm compiled, which supports an extended palette,
and there's no way to detect if someone has such a capable terminal
(basing it on $TERM is not correct).

This is one of the limitations of (pardon my use of this term) ANSI
colour palettes.  Background colours are more limited than foreground.

> If not, we should add a note in the handbook.

An entry in the Handbook could be: "If the default colours chosen are
hard to read or make text illegible while using xterm or rxvt, please
see  for how to adjust the RGB values for
grey and other colours".

Ideally, we should see about getting rid of the whole grey background
thing -- otherwise, stick with using black text with bright red letters
for the quick-jump menu keys.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: portupgrade failure

2008-10-13 Thread Jeremy Chadwick
On Mon, Oct 13, 2008 at 02:08:54PM -0400, Michael P. Soulier wrote:
> On Mon, Oct 13, 2008 at 2:05 PM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> > So don't use it?  :-)  There are alternatives like portmaster.
> 
> I suppose I prefer a single, reliable, supported tool for the system.
> portupgrade seems to be pushed the most in all of the documentation

Yes, and I've always considered that a big disappointment, since
portupgrade is written in Ruby (thus requiring knowledge of a separate
language rather than C), and has its own dependency database (due to
supposed limits of the standard /var/db/pkg database).

When portupgrade breaks -- and believe it, it happens quite often, as a
brief review of the freebsd-ports mailing list will show you -- it's a
nightmare.  I have to ask you: is this really worth it to you?

You could use portmaster, which is a /bin/sh script that does not behave
this way, and is maintained by a member of the FreeBSD developer
community (Doug Barton).  This would be a "single reliable tool" that
does not rely on external dependencies.  I strongly urge you to consider
it.  Do I use it?  No, because I'm one of those "I do everything by
hand" administrators who does things like rm -fr /usr/local ; pkg_delete
-af and so on.  But if I wanted a tool that managed things for me, I
would very likely go with portmaster.

Please note that I often get flamed for flaming portupgrade, and I would
not be surprised if that occurred as a result of this mail either.  I
strongly advocate using whatever tool gets the job done (and if that's
portupgrade, great!), but I see way too many portupgrade-related support
posts on the freebsd-ports mailing list for me to ever consider it.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: portupgrade failure

2008-10-13 Thread Jeremy Chadwick
On Mon, Oct 13, 2008 at 02:04:02PM -0400, Michael P. Soulier wrote:
> On Sat, Oct 4, 2008 at 5:02 AM, Patrick Lamaizière
> <[EMAIL PROTECTED]> wrote:
> > Portupgrade is often confused with his database on upgrade.
> > Delete /var/db/pkg/pkgdb.db and retry.
> >
> > May be you have to delete /usr/ports/INDEX-6.db too.
> 
> Hmm. This does not inspire confidence in the tool.

So don't use it?  :-)  There are alternatives like portmaster.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: new hdd numeration after mainboard change

2008-10-13 Thread Jeremy Chadwick
On Mon, Oct 13, 2008 at 07:12:20PM +0200, [EMAIL PROTECTED] wrote:
> i run "FreeBSD  7.1-PRERELEASE" i had a change of the mainboard of my
> lenovo notebook t60. after reboot the harddisk which was before
> recognized as "ad0" is now "ad4". i cannot find any other devices, no
> ad0/ad1/ad2 in /dev. even in the dmesg only ad4

The T60 is a laptop.  It only has one hard disk -- so I'm not sure why
you were seeing ad0, ad1, ad2 in the past.  You shouldn't have been,
unless you had 3 hard disks hooked up somehow.

The bottom line here is this: absolutely *nothing* requires the device
numbering to start at zero.  And this is definitely the case.

> does fbsd create a uniqe identifier for harddisks in combination with
> the motherboard or something like that?  where can i dig further into
> that issue?

It's not really an "issue".  Very likely your computer has toggled some
BIOS settings.

The T60 series has the ability to run the SATA ports in two modes: AHCI,
or Enhanced/Compatible.  Chances are before the motherboard swap, yours
was running in the opposite mode that it is now.

I would highly recommend using the AHCI mode.  It works quite well with
FreeBSD under Intel controllers.  Turn AHCI on (if it's not already),
and do not mess with it.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Installation Hangs

2008-10-13 Thread Jeremy Chadwick
On Mon, Oct 13, 2008 at 11:19:40AM -0600, Warren Block wrote:
> On Mon, 13 Oct 2008, Jeremy Chadwick wrote:
>> On Mon, Oct 13, 2008 at 09:57:22AM -0600, Warren Block wrote:
>>> On Sun, 12 Oct 2008, ton80 wrote:
>>>
>>>> I am trying to install FreeBSD.
>>>> During the install (actually at the beginning of the process) the system
>>>> hangs indefinitely.
>>>> When it gets to the select country screen...it is frozen.
>>>> During the boot process, as it is reading all the hardware, it finds the 
>>>> USB
>>>> controller OK then later it states there was an IO error and that the USB
>>>> controller is halted. I have a USB Keyboard and mouse...so I would say the
>>>> problem is here.
>>>> Is there any workaround I can use to get things going?
>>>
>>> Set "USB Legacy Support" to disabled in the BIOS.  If that isn't
>>> available, it might work to boot with the keyboard detached.  Connect it
>>> after the BIOS boot, at the FreeBSD bootloader prompt or maybe at the
>>> country select screen.
>>
>> I don't see how this would solve or even affect his problem.
>>
>> As I understand it, "USB Legacy Support" is intended for operating
>> systems which do not have a USB stack available to them, thus making USB
>> keyboards/mice appear as PS/2 keyboards/mice within MS-DOS and so on.  I
>> believe the way it works is that the BIOS acts as a software translation
>> layer between the USB device and PS/2 interaction.  This translation is
>> lost the instant interrupts are re-mapped or the southbridge/USB
>> controller is initialised.
>>
>> The OP is making it past boot2/loader, the kernel and all its drivers
>> are fully loaded (including the USB stack).
>
> An MSI motherboard did the same thing, only with a USB mouse.  The BIOS  
> defaulted to legacy emulation.  The mouse would be briefly enabled  
> during boot, then disabled as FreeBSD started.  I found a message  
> explaining it, disabled BIOS emulation, had no further problems, and...  
> didn't investigate further.  Now I can't find the exact post, but did  
> find a thread that is similar:
>
> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=1607862+0+archive/2008/freebsd-questions/20080224.freebsd-questions

Ahh, right.  But now we're talking about keyboards, when before we were
talking strictly about mice.  Then I remembered that the PS/2 interface
actually handles both keyboards *and* mice during initialisation, which
means the translation/emulation layer does the same thing.

The problem in that thread is partially documented in the ukbd(4) man
page; see the paragraph starting with "If you want to use a USB keyboard
as your default".

The "hint" commands shown should do the right thing.  However, *do not*
add them to device.hints -- add them to /boot/loader.conf.  device.hints
can be overwritten when changes occur in it (I forget if installkernel
or mergemaster does this), and you will lose your changes.

You can also type the "hint" commands into the loader section prior to
booting.  The OP might want to try doing this: at the FreeBSD
Beastie/loader menu, hit 6 to go to the Loader prompt.  At the prompt,
type in:

set hint.atkbd.0.disable="1"
set hint.atkbdc.0.disable="1"
boot

And then tell us if your keyboard works during sysinstall.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Installation Hangs

2008-10-13 Thread Jeremy Chadwick
On Mon, Oct 13, 2008 at 08:35:37PM +0400, Boris Samorodov wrote:
> Jeremy Chadwick <[EMAIL PROTECTED]> writes:
> > On Mon, Oct 13, 2008 at 09:57:22AM -0600, Warren Block wrote:
> >> On Sun, 12 Oct 2008, ton80 wrote:
> >>
> >>> I am trying to install FreeBSD.
> >>> During the install (actually at the beginning of the process) the system
> >>> hangs indefinitely.
> >>> When it gets to the select country screen...it is frozen.
> >>> During the boot process, as it is reading all the hardware, it finds the 
> >>> USB
> >>> controller OK then later it states there was an IO error and that the USB
> >>> controller is halted. I have a USB Keyboard and mouse...so I would say the
> >>> problem is here.
> >>> Is there any workaround I can use to get things going?
> >>
> >> Set "USB Legacy Support" to disabled in the BIOS.  If that isn't  
> >> available, it might work to boot with the keyboard detached.  Connect it  
> >> after the BIOS boot, at the FreeBSD bootloader prompt or maybe at the  
> >> country select screen.
> >
> > I don't see how this would solve or even affect his problem.
> >
> > As I understand it, "USB Legacy Support" is intended for operating
> > systems which do not have a USB stack available to them, thus making USB
> > keyboards/mice appear as PS/2 keyboards/mice within MS-DOS and so on.  I
> > believe the way it works is that the BIOS acts as a software translation
> > layer between the USB device and PS/2 interaction.  This translation is
> > lost the instant interrupts are re-mapped or the southbridge/USB
> > controller is initialised.
> >
> > The OP is making it past boot2/loader, the kernel and all its drivers
> > are fully loaded (including the USB stack).
> 
> Well, that may be totally correct but practice... Ex., I have an ASUS
> P5K motherboard and I can't use a USB mouse with "USB Legacy Support".
> The mouse is detected and works IFF this support is OFF.

Something tells me that if you were to enable USB Legacy Support and run
Linux or Windows, you'd have a functioning mouse.

This could simply be a BIOS bug (would not surprise me), or (more
likely) a bug in FreeBSD's initialisation of the USB chip.  FreeBSD's
USB stack is under a great amount of (justified) scrutiny as of late,
and there are efforts under CURRENT to replace the stack with a complete
brand-new written-from-the ground-up stack (patches are available).

It would be beneficial if someone with this sort of configuration oddity
could run CURRENT with the new USB stack patches applied and see if
things behave as expected.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Installation Hangs

2008-10-13 Thread Jeremy Chadwick
On Mon, Oct 13, 2008 at 09:57:22AM -0600, Warren Block wrote:
> On Sun, 12 Oct 2008, ton80 wrote:
>
>> I am trying to install FreeBSD.
>> During the install (actually at the beginning of the process) the system
>> hangs indefinitely.
>> When it gets to the select country screen...it is frozen.
>> During the boot process, as it is reading all the hardware, it finds the USB
>> controller OK then later it states there was an IO error and that the USB
>> controller is halted. I have a USB Keyboard and mouse...so I would say the
>> problem is here.
>> Is there any workaround I can use to get things going?
>
> Set "USB Legacy Support" to disabled in the BIOS.  If that isn't  
> available, it might work to boot with the keyboard detached.  Connect it  
> after the BIOS boot, at the FreeBSD bootloader prompt or maybe at the  
> country select screen.

I don't see how this would solve or even affect his problem.

As I understand it, "USB Legacy Support" is intended for operating
systems which do not have a USB stack available to them, thus making USB
keyboards/mice appear as PS/2 keyboards/mice within MS-DOS and so on.  I
believe the way it works is that the BIOS acts as a software translation
layer between the USB device and PS/2 interaction.  This translation is
lost the instant interrupts are re-mapped or the southbridge/USB
controller is initialised.

The OP is making it past boot2/loader, the kernel and all its drivers
are fully loaded (including the USB stack).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: RAID migration

2008-10-12 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 10:27:47PM -0600, Anthony Chavez wrote:
> Jeremy Chadwick wrote:
> > On Sun, Oct 12, 2008 at 07:10:31PM -0600, Anthony Chavez wrote:
> >> Dear freebsd-questions,
> >>
> >> I have a HighPoint 1820 RAID controller that is using 1 channel for an
> >> OS drive and 3 channels for a RAID-5 array.  I'm interested in migrating
> >> to a new (possibly non-HighPoint) card, and am wondering if I will be
> >> able to plug the OS drive into one channel on the new card and have it
> >> "just work."  Is it a safe bet that it will?
> > 
> > It "probably" will work, assuming that the OS disk is not configured
> > as a RAID or array member in the RAID cards' BIOS.  Meaning, if you're
> > using the disk on the controller purely in a "JBOD" fashion, yes, it
> > should work.
> 
> In the WebGUI's "logical device information" section, that particular
> drive is listed as a "hard disk" whereas the other 3 are clearly spelled
> out as a "RAID 5" array.  When I shut the machine down, I will check the
> BIOS itself to see if it specifically states "JBOD."  Thanks for the
> pointer.

It probably won't.  JBOD is just a term used to describe a hard disk
hooked to a RAID controller but not part of a RAID array.

I'd start by pulling the OS disk out and hooking it to a non-Highpoint
controller and ensure it boots.  Chances are it will.

Some advice, assuming you haven't done this before:

1) Make note of what your filesystem layout is before migrating.  "df"
output should be sufficient.

2) When you boot it, FreeBSD will probably complain "unable to determine
root filesystem".  I'm guessing these are ATA/SATA disks.  The kernel
messages shown should list off what ATA disks are attached, and you'll
have to make some educated guesses as to what it is, e.g. ufs:ad4s1a
rather than the old ufs:da0s1a.  You'll have to mount all the
filesystems by hand (mount /dev/ad4s1d /var, etc. -- this is what #1 was
for :-) ) so you can get access to vi, so you can vi /etc/fstab and fix
the problem.

You can also use ed(1) to do the fstab editing without having to mount
everything, if you're familiar with it.

Hope this helps.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: RAID migration

2008-10-12 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 07:10:31PM -0600, Anthony Chavez wrote:
> Dear freebsd-questions,
> 
> I have a HighPoint 1820 RAID controller that is using 1 channel for an
> OS drive and 3 channels for a RAID-5 array.  I'm interested in migrating
> to a new (possibly non-HighPoint) card, and am wondering if I will be
> able to plug the OS drive into one channel on the new card and have it
> "just work."  Is it a safe bet that it will?

It "probably" will work, assuming that the OS disk is not configured
as a RAID or array member in the RAID cards' BIOS.  Meaning, if you're
using the disk on the controller purely in a "JBOD" fashion, yes, it
should work.

> I'm curious to know if the array could be migrated just as easily, or if
> I should listen to my instinct and count on bumping into
> incompatibilities due to proprietary implementations.

I can absolutely guarantee you that you will lose access to all of your
data once you plug those 3 disks into another controller.

You need to back up all of your data from the RAID-5 array using
something like rsync, cpdup, or dump, move the disks over to the
non-RAID controller, format them (in whatever fashion you want),
and then restore the backup.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: The disc in your drive looks more like an Audio CD than a FreeBSDrelease

2008-10-12 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 08:23:51PM +0200, Kiffin wrote:
> Thanks for the prompt response. However, I have a brand-new ASUS X59XL
> notebook so the CD drive isn't old. Could it be that the CD drive is too
> new and not recognized properly bt FreeBSD rather than too old?

1) There's nothing "special" about the FreeBSD CDs.  They are Mode 1
discs, and do not use anything like Joliet filesystem extensions (so
that MS-DOS can see all the filenames in 8.3 format).

2) The age of the CD drive has nothing to do with what sort of
extensions and capabilities it has.  I should have been more precise
when I gave you facts talking about old CD drives -- it's likely that
fellow's Teac CD drive has a buggy firmware, and it's highly possible
that your Asus laptop has the same problem.

3) ATAPI is ATAPI; FreeBSD does not have "CD drive-specific drivers".
It would be much more likely that FreeBSD wouldn't find the CD at all
(or any hard disks, etc.) due to the ATA controller not being supported.
Yours appears supported, otherwise FreeBSD wouldn't even know the *type*
of disc.

I would recommend you contact Asus Support and ask them to burn an ISO
of FreeBSD and try to install it on that laptop, to reproduce your
problem.  If they can reproduce it, they should be able to figure out
what's causing the issue; if they can't, then it may be a problem with
your laptop specifically.

P.S. -- This "audio CD" problem goes all the way back to FreeBSD 2.2.6
or earlier.  It's not a new problem, but it's very rare.  Because of
this fact, I strongly doubt the problem is with FreeBSD, and rather
with buggy firmwares in CD drives.

> On Sun, 2008-10-12 at 10:58 -0700, Jeremy Chadwick wrote:
> > On Sun, Oct 12, 2008 at 07:36:37PM +0200, Kiffin wrote:
> > > I rechecked the discs with a verify tool using the original iso files
> > > and nothing is wrong with the discs.
> > 
> > A couple comments:
> > 
> > 1) This isn't telling me anything.  For all I know the "verify tool"
> > only compares ISO file contents to what's on a disc -- that probably
> > will return success.
> > 
> > You need to realise there's a *lot* of information in the ISO header
> > which defines the type of disc it is, and types of extensions it
> > supports (Joliet, Red Ridge, etc.).  And the burning software has to
> > properly know how to use those bits, otherwise it can do the wrong
> > thing.
> > 
> > 2) Some older CD drives apparently report FreeBSD discs as Audio CDs
> > (even inside of Windows).  I've seen this happen once in my life, but I
> > was not trying to install FreeBSD (I was just inserting the disc into a
> > Windows PC to see what was on it).
> > 
> > The below thread is of a fellow running into the same problem: and his
> > issue turned out to be a very old/unreliable CD drive, which he likely
> > (eventually) replaced.  He resorted to installing off of another machine
> > over the network, but you get the point:
> > 
> > http://forums.devshed.com/bsd-help-31/freebsd-installation-fails-when-looking-for-media-45366.html
> > 
> > > On Sun, 2008-10-12 at 08:01 -0700, Jeremy Chadwick wrote:
> > > > On Sun, Oct 12, 2008 at 04:51:54PM +0200, Kiffin wrote:
> > > > > I checked it and everything looks just fine, e.g. just Freebsd install
> > > > > files and nothing else.
> > > > 
> > > > It's very possible that the disc burning software you used did something
> > > > incorrectly, or did something custom.  What program burnt the CD?  If a
> > > > UNIX program, what flags did you give it?
> > > > 
> > > > > On Tue, 2008-10-07 at 18:42 +0800, joeb wrote:
> > > > > > Yea I would say your burn of the .iso file to your cd did not work. 
> > > > > > Mount
> > > > > > the cd and see if it contains a directory tree of Freebsd install 
> > > > > > files or
> > > > > > mp3 files.
> > > > > > 
> > > > > > -Original Message-
> > > > > > From: [EMAIL PROTECTED]
> > > > > > [mailto:[EMAIL PROTECTED] Behalf Of
> > > > > > [EMAIL PROTECTED]
> > > > > > Sent: Monday, October 06, 2008 7:07 PM
> > > > > > To: freebsd-questions@freebsd.org
> > > > > > Subject: The disc in your drive looks more like an Audio CD than a
> > > > > > FreeBSDrelease
> > > > > > 
> > > > > > Hi there.
> > > > > > 
> > > > > >

Re: Installation Hangs

2008-10-12 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 11:08:50AM -0700, ton80 wrote:
> Jeremy Chadwick-3 wrote:
> > On Sun, Oct 12, 2008 at 10:54:26AM -0700, ton80 wrote:
> >> Hello,
> >> I am trying to install FreeBSD.
> >> During the install (actually at the beginning of the process) the system
> >> hangs indefinitely.
> >> When it gets to the select country screen...it is frozen.
> >> During the boot process, as it is reading all the hardware, it finds the
> >> USB
> >> controller OK then later it states there was an IO error and that the USB
> >> controller is halted. I have a USB Keyboard and mouse...so I would say
> >> the
> >> problem is here.
> >> Is there any workaround I can use to get things going?
> > 
> > I'm inclined to believe the installation isn't "hung", but rather that
> > FreeBSD isn't properly working with your USB keyboard (this is very
> > likely, given the state of USB on FreeBSD -- work is underway on CURRENT
> > to fix these problems), so you think the installation is "hung", but
> > in reality it's just waiting for a keypress.
> > 
> > The only workaround I can think of would be to get a PS/2 keyboard and
> > use that.  Chances are even if you get the OS installed, you probably
> > won't be able to type at the console (with the USB keyboard).  :-)
> > 
> > And please remember that on many systems you should reboot the system
> > after plugging in or removing a PS/2 keyboard; hot-swapping only works
> > on some motherboards.
> > 
> > -- 
> > | Jeremy Chadwickjdc at parodius.com |
> > | Parodius Networking   http://www.parodius.com/ |
> > | UNIX Systems Administrator  Mountain View, CA, USA |
> > | Making life hard for others since 1977.  PGP: 4BD6C0CB |
> > 
> > ___
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to
> > "[EMAIL PROTECTED]"
> 
> Ah...if only it were that easy!
> My system does not have PS2 connectors...only USB.
> So if I cannot get the USB workingI cannot use FreeBSD.

In this case, correct.

> Would OpenBSD give me the same problems I wonder?

I don't know what the state of OpenBSD's USB stack is, and the last
time I encountered NetBSD's USB stack was 7 years ago (not so pleasant
results).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Installation Hangs

2008-10-12 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 10:54:26AM -0700, ton80 wrote:
> Hello,
> I am trying to install FreeBSD.
> During the install (actually at the beginning of the process) the system
> hangs indefinitely.
> When it gets to the select country screen...it is frozen.
> During the boot process, as it is reading all the hardware, it finds the USB
> controller OK then later it states there was an IO error and that the USB
> controller is halted. I have a USB Keyboard and mouse...so I would say the
> problem is here.
> Is there any workaround I can use to get things going?

I'm inclined to believe the installation isn't "hung", but rather that
FreeBSD isn't properly working with your USB keyboard (this is very
likely, given the state of USB on FreeBSD -- work is underway on CURRENT
to fix these problems), so you think the installation is "hung", but
in reality it's just waiting for a keypress.

The only workaround I can think of would be to get a PS/2 keyboard and
use that.  Chances are even if you get the OS installed, you probably
won't be able to type at the console (with the USB keyboard).  :-)

And please remember that on many systems you should reboot the system
after plugging in or removing a PS/2 keyboard; hot-swapping only works
on some motherboards.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: The disc in your drive looks more like an Audio CD than a FreeBSDrelease

2008-10-12 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 07:36:37PM +0200, Kiffin wrote:
> I rechecked the discs with a verify tool using the original iso files
> and nothing is wrong with the discs.

A couple comments:

1) This isn't telling me anything.  For all I know the "verify tool"
only compares ISO file contents to what's on a disc -- that probably
will return success.

You need to realise there's a *lot* of information in the ISO header
which defines the type of disc it is, and types of extensions it
supports (Joliet, Red Ridge, etc.).  And the burning software has to
properly know how to use those bits, otherwise it can do the wrong
thing.

2) Some older CD drives apparently report FreeBSD discs as Audio CDs
(even inside of Windows).  I've seen this happen once in my life, but I
was not trying to install FreeBSD (I was just inserting the disc into a
Windows PC to see what was on it).

The below thread is of a fellow running into the same problem: and his
issue turned out to be a very old/unreliable CD drive, which he likely
(eventually) replaced.  He resorted to installing off of another machine
over the network, but you get the point:

http://forums.devshed.com/bsd-help-31/freebsd-installation-fails-when-looking-for-media-45366.html

> On Sun, 2008-10-12 at 08:01 -0700, Jeremy Chadwick wrote:
> > On Sun, Oct 12, 2008 at 04:51:54PM +0200, Kiffin wrote:
> > > I checked it and everything looks just fine, e.g. just Freebsd install
> > > files and nothing else.
> > 
> > It's very possible that the disc burning software you used did something
> > incorrectly, or did something custom.  What program burnt the CD?  If a
> > UNIX program, what flags did you give it?
> > 
> > > On Tue, 2008-10-07 at 18:42 +0800, joeb wrote:
> > > > Yea I would say your burn of the .iso file to your cd did not work. 
> > > > Mount
> > > > the cd and see if it contains a directory tree of Freebsd install files 
> > > > or
> > > > mp3 files.
> > > > 
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED] Behalf Of
> > > > [EMAIL PROTECTED]
> > > > Sent: Monday, October 06, 2008 7:07 PM
> > > > To: freebsd-questions@freebsd.org
> > > > Subject: The disc in your drive looks more like an Audio CD than a
> > > > FreeBSDrelease
> > > > 
> > > > Hi there.
> > > > 
> > > > I tried to install 7.1-BETA from the CD I burned from
> > > > 7.1-BETA-i386-disc1.iso, but after I created all the partitions etc and 
> > > > then
> > > > selected to install, I get the following error message:
> > > > 
> > > > "The disc in your drive looks more like an Audio CD than a FreeBSD 
> > > > release"
> > > > 
> > > > Any idea what's wrong?
> > > > 
> > > > --
> > > > Kiffin Gish <[EMAIL PROTECTED]>
> > > > Gouda, The Netherlands
> > > > 
> > > > ___
> > > > freebsd-questions@freebsd.org mailing list
> > > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > > > To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> > > > 
> > > -- 
> > > Kiffin <[EMAIL PROTECTED]>
> > > 
> > > ___
> > > freebsd-questions@freebsd.org mailing list
> > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > > To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> > 
> -- 
> Kiffin <[EMAIL PROTECTED]>

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: The disc in your drive looks more like an Audio CD than a FreeBSDrelease

2008-10-12 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 04:51:54PM +0200, Kiffin wrote:
> I checked it and everything looks just fine, e.g. just Freebsd install
> files and nothing else.

It's very possible that the disc burning software you used did something
incorrectly, or did something custom.  What program burnt the CD?  If a
UNIX program, what flags did you give it?

> On Tue, 2008-10-07 at 18:42 +0800, joeb wrote:
> > Yea I would say your burn of the .iso file to your cd did not work. Mount
> > the cd and see if it contains a directory tree of Freebsd install files or
> > mp3 files.
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Monday, October 06, 2008 7:07 PM
> > To: freebsd-questions@freebsd.org
> > Subject: The disc in your drive looks more like an Audio CD than a
> > FreeBSDrelease
> > 
> > Hi there.
> > 
> > I tried to install 7.1-BETA from the CD I burned from
> > 7.1-BETA-i386-disc1.iso, but after I created all the partitions etc and then
> > selected to install, I get the following error message:
> > 
> > "The disc in your drive looks more like an Audio CD than a FreeBSD release"
> > 
> > Any idea what's wrong?
> > 
> > --
> > Kiffin Gish <[EMAIL PROTECTED]>
> > Gouda, The Netherlands
> > 
> > ___
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> > 
> -- 
> Kiffin <[EMAIL PROTECTED]>
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: rsync or even scp questions....

2008-10-12 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 09:42:38AM +0100, Matthew Seaman wrote:
> mdh wrote:
>> --- On Sat, 10/11/08, Gary Kline <[EMAIL PROTECTED]> wrote:
>>> On the Ubuntu computer I am /home/kline; on my main
>>> computer,
>>> my home is /usr/home/kline.   The following sh script
>>> worked
>>> perfected when my home on "tao" [FBSD] was
>>> /home/kline:
>>>
>>> P
>>> #!/bin/sh
>>>
>>> PWD=`pwd`;
>>> echo "This directory is [${PWD}]";
>>>
>>> scp -qrp  ${PWD}/* ethos:/${PWD}
>>> ###/usr/bin/scp -rqp -i /home/kline/.ssh/zeropasswd-id
>>> ${PWD}/* \ klin
>>> [EMAIL PROTECTED]:/${PWD}
>>>
>>> Question #1: is there any /bin/sh method of getting rid of
>>> the
>>> "/usr"?  I switch off between my two computers
>>> especially when
>>> get mucked up, as with my upgrade to kde4.  (Otherwise, I
>>> do
>>> backups of ~kline as well as other critical directories.)
>>>
>>> Is there a way of automatically using rsync rather that my
>>> kwik-and-dirty /bin/shell script?
>>>
>>> thanks, people,
>>>
>>> gary
>>
>> If what you wish to do is simply get rid of /usr in a string, you can use 
>> sed like so:
>> varWithoutUsr=`echo ${varWithUsr} |sed -e 's/\/usr//'`
>> After running this, where $varWithUsr is the variable containing a 
>> string like "/usr/home/blah", the variable $varWithoutUsr will be equal 
>> to "/home/blah".  I create simple scripts like this all the time to 
>> rename batches of files, for example.  
>>
>> The easier way is probably just to not specify a dir to scp's remote 
>> path though, since it defaults to the user's home directory.  
>
> Or, in anything resembling Bourne shell:
>
> varWithoutUsr=${varWithUsr#/usr}

And I'll take a moment to recommend Matthew's method, since it does not
involve fork()ing an additional process.

When writing shell scripts in general, it's best if you can avoid
spawning external processes for things which can be done easily
(keyword: easily!) within Bourne natively.  There's no harm in doing it
for more complex things, but fork() is somewhat expensive, and try to
imagine what will happen to those scripts if the system lacks process
table space, etc...  :-)  Best to try and make everything
"self-contained" if possible.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Worth persuing a KDB: stack backtrace: ?

2008-10-11 Thread Jeremy Chadwick
> fsck'd them, but now not so sure.

I'd recommend setting background_fsck="no" in /etc/rc.conf in the
future.  Backgrounded fsck does not catch all filesystem errors; this
has been discussed very thoroughly on the -stable list.

> > I doubt you're going to get much support on this, since you're running
> > FreeBSD 5.5, which is no longer supported.  Believe me: you will get
> > continual push-back from the rest of the FreeBSD developers asking for
> > support on 5.5.  The RELENG_6 series is on its way out as well, so
> > you should consider installing RELENG_7 (specifically 7.1-BETA at
> > this point).
> > 
>   Well, that was 1/2 of the reason why I asked if it was even
> worth it to trace it out. 1/2 was the fact its 5.5, the other 1/2 was
> that I've already been told to replace the motherboard. :)
> 
>   I tried going to 6.X on this machine for a few weeks once before, 
> constantly locked up in the booting of the kernel. I haven't had a spare 
> second otherwise to consider going to 7. I didn't think anyone would
> really want to help on 5.5, but figured I'd toss it out there and see if
> anyone thought it worth while.

I don't think anyone will be very willing to help with this now that
you've confirmed the system has bad memory, possibly a bad DIMM slot,
and very likely filesystem corruption.

As I said above, I think the solution at this point is obvious.  :-)

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: newsyslog naming scheme could be improved?

2008-10-11 Thread Jeremy Chadwick
On Sat, Oct 11, 2008 at 09:33:42AM -0700, Kelly Jones wrote:
> newsyslog rotates logfiles so that messages.0.gz is yesterday's file,
> messages.1.gz is the day before's, etc.
> 
> This is ugly. If I tell my fellow sysadmins that I ran this command:
> 
> zfgrep 'bad thing' /var/log/messages.4.gz
> 
> and found stuff, they may run it the next day and get different
> results because the file is now messages.5.gz

Is it possible to educate your co-workers into looking at timestamps on
files before randomly assuming that EVERYTHING ends up in .4.gz?  :-)
Surely your co-workers aren't that dense.

Or you can have them use zgrep 'bad thing' /var/log/messages.*.gz
and tell them "pay close attention to the timestamps shown!!"  That
might work as a better work-around.

> Improving my cow-orkers intelligence would be the ideal solution, but
> has anyone considered tweaking newsyslog to name files
> messages.2008-10-05-12-00-00.gz or something. IE, give them a constant
> name that doesn't change and then delete them after how many ever
> days?

I'd vote for the following strftime(3) format: "%Y%m%dT%H%M".  Otherwise
known as: MMDDThhmm

 = Year (4-digit)
  MM = Month (01 to 12)
  DD = Day (01 to 31)
   T = Literal ASCII string "T"
  hh = Hour (24-hour time, e.g. 00 to 23)
  mm = Minute (00 to 59)

The "T" aspect is optional, but it's what we use at my workplace,
and makes recognising the hour-minute portion easier.

I don't think we need second-level granularity on this stuff; even
minute granularity is questionable (because not all logs will get
rotated at exactly 00 minutes; they might take 20 minutes to compress
based on system load, etc...), since you'd have inconsistencies in
the filenames, e.g.:

messages.20081005T.gz
messages.20081006T0001.gz
messages.20081007T0001.gz
messages.20081008T.gz
messages.20081009T0002.gz

And so on.

Food for thought.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: cvsup 7.0 STABLE checkout failure

2008-10-11 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 02:41:34AM +0530, Shakul M Hameed wrote:
>  I am never going to do a Windows->FreeBSD mount as it is not required for me.
>  I rather go for extra space on my FreeBSD box. Is there any method to 
> increase
>  the size of my FreeBSD partition??  

Do you mean partition as in "I have separate partitions for Windows and
FreeBSD", or do you mean partition as in "I want to grow /usr to be
larger"?

If the lesser: there are commercial utilities out there (such as
Partition Magic) which let you "resize" partitions.  However, I cannot
stress this enough: *back up all of your data* before doing this.  I
have been bit by bugs in PQMAGIC *twice* in my lifetime (the program
panic'ing at 99% and causing me to lose all of my data).

If the latter: some people will tell you about growfs(8), but I'm
not sure how reliable it is.  You'll need to become familiar with
bsdlabel(8) and fdisk(8) before you can use that.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Worth persuing a KDB: stack backtrace: ?

2008-10-11 Thread Jeremy Chadwick
On Sat, Oct 11, 2008 at 11:22:21AM -0400, Tuc wrote:
>   I have a 5.5-STABLE laptop thats been having issues lately, mostly
> related to memory. I bought new chips, and I think I narrowed it down to one
> of the Dimm slots being bad. I did a memtest for 25 hours and it seemed 
> stable.

memtest86+ would definitely detect a DIMM slot being bad, so running it
for 25 hours successfully means the DIMM and the DIMM slot is likely fine.

> I started up and started downloading a backup of over 5K emails. (All have
> to go through mimedefang, procmail and sendmail... So the system was a bit
> sluggish. I started to get things like :
> 
> Oct 10 22:06:29 himinbjorg kernel: KDB: stack backtrace:
> Oct 10 22:06:29 himinbjorg kernel: 
> kdb_backtrace(c3053200,1,dbb54c04,dbb54bf0,c0
> 73ba78) at kdb_backtrace+0x29
> Oct 10 22:06:29 himinbjorg kernel: getdirtybuf(dbb54be0,0,1,cc1c81e8,1) at 
> getdi
> rtybuf+0x27
> Oct 10 22:06:29 himinbjorg kernel: flush_deplist(c305354c,1,dbb54c04) at 
> flush_d
> eplist+0x34
> Oct 10 22:06:29 himinbjorg kernel: 
> flush_inodedep_deps(c216d000,715e,c089bcf8,c0
> 808b16,ef) at flush_inodedep_deps+0x7d
> Oct 10 22:06:29 himinbjorg kernel: softdep_sync_metadata(dbb54ca0) at 
> softdep_sy
> nc_metadata+0x8c
> Oct 10 22:06:29 himinbjorg kernel: ffs_fsync(dbb54ca0) at ffs_fsync+0x33e
> Oct 10 22:06:29 himinbjorg kernel: fsync(c3549600,dbb54d04,1,1,286) at 
> fsync+0x1
> 03
> Oct 10 22:06:29 himinbjorg kernel: syscall(2f,2f,bfbf002f,80fef20,0) at 
> syscall+
> 0x227
> Oct 10 22:06:29 himinbjorg kernel: Xint0x80_syscall() at Xint0x80_syscall+0x1f
> Oct 10 22:06:29 himinbjorg kernel: --- syscall (95, FreeBSD ELF32, fsync), 
> eip =
>  0x28181ca7, esp = 0xbfbf6d1c, ebp = 0xbfbf86e8 ---

This looks more like a filesystem problem, not a memory problem.  All
of the functions listed in the backtrace show UFS/FFS problems and
filesystem metadata issues of some kind.

Booting the machine in single-user mode and run "fsck -y".  I'm betting
you'll find errors.  If not, then it's probably a kernel bug -- see
below, however.

I doubt you're going to get much support on this, since you're running
FreeBSD 5.5, which is no longer supported.  Believe me: you will get
continual push-back from the rest of the FreeBSD developers asking for
support on 5.5.  The RELENG_6 series is on its way out as well, so
you should consider installing RELENG_7 (specifically 7.1-BETA at
this point).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: cvsup 7.0 STABLE checkout failure

2008-10-11 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 02:20:52AM +0530, Shakul M Hameed wrote:
> On Sat, Oct 11, 2008 at 07:47:11AM -0700, Jeremy Chadwick wrote:
> > Are you sure?  http://www.freebsd.org/doc/en/books/handbook/cvsup.html -- 
> > see
> > the first "Note:" paragraph. 
> 
>  As a newbie to FreeBSD, I would rather like to have a single Code Versioning 
> system.  
>  Several methods put newbies in dilemma to decide upon the best suitable 
> procedure. 
>  I feel there should be one unique source code management system.

csup and cvsup function the same, and they both rely on the same source
versioning system.  However, cvsup requires Modula3/ezm3 (an external
dependency), while csup was written entirely in C and comes with the
FreeBSD base system.

Does this explain the difference?

Thus: pkg_delete cvsup and ezm3 (if installed) from your system, and
start using csup.  :-)

> > I don't see how that would fix or change anything.  In fact, I'm fairly
> > certain it doesn't.
> > 
> > The error you are receiving from cvsup is telling you "I tried to rename
> > a file, but couldn't".  This often implies a permissions or ownership
> > thing.  Since the directory you're storing stuff in is on an SMB/CIFS
> > share, I cannot help but wonder if that's the cause of the problem
> > (somehow).
> 
>  Jeremy, as pointed by "N.J. Mann"  recently in a reply in this thread, there 
> is a semicolon in the filename

You mean colon, but I understand what you meant.

>  where the rename faliure happened. Because the file
>  "checkouts.cvs:RELENG_7" had ":" in it, which was not created
>  subsequently due to SMB limitation for ":"-based filenames.  
>
>  Because this the cvsup checked-out halted at this point. Morever, as
>  indicated by "Sean <[EMAIL PROTECTED]>" the case-insensitiveness
>  would lead to missing files. 
>
> I think, I should format my Network drive to NFS to make it really
> UNIX friendly.

NFS is a transport protocol, not a filesystem type.  You don't "format a
disk to be NFS-friendly".  You can use NFS with any type of filesystem;
UFS/FFS, ZFS, ext2fs, ext3fs, NTFS, MS-DOS, etc...

The problem is that you're using an NTFS across smbmount(8).  NTFS does
not support some characters in filenames, and also is case-insensitive.
You are being limited by NTFS, and also possibly by smbmount(8).

What you need is to install another disk in your FreeBSD box, or
allocate space somewhere on the existing filesystem(s) for your
development stuff.

If you really want Windows and FreeBSD to "play well" together, your
best option is to run Samba on the FreeBSD box and use UFS2 filesystems,
then make the Windows machine mount shares from the FreeBSD machine.
The other way around (FreeBSD-->Windows) creates problems like the ones
you've experienced.

Hope this helps.  Cheers!

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: cvsup 7.0 STABLE checkout failure

2008-10-11 Thread Jeremy Chadwick
On Sun, Oct 12, 2008 at 01:21:31AM +0530, Shakul M Hameed wrote:
> > 1) Your setup looks very custom.  I see SMB/CIFS in use, and you're
> > using a non-standard directory for the cvsup CVS data (the default is
>   Yes, I am using mount_smbfs to mount a network harddrive to store all my 
> devel code.
>   I don't want to overcrowd the the root disk

I'm left wondering if there are some permissions or ownership issues as
a result of this.

>   I am using X11 cvsup stable-supfile. This is the snapshot of my modified 
> cvsup file
> 
> # Defaults that apply to all the collections
> #
> # IMPORTANT: Change the next line to use one of the CVSup mirror sites
> # listed at http://www.freebsd.org/doc/handbook/mirrors.html.
> *default host=cvsup3.de.FreeBSD.org
> *default base=/usr/home/moin/smbmount/code/SUPDB/
> *default prefix=/usr/home/moin/smbmount/code/src/
> # The following line is for 7-stable.  If you want 6-stable, 5-stable,
> # 4-stable, 3-stable, or 2.2-stable, change to "RELENG_6", "RELENG_5",
> # "RELENG_4", "RELENG_3", or "RELENG_2_2" respectively.
> *default release=cvs tag=RELENG_7
> *default delete use-rel-suffix
> 
> # If you seem to be limited by CPU rather than network or disk bandwidth, try
> # commenting out the following line.  (Normally, today's CPUs are fast enough
> # that you want to run compression.)
> *default compress
> 
> ## Main Source Tree.
> #
> # The easiest way to get the main source tree is to use the "src-all"
> # mega-collection.  It includes all of the individual "src-*" collections.
> # Please note:  If you want to track -STABLE, leave this uncommented.
> src-all
> 

I have no idea what an "X11 cvsup stable-supfile" is, so I assume you
mean you've used /usr/share/examples/cvsup/stable-supfile as a template
supfile, but have your own somewhere else.

The reason I was confused: you first stated you're using the ones in
/usr/share/examples/cvsup, and I assumed that mean you were using it
directly.  You shouldn't modify any files in /usr/share/examples, as
they will be replaced/overwritten during installworld.

Your pasted supfile looks fine, however.

> > 2) Check permissions and ownership of all directories leading up to
> > /usr/home/moin/smbmount/code/SUPDB/sup/src-all.  Yes, check every single
> > one.

Please do this.

> > 3) Ensure your umask is 022 before starting cvsup.  This could be a side
> > result of item #2.
>umask is 0022
> > 
> > 4) I'm not sure why you're using cvsup on a 7.x box when csup comes with
> > the base system.
> 
>   I don't know why ? :-) . But I did as it was listed in the FreeBSD handbook.

Are you sure?  http://www.freebsd.org/doc/en/books/handbook/cvsup.html -- see
the first "Note:" paragraph.

> > I would also try doing this as a last resort:
> > 
> > rm -fr /usr/home/moin/smbmount/code/SUPDB/sup/src-all
> > rm -fr /usr/src/*
> > csup -h  -L 2 /usr/share/examples/cvsup/stable-supfile
> 

> As a lost resort, I did a "cvsup -g -L2 stable-supfile", with just
> changing the HOST part without changing other entries in
> stable-supfile, and I was successful to download the code.

I don't see how that would fix or change anything.  In fact, I'm fairly
certain it doesn't.

The error you are receiving from cvsup is telling you "I tried to rename
a file, but couldn't".  This often implies a permissions or ownership
thing.  Since the directory you're storing stuff in is on an SMB/CIFS
share, I cannot help but wonder if that's the cause of the problem
(somehow).

> Currently, I am trying out to figure why the customised way is failing.  

I see nothing wrong with your supfile.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: proflibs

2008-10-11 Thread Jeremy Chadwick
On Sat, Oct 11, 2008 at 09:01:50AM -0400, Ansar Mohammed wrote:
> Are they needed for compiling anything from ports?

I have yet to find a port that *requires* profiled libraries.

They are only needed for developers wishing to "benchmark" code
(determine how long the system/processor stays within a specific
function), and use of profiled libraries has to be explicitly requested
(using gcc -p).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: cvsup 7.0 STABLE checkout failure

2008-10-11 Thread Jeremy Chadwick
On Sat, Oct 11, 2008 at 11:33:08PM +0530, Shakul M Hameed wrote:
> Forwarding original msg to freebsd-questions mailing list.
>  
> On Sat, Oct 11, 2008 at 11:06:13PM +0530, Shakul M Hameed wrote:
> > I am trying to download 7.0 stable release through cvsup, but it fails. I 
> > tried changing the server, but still get those errors. 
> > 
> > - ERROR ---
> > 
> > Checkout src/share/doc/psd/15.yacc/ss..
> > Updater failed: Error in
> > "/usr/home/moin/smbmount/code/SUPDB/sup/src-all/checkouts.cvs:RELENG_7": 
> > Cannot rename 
> > "/usr/home/moin/smbmount/code/SUPDB/sup/src-all/#cvs.cvsup-7219.0" to
> > "/usr/home/moin/smbmount/code/SUPDB/sup/src-all/checkouts.cvs:RELENG_7": No 
> > such filer or directory
> > 
> >  SUPFILE -
> > default stable-cvsup from /usr/share/examples/cvsup
> > -- 
> > 
> > pls, indicate what i am doing wrong here?

1) Your setup looks very custom.  I see SMB/CIFS in use, and you're
using a non-standard directory for the cvsup CVS data (the default is
/usr/sup).  You're either starting cvsup with some custom arguments or
your supfile *is* in fact modified.

2) Check permissions and ownership of all directories leading up to
/usr/home/moin/smbmount/code/SUPDB/sup/src-all.  Yes, check every single
one.

3) Ensure your umask is 022 before starting cvsup.  This could be a side
result of item #2.

4) I'm not sure why you're using cvsup on a 7.x box when csup comes with
the base system.

I would also try doing this as a last resort:

rm -fr /usr/home/moin/smbmount/code/SUPDB/sup/src-all
rm -fr /usr/src/*
csup -h  -L 2 /usr/share/examples/cvsup/stable-supfile

However, with regards to use of /usr/share/examples/cvsup/stable-supfile
see my above comment; yours may be modified.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Need help installing on SATA

2008-10-11 Thread Jeremy Chadwick
On Sat, Oct 11, 2008 at 12:44:03PM +0200, Wojciech Puchar wrote:
>> they're committing a sin by using another operating system.  Open source
>> is about freedom of choice -- if FreeBSD doesn't work for you or get the
>> job done, and Linux does, then use Linux!  If Windows works for you, use
>> Windows!  There's absolutely no shame in that.  Blind, one-sided
>
> except when it's not advocacy but superiority, for example i would rather 
> seek other hardware than run linux.

What the OP described is definitely advocacy; "I've been using FreeBSD
for 12 years and ".

The sooner users and system administrators stop toting this "
rocks!  It's better than yours!  It's better than !" attitude
the more mature and serious said operating system will appear to the
world, and to commercial vendors.

Speaking solely with regards to Linux: it has the upper hand in many
regards.  As someone who used Linux from 1992 until 1997, and switched
to BSD, I have experience in both worlds.  Linux today has:

- More kernel developers that know the innards well.  FreeBSD has no
  where near the quantity of said kernel folks, which means our guys
  are over-worked and stressed most of the time, and if a key person
  goes on hiatus, there's no guarantee issues will get dealt with while
  they are gone (see below),

- Multiple (read: more than one) kernel developers who are dedicated
  to parts of the kernel.  FreeBSD has many very key/important pieces
  which are maintained by *one individual ONLY*.  If that individual is
  busy with their job, real life, out sick, or even death (yes, this
  has happened!), it means that a key part of the kernel ends up being
  neglected for an indefinite amount of time (usually years),

- Full support from hardware manufacturers/vendors.  Linux developers
  are able to get development/test-bed cards (and usually documentation)
  for developing a new driver, sometimes for hardware/chips that aren't
  even on the market yet.  FreeBSD *very* rarely, if ever, gets this.
  We resort to looking at NetBSD or OpenBSD code (and they are in the
  same boat we are), hoping they have support for said hardware.  If
  not, we resort to looking at Linux code (which is immensely different
  from ours).  Vendors often ignore us.  I can expand on why I believe
  this is, but I have no example cases to back my opinions up,

- Turn-around time on fixes or bugs is significantly faster than ours,
  especially in kernel-land.  This is a direct result of having more
  regularly-operating eyes,

- Larger user base.  This means more bug reports, which I consider a
  good thing -- it means more things are getting fixed,

- More "user-friendly" interface pieces.  There are many aspects of
  FreeBSD which require knowledge of C, or require that someone write
  a C wrapper to get certain pieces of data from the kernel.  Linux
  has numerous methods which allow someone using Python or Ruby or
  Perl to access said data.  FreeBSD can accomplish this, there's
  nothing stopping us except time/effort, so it's not really a
  "negative" against FreeBSD; but people *are* picking Linux because
  of this,

- A significantly different attitude when it comes to support.  Back
  when I used Linux, the attitude was *horrible* (which is why I
  moved to BSD), but it has improved greatly in the past 10 years.
  I can expand on this if need be, but you'll just have to trust me
  for now.  One of the attitudes we have which is very unrealistic is
  "you have the source, you can fix it yourself" -- I'd say 80% of
  our community does not have the ability (or time) to do this.  It is
  rude and unprofessional of us to expect this of our users.

This is reality, I'm sorry to say; no form of advocacy, T-shirt-wearing,
or blogging "FreeBSD rocks!" will change it.  In my opinion, it's better
to embrace the above facts (because nothing is perfect, Linux
included!), and try to improve on them.

People will use whatever gets the job done for them.  If it doesn't,
users *will* switch to another operating system, and there is absolutely
nothing wrong with that.  Why?  Because reality states: solving problems
is more important than advocacy or "superiority".

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Need help installing on SATA

2008-10-11 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 11:06:51PM -0500, Conrad J. Sabatier wrote:
> Does anyone know the magic incantation that will permit me to install 
> FreeBSD on this new machine of mine (nVidia chipset, SATA1 disk 
> controller)?

This information is too vague.  We need to know *exactly*:

1) What motherboard model,
2) What SATA controller you're using ("nVidia chipset" is too vague),
3) If you're using BIOS-level RAID or not,
4) What version of "7.x" you're trying to install.

Please note that FreeBSD often does not support brand-spanking-new
hardware.  For example, there are Asus motherboards out right now
which use a Marvell ATA/PATA controller which FreeBSD does not have
support for.  Linux adopts brand-spanking-new hardware much quicker than
we do.

Finally, these problems are difficult to solve; it's a chicken-and-egg
problem.  Even if you can get into the Fixit CD's "Fixit#" prompt and
type "dmesg", you probably don't have serial console or anything hooked
up, so getting us the dmesg output would be very difficult.

> I've been trying for a week or so now, with no luck.  Just out of 
> curiosity, I downloaded and ran Ubuntu 8.x, and it recognized all of 
> my hardware automatically.  The FreeBSD installer (both in 7.x and 
> 8.x), though, can't find my hard drive or CD-ROM.

There have been *tons* of changes to the ATA/SATA layer between
different 7.x versions.  I would urge you to try 7.1-BETA (do not let
the term "BETA" scare you away) and see if it works for you:

ftp://ftp4.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/7.1/
ftp://ftp4.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.1/

There are some of us which have this problem on CURRENT (8.0).  For
example, in my case, my Promise TX4310 card is not even seen on the PCI
bus during boot-up, while it works just fine in RELENG_7.

> I *really* don't want to have to resort to Linux, not after using 
> FreeBSD for 12 years now, but if I can't find a solution to this 
> problem, I'll have no choice.  :-(

I'm not sure why people resort to saying things like this, like somehow
they're committing a sin by using another operating system.  Open source
is about freedom of choice -- if FreeBSD doesn't work for you or get the
job done, and Linux does, then use Linux!  If Windows works for you, use
Windows!  There's absolutely no shame in that.  Blind, one-sided
advocacy only harms open source projects.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: proflibs

2008-10-11 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 11:06:11PM -0400, Ansar Mohammed wrote:
> Can anyone explain what are the proflibs on the install media, and what they
> are for?

They're special versions of all the libraries that come with FreeBSD
which contain profiling code (code for determining the amount of time
spent within or between two functions).

They're for developers.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: gzipping multiple files w/o tarring

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 09:42:41PM +0200, Wojciech Puchar wrote:
>>
>> "gzip *" will do what you want.
>>
>> When it encounters something that's already gzip'd, it will skip it,
>> but will emit a warning that it's doing so.
>>
>> Otherwise, you could use something like:
>>
>> find -X . \! -name "*.tar.gz" -type f -maxdepth 1 | xargs gzip
>>
> i don't understand the difference.

The 2nd will avoid the warnings emit by "gzip *" when encountering
already-gzipped files.

It all depends on what the user wants.

> .tar.gz files are already gzip'd :), so no need for second case. it will  
> be skipped anyway

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: gzipping multiple files w/o tarring

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 02:49:44PM -0400, Joe Tseng wrote:
> 
> I'm sure this is easy but googling hasn't gotten me anywhere yet...  I want 
> to compress all the files in my directory that don't already have a .gz 
> extension.  I want them to be individual compressed files, not part of a 
> single .tar.gz file.  Can anyone point me to where I can find how to do this?

"gzip *" will do what you want.

When it encounters something that's already gzip'd, it will skip it,
but will emit a warning that it's doing so.

Otherwise, you could use something like:

find -X . \! -name "*.tar.gz" -type f -maxdepth 1 | xargs gzip

Which would do the same as "gzip *", but would ignore any files
with a .tar.gz extension.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Firewall and FreeBSD ports

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 06:54:32PM +0100, RW wrote:
> On Fri, 10 Oct 2008 09:51:16 -0700
> Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> 
> > On Fri, Oct 10, 2008 at 12:45:04PM -0400, John Almberg wrote:
> > > I just set up a new server with a very restricted PF configuration.
> > > One problem: I can no longer install software with ports (i.e,
> > > the / usr/ports collection.) I have to disable PF to do so.
> > > Obviously not a great solution.
> > >
> > > Am I correct in guessing that ports uses FTP to grab source files
> > > from mirrors? I'm trying to figure out the smallest number of ports
> > > (the TCP/IP kind) that I need to open in my firewall. I don't want
> > > to enable incoming FTP requests, but do want to allow outgoing ftp
> > > requests, I believe.
> > >
> > > Am I on the right track, here?
> > 
> > See the fetch(1) man page.  Try this first:
> > 
> > sh/bash: export FTP_PASSIVE_MODE=true
> > csh: setenv FTP_PASSIVE_MODE true
> 
> passive ftp has been the default for long time, fetch is called
> with the -p option.

Let's give the users some actual detail, not terse one-liners which will
induce more questions/confusion.

First off, libfetch (which is what fetch(1)) uses) itself DOES NOT
default to using FTP passive mode.  You have to either pass the -p
option to the fetch(1) binary, or you have to set the FTP_PASSIVE_MODE
environment variable (which affects anything using libfetch).

Secondly, the ports framework (not pkg_* tools!), specifically
ports/Mk/bsd.port.mk, defines FETCH_ARGS with the -p argument to force
passive mode.  This will be used for things like "make fetch".  It *will
not* be used for things like "pkg_add -r" or "pkg_add ftp://...";

The addition of the -p argument to FETCH_ARGS in ports/Mk/bsd.port.mk
was applied to HEAD on 2006/09/20.  HEAD at that time is what became
FreeBSD 6.2.  Of course, anyone updating their ports tree after that
date would also get the change; I'm just pointing it out so people know
what the actual date was when -p was added to the default argument list.

Now let's expand a bit on FTP_PASSIVE_MODE, because I'm absolutely sure
someone will try to argue "that's also been turned on by default for a
long time"; I know how people are...  :-)

FTP_PASSIVE_MODE being set by default on login shells was induced by an
addition to login.conf(5) back in late 2001 (around the time of
RELENG_6).  See revision 1.45 (not 1.44!) of src/etc/login.conf in
cvsweb.

But I'll remind people that login.conf only applies to login shells;
logging in on the console, or logging in to an account via "ssh
[EMAIL PROTECTED]".  Most people I know of *do not* SSH into their servers as
root; they SSH in as themselves and use sudo.  Some use su2, and some
use su.

Let's examine the behaviours:

$ env | grep FTP
FTP_PASSIVE_MODE=YES

As you can see here, the machine I've SSH'd into as myself does apply
login.conf's defaults.  But...

$ sudo -s
# env | grep FTP
# exit
$ sudo -i
# env | grep FTP
#

The above scenario (as root) fails, since the FTP_PASSIVE_MODE
environment variable isn't being handed down from the login shell (my
user account) to the root shell spawned by sudo[1].

su, on the other hand, does it a little differently:

$ su
Password:
# env | grep FTP
FTP_PASSIVE_MODE=YES

And likewise, "su -l" behaves the same way.

The OP did not disclose how he was installing ports.  A lot of users
think that packages == ports, so for all we know, he could be
pkg_add'ing things while using sudo and running into this.

If "make fetch" in an actual port is timing out, then he's either doing
it on a machine with a ports tree prior to 2006/09/20 (see above), or
his outbound pf rules are so strict that the machine is absurdly
limited.

I've advocated in another thread my displeasure for filtering outbound
traffic *solely* because of this exact scenario.  Network admins seem
to think that "oh, HTTP is always going to use port 80", and likewise,
"oh, FTP is always going to use ports 20-21".  Bzzzt.  Nothing stops
a MASTER_SITE from being http://lelele.com:9382/.

[1]: The problem with sudo can be addressed; FTP_PASSIVE_MODE needs to
be added to the env_keep list in the default sudoers file.  I know the
port maintainer, so I'll take this up with him so that users (including
myself) don't keep getting bit by forgetting to set FTP_PASSIVE_MODE
after doing a sudo.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Firewall and FreeBSD ports

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 12:45:04PM -0400, John Almberg wrote:
> I just set up a new server with a very restricted PF configuration. One 
> problem: I can no longer install software with ports (i.e, the / 
> usr/ports collection.) I have to disable PF to do so. Obviously not a  
> great solution.
>
> Am I correct in guessing that ports uses FTP to grab source files from 
> mirrors? I'm trying to figure out the smallest number of ports (the 
> TCP/IP kind) that I need to open in my firewall. I don't want to enable 
> incoming FTP requests, but do want to allow outgoing ftp requests, I 
> believe.
>
> Am I on the right track, here?

See the fetch(1) man page.  Try this first:

sh/bash: export FTP_PASSIVE_MODE=true
csh: setenv FTP_PASSIVE_MODE true

Chances are this will address the problem for you.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: rc: not working as expected? (round 2)

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 12:19:21PM -0300, Paul Halliday wrote:
> (I mistakenly sent the last msg before finishing..)
> 
> Or maybe an interpretation issue.
> 
> I have a few startup scripts in rc.d and I am experiencing timing
> issues. i.e. I need xyz to start before abc.
> 
> Within xyz I tried:
> 
> # REQUIRE: abc
> 
> This didn't work so I tried:
> 
> 100.xyz
> 900.abc
> which doesn't appear to work either.
> 
> What am I missing?

The answer is probably in the rcorder(8) or rc(8) man pages.

I'm betting you need to use the "BEFORE" clause, and the string you need
to match on is whatever one (or more) of the "PROVIDE" clauses are in
the script which you want to start first.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: [SOLVED] Re: 7.1 hangs, shutdown terminated

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 01:07:43PM +0200, Laszlo Nagy wrote:
>
>> Firstly, I see a periodic(8) job that DOES use find -sx, which means
>> your attempt to track it down was faulty, and your syntax should have
>> been "find -sx /" not "find / -sx".  See here:
>>
>> /etc/periodic/security/100.chksetuid:   find -sx $MP /dev/null -type f \
>>   
> Thanks for clearing that out. :-) I did not remember what it was and  
> failed to find it.

I believe the reason you saw this process still running at 8-9 in the
morning was because of the slowdown induced by lack of dirhash memory.
The periodic job runs every day, usually between 0130 and 0200, so
the process had been sitting there processing its heart out for 6-7
hours.

Since you've tuned the dirhash stuff, I'm betting this periodic job will
run much more quickly.

>> $MP == mountpoint, e.g. /, /var, or any other mounted filesystem.
>>
>> So, what you saw was the periodic check looking for setuid-root
>> binaries.
>>
>> Secondly, the kernel does not spawn userland processes like find(1).
>>
>> Thirdly, dirmem and dirmem_max are *pure* kernel things.  What they do
>> is control the amount of memory used for directory structure caching;
>> rather than continually hit the disk every time and spend all that time
>> handling directory contents, the kernel can cache previously-fetched
>> contents in memory
> Now it stays this value constantly:
>
> vfs.ufs.dirhash_mem: 44306131
>
> I think it is now caching everything.
>
> Thank you again, and sorry for the dumb questions.

You asked absolutely *no* dumb questions, especially given the
circumstances!  Do not be ashamed, you did the right thing.  :-)

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: [SOLVED] Re: 7.1 hangs, shutdown terminated

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 11:43:39AM +0200, Laszlo Nagy wrote:
>
>>>> If find / -sx is running and is consuming all CPU, what is the 
>>>> value of vfs.ufs.dirhash_mem: 
>>>>
>>>> # sysctl -a | grep dirhash
>>>> 
>>> shopzeus# sysctl -a | grep dirhash
>>> vfs.ufs.dirhash_docheck: 0
>>> vfs.ufs.dirhash_mem: 2095818
>>> vfs.ufs.dirhash_maxmem: 2097152
>>> vfs.ufs.dirhash_minsize: 2560
>>>
>>> 
>>>> Make sure vfs.ufs.dirhash_mem: is not close to vfs.ufs.dirhash_maxmem:
>>>> 
>>> All right. It is close to it. Which one should I increase? I put this 
>>>  into /etc/sysctl.conf:
>>>
>>>
>>> vfs.ufs.dirhash_maxmem=8228608
>>>
>>> Would it be scufficient?
>>> 
>>
>> We don't know, and can't tell you.  You'll have to monitor
>> vfs.ufs.dirhash_mem occasionally to see if you start to reach
>> vfs.ufs.dirhash_maxmem.
>>
>> I have a tendency to use vfs.ufs.dirhash_maxmem=16777216, which is
>> 16384*1024 (16MBytes).
>>
>> I'm not fully confident this is what's causing your problem, but it's
>> definitely a recommendation by Johan.
>>   
> Thank you very much! Probably you are right. Our users use shared IMAP  
> folders and sometimes they keep ten thousands of messages in one folder.  
> I have increased dirhash_maxmem to 64MB and see what happens.
>
> Unfortunately, I cannot play with the hardware because it is in a server  
> park, and it must be up 99.99% on workdays.
>
> I hope dirhash will solve the problem. I'm setting this to [SOLVED] and  
> come back if it happens again. (Maybe on monday?)
>
> By the way, there is nothing in /etc/periodic that would execute "find /  
> -sx". Can somebody explain what is this for, and why it was started by  
> root? Is it being used instead for enumerating files in a directory,  
> when dir hash is full?

Firstly, I see a periodic(8) job that DOES use find -sx, which means
your attempt to track it down was faulty, and your syntax should have
been "find -sx /" not "find / -sx".  See here:

/etc/periodic/security/100.chksetuid:   find -sx $MP /dev/null -type f \

$MP == mountpoint, e.g. /, /var, or any other mounted filesystem.

So, what you saw was the periodic check looking for setuid-root
binaries.

Secondly, the kernel does not spawn userland processes like find(1).

Thirdly, dirmem and dirmem_max are *pure* kernel things.  What they do
is control the amount of memory used for directory structure caching;
rather than continually hit the disk every time and spend all that time
handling directory contents, the kernel can cache previously-fetched
contents in memory.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: 7.1 hangs, shutdown terminated

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 11:13:00AM +0200, Laszlo Nagy wrote:
> Johan Hendriks írta:
>> If find / -sx is running and is consuming all CPU, what is the value of 
>> vfs.ufs.dirhash_mem: 
>>
>> # sysctl -a | grep dirhash
>>   
> shopzeus# sysctl -a | grep dirhash
> vfs.ufs.dirhash_docheck: 0
> vfs.ufs.dirhash_mem: 2095818
> vfs.ufs.dirhash_maxmem: 2097152
> vfs.ufs.dirhash_minsize: 2560
>
>> Make sure vfs.ufs.dirhash_mem: is not close to vfs.ufs.dirhash_maxmem:
>>   
> All right. It is close to it. Which one should I increase? I put this  
> into /etc/sysctl.conf:
>
>
> vfs.ufs.dirhash_maxmem=8228608
>
> Would it be scufficient?

We don't know, and can't tell you.  You'll have to monitor
vfs.ufs.dirhash_mem occasionally to see if you start to reach
vfs.ufs.dirhash_maxmem.

I have a tendency to use vfs.ufs.dirhash_maxmem=16777216, which is
16384*1024 (16MBytes).

I'm not fully confident this is what's causing your problem, but it's
definitely a recommendation by Johan.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: 7.1 hangs, shutdown terminated

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 10:40:01AM +0200, Laszlo Nagy wrote:
>  Hi,
>
> A computer hangs every day in the morning at a specific time, between 8  
> AM and 9 AM. We can ping it. Apparently the console works, also gdm  
> works on it, but we are not able to login at all. ssh accepts  
> connections, but the authentication does not continue (e.g. ssh client  
> waits for the server forever...)
>
> I even cannot login on the console as "root" because it accepts the user  
> name, but does not ask for the password!
>
> Pressing Ctrl+Alt+Del on the console waits for about one or two minutes,  
> then I see this on the screen:
>
> http://www.imghype.com/viewer.php?imgdata=9d95ee9d1fstrange_shutdown.jpg
>
> Here is /var/log/messages just before the crash:
>
> Oct 10 01:52:47 shopzeus postgres[81114]: [5-1] WARNING:  nonstandard  
> use of escape in a string literal at character 193
> Oct 10 01:52:47 shopzeus postgres[81114]: [5-2] HINT:  Use the escape  
> string syntax for escapes, e.g., E'\r\n'.
> Oct 10 01:57:11 shopzeus postgres[84132]: [5-1] WARNING:  nonstandard  
> use of escape in a string literal at character 188
> Oct 10 01:57:11 shopzeus postgres[84132]: [5-2] HINT:  Use the escape  
> string syntax for escapes, e.g., E'\r\n'.
> Oct 10 02:00:01 shopzeus postfix/postfix-script[86167]: fatal: the  
> Postfix mail system is already running
> Oct 10 02:30:00 shopzeus postfix/postfix-script[7240]: fatal: the  
> Postfix mail system is already running
> Oct 10 03:00:00 shopzeus postfix/postfix-script[27437]: fatal: the  
> Postfix mail system is already running
> Oct 10 04:07:54 shopzeus rc.shutdown: 30 second watchdog timeout  
> expired. Shutdown terminated.
> Oct 10 04:09:16 shopzeus postgres[30455]: [5-1] FATAL:  terminating  
> connection due to administrator command
> Oct 10 04:09:17 shopzeus syslogd: exiting on signal 15
> Oct 10 04:11:31 shopzeus syslogd: kernel boot file is /boot/kernel/kernel
> Oct 10 04:11:31 shopzeus kernel: Copyright (c) 1992-2008 The FreeBSD  
> Project.
> Oct 10 04:11:31 shopzeus kernel: Copyright (c) 1979, 1980, 1983, 1986,  
> 1988, 1989, 1991, 1992, 1993, 1994
>
> After rebooting the machine, nothing happens until the next day. Here  
> are some possible problems I can think of:
>
> #1. We are using gjournal. It might be that the journal size is too  
> small. Although I do not think this is the case, because we have 40GB  
> journal space for each journaled partition below (except for /home, it  
> has 10GB only, but /home is rarely used)
>
> Filesystem  1G-blocks Used Avail Capacity  Mounted on
> /dev/da0s1a 91 714%/
> devfs   00 0   100%/dev
> /dev/da0s1f.journal   140   12   117 9%/home
> /dev/da0s2d.journal   106889 8%/pgdata0
> /dev/da0s1d29026 0%/tmp
> /dev/da0s2e.journal   585   74   46414%/usr
> /dev/da0s1e.journal   145   17   11613%/var
> /dev/da1s1d.journal   4160   383 0%/data
>
> Is it possible that gjournal is hanging up the machine?
>
> #2. Yesterday when I logged in in the morning, I saw a process running  
> under root, it was something like " find / -sx ..." and then something.  
> I don't remember but it was scanning the whole filesystem. It was using  
> 100% cpu and 100% disk I/O. I wonder if that might be freezing the  
> computer. I do not know how to disable this maintenance process but I  
> should. After killing this process, the system worked fine. (We have  
> zillions of files on the disks, running "find / ..." is a bad idea.)

This could be a periodic job (since you said this happens daily) which
runs early in the morning (2-3am?) and for some reason isn't finishing
in a timely manner.  You haven't provided any actual ps -auxwww
data, so we can't easily discern if it's a periodic job or something
amiss on your system (for all we know the system could be compromised).

I'm also curious what controller your SCSI disks are attached to.  Can
you provide that information?  dmesg would be useful.  I remember
hearing some reports about 3Ware controllers locking up due to firmware
problems which were later fixed via a f/w upgrade.

> #3. In the screenshot above, you can see that the IMAP server "dovecot"  
> was terminated on signal 11. Can it be the problem? I can't believe that  
> dovecot could freeze the whole system.
>
> #4. Hardware error. I don't think this is the case since the computer  
> freezes at the same time, every day, so it is more likely a software  
> problem.

My vote is on a hardware problem.  The watchdog timeout you see
indi

Re: How To Get libm.so.4?

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 06:40:22PM +0530, Shakul M Hameed wrote:
> I think its not a very bad idea, unless your app is dependent on a routine 
> which is deprecated and
> not avaiable in the latest version of library. For testing purpose this 
> should be ok. 

I disagree.  It _is_ a bad idea.

There is absolutely *no* guarantee that symbols will be identical
between two revisions of a shared library, especially across a
major revision.  I'm not talking about missing symbols detected during
run-time either; I'm talking about internal changes that could affect
the operation of a program which relies on certain behaviour of
functions in that library, which has changed in a newer version (yet
kept the same function/calling semantics).

And let's not forget about shared libraries that are linked to other
shared libraries, resulting in a dependency tree of madness, where
you'll suddenly find yourself making symlinks all over the place.  (You
should use libmap.conf for this purpose anyway).

So like I said -- it IS a bad idea.  Please do not do it.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: How To Get libm.so.4?

2008-10-10 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 05:56:13PM +0530, Shakul M Hameed wrote:
> check for libm.so.5 in /lib.
> do a softlink of libm.so.4 pointing to libm.so.5 
> I guess this should fix your issue.

**DO NOT** do this.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Portsnap causes system to reboot

2008-10-09 Thread Jeremy Chadwick
On Fri, Oct 10, 2008 at 12:54:38AM +0300, Walter Venable wrote:
>
>> I found this: $ cat /var/crash/
>> ..minfreboundsçinfo.0ç  
>>
>> vmcore.0zinfo.vmcore.1zinfo.vmcore.2zinfo.vmcore.3zinfo.vmcore.4zinfo.vmcore.5zinfo.vmcore.6zinfo.7vmcore.7zÀ
>>  
>> 
>>
>> Any idea what that means?
> Yes, I'm tired, and I did cat on a directory.  I found this in vmcore.7:
>
> <118>Checking for core dump on /dev/ad4s1b...
> <118>savecore: reboot after panic: ffs_clusteralloc: map mismatch
> <118>Oct  9 11:16:26 freebsd savecore: reboot after panic:  
> ffs_clusteralloc: map mismatch
> <118>savecore: writing core to vmcore.6

Please reboot your machine into single-user mode, and run "fsck -y".
I'm betting there's some filesystem corruption.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: TRUE realtime priority

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 10:00:16PM +0200, Wojciech Puchar wrote:
>>> well last night i tested it with SCHED_4BSD instead of sched_ule, reduced
>>> quantum to 2 from 10 and for now - no voice chopping under high
>>> load. but i will test it more.
>>
>> What version of FreeBSD are you using for this?  Yes, it matters.
>
> got RELENG_7 yesterday by cvs, now SCHED_ULE works fine.

Great!  Glad to hear it.  :-)  Thanks for following up!

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Sysinstall

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 08:32:50PM +0200, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have the following prblem with sysinstall: when I run sysinstall inside 
> an xterm I find it very difficult to read the yellow font on the gray  
> background, which appears very light on my laptop LCD and also on an Eizo 
> LCD. Strangely, the gray is much darker if I run sysinstall from the  
> console outside X. Is there a way to make the gray darker when sysinstall 
> is run inside an xterm?

This should be solved at the core: adjust the RGB colours associated
with the ANSI/colour sequences in xterm.  Does xterm support this?
Surely it stores the RGB values somewhere, I just don't know if they're
hard-coded.  (I'm not an X guru).

It's quite possible in programs like rxvt, PuTTY, and SecureCRT
(Windows).

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Portsnap causes system to reboot

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 07:38:09PM +0300, Walter Venable wrote:
> Whenever I run portsnap fetch update (edit: it also happens for a
> simple portsnap fetch), my system reboots unexpectedly. Here's the
> output:
> # portsnap fetch update
> Looking up portsnap.FreeBSD.org mirrors... 3 mirrors found.
> Fetching snapshot tag from portsnap2.FreeBSD.org... done.
> Fetching snapshot metadata... done.
> Updating from Wed Sep 24 00:04:04 EEST 2008 to Thu Oct  9 10:28:42 EEST 2008.
> Fetching 3 metadata patches.. done.
> Applying metadata patches... done.
> Fetching 3 metadata files... done.
> Fetching 602 
> patches.102030405060708090100110120130140150160170180190200210220230240250260270280290300310320330340350360370380390400410420430440450460470480490500510520530540550560570580590600.
> done.
> Applying patches... Read from remote host X: Connection reset by peer
> Connection to X closed.
> 
> And then I can log-in again a few minutes later, and the uptime has
> gone down to a few seconds, so I know it rebooted. Any ideas why this
> is happening?

Nope, not without kernel panic information.

Does this machine have serial console?  Are kernel panic dumps being put
into /var/crash?  Is the machine even configured for it (see dumpdev,
dumpdir, and savecore in rc.conf).

> Some background info:
> $ uname -mrs
> FreeBSD 7.0-RELEASE-p5 i386

It would be useful if you could provide uname -a please, if you're
concerned about the hostname, just XXX it out.  Seeing the kernel build
date is useful.

> CFLAGS=-O2 -pipe
> COPTFLAGS=-O2 -pipe
> CPUTYPE=athlon-xp

Please don't do this.  Use ?= for this, not =.  If you think I'm
trolling, please read /usr/share/examples/etc/make.conf.

> Since this started happening, I have still successfully updated ports
> by csup'ing the ports tree. I can also still rebuild the world and
> kernel without issue.  This is a remote box, and I don't use X with
> it.

It almost sounds like a filesystem problem.  You might consider booting
into single-user and running fsck -y.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: smbpasswd mortal user

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 10:53:32AM -0400, Scott MacCallum wrote:
> I would like my users to be able to change their Samba password using the
> smbpasswd command. As of right now only root is allowed to do this. I set
> the smbpasswd command with the same permissions as the passwd command and I
> still cannot run it as a mortal user. I read the FreeBSD handbook and
> understand that smbpasswd is no longer the preferred tool to do what I want
> with version of Samba I am running, however it too cannot be run as a mortal
> user. In any case, I would like to continue using the smbpasswd command.
> 
> Does someone have a solution they can share?

Users editing their own passwords -- I have no idea how to solve that.
I don't think it's possible because the commands also allow you (or a
user) to edit many different fields in their account, including
disabling password expiry, changing their unique ID, all that jazz.  It
sounds like you might have to write a program/utility to do this, acting
as a wrapper around pdbedit(8).

smbpasswd(8) isn't recommend any more, true.  If you're like me and do
not care for things like LDAP and prefer flat-files, use the "tdbsam"
password database method, and the pdbedit(8) command to edit passwords
and do things to accounts.  All I use in smb.conf is:

private dir = /conf/ME/samba
passdb backend = tdbsam

Thus passdb.tdb and secrets.tdb will end up going into /conf/ME/samba.

You can also say "passdb backend = tdbsam:/some/place" which will store
passdb.tdb in /some/place; secrets.tdb will still end up in "private
dir"

> FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008
> [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386

Consider upgrading (world/kernel) soon, as you're susceptible to some
security issues.  Just a comment in passing; not the focus of this mail.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: daily/weekly/monthly periodic output

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 10:52:14AM -0400, Corey Dulecki wrote:
> I have FreeBSD 6.2 running on IBM hardware, single CPU.  This server  
> does not have sendmail enabled at all, i.e., in /etc/rc.conf, all four  
> of the "sendmail_xxx" enablers are set to "NO".  Today, the /var  
> filesystem ran out of inodes.
>
> I tracked the issue down to files that keep appearing in  
> /var/spool/clientmqueue.

Which makes no sense, since you're using postfix -- postfix does not use
that directory.  It sounds to me like possibly your
/etc/mail/mailer.conf (used by mailwrapper) is still pointing to the
Sendmail (non-postfix) binaries.

> I've researched enough to understand that  
> these files represent emails that cannot be sent, presumably because I  
> do not have a mail server running on the system.  I do not want to  
> enable sendmail or any other client; what I want to do is have the  
> processes which generate these emails send their information to a log,  
> which I will check manually.  I believe these emails are being generated  
> by the daily/weekly/monthly periodic processes, something that I didn't  
> even know existed until I ran out of inodes.
>
> My question is this:  How can I make it so that these periodic processes  
> simply log their messages instead of sending emails that get stuck in  
> clientmqueue?  Alternatively, if I can't do that, how do I simply turn  
> off these emails entirely so that they are not sent?

You should be using these values in rc.conf:

# We use postfix
postfix_enable="yes"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

And these values in periodic.conf:

# We use postfix
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"

And these values in /etc/mail/mailer.conf:

sendmail/usr/local/sbin/sendmail
send-mail   /usr/local/sbin/sendmail
mailq   /usr/local/sbin/sendmail
newaliases  /usr/local/sbin/sendmail

If you *really* want to turn off daily/weekly/monthly mails -- which I
strongly DO NOT recommend you do, for MANY reasons -- you should look at
/etc/defaults/periodic.conf for all of the values you can tune.  DO NOT
edit that file -- use /etc/periodic.conf instead.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: php5 segfault

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 01:15:59PM +0200, Laszlo Nagy wrote:
>
>> I thought you said you changed the order and it didn't work?  *confused*
>>   
> I said no success so far. There are more than 20 modules and there is no  
> description about what the good order should be. I had to keep trying...
>> If so: it should be obvious why it hasn't been fixed.  It doesn't appear
>> to affect everyone -- for example, we have never seen this problem in
>> the 4-5 years we've been using PHP on FreeBSD -- and the solution
>> doesn't really make much sense anyway.  It smells of a missing symbol
>> problem (e.g. libxx.so wants a symbol named "hello_bob", but the symbol
>> is available in libyy.so, which has to be loaded first; however, ld.so
>> and dlopen(3) have explicit handling for this scenario (see RTLD_NOW vs.
>> RTLD_LAZY), so I'm at a loss).
>>   
> Maybe you are right. But I would think that a missing symbol problem  
> should throw an error message telling "missing symbol" instead of making  
> a segfault.

That all depends on the C code.  If you'd like to dig around in it and
investigate/debug it to find out what the true nature of the problem is,
that would be beneficial, since AFAIK no one has done that yet.  It's
all speculative.

>> That said, if you feel this is a humongous issue, I highly recommend you
>> mail the PHP port maintainer and express your concerns, or open a PR
>>   
> We had the same problem on our previous server. I'm going to install  
> another box today and test it. If the problem comes out again, I'm going  
> to write a PR.

And I would also recommend filing a bug report with the PHP folks.  This
may be something that's a PHP problem and not a FreeBSD problem.  It may
"not be a Linux problem" because for all we know the Linux RPMs and
Portage stuff in CentOS/Gentoo could have workarounds in place.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: php5 segfault

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 11:53:11AM +0200, Laszlo Nagy wrote:
>
>>> There are no options to configure in php5-pgsql.
>>>
>>> I tried to change the order or module in extensions.ini, no success so far.
>>> 
>>
>> Then my recommendation is to build PHP with DEBUG enabled (see "make
>> config"), reproduce the situation, and provide a backtrace here.
>>   
> Problem solved. I put pgsql.so on top of all other modules and now there  
> is no segfault. Thank you!

I thought you said you changed the order and it didn't work?  *confused*

> Although I do not understand why it has not been fixed. The same
> problem  existed two years ago, right?

What "problem" are you referring to?  The extension ordering issue?

If so: it should be obvious why it hasn't been fixed.  It doesn't appear
to affect everyone -- for example, we have never seen this problem in
the 4-5 years we've been using PHP on FreeBSD -- and the solution
doesn't really make much sense anyway.  It smells of a missing symbol
problem (e.g. libxx.so wants a symbol named "hello_bob", but the symbol
is available in libyy.so, which has to be loaded first; however, ld.so
and dlopen(3) have explicit handling for this scenario (see RTLD_NOW vs.
RTLD_LAZY), so I'm at a loss).

That said, if you feel this is a humongous issue, I highly recommend you
mail the PHP port maintainer and express your concerns, or open a PR.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: php5 segfault

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 10:11:29AM +0200, Laszlo Nagy wrote:
>
>>>> Also, you cannot use a threaded Apache (e.g. threaded MPMs) with PHP
>>>> since not all extensions support threading.  Your Apache needs to be
>>>> built without threads and use a non-thread model (e.g. prefork).  I've
>>>> also had success with Apache-ITK-mpm.
>>>
>>> This is very true for mod_php, but less so if PHP is run as FastCGI.  
>>> I am
>>> currently running a box at work with the event mpm and mod_fcgid for
>>> testing and it seems to be doing well. YMMV
> All right. The problem is that we are getting segfaults with the CLI  
> version too. We are running some background PHP programs and they also  
> throw segfault.

extensions.ini is used by the CLI version as well.  I'm not sure why you
think this wouldn't be the case.

> Here is the interesting part. I wrote a test script that tries to  
> connect to the postgresql server.
>
> - if the hostname is wrong for the connection, there is no segfault
> - if the hostname is right but the password is wrong (e.g. it cannot  
> connect to the server) then there IS segfault.
>
> There are no options to configure in php5-pgsql.
>
> I tried to change the order or module in extensions.ini, no success so far.

Then my recommendation is to build PHP with DEBUG enabled (see "make
config"), reproduce the situation, and provide a backtrace here.

I would also consider filing a bug with the PHP folks.  They may know
something we don't.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: [SOLVED] Re: [EMAIL PROTECTED] maildrop and postfix - temporary authentication failure

2008-10-09 Thread Jeremy Chadwick
On Thu, Oct 09, 2008 at 04:52:29PM +1000, Da Rock wrote:
> 
> On Thu, 2008-10-09 at 16:21 +1000, Da Rock wrote:
> > I'm really about to throw this damn server through a closed window (or
> > better yet a brick wall). I've searched high and low on google for a
> > straight answer, and any references in mailing lists give an answer of
> > read the INSTALL file (as if thats supposed to solve everything).
> > 
> > I have virtual users for email in postfix, and I want to use maildrop to
> > deliver to the virtual mailboxes. Problem is, when it does use maildrop
> > it shows an error in the logs as the subject line says.
> > 
> > I've tried everything, checked everything. That supposed magic solution
> > in the INSTALL file says only ONE thing needs to be set to get it to
> > work. Maildrop is owned by root and group is mail. The socket is rwx
> > globally (all this is set by the port install). The executing user for
> > pipe in postfix is vmail.
> > 
> > I've installed the port with authlib and gdbm (even manually adjusted
> > the makefile to ensure --enable-userdb). Nada.
> > 
> > The generally consensus is that it should work out of the box- so what
> > the hell am I doing wrong? Where should I be looking? Specifically: what
> > is not authenticating? I can manually test maildrop ok. So wtf?
> > 
> > You'll have to excuse my language here- I'm not sure how much hair I
> > have left after working on this for several days...
> 
> Ok, I know I'm answering my own question here- but this should
> definitely be fixed.
> 
> In the INSTALL file, someone should change the statement where it says
> "When using the standalone maildrop build with courier-authlib, one
>  of the following configurations must be used:"\
> 
> to: "When using the standalone maildrop build with courier-authlib, ALL
>  of the following configurations must be used:"
> 
> Just after I sent the email I thought I'd check the only thing I hadn't
> changed, the setuid bit. There are several reasons why I hadn't had the
> guts to do this before- but in my mood I was feeling reckless.
> 
> 1. The statement in the INSTALL file said only one configuration needed
> to be changed.
> 2. I installed from ports- I would have thought (like most would, and
> history has served to provide empirical data) that the install process
> would have set this.
> 3. None of the information I read when searching emphasised this when
> all other options are already set- and certainly none based on freebsd.
> 
> Anyone else with this issue popping up THIS is the answer- set ALL the
> configuration options in the INSTALL file.

This should go to freebsd-ports, not freebsd-questions.  I would also
recommend filing a PR about this, since otherwise it's unlikely to get
addressed/fixed.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: kgdb debugging

2008-10-08 Thread Jeremy Chadwick
On Wed, Oct 08, 2008 at 09:43:38PM -0700, alan yang wrote:
> thank you all, device.hints solved it!
> 
> On Tue, Oct 7, 2008 at 11:14 AM, Julian Elischer <[EMAIL PROTECTED]> wrote:
> > alan yang wrote:
> >>
> >> Could people shed some light how to get remote debugging going, must
> >> be something that i overlooked, really appreciate.
> >>
> >> Two FreeBSD7 systems, target and development, connected with null
> >> modem cable on each's COM1.
> >>
> >> step 1)
> >>-  rebuild kernel with following options:
> >>options DDB
> >>options KDB
> >>options GDB
> >>
> >>makeoptions DEBUG=-g
> >
> > add hints.dev.uart.0.flags=0xc0
> > (or whatever it is) (see man uart or man sio)
> > to /boot/device.hints

This is a bad recommendation.  *DO NOT* modify device.hints!!!

You can override device.hints entries, or add your own, by using
loader.conf.  Example, taken from our loader.conf on production
systems:

# There is no COM2 on this system.
hint.sio.1.disabled="1"

Thus, in your case, this should suffice (note "hint", not "hints"
like the above paragraph says):

hint.dev.uart.0.flags="0xc0"

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: Unexpected PF Round Robin Behavior

2008-10-08 Thread Jeremy Chadwick
On Wed, Oct 08, 2008 at 12:12:47PM -0700, Mike Sweetser - Adhost wrote:
> We're noticing some unexpected behavior regarding load balancing with
> our FreeBSD 6.2 server running PF.
> 
> We have a pool set up for a two-server cluster:
> 
> table  persist { \
> 192.168.1.183 \
> 192.168.2.183 \
> }
> web_183_ext="xxx.xxx.xxx.183"
> 
> And the following rdr rule to handle it:
> 
> rdr on ! $vlanX_if proto { udp tcp } from any to $web_183_ext port { 80
> 443 } ->  round-robin sticky-address
> 
> It's working - too well.  We're noticing that it's round-robining not
> only based on the IP address, but the port as well - connections from
> the same machine to ports 80 and 443 are hitting different servers:
> 
> self tcp 192.168.1.183:80 <- xxx.xxx.xxx.183:80 <- yyy.yyy.yyy.80:53601
> FIN_WAIT_2:FIN_WAIT_2
> self tcp 192.168.1.183:80 <- xxx.xxx.xxx.183:80 <- yyy.yyy.yyy.80:53602
> FIN_WAIT_2:FIN_WAIT_2
> self tcp 192.168.1.183:80 <- xxx.xxx.xxx.183:80 <- yyy.yyy.yyy.80:53603
> ESTABLISHED:ESTABLISHED
> self tcp 192.168.2.183:443 <- xxx.xxx.xxx.183:443 <-
> yyy.yyy.yyy.80:53604   FIN_WAIT_2:FIN_WAIT_2
> self tcp 192.168.2.183:443 <- xxx.xxx.xxx.183:443 <-
> yyy.yyy.yyy.80:53605   ESTABLISHED:ESTABLISHED
> 
> Is there any way to set this so that a given client IP will hit the same
> server in the pool, regardless of port?  

Try the freebsd-pf list.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


<    1   2   3   4   >