Re: Why are some linux users saying that FreeBSD is dying

2008-04-08 Thread Erik Cederstrand

E. J. Cerejo wrote:
FreeBSD is a dying OS because netcraft.com confirms it that's the 
argument used some of these guys, and I'm wondering what data are they 
using to make their point!  Even netcraft is running FreeBSD and the 
uptimes section I can see quite a few running FreeBSD and not one linux!

Is the data from netcraft reliable?


It's a long-standing joke repeated by trolls on Slashdot: 
http://en.wikipedia.org/wiki/Slashdot#Culture


So move along, nothing to see here...

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


Re: FreeBSD diskless workstation boot over Linux PXE server

2008-03-04 Thread Erik Cederstrand

vincenzo romero wrote:

Thank you for the input from a couple of folks.  After a few research
and readings I am able to boot off a diskless client; and have a
little error encountered.  To clarify the environment:

1.  PXE/DHCP/NFS/TFTP servers is a linux host
2.  DHCP - server - dhcpd.conf file shows the following: (for my
freeBSD diskless client testing scenario)

filename pxeboot;
next-server 192.168.16.5;
option root-path 192.168.16.5:/export/images/freeBSD;

-- pxeboot is the freeBSD /boot/pxeboot file I copied over to my
/tftpboot directory.
-- next server IP is the PXE/TFTPD/DHCP server ...
-- the NFS root is exported by the NFS server as such.

 The client seems to boot properly - acquires an IP address;
downloads and reads the /tftpboot/pxeboot file;   a message also
appears that indicates it mounted the root File system: (snippet of
console messages:)

NFS ROOT:  192.168.16.5:/export/images/freeBSD
nfe0:  link state change to UP
Interface nfe0 IP_Address 192.168.16.5 ... . . . . ..
Loading Configuration files.
rc.conf:  not found
No Suitable dump device was found .
|
etc.
etc.


Did you modify rc.conf, fstab and resolv.conf as described in 
http://www.locolomo.org/pub/pxeboot/diskless.html? And what's hiding 
behind etc. etc.?


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


Re: DJ500 dead after = 16 years.

2008-02-20 Thread Erik Cederstrand

Gary Kline wrote:


	Nutshell, I'd like anyone's ideas/experiences with some of these 
	new HP/ or whateverbrand printers. I wouldn't *mind* if I

could scan in text from a techy paper into HTML or PDF or text.
But mostly, like 99.44%  plain black text.  My old deskjet used
gs as a filter to print PostScript.  Do we have any such plugin
support, or are printers still roll-your-own?  [FWIW, I can't
seem to get CUPS working...  altho it maay be my misssing
/dev/lpt0.]



I suggest getting a network printer. Most of them support the IPP
printing protocol, and if it eats PostScript then it's pretty much
guaranteed to work on every operating system under the sun. Saves you
from fiddling with drivers for FreeBSD and setting up CUPS.

Erik

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


Re: Ports question

2008-02-20 Thread Erik Cederstrand

James Harrison wrote:

On Wed, 2008-02-20 at 12:02 -0600, Darryl Hoar wrote:

Greetings,
I am looking to install a CMS system (something like postnuke) and want to
have a blog component.

Anybody have any recommendations ?  If it is in the ports, it would be even
better.

thanks,
Darryl


I've been using git  a fair bit; it's fast as all hell. It's what the
linux kernel guys use, though I'm considering moving over to bazaar
because it archives more metadata.
 http://en.wikipedia.org/wiki/Bazaar_(software)

The BSDs traditionally use CVS, so at the very least you know that's
good over long term for a lot of files.


Uhh, CMS != CVS.

The OP needs to give more information. What are the requirements? Is it 
just a blog and a couple of static pages, and very few users? Go with 
Wordpress. If you're building a community site or a company site with 
lots of pages, customers. editors etc? Drupal is great for that. 
$100.000 government site with customizations galore? Use Plone.


All three are in the ports tree.

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


Re: pxeboot, TFTP only, NFS MOUNT RPC error: 60, timeout

2008-02-07 Thread Erik Cederstrand

Rek Jed wrote:

Hey,

I've been building FreeBSD jumpstart infrastructure and it mostly 
works.  I'm using tftp  to boot off the network in to scripted 
sysinstall.  I compiled the boot loader with tftp support but every time 
I boot it will first try nfs, then timeout after around two minutes (it 
cannot find nfs) and finally boot from tftp.  Is there any way that I 
can make it boot from tftp straight away rather than wait for nfs to 
timeout?


This should Just Work, and I've had it work about half a year ago on 
6.2. Which version are you compiling on?


The tutorial I have handy[1] says to compile with:

   make -DLOADER_TFTP_SUPPORT=YES

I'm not sure if it makes a difference. Anyhow, the boot loader source 
looks like it can't cope with both TFTP and NFS at the same time, so 
there might be a bug in there after all.


Erik

[1] http://www.locolomo.org/pub/pxeboot/index.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pxeboot, TFTP only, NFS MOUNT RPC error: 60, timeout

2008-02-07 Thread Erik Cederstrand

Zinevich Denis wrote:
It does not work. I`ve tried. But as I found in forums and mailing lists 
it randomly helps sometimes.


Please don't top-post. I have a comment in 
src/sys/boot/i386/loader/conf.c v1.26 (RELENG_7) saying:


#if defined(LOADER_NFS_SUPPORT)  defined(LOADER_TFTP_SUPPORT)
#error Cannot have both tftp and nfs support yet.
#endif

So at least the intent is that NFS and TFTP are mutually exclusive. 
Since the OP has both working at the same time, there's something wrong. 
Which version are you using, and which architecture?


I'm not really able to help you debug further, so I suggest filing a PR 
if one doesn't exist already.


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


Re: pxeboot, TFTP only, NFS MOUNT RPC error: 60, timeout

2008-02-07 Thread Erik Cederstrand

Rek Jed skrev:


I've been playing with thinbsd (http://www.thinbsd.org/) a while back.
It also boots from tftp without nfs and their boot loader works fine
(boots straight away).  Latest thinbsd is based on 5.4 so maybe it broke
in 6.x?  For a workaround I used pxeboot from thinbsd with my 6.3
jumpstart setup and it seems to work fine.  However this is quite dirty.


I agree that building a boot loader for TFTP should work on current 
sources, but what makes you think using an old boot loader is dirty? 
It's just a utility to load a kernel from the network. It's not like it 
will affect your system when it's installed.


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


Re: [RFC/P] Port System Re-Engineering (Repost from -ports@)

2007-12-04 Thread Erik Cederstrand

Aryeh M. Friedman wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[Repost from [EMAIL PROTECTED]

As has been hashed out in -ports@ over the last few days there is at
least a need to examine weither or not the current ports system should
remain as is or potentially be re-engineered in the future (estimates
if and when needed vary from ASAP to 10-15 years).   I have
volunteered to undertake a feasibility/pilot project to examine what
changes (if any) are needed in the system (for the purposes of this
thread I will not venture any of my own suggestions).   I have the
following broad questions for people:

1. What is more important to your personal use of FreeBSD (the ports
system, the underlaying OS, some other aspect)?


Mu. For me, the OS is nothing without the port, and vice-versa.


2. How frequently do you interact with the ports systems and what is
the most common interaction you have with it?


Daily. Updating, building for jails.


3. What is the single best aspect of the current system?


For normal, day-to-day work on servers, it Just Works.


4. What is the single worst aspect of the current system?


Compiling takes forever, especially on small-scale machines.


5. If you where a new FreeBSD user how would your answers above
change?   If you where brand new to UNIX how whould they change?


A GUI would really help to get an overview and manage simple tasks.


6. Assuming that there was no additional work on your behalf would you
use a new system if it corrected your answer to number 4?


Yes.


7. Same as question 6 but for your answer on question 3?


No.


8. How long have you used FreeBSD and/or UNIX in general?


Five years.


9.  That is your primary use(s) for your FreeBSD machine(s) (name upto 3)?


Home server (mail, web, file), software development, small-scale production.


10. Assuming there is no functional difference what is your preferred
installation method for 3rd party software?


pkg_add to cut install time, but usually ports tree because of missing 
options in precompiled packages (e.g. no-gui vim, php5 with apache module).



11. On a scale from 1 to 10 (10 being the best) please rate the
importance of the following aspects of the ports system?

   a. User Interface


5


   b. Consistency of behaviors and interactions


9


   c. Accuracy in dependant port installations


8


   d. Internal record keeping


8


   e. Granularity's of the port management system


5


12. Please rate your personal technical skill level?


Medium.

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


Re: mail problem, using postfix dovecot

2007-12-03 Thread Erik Cederstrand

Chuck Robey wrote:
I have my mail system running on my FreeBSD server.  It uses postfix 
outgoing, and dovecot to manage the Imap server, and finally Seamonkey 
either locally or from one of my other machines, to read/write my mail, 
it makes for a very portable mail system, but I am now convinced I have 
one major bug.  It's that I'm getting too darn many duplicate mails.


I didn't complain when that happened on all the FreeBSD posts, because 
we have so daarn many people crossposting, it'd be foolish to try to fix 
that.  BUT I just got dupes on some mail from Usenix, and I know Usenix 
isn't double posting me.


Any  idea of any common sort of mail mistake I might have made?  Mail 
isn't my real forte, so I might well  have bungled something.  Any sort 
of hint, right or wrong, would help, and especially the wrong ones: I'll 
run them down anyhow, and during that running down, I often find the 
real error, so don't think I'll jump upon you for stupid suggestions.
The only sort of thing I won't try is suggestions to change the basic 
method I use: I know Imap *can* be made to work, so I won't switch to 
using something like popmail, I don't want to pop my mail.  Other than 
that, any suggestion will be checked, believe me.


Just to narrow down the problem, take a look at the full headers of the 
duplicate mails and see if the mails are exact copies (i.e. the 
duplication occurs internally) or are in fact recieved py Postfix twice. 
Check the mail logs to see what Postfix, Dovecot and whatever else you 
have in the mix (SpamAssassin? Procmail? Postgrey?) are doing. Also make 
sure you're not just recieving the extra emails from some address you've 
set to forward to your normal address.


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


Re: urgent: undoing a cvsup update

2007-11-27 Thread Erik Cederstrand

Aryeh Friedman wrote:

I just cvsuped the latest sources and they break many programs named
and most X11-apps comes to mind immediately

Well how do I backout of the this keep in miond I use cvs-supfile
to populate a local repo and did a rm -rf /usr/obj /usr/src thinking
that might clear stuff up but it didn't

As far I can tell I can track the main issue to the new malloc stuff

All programs that are borken just hang immediatlely after invocation



Please, Aryeh. You've been using freebsd for 10 years and asking a flood 
of questions here. You should know by now to at least provide the basic 
info:


uname -a
error messages
cvsup file
the commands you entered to wind up in this unfortunate situation


Since you of course have proper backups, just pop in a CD and do a 
rescue install. Asking questions like the above will get you nowhere.


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


Re: Progress on RELENG_6_3 and RELEND_7_0

2007-11-21 Thread Erik Cederstrand

David Naylor wrote:

Hi,

I have been looking regularly at the FreeBSD website about the
upcoming (and highly anticipated) releases, however I have noticed
that the pages are outdated and have not been updated recently.
Additionally, from what I can gather of the schedule the release
process in behind.

I am happy (and would prefer) to wait until it is finished but I am
feeling information deprived, could someone please tell me (and the
community) how things are going.

Apologies in advance if I have missed any announcements, in which case
could you please point me in the right direction.


Well, there's a schedule at 
http://www.freebsd.org/releases/7.0R/schedule.html. No guarantee, of course.


I really recommend you to try it. It works fine for a lot of people 
already. You might even get lucky and help sorting out a bug :-)


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


Re: Changing the boot device from PXE to hard disk

2007-11-19 Thread Erik Cederstrand

Javier Martín Rueda wrote:

I have set up a simple unattended installation system for FreeBSD, so
that I can manually configure a group of computers to boot with PXE,
and when they boot they will automatically install FreeBSD.

The final step would be to configure the BIOS to boot from the first 
hard drive. So far I can do that manually by pressing Del when the 
computer boots and entering the ROM BIOS setup program, but I would

like to know if it is possible somehow to change the boot device
priority in the BIOS from FreeBSD?


It's not possible to access the BIOS setting through FreeBSD. What I do
is to set the boot order in BIOS to:

1. hard drive
2. PXE

Before the unattended install, wipe out the MBR. If this is a blank hard
drive, then you're already OK. If the drive contains a previous FreeBSD
install, do:

# sysctl kern.geom.debugflags=16
# dd if=/dev/zero of=/dev/ad0 bs=512 count=1k

as root. This makes the BIOS skip the hard drive on the next boot and
continue to boot via PXE. Make sure your install puts an MBR on the
disk, so the BIOS picks the hard drive after rebooting.

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


Re: Jails and multicore boxes

2007-11-14 Thread Erik Cederstrand

Matt Fioravante wrote:

I've heard that things like freebsd jails or solaris zones can still
be insecure on multicore boxes because a race condition can occur. I
don't know more details about it other than that. Is this true now on
freebsd?


There's always the possibility that a bug exists which lets you break 
out of a jail and give you access to the host system.



Also, I have a home server which I'm considering running apache, bind,
dhcp, and possiblty opening ports for some other services. Is it
overkill to run all of these each  in their own jail?


You'll have to answer that yourself. How valuable is your data? What are 
you trying to protect? If you're worrying about getting cracked and used 
as a spam bot, jails are no more secure than a non-jail system.


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


Re: jails in 6.3 and 7.0

2007-11-14 Thread Erik Cederstrand

Jonathan Horne wrote:

I was reading a while back that the jails tcp system was getting an
overhaul, possibly in the 7.0 release.  I don't remember all the
particulars, but things along the lines to make jails function even
more like a real (independant) system.  I believe one of the
improvments might have been a separate virtual interface, thus
allowing he jail to have its own pf configuration.

I've not seen anything else on this topic, so I was wondering if
anyone might know if that's going to make in to 7 (and possibly
backported to 6.3)?



You're thinking about the Network Stack Virtualization project:

http://www.freebsd.org/news/status/report-2007-07-2007-10.html#Network-Stack-Virtualization

In short: not ready yet.

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


Re: Error installing plone

2007-11-12 Thread Erik Cederstrand

Monah Baki wrote:

Hi all,

I'm trying to install on Freebsd 6.3 plone from ports. I keep geting the
error message

libtool: link: `gscanner.lo' is not a valid libtool object
gmake[4]: *** [libglib.la] Error 1
gmake[4]: Leaving directory
`/usr/ports/devel/pkg-config/work/pkg-config-0.22/glib-1.2.8'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory
`/usr/ports/devel/pkg-config/work/pkg-config-0.22/glib-1.2.8'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
`/usr/ports/devel/pkg-config/work/pkg-config-0.22/glib-1.2.8'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/usr/ports/devel/pkg-config/work/pkg-config-0.22'
gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/devel/pkg-config.
*** Error code 1

Stop in /usr/ports/x11/xproto.
*** Error code 1

Stop in /usr/ports/x11/libXau.
*** Error code 1

Stop in /usr/ports/x11/libX11.
*** Error code 1

Stop in /usr/ports/x11-toolkits/tk84.
*** Error code 1

Stop in /usr/ports/x11-toolkits/py-tkinter.
*** Error code 1

Stop in /usr/ports/graphics/py-imaging.
*** Error code 1

Stop in /usr/ports/graphics/py-imaging.
*** Error code 1

Stop in /usr/ports/www/plone.


This is more a workaround than a solution, but you don't need the X11 
libraries to run plone. Try putting WITHOUT_X11=yes in your make.conf.


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


Re: port build order

2007-11-11 Thread Erik Cederstrand

Aryeh M. Friedman wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

How do I get a list of ports that need to be made before a port is
made given the following:

Note: Sorry for the *CAPS* stuff but I am using my standard specs
formating

1. The list *MUST* be in build order with the first port either being
the first or last line (make missing or pkg_info search=XXX
display=bdeps,rdeps)
2. If the package is already installed it *MUST NOT* appear on the list

The goal here is for any given port I want to be able to build each
dependency one at a time (to do some testing) and I have found hand
tracing through the dependency list on the web site to be extremely
tedious


I don't think there's anything which does exactly what you want, but you 
could start with 'make pretty-print-build/run-depends-list' and script 
your way through from there. Since what you're trying to do is what the 
ports infrastructure already does, you could always take a look at the 
code. bsd.ports.mk is what you want, I think.


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


Re: compile ports and base using both cores

2007-11-07 Thread Erik Cederstrand

Chris Whitehouse wrote:

Chris Whitehouse wrote:

Hi,

Installing ports or upgrading the base system only uses around 50% cpu 
utilization (measured with the top utility) on my dual core machine. 
Is there some way I can get higher cpu usage?


/usr/src/UPDATING says don't use make -j. I tried installing 
openoffice.org-2 with make -j 2 but it failed at some stage saying it 
couldn't find a directory. It works not using -j.


I'm using 7.0-BETA1.5 i386 on an AMD 64 system.

Thanks

Chris


Hi again,

I was wondering if anyone could give me some ideas about this. Btw I 
confess the subject line is not quite right, I think both cores are 
being used but cpu is only around 50% - or it is being measured so that 
it looks like 50% but is really more. If I make buildworld and compile a 
 port at the same time then cpu usage really does go up to 100%


AFAIK, parallel compilation using 'make -j' is not guaranteed to work. 
The concurrent threads might interfere with or depend on each other. If 
it does work for you then great, you saved some time, but don't submit 
PRs before you have tried compiling without the -j option.


Since make without -j runs single-threaded, it will only use one CPU at 
a time. The scheduler may move the process around between CPUs depending 
on which CPU is more idle at any given time. The reason a simultaneous 
make buildworld and port compilation uses 100% CPU is that these are two 
separate processes which do not interfere with one another, so they can 
be run on the two CPUs simultaneously.


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


Re: Rebuilding kernel/system to a state back-in-time?

2007-11-05 Thread Erik Cederstrand

Ewald Jenisch wrote:

Hi,

Because of severe problems wrt. a third party app (TSM Backup - see my
previous post) I'm looking for a way to compile a kernel/system to a
state as it was several weeks ago.

To be specific I'd like to build my system/kernel using the
source-files of FreeBSD 6.2 as they were back on September 14, 2007.

In cvsup there seems to be a feature date=... that should be able to
accomplish this. Has anybody out there used it sucessfully? Is specifying

date=2007.09.13.23.59.00

together with the default-settings in my stable-cvsup-file 


*default host= here comes my cvsup-host
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_5


Should be tag=RELENG_6_2


*default delete use-rel-suffix
*default compress
src-all 


enough?


That should suffice.


Anything else to consider?


This assumes you're already running 6.2. As long as you don't switch 
branches (or choose a date before the branch occurred!), you should be 
good to go.


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


Re: Rebuilding kernel/system to a state back-in-time?

2007-11-05 Thread Erik Cederstrand

Jonathan Horne wrote:

...
IMO, (and forgive me, i generally dont spew my opinions where they arent 
welcome or asked for), RELENG_6_2 is better for a server over RELENG_6 
(aka, -STABLE), as it doesnt include items that are not critically 
required for secure and stable operation.  remember, that the true 
-STABLE branch has items merged in from -CURRENT (call it back-ported?).


let say, you already know that -p8 is the latest 6.2 revision.  you get 
on a server, you log in, and it says 6.2-RELEASE-p8.  you already know 
that this system is up to date.  if you log in, and see 6.2-STABLE... 
you dont immediately know when this system was last rebuilt without 
doing some other version checks first.  i have to be honest, when it 
comes to managing a farm full of servers, i like my visual version 
checks... the same way i like my women:


We're going off-topic now, but you have a point. I'm not going to argue 
if STABLE is better than release branches on servers, but I think it 
would be useful to record the CVS date somewhere by default (I know you 
can do this manually via src/sys/conf/newvers.sh). Sometimes the p8, 
prerelease #4 or even kern.osreldate is too low resolution. uname -a 
just exposes the build date of the kernel, not the date of the sources. 
Maybe a sysctl like:


sysctl kern.oscvsdate: 20071105224900

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


Re: Another Tag issue

2007-11-04 Thread Erik Cederstrand

Tino Engel wrote:

Dear FreeBSD folks,

What is the proper Tag for 8-CURRENT in cvs? Ist it '.'?


Yes.

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


Re: Determining the number of files in a directory

2007-11-03 Thread Erik Cederstrand

Daniel Bye wrote:

On Sat, Nov 03, 2007 at 12:41:51PM +, Daniel Bye wrote:

[...]
Using FreeBSD-6.2 and Bash, how do I determine the number of files in a 
given directory? I have tried all sorts of combinations using different 
flags with the 'ls' command; however, none of them displays the number of 
files in the directory.

 $ ls | wc -l

will show you how many files and directories in the current (target)
directory. To count just files, and exclude directories, you could try
something like

 $ find /target/directory -type f -print | wc -l


Except of course, that would descend into the subdirectories you're trying
not to count... Sorry - an object lesson in not hitting send before you've
tested what you scribbled.


ls -aF | grep -v /$ | wc -l

is a quick, if somewhat ugly, way to do it. It counts the dotfiles too.

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


Re: remote binary upgrade from 4.10 to 6.2

2007-11-02 Thread Erik Cederstrand

David Yeske wrote:

I have a lot of appliances in the field running FreeBSD.  These
machines do not have a working compiler.  They need to be upgraded
from FreeBSD 4.10 to FreeBSD 6.2.  Has anyone gone through this
successfully?  Does anyone have pointers on a clean way to do this?
Due to the lack of console support for most of these machines, booting
from the 6.2 cd will not work.  This has to be a remote binary
upgrade.  I need to have FreeBSD 4.10 install FreeBSD 6.2, although
this could be done in stages with multiple reboots.  I want to avoid
upgrading from FreeBSD 4.10 to 5.5 to 6.2.  It appears that FreeBSD
6.2 runs just fine on UFS1.


First, I should mention that I have not done something like this before. 
However, I think it would help if you could be a little more specific. 
What are the specs of the machine (CPU, RAM, disk)? How remote are they 
(i.e. next building or Greenland)? How many appliances need 
upgrading? Do you control the network they're attached to?


A couple of ideas:
1) As you say, the official advice is 4.10 - 5.5 - 6.2. You could 
cross-compile the 5.5 world + kernel on a build machine and 
installworld/kernel on the appliance. Reboot, and repeat for 6.2. This 
assumes you have the disk space for the new world/kernel, or that you 
can at least NFS mount a remote /usr/obj.


2) If you have the disk space, you can create another partition, place a 
complete 6.2 distribution there (compiled on a build machine) and change 
the boot loader to boot the new partition.


3) If you are able to PXE boot the machine, you could do a network 
install of the appliance.


4) If you control the network, you could build a kernel with NFS_ROOT 
support so you're independent on the local disk. Wipe the disk and 
install a new distribution there.


5) Finally, if you have the RAM, you could build a kernel with MFS_ROOT 
support, place a memdisk image on the local disk and proceed as 4)


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


i386 chroot on amd64

2007-10-31 Thread Erik Cederstrand

Hi!

I just created an i386 chroot on an amd64 host (make TARGET=i386 
TARGET_ARCH=i386 ...). The host is compiled with lib32 support.


I'm trying to chroot into the directory to install a port (ports dir is 
nullfs_mount'ed):


chroot /path/to/chroot /bin/sh -c cd /usr/ports/my/port; make install 
clean; 


but all I get is chroot: /bin/sh: Exec format error. Google points me 
in the direction of i386/amd64 conflicts. The host is running 
7.0-PRERELEASE #4, the chroot is compiled from CURRENT sources csupped 
today.


Am what I'm trying to do even supposed to work?

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


Re: Via C7 Processor (CPU) - cpufreq and make.conf support

2007-10-24 Thread Erik Cederstrand

Ross Penner wrote:
 Hi all, I have a few questions about my Via C7 processor. In
 examples/make.conf there is an option for the CPUTYPE. It indicates
 that only the C3 and the C3-2 chips are supported. Does the C7 chip
 have support that I don't know of? If not, will it? Otherwise, will
 specifying the chipset as C3 help or hinder my environment?

I know this is not an answer, but why not just upgrade to 7.0 if you
need the C7 support?

 My second question is in regards to the CPU frequency control. I've
 seen that the C7 gets support for cpufreq in 7 current, but I'm
 running 6. Without support in cpufreq, what speed would my processor
 be running at? I've always thought my performance has been lackluster
 so I suspect it's running at the lower clock speed.

If cpufreq/powerd is not active, your processor is running full-speed.
You can check this with sysctl dev.cpu.0.freq if it's available on
your system.

Erik

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


Re: Rebuilding world

2007-10-23 Thread Erik Cederstrand

Roberth Sjonøy wrote:

Hello, i am updating FreeBSD to 8-CURRENT, and im at the 23.4.1 The
Canonical Way to Update Your System part of the handbook, when
running make buildworld, this occours:

install -o root -g wheel -m 444 dir-tmpl /usr/share/info/dir
install:No such file or directory
***Error code 1

Stop in /usr/src/share/info.
***Error code 1

Stop in /usr/src.
***Error code 1

Stop in /usr/src.
***Error code 1

Stop in /usr/src.
***Error code 1

Stop in /usr/src.

Anyone know what to do?


Apparently, make buildworld can't find the program install. What does 
which install tell you? Also, do you happen to have built world 
earlier with a NO_INFO/WITHOUT_INFO set?


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


ccache and DESTDIR for ports?

2007-10-19 Thread Erik Cederstrand

Hi!

I'm installing a small set of ports into lots of jails, using the 
DESTDIR support recently added to the ports system. Each jail contains a 
unique CVS revision of FreeBSD. I'd like to speed up compiles by using 
ccache, but as I understand it, I'll have to install ccache into each 
jail since the DESTDIR implementation chroot's into the jail.


Can I install ccache in each jail first and simply hardlink 
/somejail/root/.ccache to /root/.cache before continuing compiling the 
other ports? Or is that asking for trouble, since each jail might have a 
different gcc installed?


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


Re: postgresql and initdb

2007-10-17 Thread Erik Cederstrand

Chad Perrin wrote:

I've installed PostgreSQL here on FreeBSD 6.2-RELEASE, and I'm a
little confused by the presence of the initdb(1) manpage and absence
of an initdb command.

# locate initdb /usr/local/man/man1/initdb.1.gz
/usr/ports/databases/postgresql73-server/files/patch-src-bin-initdb-Makefile
/usr/ports/databases/postgresql74-server/files/patch-src-bin-initdb-Makefile
/usr/ports/www/rt2/files/patch-tools-initdb

Any hints?


Use the rc.d script:

/usr/local/etc/rc.d/postgres initdb

(At least for postgres 8.2)

Erik


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


Re: minimal install is too big

2007-10-04 Thread Erik Cederstrand

Tim Judd wrote:

Hi all,

Recently, for pure entertainment and a little bit of a experience
thing, I have been looking and/or finding many devices that have linux
embedded.  While in of itself the fact that it works, I'm not
discounting.  But I'd like to expand it or get it running on a system
that I am familiar with.  So I was playing with the idea of using
FreeBSD on such devices, and I would deal with the individual hardware
specs if I could get the general system small enough.

The minimal install of FreeBSD as from the developers is about 130MB. 
I want to get something working on a 8MB flash. (For those curious,

it's a ethernet NAS device)

picobsd is discontinued, nanobsd claims it can fit in 64MB.  I'd even
go with some NetBSD flavor, as long as it's not linux.  I've done
some research and would like to see this happen, but may just end up
using the GPL code from Linksys to get it working as I need it to.

Thanks for any update/idea/clue.


I guess the answer is depends on what you need. The most minimal 
system (just a prompt and a few utilities in from /rescue) would 
probably be mfsroot.gz from the installation media. It's around 4MB - 
you can add your own utilities from there, but it's a bit tedious to 
find out exactly which files, utilities and libraries you need. An 
alternative would be to have your root filesystem NFS-mounted. That way, 
you only need a kernel and a few boot files on the flash to boot, if 
your device doesn't support PXE.


There are a lot of tips in the FreeBSD from Scratch article [1]. Also, 
Erik Nørgaard's PXEBoot Guide[2] has lots of good info on net-booting. 
  And then there's of course FreeNAS[3] if you can get it running on 
your device.


Erik

[1] http://freebsd.org/doc/en_US.ISO8859-1/articles/fbsd-from-scratch/
[2] http://www.locolomo.org/pub/pxeboot/article.html
[3] http://www.freenas.org/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


gzip compression problems

2007-09-27 Thread Erik Cederstrand

Hi!

I'm trying to create a custom disk image for installing on a server. The 
plan is to PXE boot the server and dd the image to the hard-disk of the 
server.


The gzipped files I need for the server are 45MB. However, when I create 
a 4GB image, stick the same files in there and gzip the image, the 
resulting file is 251MB.


Most of the image is just empty space, so I was expecting the gzipped 
image to be roughly 45MB. What's going on?


I used the following commands to create the image:

# dd if=/dev/zero of=/path/to/diskimg bs=1k count=4m
# mdconfig -a -t vnode -f /path/to/diskimg -u 4
# fdisk -BI -b /boot/mbr md4
# bsdlabel -B -b /boot/boot -R md4s1 /path/to/disklayout
# newfs /dev/md4s1a
# mount /dev/md4s1a /mnt/
# make installworld DESTDIR=/mnt
# make distribution DESTDIR=/mnt
# make installkernel DESTDIR=/mnt
# umount /mnt
# fsck -t ufs /dev/md4s1a
# mdconfig -d -u 4

The contents of /path/to/disklayout:
   # /dev/md4s1:
   8 partitions:
   #size   offsetfstype   [fsize bsize bps/cpg]
   a: 3G   164.2BSD 2048 163848
   b:   500M*  swap
   c:  **unused0 0

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


Re: The best way to keep the system clean?

2007-09-24 Thread Erik Cederstrand

ronggui wrote:

My problem, many times I install some software from ports, it install
the dependency software. Then after some time, I find that software
isn't what I want, and deinstall it. At this point, the dependency
software isn't necessary as well. Is there a way to clean them
automatically, like the apt-get autoremove in the Ubuntu system.

And the related general question is, what's the best way to keep my
system clean? Thanks.


You're probably looking for ports-mgmt/pkg_cutleaves.

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


Re: Repeated PXE jumpstart

2007-09-24 Thread Erik Cederstrand

Ed Maste wrote:

On Fri, Sep 21, 2007 at 09:02:04PM +0100, Jan Grant wrote:

The alternative is to put PXE ahead of the HD in the boot order, and 
call back to the deployment host at the end of installation (prior to 
reboot) to signal a DHCP reconfiguration.


It adds a PXE timeout to each boot; the upside is that replacing a 
wedging or otherwise broken install is just a matter of reconfiguring a 
DHCP server.


You could instead load pxegrub and have it boot from the disk instead
of waiting for the PXE timeout.  Or, if you're willing to accept a
network-booted loader, how about just having it load and boot the kernel
from the disk?


Someone suggested this approach, but it gets complicated when I add more 
benchmarking clients to the mix later in the project. I know I can add 
host-specific setup to dhcpd.conf, and it's possible to do similar 
things with NFS (I'm installing over NFS) to put the main server in 
charge of controlling the clients, but it gets complicated if they 
aren't rebooting synchronously. I'd rather have the clients be in charge 
of when they reinstall (e.g. when the distribution-building machine has 
completed the next set of install files).


I like Jan Grants idea, but it'll only work if FreeBSD crashes and 
reboots, not if it hangs, drops to debugger etc. Still, better than 
nothing! But until I have more time to play around, I'll let the clients 
commit their post-benchmarking suicide.


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


Repeated PXE jumpstart

2007-09-21 Thread Erik Cederstrand

Hi!

I'm trying to set up a system to continually and automatically run 
benchmarks on the most recent CURRENT. The idea is to PXE-boot the 
server, do an automated jumpstart installation, reboot and run a few 
benchmarks. Lather, rinse, repeat.


My problem is when the jumpstart installation finishes. I set PXE-boot 
as the first option in the BIOS to start the installation. To complete 
the installation I need to reboot the server from the hard-disk, but I 
don't want to enter the BIOS on each reboot to change the boot sequence.


What are my options? Can I simply set the hard-disk as the first option 
in the boot sequence (with PXE second) and then wipe the MBR when the 
system comes up after an install, so the BIOS will continue to PXE? How 
would i do that?


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


Re: Repeated PXE jumpstart

2007-09-21 Thread Erik Cederstrand

Found the answer elsewhere, so this is just for the records...

Erik Cederstrand wrote:

Hi!

I'm trying to set up a system to continually and automatically run 
benchmarks on the most recent CURRENT. The idea is to PXE-boot the 
server, do an automated jumpstart installation, reboot and run a few 
benchmarks. Lather, rinse, repeat.


My problem is when the jumpstart installation finishes. I set PXE-boot 
as the first option in the BIOS to start the installation. To complete 
the installation I need to reboot the server from the hard-disk, but I 
don't want to enter the BIOS on each reboot to change the boot sequence.


What are my options? Can I simply set the hard-disk as the first option 
in the boot sequence (with PXE second) and then wipe the MBR when the 
system comes up after an install, so the BIOS will continue to PXE? How 
would i do that?


# sysctl kern.geom.debugflags=16
# dd if=/dev/zero of=/dev/ad0 bs=512 count=1

wipes the MBR and solves my problem.

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