1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom FreeBSD-update-server - creating a custom OS image

Discussion in 'Installing and Upgrading FreeBSD' started by r00t, Mar 10, 2010.

Thread Status:
Not open for further replies.
  1. r00t

    r00t New Member

    Messages:
    14
    Likes Received:
    0
    Hi

    I'm trying to create my own FreeBSD-update-server (http://www.freebsd.org/cgi/cvsweb.cgi/projects/freebsd-update-server/) so that I can automatically update all the machines on my network to the latest customized version of FreeBSD.

    The custom version is simply a minimal install, a couple of ports and a custom (reduced) kernel.

    My problem is creating an ISO of this customized version. I've searched the forums, read the handbook and some other guides but all fail to explain how to REALLY do what I need to do. (or i missed it somehow)

    The machine I'm using as the update server (and for compiling everything) already has a minimal install + custom kernel. Just need to know how to convert all this to an ISO so that I can easily use it on other machines (through the update system).

    If I'm correct, this whole mechanism will allow me to update/upgrade any machine on the network simply by running freebsd-update on the target machine.

    If you think I'm going in the wrong direction and that there's a better way to achieve this, I'm all ears! If you need more info I will also provide it.

    Hope someone can help!
    Thanks in advance!
     
  2. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,427
    Likes Received:
    16
    Have a look at the scripts and Makefile in /usr/src/release/. The "make release" there will basically create a bootable install CD.
     
  3. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,673
    Likes Received:
    26
    I don't know about freebsd-update specifically, but release(7) should help.
     
  4. jgh@

    jgh@ New Member Developer

    Messages:
    76
    Likes Received:
    0
    The only way to do this is with using the facility of "make release," as aforementioned.

    What you are doing is something I've been doing for some time now, and have gained some expertise with it.

    Everything NEEDS to be in the iso. As freebsd-update-server code will download the iso and do all patching and compiling from that iso.

    I wrote up some documentation that was accepted into the Releng Document that may help.
    http://www.freebsd.org/doc/en_US.ISO8859-1/articles/releng/release-build.html
    I added section specifics for using a custom kernel in 3.4.1

    As far as the update server, you can look at this documentation I wrote:
    http://people.freebsd.org/~manolis/patches/freebsd-update-server/
    http://www.experts-exchange.com/art...BSD/Build-Your-Own-FreeBSD-Update-Server.html

    You will need to make a couple of modifications to the freebsd-update-server software. The subroutines in build.subr regarding documentation and buildworld will need to be tuned. I have spoken with Colin about a bug in the buildworld routine that won't build on customized kernels, and it is something he will eventually look into. I have modified mine to work on custom kernels, but the real fix is to find out why it is ignoring it.

    Above all, make sure your ISO actually works before building update code against it.
     
  5. bsd10

    bsd10 New Member

    Messages:
    72
    Likes Received:
    0
    If you make a release with additional ports or other programs, will they be automatically installed by the iso that is generated? Can you also get freebsd-update-server to update both the base system and the ports and other software?
     
  6. tty3

    tty3 New Member

    Messages:
    18
    Likes Received:
    0
    http://www.freebsd.org/doc/en/articles/fbsd-from-scratch/why.html
     
  7. jgh@

    jgh@ New Member Developer

    Messages:
    76
    Likes Received:
    0
    My article was finally committed! This should help you build your own update server.
    http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/index.html
     
  8. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,673
    Likes Received:
    26
Thread Status:
Not open for further replies.