Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jan 2008 19:01:08 -0700
From:      Bert JW Regeer <xistence@0x58.com>
To:        hackers@freebsd.org
Subject:   Using freebsd-update to install a clean system
Message-ID:  <CB96FD86-963F-4524-AF95-2C56DEDD3CDA@0x58.com>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-6-691652653
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hello,

I am working on a tool to automatically provision new servers, and  
currently have it working properly using netboot, the way we currently  
do it is to have our own /usr/src and /usr/obj that we keep up to date  
with the latest patches and versions. The machines netboot an image,  
that NFS mounts those, and fdisks/bsdlabels the local disk and mount  
that as /target/{tmp,usr,var}, from there we set DESTDIR and run make  
{installworld, installkernel, distrib-dirs, distribution}, write out  
an fstab file, set up a simple rc.conf and let the machine reboot.

This process works great, however for stability reasons we are not  
able to rebuild the source tree, each time an advisory comes out, and  
would like a better way of automating this system. Now that freebsd- 
update looks like it is going to be a first class citizen, we would  
like to take advantage of it always being up to date, we would want to  
run our own local update server, and then using freebsd-update install  
an entire distribution, from scratch without first installing one from  
compiled sources.

Is this possible? Is there some way I can tell freebsd-update to  
target /target/ and install every part that we would need (kernel/ 
generic, world/base, world/manpages), without there already being a  
system installed in that location?

While using -b partially works, it throws back all kinds of errors:

install: /target//boot/kernel/3dfx_linux.ko.symbols: No such file or  
directory
install: /target//boot/kernel/aac.ko.symbols: No such file or directory
install: /target//boot/kernel/aac_linux.ko.symbols: No such file or  
directory
install: /target//boot/kernel/accf_data.ko.symbols: No such file or  
directory
install: /target//boot/kernel/accf_http.ko.symbols: No such file or  
directory

Also, looking at the freebsd-update.sh script, sometimes it does not  
have ${BASEDIR} in front of what it is doing, for example on line 2492:

kldxref -R /boot/ 2>/dev/null

Would that not have to be:

kldxref -R ${BASEDIR}/boot/ 2>/dev/null ?


Thank you,
Bert JW Regeer
--Apple-Mail-6-691652653--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CB96FD86-963F-4524-AF95-2C56DEDD3CDA>