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:
http://openbsd-geek.de/projects/yaifo
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)


Comments
  1. By Matt Van Mater (69.255.1.181) 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?

    Comments
    1. By Anonymous Coward (69.70.207.240) 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 (69.255.1.181) 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:

      #!/bin/sh

      #Based on the work found here: http://www.openbsd.de/~wbx/
      # This code written by Matt Van Mater

      echo Getting the yaifo code
      ftp -a http://www.openbsd.de/~wbx/yaifo-0.1.tgz

      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
      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
      echo

      #values currently in config file, need to replace them below
      #DHCP=on
      #DNS=192.168.2.1
      #IP=
      #NETMASK=255.255.255.255
      #GATEWAY=10.255.255.1

      sed s/DHCP=on/DHCP=off/g config > config.1
      sed s/DNS=192.168.2.1/DNS=$DNS_/g config.1 > config.2
      sed s/IP=/IP=$IP_/g config.2 > config.3
      sed s/NETMASK=255.255.255.255/NETMASK=$NETMASK_/g config.3 > config.4
      sed s/GATEWAY=10.255.255.1/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/id_rsa.pub authorized_keys

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

      cd /usr/src
      ftp -a ftp://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/src.tar.gz
      clear
      echo Decompressing src
      tar zxf src.tar.gz

      ftp -a ftp://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/sys.tar.gz
      clear
      echo Decompressing sys
      tar zxf sys.tar.gz

      cd $HERE
      fi

      make clean
      make obj
      make

      clear
      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" ]
      then
      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 ]
      then
      cp /usr/src/src.tar.gz .
      else
      ftp -a ftp://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/src.tar.gz
      fi
      if [ -e /usr/src/sys.tar.gz ]
      then
      cp /usr/src/sys.tar.gz .
      else
      ftp -a ftp://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/sys.tar.gz
      fi

      # Do not forget the others
      ftp -a ftp://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/ports.tar.gz
      ftp -a ftp://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/XF4.tar.gz

      cd `arch -s`/

      # Get list of what there is to download for your arch
      ftp -a ftp://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/`arch -s`/index.txt

      for i in `cat index.txt`
      do
      ftp -a ftp://ftp3.usa.openbsd.org/pub/OpenBSD/`uname -r`/`arch -s`/$i
      done
      rm index.txt

      cd $HERE
      fi

      # 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 (69.238.133.30) adam@akarsoft.com on http://akarsoft.com

    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 (67.64.89.177) marco@peereboom.us on http://www.peereboom.us

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

  4. By Brendan Strejcek (128.135.11.3) on http://praksys.blogspot.com/

    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:

    http://people.cs.uchicago.edu/~brendan/howtos/openbsd_install/

    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 (65.92.66.92) on

    The web site appears to be down.

Latest Articles

Credits

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 deadly.org 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.]