Cross compiling i386 packages on amd64

2008-05-06 Thread Andrew Cid
Hi all,

I have an i386 jail running on an amd64 host that I use to build
packages.  Most packages build fine, however I have a few that fail.
This includes xorg (dri won't build) and mplayer.  In all cases I get an
error messages similar to this:

{standard input}:147: Error: `(%rsi)' is not a valid 32 bit base/index 
expression
{standard input}:148: Error: `(%rsi,%rax)' is not a valid 32 bit base/index 
expression
gmake[1]: *** [pullup.o] Error 1

Any ideas how I can fix this?

Cheers,


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


Re: QEMU networking quirkiness on 7.0

2008-04-11 Thread Andrew Cid
Hi Mario,

 
 1) # rc.conf
 
 ifconfig_re0=up polling   - no IP here !
 autobridge_interfaces=bridge0
 autobridge_bridge0=tap0 re0 - important even if tap0 does not exist yet
 cloned_interfaces=bridge0
 # the bridge gets the IP
 ifconfig_bridge0=inet 10.10.10.2 netmask 255.255.255.0  
 
 2) tell QEMU launch to open a tap device
 
 3) tap up script to run when invoking the machine(s). 
 
 # qemu-net
 
 #!/usr/local/bin/bash
 $1 = tap ifac created 
 /sbin/ifconfig $1 up
 # test if tap is already added
 TEST=`ifconfig -a | grep -A 6 bridge | grep $1`
 if [ $TEST ==  ]; then
/sbin/ifconfig bridge0 addm $1
 fi
 # add a route to the virtual machine
 /sbin/route add -host 10.10.10.100 -iface bridge0
 
 
 
 Set the gateway on both machines to the same gateway of the host.
 That's all.
 
 This works perfectly for me. If I want both virtual machines up, I have to 
 add 
 another route to the IP of the second machine through the bridge.

I don't really understand why you need routing here.  In my
understanding a bridge works like a layer 2 switch so there should be no
need for any routing.   

Cheers,


Andrew 

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


Re: QEMU networking quirkiness on 7.0

2008-04-10 Thread Andrew Cid
 Yes, this needs to be setup on the host system.  The way a bridge is
 configured has changed on 7.  Here are the steps assuming that your
 external interface is em0:
 
 # ifconfig tap0 create
 # ifconfig tap0 up
 # ifconfig em0 up
 # ifconfig bridge0 create
 # ifconfig bridge0 addm tap0 addm em0
 
 Now tap0 and em0 are bridged together.  You should configure your
 external IP on the bridge instead of em0 as you normally would.  If you
 use DHCP then:
 
 # dhclient bridge0

Forgot to add that you'll also need to create the /etc/qemu-ifup script,
otherwise this won't work.  That's what the script should look like:

#!/bin/sh
ifconfig ${1} up
 

Don't forget to make it executable:

# chmod 755 /etc/qemu-ifup

 And start qemu:
 
 # qemu -boot c -net nic -net tap -hda path_to_your_disk_image
 
 Now the VM should be able to see your LAN and get an IP from DHCP (if
 that's what you use on your LAN)

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


Re: QEMU networking quirkiness on 7.0

2008-04-10 Thread Andrew Cid
Hi Jim,

 I just CPed a huge section and tacked it on to the end of this mail.
 It says to do this within the emulator, but the emulator is supposedly
 running win2k. I take it this is done on the host system?

Yes, this needs to be setup on the host system.  The way a bridge is
configured has changed on 7.  Here are the steps assuming that your
external interface is em0:

# ifconfig tap0 create
# ifconfig tap0 up
# ifconfig em0 up
# ifconfig bridge0 create
# ifconfig bridge0 addm tap0 addm em0

Now tap0 and em0 are bridged together.  You should configure your
external IP on the bridge instead of em0 as you normally would.  If you
use DHCP then:

# dhclient bridge0

And start qemu:

# qemu -boot c -net nic -net tap -hda path_to_your_disk_image

Now the VM should be able to see your LAN and get an IP from DHCP (if
that's what you use on your LAN)

Hope this helps,


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


Re: QEMU networking quirkiness on 7.0

2008-04-09 Thread Andrew Cid
Hi Jim,

 The QEmu VM can access the web (I'm typing this out now in WindowsXP
 running safely in it's cage, for example). But it cannot VPN into work
 (timeout) or ping anything. I suspect it has to do with the way that
 QEmu is given network access. Is there any way to set up QEmu to
 access the network through an aliased IP address, and hence look like
 any other machine on my network, rather than to hide behind my BSD
 box? Is there another route I should take?+


I connect my qemu boxes via the tap interface and then bridge it to the
external interface so it works like just another box on the LAN.  It's
quite easy to setup and works pretty well, checkout:
http://people.freebsd.org/~maho/qemu/qemu.html

Give us a shout if you get stuck.


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


Re: Server build config, what would you do?

2008-04-09 Thread Andrew Cid
Hi Eric,

 I plan to use a 3-Ware or Areca controller (4 port). Does one of those 
 work better than the other? I have had pretty good luck with some 3-Ware 
 cards so far with FreeBSD, but have heard good things about the Areca 
 cards too.

I'm using 3-ware 9000 series in a few production boxes and they work
really well.  Hot swapping disks also works if you have a compatible
power supply.  Don't know about Areca, never used it.


Cheers,  


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


Setting global enviroment variables

2008-04-08 Thread Andrew Cid
Hi all,

What's the best way of setting environment variables on FreeBSD
so that all users and daemons running from rc can see them?

I'd like to set PKGROOT to a custom package server, so that all users
and a couple of daemons that start from rc will use the new packages.

Cheers,


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


Re: Setting global enviroment variables

2008-04-08 Thread Andrew Cid
On Tue, Apr 08, 2008 at 06:31:27PM +0100, Matthew Seaman wrote:
 
 /etc/login.conf -- don't forget to run cap_mkdb after editing it.


Thanks, that's totally it.  I added PACKAGEROOT to setenv in the default
class: 

:setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES,PACKAGEROOT=http\c//pkg.accid.net:\

I also had to comment out a line in sudoers to preserve the package
related variables:

Defaultsenv_keep += PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR PACKAGEROOT 
PACKAGESITE PKGDIR

Now both, users and daemons are enjoying new packages.  


Massive thanks for all replies,



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


FreeBSD 7.0 compact flash, HP Proliant ML115

2008-04-04 Thread Andrew Cid
Hello everybody,

I'm having trouble booting FreeBSD 7.0 on an HP Proliant ML115 server
using a compact flash stick.  Here is my dmesg:

ums0: ServerEngines SE USB Device, class 0/0, rev 1.10/0.01, addr 2 on
uhub0
ums0: 8 buttons and Z dir.
umass0: vendor 0x55aa UnoPlus CF, class 0/0, rev 1.10/1.03, addr 3 on
uhub0
umass0: Get Max Lun not supported (IOERROR)
Timecounters tick every 1.000 msec
hptrr: no controller detected.
acd0: CDRW TSSTcorp CDW/DVD TS-H492C/TB01 at ata0-master UDMA33
ad4: 152627MB GB0160CAABV HPG1 at ata2-master SATA150
SMP: AP CPU #1 Launched!
da0 at umass-sim0 bus 0 target 0 lun 0
da0: OEI-USB CompactFlash 1.03 Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: 967MB (1981728 512 byte sectors: 64H 32S/T 967C)
GEOM_LABEL: Label for provider da0s1a is ufs/freebsd.
Trying to mount root from ufs:/dev/ufs/freebsd
Lookup of /dev for devfs, error: 20
exec /sbin/init: error 20
exec /sbin/oinit: error 20
exec /sbin/init.bak: error 20
exec /rescue/init: error 20
exec /stand/sysinstall: error 20
init: not found in path
/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall
panic: no init
cpuid = 1
Uptime: 6s
Cannot dump. No dump device defined.
Automatic reboot in 15 seconds - press a key on the console to abort

It boots fine on other boxes and in qemu.  I tried both i386 and amd64
releases with the same result.  What can be wrong with this particular
machine?  Can this be a hardware thing?  

Also, Can someone tell me what umass0: Get Max Lun not supported (IOERROR)
means?  Can this be the problem?

Many thanks,


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


Re: Remote backups using ssh and dump

2008-04-04 Thread Andrew Cid
Hey,

 I'm presently using rsync over ssh, but I think dump would be better if it 
 will work.  I've been reading the man page, but I'm wondering if anyone is 
 doing this successfully and would like to share their cmdline.

Are doing backups to disk?  I find rsync combined with hard links to be
quite efficient and easy to manage/restore.  Checkout Mike Rubel's
article [1] if you haven't seen it already, he explains it well.  I
find Rsnapshot [2] quite useful/easy for small installations.  There is
also Dirvish [3] which might be worth looking at.  Both use the same
concept.

Hope this helps,


Andrew. 

[1] http://www.mikerubel.org/computers/rsync_snapshots/
[2] http://rsnapshot.org/
[3] http://www.dirvish.org/
-- 
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: need a shell script that can be executed manually or as part of the rc process. How can the script detect WHERE it is being called from to know how to handle various options.

2008-04-04 Thread Andrew Cid
Hi Rance,

 I have a sh script im working on that is going to be able to run by
 the init/rc process.  That same script can also be run after the
 system is started.
 
 I need a way to have the sh script detect WHERE in the boot process
 the server is when it is being executed.

You can control when your rc script runs with #REQUIRE: and #BEFORE:

Checkout the practical rc.d scripting article [1], chapter 7 has an
example.  Use rcorder(8) to see what runs when:

$ rcorder /etc/rc.d/*

Hope this helps,


Andrew 

[1] http://www.freebsd.org/doc/en/articles/rc-scripting/index.html
-- 
[EMAIL PROTECTED]

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