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

Status
Not open for further replies.
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!
 
r00t said:
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)
Have a look at the scripts and Makefile in /usr/src/release/. The "make release" there will basically create a bootable install CD.
 
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.
 
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?
 
The problem with sysinstall is that it is severely limited in what, where and how it can install.

It is normally used to install pre-built distribution sets and packages from some other source (CD, DVD, FTP). It cannot install the result of a make buildworld.

It cannot install a second system under a directory in a running system.

It cannot install in Vinum or ZFS partitions.

It cannot compile ports, only install precompiled packages.

It is hard to script or to make arbitrary post-installation changes.

Last but not least, sysinstall is semi-officially at its End-Of-Life.

http://www.freebsd.org/doc/en/articles/fbsd-from-scratch/why.html
 
jgh said:
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.

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
 
Status
Not open for further replies.
Back
Top