OpenBSD Journal

Diskless OpenBSD

Contributed by sean on from the we need no stinkin' spindles dept.

Will Backman writes in:
Robert de Bock has written a nice recipe to diskless(8) boot an OpenBSD machine.

"This can be used to boot any machine that has no disks and supports pxeboot. The advantage is you save a little money on not buying hard-disks, but on the other hand, the "server" that serves everything must be always on..."

Along with configuration examples, he also provides VMWare fusion virtual machines if you would like to test this recipe on a virtual network.

Read the entire article at http://meinit.nl/openbsd-diskless-install.

(Comments are closed)


Comments
  1. By mk (130.225.243.71) on

    You can do a sparse swap file like this:

    dd if=/dev/zero of=swap bs=1m count=0 seek=32

    (I stole this from Miod.)

    Comments
    1. By Anonymous Coward (85.178.110.88) on

      > You can do a sparse swap file like this:
      >
      > dd if=/dev/zero of=swap bs=1m count=0 seek=32
      >
      > (I stole this from Miod.)

      Could you may point out what this command does?
      As far as I understand the manpage count=0 means it should do absolutly nothing?!
      But I'm no native englishmen so I may missunderstand the manpage. :-/

      Comments
      1. By Darrin Chandler (dwc) on http://www.stilyagin.com/darrin/

        > > You can do a sparse swap file like this:
        > >
        > > dd if=/dev/zero of=swap bs=1m count=0 seek=32
        > >
        > > (I stole this from Miod.)
        >
        > Could you may point out what this command does?
        > As far as I understand the manpage count=0 means it should do absolutly nothing?!
        > But I'm no native englishmen so I may missunderstand the manpage. :-/

        no bytes are written (count=0) but the file is created as a 32MB file (bs=1m seek=32). 'ls -l' shows 32M, but 'du' shows only 32K size (i.e., it's NOT taking 32M of disk until/unless actual data is written).

    2. By Martin Schröder (87.157.111.182) martin@oneiros.de on http://www.oneiros.de

      > You can do a sparse swap file like this:

      So that when you start swapping to the file and the disk is full, the sparse file can't be expanded? Do you really want that?

  2. By Anonymous Coward (85.178.127.68) on

    I'm unsure if I got everythign right...

    Would it work for different Archs as well?
    Lets say a i386 Server but a x86-64 client running x86-64?

    Comments
    1. By Darrin Chandler (dwc) on http://www.stilyagin.com/darrin/

      > I'm unsure if I got everythign right...
      >
      > Would it work for different Archs as well?
      > Lets say a i386 Server but a x86-64 client running x86-64?

      The basic idea is the same, as are many of the steps. But doing diskless for a different arch has some extra steps involving serving up appropriate files. Basically grabbing the right filesets, unpacking them somewhere, and serving up what's needed. Hit the link for diskless(8) above for many more details.

      Comments
      1. By Anonymous Coward (24.37.242.64) on

        Can you compile i386 kernel from the amd64.mp (dual core) and even create an i386 release(8) from it?

        Off topic I know, this just made me think of this. =)

        Comments
        1. By Anonymous Coward (219.90.173.40) on

          No. Cross compiling is not supported by OpenBSD.

          Comments
          1. By Anonymous Coward (85.178.90.165) on

            > No. Cross compiling is not supported by OpenBSD.

            Doesn't mean gcc and pcc wont eb able to do it at all...

            Comments
            1. By Anonymous Coward (219.90.173.40) on

              If he had the ability to do it (fixing all the problems along the way), he wouldn't need to ask here if it were possible.

    2. By Anonymous Coward (24.22.214.124) on

      > I'm unsure if I got everythign right...
      >
      > Would it work for different Archs as well?
      > Lets say a i386 Server but a x86-64 client running x86-64?

      x86-64 is also backwards compatible with i386, if you don't using that :)

  3. By Anonymous Coward (86.125.101.42) on

    If only OpenBSD's pxeboot was able to pass the options it gets from the
    dhcp server as arguments to the kernel.

    Then you could configure everything from dhcpd.conf (with the
    root-path, swap-server, boot-file options, see dhcp-options(8)).

    Instead of all the atrocious crap of having to configure rarpd & bootparamd,
    and keep the configurations from /etc/{dhcpd.conf,ethers,bootparams} in
    sync by hand for each separate machine.

  4. By Anonymous Coward (24.37.242.64) on

    Speaking of pxeboot'ing, is there a way to install via tftp once booted via pxeboot? I know it's not in the install option, but there must be a way some how?

    In other words, to transfer the install files but not with NFS, HTTP[s], FTP, Tape, HD, CD, etc.

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