OpenBSD Journal

Creating OpenBSD bootable CD

Contributed by jose on from the boot-yourself dept.

toxa writes: "Just a little guide for newbies...

The best way to enjoy fresh OpenBSD release is to order an official CD-set, and I strongly recommend you this way. But what to do if you want to get bootable OpenBSD CD and unable to order an official one? Then you should to take a look at ftp.openbsd.org (the good way is to use mirrors instead), because all you need is in /pub/OpenBSD/3.4/${arch} (there ${arch} is i386 for example). Just download all files and subfolders and follow the steps below."

1. Make iso image using cdrtools:

shell# mkhybrid -b openbsd/floppy34.fs -c boot.catalog -l -J -L -r -o obsd34.iso openbsd/
It's supposed all files are in openbsd/ catalog.

options are:

-l -- allow files that contain "~" and "#" in the filename.
-J -- includes Joliet extensions.
-L -- allow filenames to begin with ".".
-r -- sets file permissions.
-o obsd34.iso -- output goes to obsd34.iso
-b openbsd/floppy34.fs -- specifies the boot image to use, path is relative to /openbsd.
-c boot.catalog -- creates a boot catalog.
Your iso image will be about 240 mbytes. It's normal for 650/700 mb (75/80 min) cd's but too large for small pretty 210 mb (23 min) cd's. You can play with gzip/bzip2 utulites to convert src.tar.gz, sys.tar.gz and ports.tar.gz to bzip2-archives. For example:
shell# gzip -d src.tar.gz && bzip2 -z -9 src.tar
As result, your get src.tar.bz2 is much smaller size. Do this with sys.tar.gz and ports.tar.gz also, and whole iso image will be 205 mbytes. Great!

2. Burn new image using cdrtools:

shell# cdrecord -v speed=8 dev=0,2,0 -eject -data obsd34.iso
options are:
-v -- verbose mode
speed -- speed using to burn (your drive must supports it as like as blank cd-rw!)
dev -- device node, try shell# cdrecord -scanbus to determine it
-eject -- eject CD after burning
-data obsd34.iso -- path to your OpenBSD iso image
3. Play your BIOS settings to boot from cdrom. Put your new OpenBSD 3.4 compact disk into drive and enjoy!

But official CDs are much cooler ;-)

(Comments are closed)


Comments
  1. By Stefan () on

    The layout for OpenBSD ISO's is copyright by Theo de Raadt. So from a leagal point of view you will go to prison.
    Buy the CD sets to support the further development. That is intended with selling t-shirts and CD's.

    Comments
    1. By Anonymous Coward () on

      Garbage.

      1. You don't go to prison for copyright infringement unless it is infringement in the course of trade. I should know since I am an IPR specialist.

      2. How can Theo have copyright in the layout ? Firstly, if you're talking about any of the material on the FTP website, then even if he does have copyright, there's (a) no explicit notice, (b) an implicit license by virtue of the material being available in an "installation directory" suggesting that it is available for anyone to use as part of the installation set.
      Secondly, copyright protects a particular form expression from _copying_, it doesn't protect independent creation of the same form of expression. So if you independently create your own Boot CD format, it can't infringe any so-called copyright that he may hold in the format.

      I agree that people should pay for a CD to support the project (I have - it's on my desk here), but at the same time, please don't use the type of language that puts unnecessary fear into people.

      Comments
      1. By Raymond () raymond@openminds.nl on www.openminds.nl

        Besides that, this HOWTO describes the build of a subset of the OpenBSD CDROM.

        The layout isn't the same anymore.

      2. By argius () on

        It was a joke.
        I suppose.

    2. By Anonymous Coward () on

      There are places that the CD's take tooooooooo loooooooong to arrive. From 4 to 7 week, maybe more. Even buying the CD's I myself must build an ISO image or wait until the media arrive in my town.

      Comments
      1. By Anonymous Coward () on

        yes, take a look at author's email. He is from Russia. There is too long distance between him and CDs :)

      2. By rik () rik@arbornet.org on mailto:rik@arbornet.org

        When did you place your order? To be cliche, the early bird gets the puffy. I live in Michigan and know of some who reside in Australia who received their cd set before me. The earlier you order, the sooner you acquire.

    3. By Anonymous Coward () on

      >>THEO'S << layout/ISO is copyrighted. So if you bought a CD then you aren't supposed to copy it. However, downloading the files and making your own ISO is perfectly legal because you aren't making an exact copy of Theo's.

      Sheesh...get it straight.

    4. By Anonymous Coward () on

      As other posters have noted, Theo's copyright only applies to the *specific* layout on the released CDs. This means you have to have an exact copy. This article describes how to make a CD that supports one architecture, not three or four architectures, as the official CDs do.

      If you want to support further development of OpenBSD, the best way is to *MAKE A DONATION*. Consider the option of giving them your money without any restrictions or demands for a physical product.

      CDs, T-shirts, posters, and other items for sale all cost money. By purchasing these items, you require that the OpenBSD team spend money to produce replacements. Even though they do profit from this exchange, there is still a cost involved, in time and money.

      My solution has been to make a donation of a reasonable amount ($40 to $60 works for me) per release. Once I have done this, I go download the files to build and burn my own i386-specific CD.

      This means that I don't ask them to print another CD set for me. Yes, the CD set is a wonderful package, and I'm sure that the packaging is nice and the instructions are helpful, but I don't need them, nor do I need 3 CDs with *ALL* supported architectures. I need one CD with the architecture that I use (i386).

      Also, I can re-use my own CD-RW discs and minimize waste. I used to make copies of *BSD releases and Linux distributions on CD-R, but found that I had a growing binder full of discs that I would never use again. Switching to CD-RW discs alleviates that problem. I can re-use the media a number of times without problems.

      Consider donating. You'll feel better, and they'll be grateful.

      Comments
      1. By chris humphries () chris@unixfu.net on http://unixfu.net/

        wish more people would read this. buying cds isnt the only way to support the project. easier to throw money at the project, than purchase stuff i will probably never use :)

        there seems to be a solid answer of "buy a cd" when people have questions about making isos. this is sad, and making a donation is easier, and i dont know about you, but i end up having to update the os due to errata. it is constantly changing and paying for a snapshot of the state of openbsd at the time of burning is almost useless to me.

        also, pushing openbsd into use in company servers and things seems to be of value too, even if not always as shiney as money. at least i think so anywho.

      2. By Anonymous Coward () on

        Working as a consultant, when I use OpenBSD at a client's site, I buy the CD's (each company) and expense it to them. Of course, I also buy CD's for myself too. Atleast this way, I can technically buy more CDs, support the project while having other people buy it rather than just me. I hope other people do the same too.

        Another thing I think people should do is that if they want to 'recruit' a new soul to OpenBSD, they should buy them a CD... Makes a nice x-mas stocking gift too! ;)

      3. By Anonymous Coward () on

        Consider donating. You'll feel better, and they'll be grateful.


        I donated over one million dollars last April 15. Theo didn't seem too grateful.

        - US Taxpayer

        Comments
        1. By Anonymous Coward () on

          Hahaha, that's good. Yeah, why isn't this Canadian-based project grateful about all the money we're involuntarily donating to the US government? I don't understand. :-D

        2. By Anonymous Coward () on

          > I donated over one million dollars last April 15. Theo didn't seem too grateful.

          You as an individual donated one million tax dollars? That's an outright lie.

          From that "one million dollars", you approximately contributed 3 thousandths of a PENNY.

          Comments
          1. By Anonymous Coward () on

            Nowhere did I suggest that each individual taxpayer paid one million dollars. That would exceed the entire federal budget.

            FACT: The US taxpayers gave over one million dollars to the OpenBSD project.

            FACT: Theo was none too grateful.

            Can you disprove either statement above? If not, then it is YOU who is evading the truth with your silly breakdown on a per citizen basis. By knowingly making the false claim that I was lying makes YOU the liar.

            Comments
            1. By Anonymous Coward () on

              FACT:

              The US taxpayers gave their money to the IRS. The IRS dumped it into the federal budget, the DOD pumped it into DARPA, DARPA pumped some into one of a myriad computing projects, who passed some of it to OpenBSD.

              and? had he been a US citizen, you think he would have waived his constitutional rights for a defense grant?

              by the way, there is no budget, there's currently only a federal deficit...

              Comments
              1. By Anonymous Coward () on

                FACT: You are a jackass.

                The original poster specifically said "if you give them money, they would be grateful". I countered that claim.


                Theo's nationality nor his would-be constitutoinal rights is not the issue whatsoever. Whether DARPA was wise to give that money to OpenBSD is not the issue whatsoever.


                As an aside, I think they were wise to do so. But as you and the others were too stupid to figure out, that was not the point.

            2. By Anonymous Coward () on

              > Nowhere did I suggest that each individual taxpayer paid one million dollars.

              No you didn't. You said "I donated over one million dollars last April 15."

              That, is a lie.

              >The US taxpayers gave over one million dollars to the OpenBSD project.

              That is true, and did not come into question in my initial post.

              > FACT: Theo was none too grateful.

              Unless you have Theo quoted as saying "I'm not grateful for the grant", it is only opinion. And if he wasn't grateful; so? You don't give *emotions* money, you give the technical merit of a project money. It's irrelevant how Theo feels. What's in question here is OpenBSD, *not* Theo. Theo is *not* OpenBSD.

              Comments
              1. By Anonymous Coward () on

                And if he wasn't grateful; so?


                The original poster said "they would be grateful." I proved otherwise. That was the whole point of the thread in the first place.


                What's in question here is OpenBSD


                No it is not. The original poster said "they would be grateful." That was the whole point of the thread in the first place. Lean how to read, you illiterate jackass.


                Guess what? My real name isn't "US Taxpayer." I suppose that was a lie too. The "I" was a generic, collective term. Perhaps "we" would have resulted in a lesser hissy-fit for you. But since you have proven lack basic reading comprehension skills, I was afraid using two letter words would be too difficult for you.

                Comments
                1. By Anonymous Coward () on

                  holy crap, you guys turned a pretty funny joke (i actually LOL'd) into a flamewar?? chill out....

                  Comments
                  1. By Anonymous Coward () on

                    holy crap, you guys turned a pretty funny joke (i actually LOL'd) into a flamewar?? chill out....

                    You (at least I believe it was you, based on IP address) called me a liar. I don't find that funny. When someone makes an unprovoked attack against me, I defend myself vigorously.

                2. By Anonymous Coward (142.59.231.163) on

                  shut up yank. Of course using "I" implies an individual rather than 'we' that is collective! Not the other way around as you claim. Don't act like an founder's influence, inbred, my pappy was my granp**** type of person By the way, I (speaking as a Canadian individual) would rather that you spent american blood money in other fashions. By the way, I am a literature major and I have never heard of "I" used collectively. I know of a plural/royal "we" as when the queen speaks of herself in plural terms, but never a plural "I". Got try to fool someone else. chason

    5. By Dom De Vitto () on

      Well, you'd only be breaking the law if the layout was (exactly) the same - just reverse the order of a couple of files on the CD and copyright is not infringed.

  2. By jpriddy () jpriddy@N0SPAM.memphis.edu on /dev/null

    i use openbsd as a firewall only, and i find there is no reason to have a burner (or even anything over a 486 with 300M or so drive with 2 network cards), so if you dont have a unix machine w/ a burner handy...

    http://www.shockley.net/obsd-bootcd.asp

    i came across this a few years ago -- though i found you have to have the boot image file (cdrom34.fs) within the root of the dir you are using for the iso? that or im doing something wrong.

    and yes, after using openbsd for the last few years i am going to buy this release. the holy war over buying the cd is getting a bit tiresome.

  3. By samh () on

    subject says it all

    Comments
    1. By panda () panda at epita dot fr on mailto:panda at epita dot fr

      yep i agree it would be interesting to know how to build sparc/sparc64/alpha and so on cd sets,
      building i386 bootable isos is pretty well documented, but there seems to be a big void concerning other architectures.

      Comments
      1. By Peter Hessler () spambox@theapt.org on http://theapt.org/openbsd/

        on macppc, I do pretty much the same, but I add "-hfs". YMMV, etc, etc.

      2. By Martin Reindl () wildweasel@bsdcow.net on http://open.bsdcow.net

        On Alpha it is the same as on i386.

  4. By Anonymous Coward () on

    Who uses cd's to install? As soon as my cd-set arrives, I just put the files on my local FTP-server, and install the rest of my LAN over the network. Far easier, especially as most of my computers don't have a cdrom drive ;)

    Comments
    1. By Matt Burke () on

      how do you boot? or do you use those vile floppy disk things?

      Comments
      1. By orion () on

        some BIOS-things (maybe not called as such
        but in any case speaking of the "hind-brain"
        OS-independent part of the computer) are smart enough to natively boot off the net, e.g. sparc/sparc64 have an OpenBoot prom command "boot net" that can (with suitable setup involvng TFTP servers for the boot kernel images and such) be used to boot completely off the network with no installed-machine physical media needed (both in the sense of installation and in the sense of diskless operation, but that's another post).

    2. By Anonymous Coward () on

      Why order the cds then?
      If you want to support the OpenBSD project, yoy can donate with paypal or buy a cool t-shirt ..

      Well maby you do it for the stickers =)

  5. By tcon () tcon@securityage.com on mailto:tcon@securityage.com

    Does the mkhybrid create a CD bootable for Sparc architecture, too? I attempted mkisofs somewhat recently, and had no luck -- in defeat, I used the sparc/cd33.iso and installed via LAN, which worked fine, but I remain curious as to how to create a Sparc-bootable CD.

    Comments
    1. By tedu () on

      mksuncd

      Comments
      1. By orion () on

        (googled on that and found this page:
        http://dbforums.com/arch/181/2003/1/642945
        which has instructions for use)

        am i missing something or is that only in
        the sparc64 distrib (looked around a bit
        via google)? what about for a sparc
        (32bit) platform?

        Comments
        1. By tedu () on

          apparently not needed there. have a look at
          src/distrib/sparc/cdfs/Makefile

          Comments
          1. By orion () on

            cool! thank you!

    2. By Gary () on

      I've had pretty good luck building sparc32 ISOs using NetBSD's mksunbootcd tool. A friend of mine says he made some sparc64 discs with it, too, but I haven't had a chance to test it myself.

      http://www.netbsd.org/Documentation/bootcd.html#sparcimage

  6. By Anonymous Coward () on

    shell# mkhybrid -b openbsd/floppy34.fs -c boot.catalog -l -J -L -r -o obsd34.iso openbsd/

    floppy34? Won't it take cdrom34? Like:

    shell# mkhybrid -b openbsd/cdrom34.fs -c boot.catalog -l -J -L -r -o obsd34.iso openbsd/

    In any event, thanks a bunch for the pointers. I gladly buy releases on CD, but unfortunately they don't send me CD's every time -STABLE changes. So this way I can burn my own -STABLE snapshot CD's and use them to install on new systems, instead of installing release and patching from source.

    Comments
    1. By Anonymous Coward () on

      maybe it's just a little mistake without any affection to the main goal which is to get bootable CD. Because it seems like all you need from *.fs is to get a bootable info, so there is no difference - to boot "from cd like from cd" or "to boot from cd like from floppy" ;-)

    2. By Anonynous () dcc@dcc.uchile.cl on http://www.dcc.uchile.cl

      Howto to make a real macppc install iso image in openbsd??
      I tried a diferentes forms, but i can't load de fu*k installer of obsd in ppc platform.

  7. By Anonymous Coward () on

    Thanks for the info, dude. Made myself a custom emergency repair/install CD last night based on this, and some of the resulting comments.

    I usually just borrow the copy of OBSD from work (we buy it every 6 months) for home use, and buy a t-shirt, so there is no lost revenue there.

  8. By Marco () dont_feed_me_spam@yahooDOTcom on mailto:dont_feed_me_spam@yahooDOTcom

    How does one make a cdrom that is bootable on the alpha architecture? (both DEC3000/* and other)

    The official release doesnt seem to include Alpha anymore, and burning 3.4/alpha/cd34.iso to a cdrom on its own seems a bit wasteful (RW's are out of the question, as most of the older 2-speeds wont read them).

    Marco

    Comments
    1. By Noth () on

      There's no cdrom34.fs for alpha and you can't use floppy*34.fs to boot off from a CD. *However*, you can create a multisession CD, with cd34.iso for the first session, and an image of the OBSD stuff for the second session.

      I've been using this trick for quite some time (ever since OBSD doesn't include alpha in its bootable archs ;) ). You can even throw some extra things in it (e.g. sys.tar.gz, src.tar.gz, XF4 sources, etc.). Or you can include just the basic stuff and get yourself a nice, 8" bootable OBSD disc for your beloved alpha (I usually carry one in my side pocket, just to make x86/non-OBSD people jealous of me :P ).

      nn

    2. By RC () on

      Looks like I'm late to the party, but I'll post it on the odd chance that you, or someone else, will see it.

      First, cd into the folder where "3.4/" is (and "/alpha/" below it) and run this script I threw together.


      ##################
      VER="3.4" # Must be set properly

      # Clean Up After Previous Runs of This Script
      rm OpenBSD-"$VER"_i386-alpha_boot.iso
      umount /mnt
      rm boot.catalog log
      vnconfig -u svnd0

      # Make the ISO Image
      cp "$VER"/alpha/bsd.rd bsd

      mkhybrid -a -R -v -v -T -L -d -D
      -N -l -J -r -b "$VER"/i386/cdrom34.fs
      -o OpenBSD-"$VER"_i386-alpha_boot.iso
      -A "OpenBSD-$VER alpha i386 boot CD"
      -V "OpenBSD-$VER alpha i386 boot CD"
      . 2>&1 | tee log

      # Mount ISO
      vnconfig -v -c svnd0 OpenBSD-"$VER"_i386-alpha_boot.iso

      mount -t cd9660 /dev/svnd0a /mnt

      # Install Alpha BootSectors
      /usr/mdec/installboot -v -s `cat log
      | grep -v 'Name' | egrep 'alpha/boot$$'
      | cut -d' ' -f1` -e `cat log | grep -v
      'Name' | egrep 'alpha/boot$$' | cut -d' '
      -f2` /mnt/"$VER"/alpha/boot
      /usr/mdec/bootxx /dev/rsvnd0c

      # Clean Up
      umount /mnt
      rm boot.cat* log
      vnconfig -u svnd0

      du -sh OpenBSD-"$VER"_i386-alpha_boot.iso

      #### THE END ####

      There you have it. That will create a hybrid CD, bootable both on Alpha and i386... Although, my most recent attempt--to create a bootable CD on 3.4--is running into this error:
      "installboot: /mnt/3.4/alpha/boot: must be on a FFS filesystem"

      So, maybe I will need to change something around soon.

      BTW, in case it isn't obvious, this script MUST be run on an OpenBSD/Alpha machine (unless there is some cross-architecture capability in 'installboot' that I don't know about). Personally, the nasty quirks of OpenBSD/Alpha, and the DMA problem are driving me to other OSes.

      Comments
      1. By marco (220.240.156.73) on

        cheers

  9. By paulo (201.19.229.93) cyberpsi@gmail.com on

    that is the only option I have. The local stores don't have updated versions of the cd set. except www.linuxmall.com.br that sells the same cd-r that you're teaching howto create... isn't that ilegal?

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