View Full Version : [Solved] Build Your Own FreeBSD Update Server
jgh
February 23rd, 2011, 07:21
This is a howto that I wrote that was recently committed to the FreeBSD Documentation Project.
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server
nestux
February 24th, 2011, 05:22
Very useful, thanks you.
fadolf
March 2nd, 2011, 11:43
Very useful indeed. The only thing that remains a bit unclear is where one would make customisations to the kernel, or rather if those would have to be made to the GENERIC configuration or by adding a custom one and setting KERNELPARTS to that target?
Thanks in advance for clarifying.
copypaiste
March 4th, 2011, 09:13
Is there any way to avoid downloading during initial build run? I'd like to use already fetched iso image.
copypaiste
March 4th, 2011, 09:52
Also it seems that scripts/init.sh using old naming scheme when fetching iso images, so it fails when I tried to run initial build for 8.1-RELEASE:
>./scripts/init.sh i386 8.1-RELEASE
Fri Mar 4 11:47:53 MSK 2011 Starting fetch for FreeBSD/i386 8.1-RELEASE
fetch: ftp://ftp4.ru.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/8.1/8.1-RELEASE-i386-disc1.iso: Not Found
But:
> fetch -s 'ftp://ftp4.ru.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/8.1/FreeBSD-8.1-RELEASE-i386-disc1.iso'
676384768
fadolf
March 4th, 2011, 11:13
Yeah i noticed that too. You need to make these changes to scripts/build.subr.
--- scripts/build.subr.orig 2011-03-04 11:09:38.000000000 +0100
+++ scripts/build.subr 2011-02-14 15:10:33.000000000 +0100
@@ -301,7 +301,7 @@
# Figure out where the disc1 ISO image is
RELNUM=${REL%-*}
- ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso
+ ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/FreeBSD-${REL}-${TARGET}-disc1.iso
# Fetch the ISO image. We consider the ISO image to be
# the One True Release and don't look at the files used
copypaiste
March 4th, 2011, 11:24
Thanks, I see now it would be easy to modify the procedure and make it check the iso image before trying to fetch anything.
jgh
March 6th, 2011, 03:27
Very useful indeed. The only thing that remains a bit unclear is where one would make customisations to the kernel, or rather if those would have to be made to the GENERIC configuration or by adding a custom one and setting KERNELPARTS to that target?
Thanks in advance for clarifying.
You would need to modify the actual release to include a new kernel, or modify GENERIC. If you add a new kernel, you would need to alter KERNELPARTS for your additional kernel support, and be aware of it in the jail creation, as well. If you just patch GENERIC, you would not need to do anything else. It literally could be a 0 level patch to the distribution.
jgh
March 6th, 2011, 03:28
Is there any way to avoid downloading during initial build run? I'd like to use already fetched iso image.
You just need to modify the fetchiso location you are downloading from in build.subr. You could simply create an anonymous ftp server locally, even.
jgh
March 6th, 2011, 03:31
Yeah i noticed that too. You need to make these changes to scripts/build.subr.
--- scripts/build.subr.orig 2011-03-04 11:09:38.000000000 +0100
+++ scripts/build.subr 2011-02-14 15:10:33.000000000 +0100
@@ -301,7 +301,7 @@
# Figure out where the disc1 ISO image is
RELNUM=${REL%-*}
- ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso
+ ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/FreeBSD-${REL}-${TARGET}-disc1.iso
# Fetch the ISO image. We consider the ISO image to be
# the One True Release and don't look at the files used
Yes, this is due to recent updates to the naming of the iso when built. fetchiso routine can be modified on a per release basis in build.subr under the scripts/architecture/x.x-RELEASE/ to account for differences in 7.x and 8.x releases
jgh
March 6th, 2011, 04:39
In about the past week or so, I have updated the article. One was a formatting update, and the other was a content update. The content update fixed some redundancy, provided some clarity and I also expanded on the tips, which may help with some of the updates I posted in this thread.
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/tips.html
fender0107401
April 6th, 2011, 02:16
Good job!
Your have contributed!
silverglade00
January 20th, 2012, 21:44
I am currently in the process of trying to get updates for 9.0-RELEASE built. A lot has changed in the layout of the .iso file. If anyone is interested, I would be happy to collaborate. I can get pretty much everything except the kernel built correctly.
jgh
January 21st, 2012, 08:33
cperciva has committed recently to the project that should help in your effort:
http://www.freebsd.org/cgi/cvsweb.cgi/projects/freebsd-update-server/scripts/9.0-RC2/
silverglade00
January 24th, 2012, 15:34
Thanks, jgh! I will start testing it and report back.
silverglade00
February 28th, 2012, 19:11
Wow, I was really horrible about reporting back. It worked great. We are now in production serving up FreeBSD 9.0-RELEASE via freebsd-update on our internal network.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.