Re: Bash and arrays

2009-07-14 Thread Dan Nelson
In the last episode (Jul 15), Bryan Venteicher said:
> > I thought I understood how arrays work in bash, but I have been proven
> > wrong.  I am reading lines from a file and placing them in an array. 
> > However, when I am finished, the array has a length of 0.
> > 
> > Following is the code I am using.
> > 
> > #!/usr/local/bin/bash
> > COUNTER=0
> > cat ./test_file.txt | while read LINE
> > do
> >  echo ${LINE}
> >  FOO[${COUNTER}]=${LINE}
> >  COUNTER=`expr ${COUNTER} + 1`
> > done
> > 
> > echo ${#f...@]}
> > echo ${#FOO[*]}
> > 
> > 
> > And, here is the output.
> > 
> > test_file
> > file_size
> > 0
> > 0
> > 
> > Thanks in advance for any help you can offer.
> 
> The right hand side of the pipe is running in its own subshell so
> it has its own copy of FOO.
> 
> One fix is
> #!/usr/local/bin/bash
> COUNTER=0
> while read LINE
> do
>  echo ${LINE}
>  FOO[${COUNTER}]=${LINE}
>  COUNTER=`expr ${COUNTER} + 1`
> done < ./test_file.txt

Another alternative would be to use zsh, which makes sure that the last
component of a pipeline is run in the current shell process so the original
script would have worked.

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OFFTOPIC: HP DL1xx vs IBM x3250 vs DELL R200

2009-07-14 Thread Peter
Tim Judd wrote:
> On 7/13/09, Peter  wrote:

> Building your own box is more likely to support naturally and best
> option than HP/IBM/Dell if you want complete customization -- but you
> or your company may prefer a commercial support option if things go
> awry.
> 
> Good luck.
> 


I can easily build a supermicro box, but they tend to be noisy :-)
Another option I think is to get 2U supermicro, which obviously will
quieter. However, I wanted to get some feedback about  HP DL1xx vs IBM
x3250 vs DELL R200 since if they are more silent than supermicro I can
go with them. I already have 2 1 U machine and one of them DELL 1650
seems quite noisy and old :-) so did not want to risk to raise noise
level much more.

Peter


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


Re: Bash and arrays

2009-07-14 Thread Bryan Venteicher

- Jay Hall  wrote:
> Ladies and Gentlemen,
> 
> I thought I understood how arrays work in bash, but I have been proven  
> wrong.  I am reading lines from a file and placing them in an array.   
> However, when I am finished, the array has a length of 0.
> 
> Following is the code I am using.
> 
> #!/usr/local/bin/bash
> COUNTER=0
> cat ./test_file.txt | while read LINE
> do
>  echo ${LINE}
>  FOO[${COUNTER}]=${LINE}
>  COUNTER=`expr ${COUNTER} + 1`
> done
> 
> echo ${#f...@]}
> echo ${#FOO[*]}
> 
> 
> And, here is the output.
> 
> test_file
> file_size
> 0
> 0
> 
> Thanks in advance for any help you can offer.

The right hand side of the pipe is running in its own subshell so
it has its own copy of FOO.

One fix is
#!/usr/local/bin/bash
COUNTER=0
while read LINE
do
 echo ${LINE}
 FOO[${COUNTER}]=${LINE}
 COUNTER=`expr ${COUNTER} + 1`
done < ./test_file.txt

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

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


Re: Install from a USB Pen

2009-07-14 Thread Fbsd1


... or you could just download an official image instead of going to all 
of that trouble. Check the FTP site, there's a memstick.img if you're 
down for using with 8 instead of 7. There are currently three PRs about 
this, and I recently took ownership of them. Filing duplicate bug 
reports doesn't "get attention", it's just annoying and it makes trying 
to improve sysinstall that much more difficult because I'll have to 
spend more time closing these duplicates and less time fixing problems. 
There has been an email that stated there is USB install support in 
sysinstall as of 8.0 BETA1, and USB livefs support as of 8.0 BETA2. The 
PRs for USB support in sysinstall will be updated and closed soon. Don't 
open new ones.


You're welcome! :D

-- randi


What are the instructions for using this 8.0 memstick.img?
What raw size memstick is needed?
Is the 8.0 memstick.img the same content as the cd1 disk?


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


Bash and arrays

2009-07-14 Thread Jay Hall

Ladies and Gentlemen,

I thought I understood how arrays work in bash, but I have been proven  
wrong.  I am reading lines from a file and placing them in an array.   
However, when I am finished, the array has a length of 0.


Following is the code I am using.

#!/usr/local/bin/bash
COUNTER=0
cat ./test_file.txt | while read LINE
do
echo ${LINE}
FOO[${COUNTER}]=${LINE}
COUNTER=`expr ${COUNTER} + 1`
done

echo ${#f...@]}
echo ${#FOO[*]}


And, here is the output.

test_file
file_size
0
0

Thanks in advance for any help you can offer.


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


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Mel Flynn
On Tuesday 14 July 2009 17:36:24 Polytropon wrote:

> so in my opinion it's
> always safe to first umount, then remove.

Kids (or aging muscles) force you to revise your view. Not to mention low 
quality USB camera cables. AFAIK the panic is resolved in 8.x though. Not sure 
about the 7.x series.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Polytropon
On Tue, 14 Jul 2009 18:33:50 -0600, Chad Perrin  wrote:
> On Wed, Jul 15, 2009 at 12:35:24AM +0200, Polytropon wrote:
> > 
> > To make it more complicated, what about wearing some specific USB device
> > on your clothes, attached to a chain, and when you leave the computer,
> > it will pop out of the USB socket and therefore cause "xlock" to be
> > called? :-)
> 
> Does FreeBSD still have the kernel panic when mounted USB storage devices
> are detached without unmounting problem? 

Hmmm... How do other operating systems react if you suddenly remove a
direct storage media that is just read from or written to? Do other
operating systems go like, "Oh wow, the hard disk just disappeared,
so then I will write the data on another hard disk..." :-)

As far as I know, there are some tools like DBUS and HAL that make
using USB sticks more easy in terms of "automount if plugged in,
autoumount when removed", but I have to be honest: I don't use any
automount feature (due to security reasons), so in my opinion it's
always safe to first umount, then remove.



> If so, you could just mount a
> USB storage device, and unplug it when you leave the keyboard.  Then
> your computer would be safe from snooping, because it would kernel panic
> every time you walk away!

I first thought about that, too, but in my opinion it's not needed to mount
whatever you plug in as USB device, maybe a defective MP3 player made from
crap, a memory stick or who knows what. The lock / unlock action could be
assigned to the simple presence of the device.

And: Yes, I know, that's a very stupid idea. :-)



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OFFTOPIC: HP DL1xx vs IBM x3250 vs DELL R200

2009-07-14 Thread Tim Judd
On 7/13/09, Peter  wrote:
> Hello,
>
> We are about to buy 1U rack mount server for the office. The server room
> is small and close to meeting room so we have two priorities:
>
> 1)Good FreeBSD support.
> 2) Low noise level (!)
>
>
> Speed is not a priority, system load will be small.
>
> Which one will you recommend ?
>
>
>
> HP DL160G5 E5405 2x1GB 2x250GB NHP-SATA CD-DVD Combo 3y
> carepack;Quad-Core Intel(R) Xeon(R) processor E5405 (2.00 GHz, 80W, 1333MHz
> FSB);Supports up to 64 GB of PC2-5300 (DDR2-667) and up to 32 GB of
> PC2-6400 (DDR2-800) fully buffered DIMMs (DDR2-667) with Advanced ECC;
> Two embedded NC105i PCIe Gigabit Server Adapters;Five USB ports (two
> front, one internal, two rear);650W Power Supply (Non-Hot Plug,
> Autoswitching);Rack (1U)
>
> VS:
>
> IBM x3250 M2 1 x  Xeon Q3330 QuadCore 2.66GHz/1333MHz FSB Hyper
> Threading with EM64T, 6MB Cache, 2x1024MB ECC DDR2, 2 x 250 GB SATA/SAS
> HDD HotSwap, OpenBay Serial Attached SCSI (SAS) Hot Swap, Integrated
> RAID-1, 1x351W, DVD/CD-RW, Dual LAN 10/100/1000, 3 year on-site warranty
>
> VS:
>
> DELL(tm) PowerEdge(tm) R200   1   
> Quad-Core Intel Xeon Processor X3210 2.13 GHz / 1066 MHz FSB / 8 MB   
> SAS
> 6/i Integrated RAID Controller Card for SATA and SAS Hard Drives,
> RAID 0,1  
> 2GB 800MHz ECC Unbuffered DDR-2 SDRAM 
> 2 х 250GB, SATA, 3.5-inch, 7.2K RPM Hard Drive (Cabled)   
> Slim DVD/CD-RW Combo Drive
> R200 PCI-E Riser Card (2 x PCI Express slots) 
> dual embedded Broadcom(R) Gigabit Ethernet NIC
> Sliding Rack Kit for Dell Racks (Rapid Rails) 
>
>
> Prices are almost the same :-)
>
> Please recommend.
>
> Thanks in advance.
>
> Peter 


I'd recommend looking at any one of the iXsystems -- who is the
organization behind pcbsd.  FreeBSD support is practically guaranteed.


Building your own box is more likely to support naturally and best
option than HP/IBM/Dell if you want complete customization -- but you
or your company may prefer a commercial support option if things go
awry.

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


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Chad Perrin
On Wed, Jul 15, 2009 at 12:35:24AM +0200, Polytropon wrote:
> 
> To make it more complicated, what about wearing some specific USB device
> on your clothes, attached to a chain, and when you leave the computer,
> it will pop out of the USB socket and therefore cause "xlock" to be
> called? :-)

Does FreeBSD still have the kernel panic when mounted USB storage devices
are detached without unmounting problem?  If so, you could just mount a
USB storage device, and unplug it when you leave the keyboard.  Then
your computer would be safe from snooping, because it would kernel panic
every time you walk away!

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
Quoth Larry Wall: "You can never entirely stop being what you once were.
That's why it's important to be the right person today, and not put it
off till tomorrow."


pgpTOQ9RgOEGA.pgp
Description: PGP signature


Re: turning off the wireless network radio

2009-07-14 Thread Chad Perrin
On Tue, Jul 14, 2009 at 12:53:42PM -0800, Mel Flynn wrote:
> On Tuesday 14 July 2009 12:28:40 Chad Perrin wrote:
> >
> > At first glance, it looks like the iwi equivalent is dev.iwi.0.radio,
> > where 1 is on and 0 is off.  It won't let me set it to 0, though,
> > claiming it's a read-only sysctl setting.
> >
> > . . . and trying to set the debug.iwi sysctl setting to 1 caused the
> > computer to reboot (not intended behavior, I'm sure).  Bah.  I wonder if
> > there's something wrong with my driver.
> 
> There is plenty wrong with the driver, also with the product. Unfortunately, 
> Intel does not support the FreeBSD team with developers for the wireless 
> cards 
> as they do with the wired cards and the iwi driver is particularly plagued.

Well . . . that's bad news, but it's good to know, I guess.  Thanks.  I
wonder if my inability to turn off the adapter is a driver issue.  There
are times I can get it to turn off -- but other times, I can't.


> 
> At present the best working Intel wireless on FreeBSD is the wpi, but it is 
> on 
> the virge of the same fate as Benjamin Close is lacking time to support it.
> 
> There's a group of people working on improving iwn for the 5000 series, 
> effort 
> spawned from this list, but as of yet I haven't seen anything hit the source 
> tree.

Thanks for the information.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
Quoth Christopher Hitchens: "What can be asserted without proof can be
dismissed without proof."


pgp4FYMuhZkVL.pgp
Description: PGP signature


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Daniel Underwood
> To make it more complicated, what about wearing some specific USB device
> on your clothes, attached to a chain, and when you leave the computer,
> it will pop out of the USB socket and therefore cause "xlock" to be
> called? :-)

Haha... Polytropon's witty responses are enough reason in themselves
to monitor this mailing list :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Polytropon
On Tue, 14 Jul 2009 14:03:04 -0800, Mel Flynn 
 wrote:
> And use xev to figure out the keycode of an unused key on your keyboard you
> can easily access (like multimedia keys). Then you can activate it
> when leaving your spot or when that creepy guy from accounting tries to
> look over your shoulder. You would probably need some window/session manager
> that supports "global key shortcuts".

Just as an example, I do use this with WindowMaker. My Sun Type 6 keyboard
has a nice double-width button "Help" in the upper left - excellent for
hitting it when leaving the workstation. It is connected with the "xlock"
command.



> I like the bluetooth idea too, with the caveat that the range might not be
> sufficient.

To make it more complicated, what about wearing some specific USB device
on your clothes, attached to a chain, and when you leave the computer,
it will pop out of the USB socket and therefore cause "xlock" to be
called? :-)





-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Problem with make buildworld during upgrade from 7.0-RELEASE to 7.2-RELEASE

2009-07-14 Thread Joseph Bashe
Great response! There's a lot of good info here. Thanks, and I will check
out the SSH keepalive settings.

To update, I did finally solve my problem, although I was in a pickle there
for a bit. Ironically, it's more intuitive to me to just do the install the
old way (using make buildworld):

I decided to attempt to install cvsup from my ports tree and thankfully it
worked fine:

cd /usr/ports/net/cvsup
make install && make clean

[Then, I just did:]

tar -cyv /usr/home/myuser/7.2-RELEASE-src.tar.bz2 /usr/src/
rm -r /usr/src
mkdir /usr/src

rm -r /usr/obj

cvsup my-supfile

that gave me a fresh copy of the FreeBSD RELEASE-7.2 source tree (my-supfile
had the correct release engine specified), and cleaned out any garbage that
might have been in the /usr/obj directory

[then:]

mergemaster -pv

env -i make buildworld

nextboot -k GENERIC

make buildkernel
make installkernel

shutdown -r now

[log back in as su, then]

mergemaster
make installworld

shutdown -r now

[log back in as su, then]

uname -a

and get a nice listing that I'm running FreeBSD 7.2-RELEASE-p2

I'm guessing this method will work no matter what as long as you can install
cvsup. Nice that I can do it over SSH too!

Now to build a custom kernel!

Thanks again,

Joe

On Tue, Jul 14, 2009 at 1:36 PM, Mel Flynn <
mel.flynn+fbsd.questi...@mailing.thruhere.net
> wrote:

> On Tuesday 14 July 2009 11:51:40 Mel Flynn wrote:
> > On Monday 13 July 2009 13:40:31 Joseph Bashe wrote:
> > > I am going thru my first FreeBSD upgrade and it's not going too
> smoothly.
> > > I originally started the upgrade using the "freebsd-update" method.
> This
> > > is what I've done so far (all as root user):
> >
> > There's a few misconceptions in your understanding of the upgrade
> process,
> > which I'll try to address below. However, you're also using the wrong
> > sequence of events. You *first* want to update your kernel and base
> system,
> > only then your ports.
> >
> > > PS. I am using a custom kernel.
> >
> > As such, freebsd-update cannot upgrade your kernel.
>
> That should be ", without the intermediate use of a GENERIC kernel.".
>
> --
> Mel
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"
>



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


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Mel Flynn
On Tuesday 14 July 2009 07:52:43 Bill Moran wrote:
> In response to Frederique Rijsdijk :
> > I'm looking for a way to automaticaly lock my X session when I leave my
> > desk. Probably just using 'xlockmore -mode blank' or such. But how to
> > detect?
> >
> > It could be infrared based (heat signature), video based (webcam w/
> > motion detection) or even mechanical (switch in seat? meh..).
> >
> > And how would FreeBSD interface with such device? Most likely via USB,
> > since my lt doesn't have any serial ports.
> >
> > Any ideas? Experience?
>
> Unless your requirements are really as strict as you state, you're probably
> better off just installing xscreensaver and configuring it to lock the
> screen after a reasonable amount of inactivity.

And use xev to figure out the keycode of an unused key on your keyboard you
can easily access (like multimedia keys). Then you can activate it
when leaving your spot or when that creepy guy from accounting tries to
look over your shoulder. You would probably need some window/session manager
that supports "global key shortcuts".

I like the bluetooth idea too, with the caveat that the range might not be
sufficient. There's an article about it here:


I don't use bluetooth at all, so can't help you with the FreeBSD specifics.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Re: Automatic screen lock when leaving desk

2009-07-14 Thread utisoft

On 14 Jul 2009 21:43, Chad Perrin  wrote:

On Tue, Jul 14, 2009 at 05:32:01PM +0200, Frederique Rijsdijk wrote:



> Hi,



>



> I'm looking for a way to automaticaly lock my X session when I leave my



> desk. Probably just using 'xlockmore -mode blank' or such. But how to



> detect?





Why does it have to be automatic? Something like xlockmore or slock can



be tied to a keyboard shortcut, such as ++. If for some



reason you require automatic locking, though, you could perhaps set up



some kind of Bluetooth connection detection if you have a Bluetooth



enabled cellphone in your pocket (or something else that would work as a



Bluetooth token) and if your computer has the right hardware. I imagine



writing a daemon in Perl or Ruby that checks for loss of a Bluetooth



connection would be easier than getting Bluetooth working in the first



place might be, depending on the state of Bluetooth support in FreeBSD.





I'm not really well-versed in the ephemera of what is used to determine



"inactivity" on a computer, but if it's reasonably easy (or if there's a



Perl module for it), that seems like the obvious way to handle it --



though of course that may present problems, such as false positives on



detecting "inactivity" when watching a movie on the computer or something



like that.



Although it would ravish your cellphone's battery

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


Re: turning off the wireless network radio

2009-07-14 Thread Mel Flynn
On Tuesday 14 July 2009 12:28:40 Chad Perrin wrote:
> On Tue, Jul 14, 2009 at 12:20:25PM +0200, Maciej Milewski wrote:
> > Dnia wtorek 14 lipiec 2009 o 07:38:49 Chad Perrin napisał(a):
> > > I'm having a real bitch of a time trying to figure out how to shut down
> > > the wireless adapter's radio.  The driver module won't unload as long
> > > as the adapter is active, and neither ifconfig nor iwicontrol are
> > > providing a solution either.
> > >
> > > I'm using (as you may have guessed by mention of iwicontrol) an Intel
> > > wireless adapter, with if_iwi.ko as my driver module.  It's an Intel
> > > PRO/Wireless 2200BG Network Connection according to pciconf -lv.
> > >
> > > Thanks in advance.
> >
> > You can try doing this by software switch:
> > sysctl -a | grep rfkill
> > dev.ath.0.rfkill: 0
> > This switch should disable radio.
> > I don't know if it is supported by iwi driver but you can try.
>
> At first glance, it looks like the iwi equivalent is dev.iwi.0.radio,
> where 1 is on and 0 is off.  It won't let me set it to 0, though,
> claiming it's a read-only sysctl setting.
>
> . . . and trying to set the debug.iwi sysctl setting to 1 caused the
> computer to reboot (not intended behavior, I'm sure).  Bah.  I wonder if
> there's something wrong with my driver.

There is plenty wrong with the driver, also with the product. Unfortunately, 
Intel does not support the FreeBSD team with developers for the wireless cards 
as they do with the wired cards and the iwi driver is particularly plagued.

At present the best working Intel wireless on FreeBSD is the wpi, but it is on 
the virge of the same fate as Benjamin Close is lacking time to support it.

There's a group of people working on improving iwn for the 5000 series, effort 
spawned from this list, but as of yet I haven't seen anything hit the source 
tree.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Chad Perrin
On Tue, Jul 14, 2009 at 05:32:01PM +0200, Frederique Rijsdijk wrote:
> Hi,
> 
> I'm looking for a way to automaticaly lock my X session when I leave my
> desk. Probably just using 'xlockmore -mode blank' or such. But how to
> detect?

Why does it have to be automatic?  Something like xlockmore or slock can
be tied to a keyboard shortcut, such as ++.  If for some
reason you require automatic locking, though, you could perhaps set up
some kind of Bluetooth connection detection if you have a Bluetooth
enabled cellphone in your pocket (or something else that would work as a
Bluetooth token) and if your computer has the right hardware.  I imagine
writing a daemon in Perl or Ruby that checks for loss of a Bluetooth
connection would be easier than getting Bluetooth working in the first
place might be, depending on the state of Bluetooth support in FreeBSD.

I'm not really well-versed in the ephemera of what is used to determine
"inactivity" on a computer, but if it's reasonably easy (or if there's a
Perl module for it), that seems like the obvious way to handle it --
though of course that may present problems, such as false positives on
detecting "inactivity" when watching a movie on the computer or something
like that.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
Quoth Paul Graham: "SUVs are gross because they're the solution to a
gross problem. (How to make minivans look more masculine.)"


pgps08FekitOV.pgp
Description: PGP signature


Re: port-upgrade & freebsd-update causing page faults and slow performance

2009-07-14 Thread Mel Flynn
Maybe you shouldn't run those while typing an email?

Seriously, ENOTENOUGHINFO | EQUESTIONMISSING.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Problem with make buildworld during upgrade from 7.0-RELEASE to 7.2-RELEASE

2009-07-14 Thread Mel Flynn
On Tuesday 14 July 2009 11:51:40 Mel Flynn wrote:
> On Monday 13 July 2009 13:40:31 Joseph Bashe wrote:
> > I am going thru my first FreeBSD upgrade and it's not going too smoothly.
> > I originally started the upgrade using the "freebsd-update" method. This
> > is what I've done so far (all as root user):
>
> There's a few misconceptions in your understanding of the upgrade process,
> which I'll try to address below. However, you're also using the wrong
> sequence of events. You *first* want to update your kernel and base system,
> only then your ports.
>
> > PS. I am using a custom kernel.
>
> As such, freebsd-update cannot upgrade your kernel.

That should be ", without the intermediate use of a GENERIC kernel.".

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


Re: turning off the wireless network radio

2009-07-14 Thread Chad Perrin
On Tue, Jul 14, 2009 at 12:20:25PM +0200, Maciej Milewski wrote:
> Dnia wtorek 14 lipiec 2009 o 07:38:49 Chad Perrin napisał(a):
> > I'm having a real bitch of a time trying to figure out how to shut down
> > the wireless adapter's radio.  The driver module won't unload as long as
> > the adapter is active, and neither ifconfig nor iwicontrol are providing
> > a solution either.
> >
> > I'm using (as you may have guessed by mention of iwicontrol) an Intel
> > wireless adapter, with if_iwi.ko as my driver module.  It's an Intel
> > PRO/Wireless 2200BG Network Connection according to pciconf -lv.
> >
> > Thanks in advance.
> You can try doing this by software switch:
> sysctl -a | grep rfkill
> dev.ath.0.rfkill: 0
> This switch should disable radio.
> I don't know if it is supported by iwi driver but you can try.

At first glance, it looks like the iwi equivalent is dev.iwi.0.radio,
where 1 is on and 0 is off.  It won't let me set it to 0, though,
claiming it's a read-only sysctl setting.

. . . and trying to set the debug.iwi sysctl setting to 1 caused the
computer to reboot (not intended behavior, I'm sure).  Bah.  I wonder if
there's something wrong with my driver.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
Quoth Steinbach's Guideline for Systems Programmers: "Never test for an
error condition you don't know how to handle."


pgpVKTWIMggGu.pgp
Description: PGP signature


Re: turning off the wireless network radio

2009-07-14 Thread Chad Perrin
On Tue, Jul 14, 2009 at 01:22:22AM -0500, Adam Vande More wrote:
> 
> i...@pci0:2:3:0:class=0x028000 card=0x25658086 chip=0x10438086
> rev=0x04 hdr=0x00
> vendor = 'Intel Corporation'
> device = 'Intel(R) PRO/Wireless 2100 LAN Card Driver (82801)'
> class  = network
> 
> kldunload works for me as well.  If you turn debug up on ifconfig does that
> give you any clues?

I dunno.  Maybe I'm using the debug parameter incorrectly, but it isn't
giving me *anything*.  How is it supposed to be used?

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
Quoth Philip Machanick: "caution: if you write code like this,
immediately after you are fired the person assigned to maintaining your
code after you leave will resign"


pgp8PqPR2GUWG.pgp
Description: PGP signature


Re: partition black magic but no data lost phew!

2009-07-14 Thread Chris Whitehouse

Randi Harper wrote:

On Mon, Jul 13, 2009 at 3:56 PM, Chris Whitehouse wrote:


Hi,

This is from memory (brain not ram) and I can't recreate the steps for
reasons which will be obvious, so may not be entirely accurate.

I have a sata hard disk which is divided into 2 slices. Slice 1 (ad4s1) is
about half the disk and had the remains of a standard install with swap, / ,
/var, /tmp, /usr. Slice 2 (ad4s2) is the remainder and has a single
partition for data, ad4s2d. It was all created with sysinstall and doesn't
have anything special like dangerously dedicated.

The operating system on this machine is on a second hard disk which is what
I booted from.

I moved all the data from ad4s1f onto ad4s2d so that I could delete
partitions from slice 1 and make a single large partition.

I then unmounted all ad4* partitions. I may even have rebooted.

sysinstall - Configure - Label allowed me to delete ad4s1a but when I tried
to delete the other ad4s1* partitions sysinstall told me I had to set
kern.geom.debugflags=16 before I could make changes on a running system . I
set kern.geom.debugflags but changes I made in sysinstall did not take
effect, the partitions persisted, both as /dev/ad4s1* and as entries in
sysinstall

At some stage sysinstall core dumped and somewhere else ad4s2d got deleted.
I managed to recreate it and didn't lose any data.

Next I booted from a pen drive and successfully deleted the partitions from
slice 1, being very careful not to delete the partition on slice 2, however
when I exited from sysinstall ad4s2d was gone. Again I managed to recreate
it and didn't lose any data.

The bit that puzzles me is that ad4s2d disappeared twice and the second
time I am sure I didn't do any explicit steps to delete it.

Did I hit a bug in sysinstall or did I do something wrong? I didn't lose
any data in the end but I could easily have done (I know - back up - I'm
going to go and buy a nice big external hard disk very soon ;)

FreeBSD muji 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Mon Nov 24 20:22:16
EST 2008 r...@pcbsdx32-7:/usr/obj/pcbsd-build/cvs/7.0.2-src/sys/PCBSD
 i386

Everything is sorted now so I am really asking this out of curiousity.

Thanks

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



When you booted from the pen drive, was sysinstall running as init? ie: is
this the memstick.img from the ftp site or a homebrew disc1.iso->usb image,
or did you have freebsd installed to the pen drive? If so, what version?

-- randi


I'm pretty sure I used these instructions to create the pen drive install.

http://typo.submonkey.net/articles/2006/04/13/installing-freebsd-on-usb-stick-episode-2

Otherwise it was a standard 7.2-R install. As the pen drive doesn't have 
an rc.conf I think it must be the submonkey article.


uname -a for the pen drive:
FreeBSD  7.2-RELEASE FreeBSD 7.2-RELEASE #0: Wed Jul  1 21:15:38 BST 
2009 r...@eco.config:/usr/src/sys/i386/compile/GENERIC_NO_SBP  i386


uname -a for the bootable hard disk which I gave incorrectly in my first 
post is
FreeBSD eco.config 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Sat Jun 20 
22:43:47 BST 2009 
r...@eco.config:/usr/src/sys/i386/compile/GENERIC_NO_SBP  i386


This is from Manolis's XFCE DVD 
http://freebsd-custom.wikidot.com/downloads-page



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


Re: Server screwed up (/lib/libc.so.7: Undefined symbol "_nsdispatch")

2009-07-14 Thread Victor Starenky
Thank you Sergio!
I'll give it a try tonight while keeping my fingers crossed.

On Tue, Jul 14, 2009 at 3:34 PM, Sergio de Almeida
Lenzi wrote:
> Em Ter, 2009-07-14 às 10:00 -0400, Victor Starenky escreveu:
> ===OK... 
> you can try this script...
> it suposes that you have ALL the /usr/src  and the GENERIC KERNEL...
> in a slow machine, it is about 4 hours (Pentium 2, 256mb memory, 10Gb
> disk)
> FreeBSD 7.0 =>  FreeBSD 7.2
> save the script in the root directory say: updatebsd
> than with all the /usr/src (you can get it from the CD).
>
> sh updatebsd
> if it finds a small mistake it will stop.
> after building the OS, check if everything is ok, and reboot.
> this script will install the GENERIC KERNEL, so if you have your
> own kernel,   edit the last lines of the code to make your needs
> ==
> DEPEND=depend
> cd /usr/src
> set -e
> (cd share/mk;make all install || exit 1)
> make includes
> for i in etc share lib libexec secure/lib secure
> do
> (cd $i;make ${DEPEND} all install || exit 1)
> sync
> done
> for i in sbin bin usr.sbin usr.bin
> do
> (cd $i;make ${DEPEND} all install || exit 1)
> sync
> done
> cd /sys/`uname -m`/conf
> config GENERIC
> cd ../compile/GENERIC
> make ${DEPEND} all install
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Problem with make buildworld during upgrade from 7.0-RELEASE to 7.2-RELEASE

2009-07-14 Thread Mel Flynn
On Monday 13 July 2009 13:40:31 Joseph Bashe wrote:

> I am going thru my first FreeBSD upgrade and it's not going too smoothly. I
> originally started the upgrade using the "freebsd-update" method. This is
> what I've done so far (all as root user):

There's a few misconceptions in your understanding of the upgrade process, 
which I'll try to address below. However, you're also using the wrong sequence 
of events. You *first* want to update your kernel and base system, only then 
your ports.

> PS. I am using a custom kernel.

As such, freebsd-update cannot upgrade your kernel.

> 1. ran "portsnap fetch update" - [success]
>
> 2. ran "portupgrade -va" ["portupgrade"not found - i hadn't installed it
> yet"
>
> 3. ran "freebsd-update fetch" [success] (i know this was out of sequence
> from the guide)
>
> 4. installed portupgrade ("make install clean" from the dir in ports) [ssh
> connection dropped, so i had to login again]
>
> 5. installed portupgrade ("make install") [success] then "make clean"
> [success]
>
> 6. ran "portupgrade -va" [long process begins... strangely, several X
> components install although this is not desired]

echo WITHOUT_X11=yes >>/etc/make.conf

> 7. ran "freebsd-update fetch" again [success]
>
> 8. ran "freebsd-update upgrade -r 7.2-RELEASE" [ssh connection dies during
> "preparing to download files", so i log in again]
>
> 9. ran "freebsd-update upgrade -r 7.2-RELEASE" [~27,000 updates..] and of
> course ssh connection dies during "Fetching 3060 files" although "applying
> patches" succeeds. A note: these disconnects are not at all common during a
> normal ssh connection to this computer, it seems due to the
> resource-intense operations required for updating freebsd.

More likely to be bad queuing in the gateway or you're hitting the default 
session timeout of 5 minutes of inactivity. See man ssh_config for 
ServerAliveInteral and TCPKeepAlive.

> 10. log back in, ran "freebsd-update upgrade -r 7.2-RELEASE" [..success]
>
> 11. ran "freebsd-update install" [and of course ssh dies during "Installing
> updates..."]
>
> 12. log back in, ran "freebsd-update install".
>
> 13. Then i ran nextboot -k GENERIC and got "/boot/GENERIC doesn't exist".
> so, i copied kernel.old to /boot/GENERIC

This is out of sequence and likely the cause for some problems. First of all, 
you must be sure that kernel.old is really a GENERIC 7.0-RELEASE kernel. 
Secondly, this step /should/ have been run /before/ freebsd-update install.

> 14. Ok, maybe this was the problem. for some reason at this point i decide
> to run "freebsd-update install" again, and get "no updates are available".
>
> 15. Then I run "freebsd-update -r 7.2-RELEASE upgrade" again.. it downloads
> some patches, but then i get this error: "/usr/sbin/freebsd-update: cannot
> open files/.gz: No such file or directory" about 100 times.. plus, i get
> questions like

Running an upgrade again, without a rollback is generally not a good idea.

> "The following file will be removed, as it no longer exists in
> FreeBSD 7.2-RELEASE: /boot/device.hints
> Does this look reasonable (y/n)?"
>
> which doesn't look very good.
>
> 16. so, i issued a shutdown -r now command and crossed my fingers.. the
> system is still up, but it hasn't been upgraded (uname still reports
> 7.0-p11 for booting form the GENERIC kernel, and 7.0-p9 for the custom
> kernel). on top, make buildworld fails with:
>
> "Stop in /usr/src/secure/lib/libssh.
> *** Error code 1 "
>
> every time.
>
> and worse,
>
> any csup command dies with "/libexec/ld-elf.so.1: /lib/libc.so.7: version
> FBSD_1.1 required by /lib/libthr.so.3 not found" along with a lot of other
> commands... any ideas??

Your world and kernel are out of sync, because of loading a not upgraded 
kernel with a freebsd-update'd 7.2 world. I would try fetching the 7.2 livefs 
ISO, mount it as a vnode and install the GENERIC kernel from there to get your 
system back in working order.
Example steps:
$ sha256 /data/isos/7.2-RELEASE-i386-livefs.iso
SHA256 (/data/isos/7.2-RELEASE-i386-livefs.iso) = 
4faa7b9d78d125f9b28521247e32e1f0bef3b0b0f21b654ba22c6e79ca3301ce

$ sudo mdconfig -a -t vnode -f /data/isos/7.2-RELEASE-i386-livefs.iso -u 0
$ sudo mount -t cd9660 /dev/md0 /mnt
$ sudo mv /boot/kernel /boot/kernel.bogus
$ sudo cp -Rp /mnt/boot/kernel /boot/
$ shutdown -r now # may need sudo if you're not in operator group

If you still have problems after this, it's likely you need single user mode 
to get back into working order. Given the number of errors given by the second 
freebsd-update upgrade command I wouldn't trust a freebsd-update rollback.

This would be where I'd restore the backups using a livecd and restart the 
freebsd-update process, this time sticking verbatim to the handbook, but 
skipping the "portupgrade test run".
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freeb

Re: Server screwed up (/lib/libc.so.7: Undefined symbol "_nsdispatch")

2009-07-14 Thread Sergio de Almeida Lenzi
Em Ter, 2009-07-14 às 10:00 -0400, Victor Starenky escreveu:
===OK... 
you can try this script...
it suposes that you have ALL the /usr/src  and the GENERIC KERNEL...
in a slow machine, it is about 4 hours (Pentium 2, 256mb memory,
10Gb disk)
FreeBSD 7.0 =>  FreeBSD 7.2
save the script in the root directory say: updatebsd
than with all the /usr/src (you can get it from the CD).

sh updatebsd
if it finds a small mistake it will stop.
after building the OS, check if everything is ok, and reboot.
this script will install the GENERIC KERNEL, so if you have your
own kernel,   edit the last lines of the code to make your needs
==
DEPEND=depend
cd /usr/src
set -e
(cd share/mk;make all install || exit 1)
make includes
for i in etc share lib libexec secure/lib secure
do
(cd $i;make ${DEPEND} all install || exit 1)
sync
done
for i in sbin bin usr.sbin usr.bin 
do
(cd $i;make ${DEPEND} all install || exit 1)
sync
done
cd /sys/`uname -m`/conf
config GENERIC
cd ../compile/GENERIC
make ${DEPEND} all install

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


Re: Should DNS be on same server as webserver?

2009-07-14 Thread Mel Flynn
On Monday 13 July 2009 14:27:46 Karl Vogel wrote:

>It's very easy to set up a caching nameserver without using all the
>memory on your system.

It's much easier to turn your HIGH-performance webserver into a slug, by 
running stuff you don't need on the same machine. Memory unused by the 
webserver can then be used by the OS to provide filesystem caching, which 
indirectly greatly benefits a webserver, much more then a local cache can 
speed things up.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


port-upgrade & freebsd-update causing page faults and slow performance

2009-07-14 Thread Christopher Chambers

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


Re: Should DNS be on same server as webserver?

2009-07-14 Thread Jon Radel

Karl Vogel wrote:

On Jul 13, 2009, at 6:27 PM, Karl Vogel wrote:

K> You can fix the security problems by dumping Bind and using djbdns.


On Tue, 14 Jul 2009 10:16:24 +0200, Ruben de Groot replied:

R> What security problems? This one ? :)
R> http://blogs.zdnet.com/security/?p=2812

   When BIND offers (and makes good on) a $1,000 bug bounty, I'll be happy
   to consider its security model the equal of djbdns.



It's nice to see that their marketing efforts work on somebody.

--

--Jon Radel
j...@radel.com


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Should DNS be on same server as webserver?

2009-07-14 Thread Karl Vogel
>> On Jul 13, 2009, at 6:27 PM, Karl Vogel wrote:
K> You can fix the security problems by dumping Bind and using djbdns.

>> On Tue, 14 Jul 2009 10:16:24 +0200, Ruben de Groot replied:
R> What security problems? This one ? :)
R> http://blogs.zdnet.com/security/?p=2812

   When BIND offers (and makes good on) a $1,000 bug bounty, I'll be happy
   to consider its security model the equal of djbdns.

-- 
Karl Vogel  I don't speak for the USAF or my company
Give me ambiguity, or give me something else.   --unknown
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ZFS or UFS for 4TB hardware RAID6?

2009-07-14 Thread Richard Mahlerwein

--- On Tue, 7/14/09, Matthew Seaman  wrote:

> From: Matthew Seaman 
> Subject: Re: ZFS or UFS for 4TB hardware RAID6?
> To: mahle...@yahoo.com
> Cc: "Free BSD Questions list" 
> Date: Tuesday, July 14, 2009, 4:23 AM
> Richard Mahlerwein wrote:
> 
> > With 4 drives, you could get much, much higher
> performance out of
> > RAID10 (which is alternatively called RAID0+1 or
> RAID1+0 depending on
> > the manufacturer
> 
> Uh -- no.  RAID10 and RAID0+1 are superficially
> similar but quite different
> things.  The main differentiator is resilience to disk
> failure. RAID10 takes
> the raw disks in pairs, creates a mirror across each pair,
> and then stripes
> across all the sets of mirrors.  RAID0+1 divides the
> raw disks into two equal
> sets, constructs stripes across each set of disks, and then
> mirrors the
> two stripes.
> 
> Read/Write performance is similar in either case: both
> perform well for the sort of small randomly distributed IO
> operations you'ld get when eg.
> running a RDBMS.  However, consider what happens if
> you get a disk failure.
> In the RAID10 case *one* of your N/2 mirrors is degraded
> but the other N-1
> drives in the array operate as normal.  In the RAID0+1
> case, one of the
> 2 stripes is immediately out of action and the whole IO
> load is carried by
> the N/2 drives in the other stripe.
> 
> Now consider what happens if a second drive should
> fail.  In the RAID10
> case, you're still up and running so long as the failed
> drive is one of
> the N-2 disks that aren't the mirror pair of the 1st failed
> drive.
> In the RAID0+1 case, you're out of action if the 2nd disk
> to fail is one
> of the N/2 drives from the working stripe.  Or in
> other words, if two
> random disks fail in a RAID10, chances are the RAID will
> still work.  If
> two arbitrarily selected disks fail in a RAID0+1 chances
> are basically
> even that the whole RAID is out of action[*].
> 
> I don't think I've ever seen a manufacturer say RAID1+0
> instead of RAID10,
> but I suppose all things are possible.  My impression
> was that the 0+1 terminology was specifically invented to
> make it more visually distinctive
> -- ie to prevent confusion between '01' and '10'.
> 
>     Cheers,
> 
>     Matthew
> 
> [*] Astute students of probability will point out that this
> really only
> makes a difference for N > 4, and for N=4 chances are
> evens either way that failure of two drives would take out
> the RAID.
> 
> -- Dr Matthew J Seaman MA, D.Phil.     
>              7
> Priory Courtyard
>                
>                
>              
>    Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey 
>    Ramsgate
>                
>                
>              
>    Kent, CT11 9PW
> 

--- On Tue, 7/14/09, Matthew Seaman  wrote:

> From: Matthew Seaman 
> Subject: Re: ZFS or UFS for 4TB hardware RAID6?
> To: mahle...@yahoo.com
> Cc: "Free BSD Questions list" 
> Date: Tuesday, July 14, 2009, 4:23 AM
> Richard Mahlerwein wrote:
> 
> > With 4 drives, you could get much, much higher
> performance out of
> > RAID10 (which is alternatively called RAID0+1 or
> RAID1+0 depending on
> > the manufacturer
> 
> Uh -- no.  RAID10 and RAID0+1 are superficially
> similar but quite different
> things.  The main differentiator is resilience to disk
> failure. RAID10 takes
> the raw disks in pairs, creates a mirror across each pair,
> and then stripes
> across all the sets of mirrors.  RAID0+1 divides the
> raw disks into two equal
> sets, constructs stripes across each set of disks, and then
> mirrors the
> two stripes.
> 
> Read/Write performance is similar in either case: both
> perform well for the sort of small randomly distributed IO
> operations you'ld get when eg.
> running a RDBMS.  However, consider what happens if
> you get a disk failure.
> In the RAID10 case *one* of your N/2 mirrors is degraded
> but the other N-1
> drives in the array operate as normal.  In the RAID0+1
> case, one of the
> 2 stripes is immediately out of action and the whole IO
> load is carried by
> the N/2 drives in the other stripe.
> 
> Now consider what happens if a second drive should
> fail.  In the RAID10
> case, you're still up and running so long as the failed
> drive is one of
> the N-2 disks that aren't the mirror pair of the 1st failed
> drive.
> In the RAID0+1 case, you're out of action if the 2nd disk
> to fail is one
> of the N/2 drives from the working stripe.  Or in
> other words, if two
> random disks fail in a RAID10, chances are the RAID will
> still work.  If
> two arbitrarily selected disks fail in a RAID0+1 chances
> are basically
> even that the whole RAID is out of action[*].
> 
> I don't think I've ever seen a manufacturer say RAID1+0
> instead of RAID10,
> but I suppose all things are possible.  My impression
> was that the 0+1 terminology was specifically invented to
> make it more visually distinctive
> -- ie to prevent confusion between '01' and '10'.
> 
> Cheers,
> 
> Matthew
> 
> [*] Astute students of prob

Re: Automatic screen lock when leaving desk

2009-07-14 Thread Glen Barber
Hi,

On Tue, Jul 14, 2009 at 11:32 AM, Frederique
Rijsdijk wrote:
> Hi,
>
> I'm looking for a way to automaticaly lock my X session when I leave my
> desk. Probably just using 'xlockmore -mode blank' or such. But how to
> detect?
>
> It could be infrared based (heat signature), video based (webcam w/
> motion detection) or even mechanical (switch in seat? meh..).
>
> And how would FreeBSD interface with such device? Most likely via USB,
> since my lt doesn't have any serial ports.
>
> Any ideas? Experience?
>
>

There was an application about a year or so, Gnome based, that I saw
in the Ubuntu repository. I just checked the ports tree, but
unfortunately I don't see it.  (I searched based on key, not name,
because I forget the exact name.)

It would connect to bluetooth on a cellular phone / smartphone, and if
the bluetooth signal was lost (ie, you walked away) xscreensaver would
kick in.

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


Re: Automatic screen lock when leaving desk

2009-07-14 Thread Bill Moran
In response to Frederique Rijsdijk :
> 
> I'm looking for a way to automaticaly lock my X session when I leave my
> desk. Probably just using 'xlockmore -mode blank' or such. But how to
> detect?
> 
> It could be infrared based (heat signature), video based (webcam w/
> motion detection) or even mechanical (switch in seat? meh..).
> 
> And how would FreeBSD interface with such device? Most likely via USB,
> since my lt doesn't have any serial ports.
> 
> Any ideas? Experience?

Unless your requirements are really as strict as you state, you're probably
better off just installing xscreensaver and configuring it to lock the
screen after a reasonable amount of inactivity.

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Automatic screen lock when leaving desk

2009-07-14 Thread Frederique Rijsdijk
Hi,

I'm looking for a way to automaticaly lock my X session when I leave my
desk. Probably just using 'xlockmore -mode blank' or such. But how to
detect?

It could be infrared based (heat signature), video based (webcam w/
motion detection) or even mechanical (switch in seat? meh..).

And how would FreeBSD interface with such device? Most likely via USB,
since my lt doesn't have any serial ports.

Any ideas? Experience?


-- Frederique

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


Re: Server screwed up (/lib/libc.so.7: Undefined symbol "_nsdispatch")

2009-07-14 Thread Victor Starenky
That's "restoring from backup" that's non-trivial :PI'd take on the
challenge of trying to restore just some pieces if you just point me into
the direction of what exactly needs to be done. I'm not asking step-by-steps
but rather something along the lines "recompile kernel - here's the link on
how to start". I don't want to abuse your help, you've already been very
helpful!

Thing is - I was in the process of building a new server to replace this guy
but one not-so-happy day it didn't boot after unsuccesful update (that's
Suse for a change). Meanwhile I wanted to keep mail and stuff running until
I finish with that one.
Now rebuilding this old machine would take weeks of just CPU time alone. I
remember very well the process of putting everything up there in the first
place.

Thanks again,
Victor

On Tue, Jul 14, 2009 at 6:53 AM, Sagara Wijetunga wrote:

> Victor Starenky writes:
>
> Sorry for the lame question. But how exactly would I go about recompiling
> the base?Could you point me to any articles/manuals about it? I'm just
> trying to understand which steps exactly need to be done and how to do it.
> Compiling everything would take me a few weeks on this machine :(
>
> Oops, I just explain is a brain surgery :)
>
> Are you sure that you cannot let go your server, erase everything,
> reinstall and restore from a backup? That's the easiest.
>
> Regards
> Sagara
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: module_register: module probe already exists!

2009-07-14 Thread Nikos Vassiliadis

Robert Huff wrote:

sem_load="YES"


You should remove this line, since it's now built in the
GENERIC kernel and hence the warning message.

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


Re: Server screwed up (/lib/libc.so.7: Undefined symbol "_nsdispatch")

2009-07-14 Thread Sagara Wijetunga
Victor Starenky writes: 


Sorry for the lame question. But how exactly would I go about recompiling
the base?Could you point me to any articles/manuals about it? I'm just
trying to understand which steps exactly need to be done and how to do it.
Compiling everything would take me a few weeks on this machine :( 



Oops, I just explain is a brain surgery :) 

Are you sure that you cannot let go your server, erase everything, reinstall 
and restore from a backup? That's the easiest. 


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


Re: Server screwed up (/lib/libc.so.7: Undefined symbol "_nsdispatch")

2009-07-14 Thread Victor Starenky
Sorry for the lame question. But how exactly would I go about recompiling
the base?Could you point me to any articles/manuals about it? I'm just
trying to understand which steps exactly need to be done and how to do it.
Compiling everything would take me a few weeks on this machine :(

Thanks again!
Victor

On Tue, Jul 14, 2009 at 6:31 AM, Sagara Wijetunga wrote:

> Victor Starenky writes:
>
> Actually I am running this without GUI (X is a luxury on this machine) .But
>
> if I restore it from the live CD I understand that all ports I have will be
>
> messed up?
>
> You build ports on top of a working base. Now your foundation, aka the base
> has gone wrong. What you got to do is to get the base working again.
>
> Actually the first thing you should try is, to compile the base and the
> kernel (buildworld, buildkernel, etc) and install them properly. Check every
> stage complete without any error. If you can reinstall your base without any
> error, your base is working. Then you can rebuild your ports.
>
> If you cannot, recompile your base, ie. if errors develops, then copy
> necessary libs, etc. from the live CD till your recompile the base completes
> without errors.
>
> So my only option would be to go and install/reinstall all of them from the
>
> scratch? Building anything that needs Ruby for example takes like 24 hours
> on this machine :(
>
> This is your last option.
>
> Regards
> Sagara
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Server screwed up (/lib/libc.so.7: Undefined symbol "_nsdispatch")

2009-07-14 Thread Sagara Wijetunga
Victor Starenky writes: 


Actually I am running this without GUI (X is a luxury on this machine) .But
if I restore it from the live CD I understand that all ports I have will be
messed up?


You build ports on top of a working base. Now your foundation, aka the base 
has gone wrong. What you got to do is to get the base working again. 

Actually the first thing you should try is, to compile the base and the 
kernel (buildworld, buildkernel, etc) and install them properly. Check every 
stage complete without any error. If you can reinstall your base without any 
error, your base is working. Then you can rebuild your ports. 

If you cannot, recompile your base, ie. if errors develops, then copy 
necessary libs, etc. from the live CD till your recompile the base completes 
without errors. 




So my only option would be to go and install/reinstall all of them from the
scratch? Building anything that needs Ruby for example takes like 24 hours
on this machine :(


This is your last option. 


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


module_register: module probe already exists!

2009-07-14 Thread Robert Huff

[I'm asking this here and not on current@ because it's not
necessarily a CURRENT-limited issue.]

After updating one system Current of April 21 to:

FreeBSD 8.0-BETA1 #0: Sun Jul 12 18:26:14 EDT 2009 i386 

I now get this:
 
jerusalem kernel: module_register: module probe already exists!
jerusalem kernel: Module probe failed to register: 17

at the beginning of the hardware probe.  The system continues
to boot, but this makes me nervous.
How do I figure out what module is causing this?  The
loader.conf has:

loader_color="YES"
loader_logo=beastie
accf_http_load="YES"
if_em_load="YES"
debug.mpsafenet=1
nvidia_load="YES"
linux_load="YES"
uscanner_load="YES"
sem_load="YES"

Respectfully,

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


Re: Server screwed up (/lib/libc.so.7: Undefined symbol "_nsdispatch")

2009-07-14 Thread Victor Starenky
Actually I am running this without GUI (X is a luxury on this machine) .But
if I restore it from the live CD I understand that all ports I have will be
messed up?
So my only option would be to go and install/reinstall all of them from the
scratch? Building anything that needs Ruby for example takes like 24 hours
on this machine :(
Can you think of any way I could try to fix just the damaged part
(nss/nsswitch)?
Is there any place I could search for the backed up libraries (I think
portupgrade would back them up first?).

Thanks guys, I really appreciate your help!

Victor

On Mon, Jul 13, 2009 at 10:43 PM, Sagara Wijetunga
wrote:

> Victor Starenky writes:
>
> Hi guys,
> I was running FreeBSD server at home for a few years on an old box for
> mail,
> some web and ftp etc. I've been through a number of upgrades even though
> it's not easy with the box as old as this one (PII 350). Right now I'm at
> 7.0 Release.
> Now last weekend something's screwed up there pretty badly and machine is
> pretty much unusable.
> The sympthom is that pretty much any command results in the following
> error:
> /libexec/ld-elf.so.1: /lib/libc.so.7: Undefined symbol "_nsdispatch"
> Specifically this is thrown when trying to login (after entering login
> name)
> on the console, ssh, ftp.
> This is also thrown for "fetch"or for "ls -l" (plain ls works).
> So I'm lucky to have one root session on the console as I can't login at
> any
> other...
> Most recent thing that might have something to do with it would be an
> (unsuccessful) attempt to portupgrade cups-base. This failed with the error
>
> message of wrong cups client. Now this is not new and I have a number of
> ports that wouldn't upgrade - cups-base, apache for example. But before
> portupgrade would fail without affecting the system. Same cups-base failed
> before without any side effects.
> As I said this might have nothing to do with the errors I'm getting, just
> most recent my actions.
> So currently server is not usable - it won't even accept mail (Currier
> server) with the same error message.
> I tried portupgrade bash but portupgrade itslef also fails with the same
> message. I do have one mean of getting new files there through mounted smb
> directory. I've tried putting all new bash files into
> /usr/ports/distfiles/bash but portupgrade still fails (just a bit further
> now).
> I ran pkg_libchk which shows a bunch of missing libraries, mostly for
> compat4x-i386-5.3_9 but for example courier also misses one:
> courier-0.54.0: /usr/local/libexec/filters/perlfilter misses libperl.so
> At this point I think I'm lost. I'd really rather avoid complete reinstall
> of the server if possible.
> I would greatly appreciate any help troubleshooting the libraries. Still
> hope there is something that can be done other than reinstall.
> Thanks in advance!
> Victor
>
> Hi Victor
>
> What you could do is put it back what is missing/damaged using an live
> FreeBSD CD and get the base system to work again without any GUI.
>
> Regards
> Sagara
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Should DNS be on same server as webserver?

2009-07-14 Thread Peter Boosten
Steve Bertrand wrote:

> 
> I like whatever works in regards to the situation I'm facing ;)

And that's the best possible reason one could have! ;-)

Peter

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


Re: ZFS or UFS for 4TB hardware RAID6?

2009-07-14 Thread Adam Townsend
>>> A bit of reading shows that ZFS, if it's stable enough, has some
>>> really great features that would be nice on such a large pile o'
>>> drives.
>>>
>>> See http://wiki.freebsd.org/ZFSQuickStartGuide
>>>
>>> I guess the last question I'll ask (as any more may uncover my
>>> ignorance) is if you need to use hardware RAID at all?  It seems
>>> both UFS2 and ZFS can do software RAID which seems to be quite
>>> reasonable with respect to performance and in many ways seems to be
>>> more robust since it is a bit more portable (no specialized
>>> hardware).
>>
>> I've thought about this one a lot. In my case, the hard drives are in
>> a separate enclosure from the server and the two had to be connected
>> via SAS cables. The 9690SA-8E card was the best choice I could find
>> for accessing an external SAS enclosure with support for 8 drives.
>>
>> I could configure it in JBOD mode and then use software to create a
>> RAID array. In fact, I will likely do this to compare performance of a
>> hardware vs. software RAID5 solution. The ZFS RAID-Z option does not
>> appeal to me, because the read performance does not benefit from
>> additional drives, and I don't think RAID6 is available in software.
>> For those reasons I'm leaning toward a hardware implementation.
>>
>
>
> Hi Maxim,
>
> RAID-Z2 is the RAID6 double parity option in ZFS.
>
>
> gr
> Arno
>
>
I'm planning on doing something like this once I get 2 more 1TB
drives.  I'm going to try out a zfs RAID-Z not RAID-Z2, but yeah.
I've been around openSolaris' docs on zfs & it seems to be really
robust, you can export it on one OS and import it on another (incase
your root dies, or you want to migrate your disks to another box), you
can take "snapshots" which are stored on the drive, but I'm sure you
could send those files somewhere to be backed up.  And if you have
really important files you can create multiple copies of them
automatically with ZFS.  If you set it up with multiple vdevs, you can
get a lot more speed out of disk I/O as well, because if you have like
2 raidz vdevs, it stripes them, so you can pull data faster from both.
 I can't remember if it was on this or another list, but there was a
great discussion about the performance abilities/issues of zfs & they
had some good points like not using more than 8 drives per vdev &
such. If you search this, the hardware list, or hackers list I'm sure it'll
pop up.

Try it out both ways and see which is best.  there are pro's & con's
to both, but it all depends on what you need for your solution.

Cheers,
Bucky

...whoops sent this as a reply to the digest w/o changing the name.  I hope
it finds the right person now.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Should DNS be on same server as webserver?

2009-07-14 Thread Steve Bertrand
Peter Boosten wrote:
> Ruben de Groot wrote:
>> On Tue, Jul 14, 2009 at 12:46:43AM -0400, Steve Bertrand typed:
>>> John Almberg wrote:
 On Jul 13, 2009, at 6:27 PM, Karl Vogel wrote:
>You can fix the security problems by dumping Bind and using djbdns.
>> What security problems? This one ? :)
>> http://blogs.zdnet.com/security/?p=2812
>>
> 
> It's the old 'my product is better' discussion: some people like
> Mercedes, other people BMW, 'American Cars' are always better, and some
> people like Volvo's.

I like whatever works in regards to the situation I'm facing ;)

We used BIND for years, but with hundreds of domains, I personally had
to manage the zones, lest someone made a typo in a zone or a config file.

I switched us over to DJBDNS a few years ago, simply for the ability to
throw VegaDNS at it in order to provide a safe method to delegate domain
management to other staff.

Many of our servers are still BIND however. I prefer BIND myself. Some
of the BIND servers slave for the djb servers, and others handle other
tasks, particularly all of my zones with IPv6 records.

> I'm a happy bind user for years now (and I use sendmail as well).

I switched from sendmail to Qmail on our core MTAs for the same reasons
stated above. At one point, I wrote CGI wrapper applications so staff
could manage email accounts, but it just got too much. I standardized on
Matt Simerson's Mail Toaster about 6 years ago, simply for the
ease-of-management (ie I don't have to do it).

To me, the product that is better is the one that removes me from having
to use and manage it, and allows me to do other things ;)

Steve


smime.p7s
Description: S/MIME Cryptographic Signature


Re: FreeBSD HA file cluster possibilities

2009-07-14 Thread Rick van der Zwet

RIck van der Zwet wrote:
I been (re)searching and reading what the options are with regards to 
H(igh) A(vailablility) file storage using FreeBSD, but cannot yet find a 
proper working solution. Any advice welcome!


I like to be able to mirror a full identical disk between two server. So 
in case of hardware failure of server A (Master). Server B (Slave) 
immediately takes over, without any loss of data. The Network 
configuration is easy using ucarp/vppr. But the file system is the hard 
part. Paths I have investigated:


a) ggate & gmirror: Export system on Server B to Server A. Use gmirror 
on Server A to keep identical disks. When the ggated on Server B 
actually goes down, the whole setup freezes, until the ggated is back up 
again. Second on network delays gmirror looses, having to sync all over 
again. Leaving the machine at risk.


The freezing has come to a end, with the patch attached, but is the
patch the right way to go (as C coding is not my strongest point)?

To test:
  # Create backup filesystem & export it
  serverB$ truncate -s100m /root/ha-slave.img
  serverB$ echo "192.168.33.41 RW /root/ha-slave.img" > /etc/gg.exports
  serverB$ ggated

  # Apply attached patch
  serverA$ cd /usr/src/sbin/ggate/ggatec
  serverA$ patch < %%ATTACHED_FILE%%
  serverA$ make clean install
  # Local file image
  serverA$ truncate -s 100m /root/ha-master.img
  serverA$ mdconfig -t vnode -f /root/ha-master.img
  #Remote file image
  serverA$ ggatec create  192.168.33.42 /root/ha-slave.img
  # Mirror building
  serverA$ gmirror label hamirror ggate0 md0
  serverA$ newfs /dev/mirror/hamirror
  serverA$ mount /dev/mirror/hamirror /mnt

Note: if you have _not_ applied the patch and you kill ggated on
machineB you will notice machineA freeze when trying to write to
something on /mnt or call `gmirror status'. Same applies if you kill 
ggatec on machineA without patch.


Using net/ucarp I detect failures on serverA and terminate ggated and
mount the image on serverB.
/Rick

--- ggatec.c.orig	2009-07-09 18:27:12.0 +0200
+++ ggatec.c	2009-07-14 10:15:34.0 +0200
@@ -156,7 +156,7 @@
 			break;
 		if (data != sizeof(hdr)) {
 			g_gate_log(LOG_ERR, "Lost connection 1.");
-			reconnect = 1;
+			reconnect = 0;
 			pthread_kill(recvtd, SIGUSR1);
 			break;
 		}
@@ -168,7 +168,7 @@
 break;
 			if (data != ggio.gctl_length) {
 g_gate_log(LOG_ERR, "Lost connection 2 (%zd != %zd).", data, (ssize_t)ggio.gctl_length);
-reconnect = 1;
+reconnect = 0;
 pthread_kill(recvtd, SIGUSR1);
 break;
 			}
@@ -177,6 +177,7 @@
 		}
 	}
 	g_gate_log(LOG_DEBUG, "%s: Died.", __func__);
+	g_gate_destroy(unit, 1);
 	return (NULL);
 }
 
@@ -203,7 +204,7 @@
 			if (data == -1 && errno == EAGAIN)
 continue;
 			g_gate_log(LOG_ERR, "Lost connection 3.");
-			reconnect = 1;
+			reconnect = 0;
 			pthread_kill(sendtd, SIGUSR1);
 			break;
 		}
@@ -223,7 +224,7 @@
 			g_gate_log(LOG_DEBUG, "Received data packet.");
 			if (data != ggio.gctl_length) {
 g_gate_log(LOG_ERR, "Lost connection 4.");
-reconnect = 1;
+reconnect = 0;
 pthread_kill(sendtd, SIGUSR1);
 break;
 			}
@@ -235,6 +236,7 @@
 		g_gate_ioctl(G_GATE_CMD_DONE, &ggio);
 	}
 	g_gate_log(LOG_DEBUG, "%s: Died.", __func__);
+	g_gate_destroy(unit, 1);
 	pthread_exit(NULL);
 }
 
@@ -410,8 +412,7 @@
 static void
 signop(int sig __unused)
 {
-
-	/* Do nothing. */
+	g_gate_destroy(unit,1);
 }
 
 static void
@@ -420,6 +421,7 @@
 	struct g_gate_ctl_cancel ggioc;
 
 	signal(SIGUSR1, signop);
+	signal(SIGINT, signop);
 	for (;;) {
 		g_gatec_start();
 		g_gate_log(LOG_NOTICE, "Disconnected [%s %s]. Connecting...",
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Re: turning off the wireless network radio

2009-07-14 Thread Maciej Milewski
Dnia wtorek 14 lipiec 2009 o 07:38:49 Chad Perrin napisał(a):
> I'm having a real bitch of a time trying to figure out how to shut down
> the wireless adapter's radio.  The driver module won't unload as long as
> the adapter is active, and neither ifconfig nor iwicontrol are providing
> a solution either.
>
> I'm using (as you may have guessed by mention of iwicontrol) an Intel
> wireless adapter, with if_iwi.ko as my driver module.  It's an Intel
> PRO/Wireless 2200BG Network Connection according to pciconf -lv.
>
> Thanks in advance.
You can try doing this by software switch:
sysctl -a | grep rfkill
dev.ath.0.rfkill: 0
This switch should disable radio.
I don't know if it is supported by iwi driver but you can try.

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


Re: 8.0 BETA1 LOR

2009-07-14 Thread Fernando Apesteguía
2009/7/13 Glen Barber :
> 2009/7/13 Glen Barber :
>> Hi, Fernando
>>
>> 2009/7/13 Fernando Apesteguía :
>>> Hi there,
>>>
>>> I downloaded FreeBSD 8.0 in order to help testing it. I have found
>>> several issues. This is the first one:
>>>
>>> Jul 13 18:37:43 beastie kernel: lock order reversal:
>>> Jul 13 18:37:43 beastie kernel: 1st 0xff0007d42ba8 ufs (ufs) @
>>> /usr/src/sys/kern/vfs_mount.c:1199
>>> Jul 13 18:37:43 beastie kernel: 2nd 0xff002e007270 devfs (devfs) @
>>> /usr/src/sys/fs/msdosfs/msdosfs_vfsops.c:944
>>> Jul 13 18:37:43 beastie kernel: KDB: stack backtrace:
>>> Jul 13 18:37:43 beastie kernel: db_trace_self_wrapper() at
>>> db_trace_self_wrapper+0x2a
>>> Jul 13 18:37:43 beastie kernel: _witness_debugger() at 
>>> _witness_debugger+0x2e
>>> Jul 13 18:37:43 beastie kernel: witness_checkorder() at 
>>> witness_checkorder+0x81e
>>> Jul 13 18:37:43 beastie kernel: __lockmgr_args() at __lockmgr_args+0xcf3
>>> Jul 13 18:37:43 beastie kernel: vop_stdlock() at vop_stdlock+0x39
>>> Jul 13 18:37:43 beastie kernel: VOP_LOCK1_APV() at VOP_LOCK1_APV+0x9b
>>> Jul 13 18:37:43 beastie kernel: _vn_lock() at _vn_lock+0x47
>>> Jul 13 18:37:43 beastie kernel: msdosfs_sync() at msdosfs_sync+0x227
>>> Jul 13 18:37:43 beastie kernel: dounmount() at dounmount+0x2ca
>>> Jul 13 18:37:43 beastie kernel: unmount() at unmount+0x28a
>>> Jul 13 18:37:43 beastie kernel: syscall() at syscall+0x1af
>>> Jul 13 18:37:43 beastie kernel: Xfast_syscall() at Xfast_syscall+0xd0
>>> Jul 13 18:37:43 beastie kernel: --- syscall (22, FreeBSD ELF64,
>>> unmount), rip = 0x8006a09ac, rsp = 0x7fffdc38, rbp = 0 ---
>>> Jul 13 18:37:44 beastie gnome-keyring-daemon[61245]: removing
>>> removable location: volume_size_4144496640
>>>
>>> I got this while trying to unmount a USB device. The unmounting seemed
>>> to be fine, all the files were in the device and no corruption
>>> occurred. I found a very similar problem (maybe the same) here[1]. Any
>>> clues about this?
>>>
>>>
>>> Thanks in advance.
>>>
>>> PS: Is this the proper list for asking these questions?
>>>
>>> [1] http://forums.freebsd.org/showthread.php?p=31490
>>
>> You can view reported lock order reversals here:
>>
>> http://sources.zabbadoz.net/freebsd/lor.html
>>
>> Questions about the -CURRENT branch should be asked on questi...@.
>>
>
> This is why multitasking is not generally a good thing.  I meant curr...@.

OK, thanks. I will have a look at the list.

Cheers

>
> Sorry for the noise.
>
>
> --
> Glen Barber
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Install from a USB Pen

2009-07-14 Thread Randi Harper
On Mon, Jul 13, 2009 at 7:17 PM, Fbsd1  wrote:

> Mark Wallbank wrote:
>
>> OK I know this has probably been done to death by know and I keep
>> hitting the same problems with the methods I have tried to find on
>> google and I know I could just sacrifice a laptop and do a build to
>> create the image or do a net (pxe) install from another NIX serverbut
>> it does seem to be a bit over the top. Does any body know of an easy
>> way to create a bootable USB install media for 7.2 using either linux
>> or vista (or using an option from the install dvd). I have tried some
>> of the tricks from openBSD and linux to no avail.
>> Any help appreciated...
>> Cheers
>> Mark
>> ___
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "
>> freebsd-questions-unsubscr...@freebsd.org"
>>
>>
>>
>
> If your asking how to put the cd1 install contents onto a usb stick and use
> the sysinstall program to perform the install on the target box then check
> the archive.
> It has a post with a script to convert the cd1 install disk to usb stick.
> But the show stopper is the sysinstall program does not have option for usb
> stick as install source. There was a bug report submitted 2 years ago
> pointing out this oversight, but as of 7.2 it has not been corrected.
> If you think the sysinstall program should have install source option for
> usb stick them file your own bug report. The more people who file bug
> reports the more attention this problem will get from the developers.
>
>
>
>
>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"
>


... or you could just download an official image instead of going to all of
that trouble. Check the FTP site, there's a memstick.img if you're down for
using with 8 instead of 7. There are currently three PRs about this, and I
recently took ownership of them. Filing duplicate bug reports doesn't "get
attention", it's just annoying and it makes trying to improve sysinstall
that much more difficult because I'll have to spend more time closing these
duplicates and less time fixing problems. There has been an email that
stated there is USB install support in sysinstall as of 8.0 BETA1, and USB
livefs support as of 8.0 BETA2. The PRs for USB support in sysinstall will
be updated and closed soon. Don't open new ones.

You're welcome! :D

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


Re: partition black magic but no data lost phew!

2009-07-14 Thread Randi Harper
On Mon, Jul 13, 2009 at 3:56 PM, Chris Whitehouse wrote:

> Hi,
>
> This is from memory (brain not ram) and I can't recreate the steps for
> reasons which will be obvious, so may not be entirely accurate.
>
> I have a sata hard disk which is divided into 2 slices. Slice 1 (ad4s1) is
> about half the disk and had the remains of a standard install with swap, / ,
> /var, /tmp, /usr. Slice 2 (ad4s2) is the remainder and has a single
> partition for data, ad4s2d. It was all created with sysinstall and doesn't
> have anything special like dangerously dedicated.
>
> The operating system on this machine is on a second hard disk which is what
> I booted from.
>
> I moved all the data from ad4s1f onto ad4s2d so that I could delete
> partitions from slice 1 and make a single large partition.
>
> I then unmounted all ad4* partitions. I may even have rebooted.
>
> sysinstall - Configure - Label allowed me to delete ad4s1a but when I tried
> to delete the other ad4s1* partitions sysinstall told me I had to set
> kern.geom.debugflags=16 before I could make changes on a running system . I
> set kern.geom.debugflags but changes I made in sysinstall did not take
> effect, the partitions persisted, both as /dev/ad4s1* and as entries in
> sysinstall
>
> At some stage sysinstall core dumped and somewhere else ad4s2d got deleted.
> I managed to recreate it and didn't lose any data.
>
> Next I booted from a pen drive and successfully deleted the partitions from
> slice 1, being very careful not to delete the partition on slice 2, however
> when I exited from sysinstall ad4s2d was gone. Again I managed to recreate
> it and didn't lose any data.
>
> The bit that puzzles me is that ad4s2d disappeared twice and the second
> time I am sure I didn't do any explicit steps to delete it.
>
> Did I hit a bug in sysinstall or did I do something wrong? I didn't lose
> any data in the end but I could easily have done (I know - back up - I'm
> going to go and buy a nice big external hard disk very soon ;)
>
> FreeBSD muji 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Mon Nov 24 20:22:16
> EST 2008 r...@pcbsdx32-7:/usr/obj/pcbsd-build/cvs/7.0.2-src/sys/PCBSD
>  i386
>
> Everything is sorted now so I am really asking this out of curiousity.
>
> Thanks
>
> Chris
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"


When you booted from the pen drive, was sysinstall running as init? ie: is
this the memstick.img from the ftp site or a homebrew disc1.iso->usb image,
or did you have freebsd installed to the pen drive? If so, what version?

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


Re: OFFTOPIC: HP DL1xx vs IBM x3250 vs DELL R200

2009-07-14 Thread Matthew Seaman

Peter wrote:

Hello,

We are about to buy 1U rack mount server for the office. The server room
is small and close to meeting room so we have two priorities:

1)Good FreeBSD support.
2) Low noise level (!)


Speed is not a priority, system load will be small.

Which one will you recommend ?



HP DL160G5 E5405 2x1GB 2x250GB NHP-SATA CD-DVD Combo 3y
carepack;Quad-Core Intel® Xeon® processor E5405 (2.00 GHz, 80W, 1333MHz
FSB);Supports up to 64 GB of PC2-5300 (DDR2-667) and up to 32 GB of
PC2-6400 (DDR2-800) fully buffered DIMMs (DDR2-667) with Advanced ECC;
Two embedded NC105i PCIe Gigabit Server Adapters;Five USB ports (two
front, one internal, two rear);650W Power Supply (Non-Hot Plug,
Autoswitching);Rack (1U)

VS:

IBM x3250 M2 1 x  Xeon Q3330 QuadCore 2.66GHz/1333MHz FSB Hyper
Threading with EM64T, 6MB Cache, 2x1024MB ECC DDR2, 2 x 250 GB SATA/SAS
HDD HotSwap, OpenBay Serial Attached SCSI (SAS) Hot Swap, Integrated
RAID-1, 1x351W, DVD/CD-RW, Dual LAN 10/100/1000, 3 year on-site warranty

VS:

DELL™ PowerEdge™ R200   1   
Quad-Core Intel Xeon Processor X3210 2.13 GHz / 1066 MHz FSB / 8 MB 
SAS
6/i Integrated RAID Controller Card for SATA and SAS Hard Drives,
RAID 0,1
2GB 800MHz ECC Unbuffered DDR-2 SDRAM   
2 х 250GB, SATA, 3.5-inch, 7.2K RPM Hard Drive (Cabled) 
Slim DVD/CD-RW Combo Drive  
R200 PCI-E Riser Card (2 x PCI Express slots)   
dual embedded Broadcom® Gigabit Ethernet NIC
Sliding Rack Kit for Dell Racks (Rapid Rails)   


Prices are almost the same :-)

Please recommend.


None of the above are going to be particularly quiet I'm afraid.  The 
main noise source in all cases will be the cooling fans, both in the PSUs

and the ones blowing air across the CPU heat sinks.  They should all have
adaptive fan speed controls -- so the fans work harder when the machine
gets hotter -- but the distinction in noise levels is between unbearable and
merely loud.

Now, if compute performance really isn't your limiting factor, then you may
be able to get away with a low-wattage processor such as the Intel Atom --
these can be operated fanless with the right sort of case design.  The trick
is finding a supplier.  Tranquil PC (http://www.tranquilpc.co.uk/) is 
someone I've seen recommended elsewhere on FreeBSD mailing lists, and I believe

their systems are generally FreeBSD compatible, but I have no real confirmation
that is the case, just some hearsay on mailing lists.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re USB install

2009-07-14 Thread Mark Wallbank
Thanks for all the help, much appreciated; didn't think the Linux  
tricks would work from my experience with OBSD. But knew it had to be  
possible


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


Re: Should DNS be on same server as webserver?

2009-07-14 Thread Peter Boosten
Ruben de Groot wrote:
> On Tue, Jul 14, 2009 at 12:46:43AM -0400, Steve Bertrand typed:
>> John Almberg wrote:
>>> On Jul 13, 2009, at 6:27 PM, Karl Vogel wrote:
You can fix the security problems by dumping Bind and using djbdns.
> 
> What security problems? This one ? :)
> http://blogs.zdnet.com/security/?p=2812
> 

It's the old 'my product is better' discussion: some people like
Mercedes, other people BMW, 'American Cars' are always better, and some
people like Volvo's.

To prove they're right, they try to find why the other products are not
as good as theirs, and keep holding onto old bugs and prejudices.

I'm a happy bind user for years now (and I use sendmail as well).

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


Re: ZFS or UFS for 4TB hardware RAID6?

2009-07-14 Thread Matthew Seaman

Richard Mahlerwein wrote:


With 4 drives, you could get much, much higher performance out of
RAID10 (which is alternatively called RAID0+1 or RAID1+0 depending on
the manufacturer


Uh -- no.  RAID10 and RAID0+1 are superficially similar but quite different
things.  The main differentiator is resilience to disk failure. RAID10 takes
the raw disks in pairs, creates a mirror across each pair, and then stripes
across all the sets of mirrors.  RAID0+1 divides the raw disks into two equal
sets, constructs stripes across each set of disks, and then mirrors the
two stripes.

Read/Write performance is similar in either case: both perform well for 
the sort of small randomly distributed IO operations you'ld get when eg.

running a RDBMS.  However, consider what happens if you get a disk failure.
In the RAID10 case *one* of your N/2 mirrors is degraded but the other N-1
drives in the array operate as normal.  In the RAID0+1 case, one of the
2 stripes is immediately out of action and the whole IO load is carried by
the N/2 drives in the other stripe.

Now consider what happens if a second drive should fail.  In the RAID10
case, you're still up and running so long as the failed drive is one of
the N-2 disks that aren't the mirror pair of the 1st failed drive.
In the RAID0+1 case, you're out of action if the 2nd disk to fail is one
of the N/2 drives from the working stripe.  Or in other words, if two
random disks fail in a RAID10, chances are the RAID will still work.  If
two arbitrarily selected disks fail in a RAID0+1 chances are basically
even that the whole RAID is out of action[*].

I don't think I've ever seen a manufacturer say RAID1+0 instead of RAID10,
but I suppose all things are possible.  My impression was that the 0+1 
terminology was specifically invented to make it more visually distinctive

-- ie to prevent confusion between '01' and '10'.

Cheers,

Matthew

[*] Astute students of probability will point out that this really only
makes a difference for N > 4, and for N=4 chances are evens either way 
that failure of two drives would take out the RAID.


--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: Should DNS be on same server as webserver?

2009-07-14 Thread Ruben de Groot
On Tue, Jul 14, 2009 at 12:46:43AM -0400, Steve Bertrand typed:
> John Almberg wrote:
> > On Jul 13, 2009, at 6:27 PM, Karl Vogel wrote:
> >>
> >>You can fix the security problems by dumping Bind and using djbdns.

What security problems? This one ? :)
http://blogs.zdnet.com/security/?p=2812

> > I actually do use djbdns. Super easy to use, once you figure it out.
> 
> ...to run a DNS cache with djbdns, it doesn't take much figuring out:

(snipped rather long installation instructions)

To enable DNS cache with bind:

echo "named_enable=YES" >>/etc/rc.conf
/etc/rc.d/named start

Ruben

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


gmirror + geli problem : wrong key for mirror/gm0

2009-07-14 Thread Taras Danko
Hello to all.

I've got a problem setting up the gmirror + geli combination for /
under the FreeBSD 7.2-RELEASE.
I have successfully created the mirror/gm0 device from "fixit" bsd
livecd, then I've initialized the geli provider using the command
geli init -b -l 256 -s 4096 -K /usb/gm0.key /dev/mirror/gm0

geli attach -k /usb/gm0.key /dev/mirror/gm0 went successfully as well
as detach/re-attach so passphrase and the key is ok.

after that I've detached the gm0 and rebooted from the bootable
usb-stick, which contained the /boot/ /etc/ and key-file + loader.conf
with the following:

geli_gm0_keyfile0_load="YES"
geli_gm0_keyfile0_type="gm0:geli_keyfile0"
geli_gm0_keyfile0_name="/boot/keys/gm0.key"
kern.geom.eli.visible_passphrase=1


During the boot process I got a message that mirror/gm0 is created and
after that I was asked for my pass-phrase.
I've typed the pass-phrase (for the experiment clearance it was "aaa"
- without any "special" characters or something) and got an error:
GEOM_ELI: wrong key for mirror/gm0

The keyboard is ok - I see all the characters typed (due to
visible_passphrase param in my loader.conf)
I have disabled the kbdmux device in kernel which was blamed as a geli
troublemaker as well.
GEOM mirror and eli options as well as cryptodevice are compiled into
the kernel.

Booting from "fixit" cd again shows that cryptoprovider creates and
mounts ok with the mentioned key and passphrase.

My guess was to change the "gm0" to mirror/gm0 at geli_ strings of
loader.conf file - I've tried that but with no luck (maybe I did it
incorrectly)
There are really a very few articles over internet describing
geli+gmirror combination - so I'll very much appreciate any
suggestions!


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