115b5 [Solved] Custom FreeBSD-update-server - creating a custom OS image - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Installing & Upgrading

Installing & Upgrading Installing and upgrading FreeBSD.

Closed Thread
 
Thread Tools Display Modes
  #1  
Old March 10th, 2010, 17:26
r00t r00t is offline
Junior Member
 
Join Date: Jul 2009
Posts: 14
Thanks: 7
Thanked 0 Times in 0 Posts
Default Custom FreeBSD-update-server - creating a custom OS image

Hi

I'm trying to create my own FreeBSD-update-server (http://www.freebsd.org/cgi/cvsweb.cg...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  
Old March 10th, 2010, 17:44
SirDice's Avatar
SirDice SirDice is online now
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,847
Thanks: 48
Thanked 2,061 Times in 1,890 Posts
Default

Quote:
Originally Posted by r00t View Post
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.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
The Following User Says Thank You to SirDice For This Useful Post:
r00t (October 27th, 2011)
  #3  
Old March 10th, 2010, 17:47
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,928
Thanks: 30
Thanked 1,924 Times in 1,350 Posts
Default

I don't know about freebsd-update specifically, but release(7) should help.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Administrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
The Following User Says Thank You to DutchDaemon For This Useful Post:
r00t (October 27th, 2011)
  #4  
Old March 11th, 2010, 04:50
jgh@ jgh@ is offline
FreeBSD Developer
 
Join Date: May 2009
Location: San Luis Obispo
Posts: 76
Thanks: 0
Thanked 18 Times in 11 Posts
Default

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.ISO...ase-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/p...update-server/
http://www.experts-exchange.com/arti...te-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.

Last edited by jgh@; March 11th, 2010 at 05:24. Reason: forgot to mention some stuff
The Following User Says Thank You to jgh@ For This Useful Post:
r00t (October 27th, 2011)
  #5  
Old September 20th, 2010, 21:21
bsd10 bsd10 is offline
Junior Member
 
Join Date: Jun 2010
Posts: 72
Thanks: 12
Thanked 3 Times in 3 Posts
Default

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  
Old September 21st, 2010, 03:37
tty3 tty3 is offline
Junior Member
 
Join Date: Aug 2010
Location: A home from Spain
Posts: 18
Thanks: 0
Thanked 2 Times in 1 Post
Default

Quote:
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/articl...ratch/why.html
  #7  
Old February 23rd, 2011, 07:16
jgh@ jgh@ is offline
FreeBSD Developer
 
Join Date: May 2009
Location: San Luis Obispo
Posts: 76
Thanks: 0
Thanked 18 Times in 11 Posts
Default

Quote:
Originally Posted by jgh View Post
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.ISO...ase-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/p...update-server/
http://www.experts-exchange.com/arti...te-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.ISO...ver/index.html
The Following User Says Thank You to jgh@ For This Useful Post:
r00t (October 27th, 2011)
  #8  
Old February 23rd, 2011, 18:42
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,928
Thanks: 30
Thanked 1,924 Times in 1,350 Posts
Default

Any further discussion here: http://forums.freebsd.org/showthread.php?t=22016
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Administrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freebsd-update with custom kernel vso1 Installing & Upgrading 5 August 12th, 2010 14:48
Custom freebsd-update-server with Ports bsd10 Installing & Upgrading 2 August 11th, 2010 16:50
creating image from installed FreeBSD starsoheil FreeBSD Development 8 March 8th, 2010 12:48
Using freebsd-update with custom module pnosbsd Installing & Upgrading 0 October 1st, 2009 19:59
Custom FreeBSD iso CD Stamps Installing & Upgrading 3 June 2nd, 2009 02:36


All times are GMT +1. The time now is 09:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0