OpenBSD Journal

YaifO 0.2 for OpenBSD 3.8

Contributed by marco on from the who-wants-to-drive-100miles dept.

Waldemar Brodkorb submitted the following story:
Today I released a new version of YaifO with works fine to install OpenBSD 3.8 remotely via Secure Shell.
See the project page:
It is very useful to do installations of dedicated servers in colocations which often comes with Linux preinstalled.

Note: This has not been tested by the undeadly editors so please add some postings with success/failure stories.

(Comments are closed)

  1. By Matt Van Mater ( on

    I have not used this latest version, but did use the last version of YAIFO on several occasions. I actually added a little special sauce to his code to automate the entire process all the way from fetching the src, updating src, modify yaifo patch with my desired ip/dns/gateway, auto trust local machine's ssh key, apply yaifo patch, compile src, build release, build bootable install iso. It worked well for me on the few occasions I had to use it. I will re-release my 'secret sauce' script as soon as I update it to match yaifo 0.2.

    In any case, I think this is a great idea and support it strongly. I hope it gains support from others as well.

    An even better alternative to this would be the ability to create a jumpstart like script that can install a full obsd just by grabbing a few variables out of a 'install.conf' file (ie partition choices, ftp mirror, install sets, etc). An even better option would be to save your installation choices to a text file for 'replay'. I started working with Expect to create a script like this, but never got far down that road. Anyone else interested in something like this?

    1. By Anonymous Coward ( on

      This is the first time I hear of this and I too think this sounds very promissing; I'll be needing something like this in the near future and this looks like it will do the job. I would also personally love to see your mods incorporated with this and the install.conf and replay idea I think is a great idea too! Would be really nice to see YaifO and your mods incorporated into future OpenBSD releases. Great work to the both of you! Thank you!

    2. By Matt Van Mater ( on

      I have not updated it yet, but here is my older script that I was talking about. I know it's not perfect and needs some polish, but it served my needs:


      #Based on the work found here:
      # This code written by Matt Van Mater

      echo Getting the yaifo code
      ftp -a

      echo Uncompressing it
      tar zxf yaifo-0.1.tgz
      cd yaifo

      echo Now we have to manually edit the config to make it point at the right DNS, gateway, etc
      echo Enter DNS
      read DNS_
      echo Enter IP address
      read IP_
      echo Enter netmask
      read NETMASK_
      echo Enter gateway
      read GATEWAY_
      echo Enter a short name for this configuration with no spaces in it
      read CFG_NAME
      echo Do you want to fetch the src files? y or n
      read GET_SRC
      echo Do you want to include the install sets for your arch on the cd? y or n
      read GET_TGZs

      #values currently in config file, need to replace them below

      sed s/DHCP=on/DHCP=off/g config > config.1
      sed s/DNS=$DNS_/g config.1 > config.2
      sed s/IP=/IP=$IP_/g config.2 > config.3
      sed s/NETMASK=$NETMASK_/g config.3 > config.4
      sed s/GATEWAY=$GATEWAY_/g config.4 > config.5
      mv config.5 config
      rm config.*

      echo Generating SSH key.
      echo Just press enter 3 times '(store key in default location, and give blank password)'
      ssh-keygen -t rsa

      cp ~/.ssh/ authorized_keys

      if [ $GET_SRC == "y" ]
      export HERE=`pwd`

      cd /usr/src
      ftp -a`uname -r`/src.tar.gz
      echo Decompressing src
      tar zxf src.tar.gz

      ftp -a`uname -r`/sys.tar.gz
      echo Decompressing sys
      tar zxf sys.tar.gz

      cd $HERE

      make clean
      make obj

      echo Making ISO

      mkdir -p cd-dir/`uname -r`/`arch -s`
      mkdir -p cd-dir/etc
      echo "echo Welcome to the YAIFO remote installation CD" > cd-dir/etc/boot.conf
      echo "set image /`uname -r`/`arch -s`/yaifo.rd" >> cd-dir/etc/boot.conf
      cp yaifo.rd cd-dir/`uname -r`/`arch -s`/
      cp /usr/mdec/cdb* cd-dir/`uname -r`/`arch -s`

      if [ $GET_TGZs == "y" ]
      echo Getting various sources

      export HERE=`pwd`
      cd cd-dir/`uname -r`/

      # Try to capitalize on files you may have already downloaded
      if [ -e /usr/src/src.tar.gz ]
      cp /usr/src/src.tar.gz .
      ftp -a`uname -r`/src.tar.gz
      if [ -e /usr/src/sys.tar.gz ]
      cp /usr/src/sys.tar.gz .
      ftp -a`uname -r`/sys.tar.gz

      # Do not forget the others
      ftp -a`uname -r`/ports.tar.gz
      ftp -a`uname -r`/XF4.tar.gz

      cd `arch -s`/

      # Get list of what there is to download for your arch
      ftp -a`uname -r`/`arch -s`/index.txt

      for i in `cat index.txt`
      ftp -a`uname -r`/`arch -s`/$i
      rm index.txt

      cd $HERE

      # EXTREMELY UNSAFE, but convenient
      cp ~/.ssh/id_rsa cd-dir/

      mkhybrid -l -J -R -V $CFG_NAME -b `uname -r`/`arch -s`/cdbr -c `uname -r`/`arch -s`/boot.catalog -o $CFG_NAME-yaifo.iso cd-dir/

  2. By Archite ( on

    Let me just say, thanks! The previous release was great and I used it several times in order to install on remote headless systems.

    If you have not tried yaifo yet, please do! It is a great project and fills a great need!

  3. By Marco Peereboom ( on

    Let me remind everyone that things like these can be made into ports.

  4. By Brendan Strejcek ( on

    Automated installation is one of those really important features that is not present in the official OpenBSD base. (At least, it is really important to those of us that manage lots of OpenBSD machines.)

    This was my solution, a while back:

    I should probably update this as it is no longer in sync with the scripts that I actually use... my most recent version can install any version of OpenBSD.

    YaifO looks very cool (and a bit more polished than my crufty howto).

  5. By Anonymous Coward ( on

    The web site appears to be down.


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]