Some notes on DragonFlyBSD 1.x

* Version 1.4 of DragonFly was made available on January 7, 2006. Information below is about older versions.

  • Sample cvsupfile for DragonFlyBSD sources:
    *default host=cvsup.dragonflybsd.org
    *default base=/usr
    *default prefix=/usr
    *default release=cvs tag=DragonFly_Preview
    *default delete use-rel-suffix
    *default compress
    
    cvs-root
    cvs-src
    
  • Sample cvsupfile for DragonFlyBSD pkgsrc:
    *default release=cvs tag=.
    *default delete use-rel-suffix
    *default umask=022
    *default host=cvsup.us.NetBSD.org
    *default base=/usr
    *default prefix=/usr
    *default compress
    
    netbsd-pkgsrc
    

    Do not forget to:

    # cd /usr/pkgsrc/bootstrap
    # ./bootstrap
    # cp -i work/mk.conf.example /etc/mk.conf
    
  • Simple update procedure, but it is best that you read /usr/src/UPDATING first:
    # make buildworld buildkernel installkernel installworld upgrade && \
    newaliases && reboot
    
  • Note on using ftp-proxy(8) on DFLY (Information current for at least 1.3-Preview as built at 2005/06/15):

    DFLY’s inetd listens on all network interfaces and cannot be instructed to bind on one (as does OpenBSD’s inetd). So while the manual says that your /etc/inetd.conf entry should be:

    127.0.0.1:8021 stream tcp nowait root /usr/libexec/ftp-proxy ftp-proxy

    instead for DFLY it should be:

    ftp-proxy stream tcp nowait root /usr/libexec/ftp-proxy ftp-proxy

    and you should use /etc/hosts.allow to wrap/control access to ftp-proxy. You must allow access to ftp-proxy from the networks that you expect to use it. This is somewhat different than what you expect if you have used OpenBSD/pf/ftp-proxy where the redirection is done on 127.0.0.1. So while the manual instructs:

    rdr pass on $int_if proto tcp from any to any port 21 -> 127.0.0.1 port 8021

    you should use:

    rdr pass on $int_if proto tcp from any to any port 21 -> $int_if port 8021
  • I cannot install DragonFlyBSD from the install CD. It fails with:
    ad0: READ command timeout tag=0 serv=0 - resetting
    ata0: resetting devices ..
    

    or something similar. Why?

    *** Information current with at least 1.2.0-RELEASE ISO image ***

    Well, some of the newer motherboards cannot fallback at PIO mode if DMA fails. Have no fear, you can still install DFLY. At the boot selection prompt, select option 6 which starts the loader prompt. While there type the following three commands and you are OK:

    > set hw.ata.ata_dma=0
    > set hw.ata.atapi_dma=0
    > boot
    

    Voila!

    PS: You may need to put these values to /boot/loader.conf.local:

    	
    hw.ata.ata_dma=0
    hw.ata.atapi_dma=0
    

    man loader.conf and man ata for syntax and more

  • Perl: If you have Perl installed from pkgsrc and you have made a copy or a symbolic link so as to have /usr/bin/perl be the same as /usr/pkg/bin/perl , after runnning make upgrade you have to remake the link in /usr/bin (or recopy /usr/pkg/bin/perl there).

Using Annoyance Filter

Annoyance Filter is an adaptive Bayesian junk email filter written by John Walker.

Training annoyance-filter on what is and what is not spam:

/usr/bin/annoyance-filter --mail ${MAIL} \
	--junk ${HOME}/Mail/spam \
	--prune \
	--write ${HOME}/.annoyance.dict

Note: The same command retrains annoyance-filter.

To use annoyance-filter with procmail edit your ${HOME}/.procmailrc:

 
:0fw:
| ${HOME}/bin/annoyance-filter-run
 
:0:
* ^X-Annoyance-Filter-Classification: Junk
${MBOXDIR}/annoyance

The above recipe executes the script annoyance-run on incoming email.

 
#!/bin/sh
# annoyance-run - Script to run annoyance-filter from .procmailrc

exec /usr/bin/annoyance-filter \
	--read ${HOME}/.annoyance.dict \
	--transcript - \
	--test -

Using bogofilter

* This note was written on September 7, 2003

  1. Keep some (~50) spams in a separate folder (eg. ~/Mail/spam)
  2. Edit your ~/.bogofilter.cf
    bogofilter_dir=~/.bogofilter
    user_config_file=~/.bogofilter.cf
    db_transaction=no
    spam_header_name=X-Bogosity
    spam_subject_tag={BOGOSPAM}
    unsure_subject_tag={BOGOSPAM}
    stats_in_header=Yes
    db_cachesize=32
    db_log_autoremove=yes
    db_lk_max_locks=16384
    db_lk_max_objects=16384
    timestamp=Yes
    spamicity_tags = Yes, No, Unsure
    spamicity_formats = %0.6f, %0.6f, %0.6f
    header_format = %h: %c, tests=bogofilter, spamicity=%p, version=%v
    terse_format = %1.1c %f
    log_header_format = %h: %c, spamicity=%p, version=%v
    log_update_format = register-%r, %w words, %m messages
    terse=no
    block_on_subnets=no
    charset_default=iso-8859-7
    replace_nonascii_characters=N
    min_dev=0.375
    robs=0.0178
    robx=0.52
    ham_cutoff  = 0.00
    spam_cutoff = 0.99
    ns_esf = 1.000
    sp_esf = 1.000
    thresh_update=0.01
    
  3. bogofilter -Mn < ${MAIL} /* learn what is NOT spam */
  4. bogofilter -Ms < Mail/spam /* learn what IS spam */
  5. Add the following four (4) lines to your ~/.procmailrc:
    # http://bogofilter.sf.net
    :0HB:
    * ? bogofilter -u
    ${HOME}/Mail/bogofilter
     
    

How I became a system administrator

* Originally written at Thu Sep 2 05:17:58 EEST 1999.

This is how it started


Every penny that I have made today and every one that I will make, I owe it to my Prof. Timos Sellis who has trusted me more than enough:

When I entered the NTUA EE School (Fall of 1990), I had no computer and no money to buy one. Also I wanted to become a Computer Engineer. The labs are not always open and keys are not the easiest thing to find. Somehow until Fall of 1993 I managed. But by then it was impossible to continue without a computer.

It was then that I heard from a friend that Prof. Sellis was looking for a System’s Administrator for his lab machines. The Following dialog is real:

 
Yiorgos: Hi, I heard that you are looking for a System's Administrator
Timos: Yes, do you know of any?
Yiorgos: Yes, actually I'd like to do that
Timos: Do you know anything about it?
Yiorgos: No, not a thing!
Timos: That's OK, you will learn

This dialog changed my professional life. It is because of Timos’ trust that I am able to make my living today.

[ I was not a total ignorant of Unix internals. I was a Unix power user who could do anything that could be done without root access. It was just that I was ignorant of administering systems and maintaining things like DNS and sendmail ]

The least I can do as to thank Timos for the door he opened to me into the amazing world of System Administration is to document the story down.

[ needless to say that I graduated without owning a computer ;-) ]

With lots of gratitude,

Yiorgos Adamopoulos.