Remote System Builds

2012-03-26 Thread Martin McCormick
Is there yet any way to remotely rebuild a FreeBSD
system? I have two FreeBSD systems on two remote campuses that
presently run FreeBSD6.3. They need to be running FreeBSD9.0 and
I don't really care how I get there as long as it can be done
over the network. If we were physically there, I would put a
CDROM in and blow them away since it is such a large jump.

I can have staff members there install CDROM's that were
remastered to use the serial console, but I am hoping that maybe
we are moving past this sort of logistics.

I just tried to unpack the 9.0 image using tar which has
worked in the past to let one modify loader.conf but I got a
bunch of errors this time about files that couldn't be created
so maybe this is not the recommended headless installation
technique any longer.

Any ideas?

Thank you very much

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Remote System Builds

2012-03-26 Thread Doug Hardie

On 26 March 2012, at 11:20, Martin McCormick wrote:

   Is there yet any way to remotely rebuild a FreeBSD
 system? I have two FreeBSD systems on two remote campuses that
 presently run FreeBSD6.3. They need to be running FreeBSD9.0 and
 I don't really care how I get there as long as it can be done
 over the network. If we were physically there, I would put a
 CDROM in and blow them away since it is such a large jump.
 
   I can have staff members there install CDROM's that were
 remastered to use the serial console, but I am hoping that maybe
 we are moving past this sort of logistics.
 
   I just tried to unpack the 9.0 image using tar which has
 worked in the past to let one modify loader.conf but I got a
 bunch of errors this time about files that couldn't be created
 so maybe this is not the recommended headless installation
 technique any longer.

I am going to be facing the same issue in a few months.  My experiences with 
the serial console are that it is great for correcting small issues, trying to 
use it for initial configuration is not going to be real easy.  I would like to 
be able to build a custom CD for that specific machine that doesn't need any 
operator input.  They just install it and boot the machine. It would need to 
format the disk and do the complete installation (base and uniquely configured 
ports etc.). Is that possible?___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Remote System Builds

2012-03-26 Thread Boris Samorodov
26.03.2012 22:20, Martin McCormick пишет:
   Is there yet any way to remotely rebuild a FreeBSD
 system? I have two FreeBSD systems on two remote campuses that
 presently run FreeBSD6.3. They need to be running FreeBSD9.0 and
 I don't really care how I get there as long as it can be done
 over the network. If we were physically there, I would put a
 CDROM in and blow them away since it is such a large jump.

I used an USB stick with full system, sources (/usr/src) and
compiled binary (/usr/obj). Since the system is booted from USB,
I have full control via ssh session.

   I can have staff members there install CDROM's that were
 remastered to use the serial console, but I am hoping that maybe
 we are moving past this sort of logistics.

   I just tried to unpack the 9.0 image using tar which has
 worked in the past to let one modify loader.conf but I got a
 bunch of errors this time about files that couldn't be created
 so maybe this is not the recommended headless installation
 technique any longer.
 
   Any ideas?

HTH
-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Remote System Builds

2012-03-26 Thread Devin Teske


 -Original Message-
 From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
 questi...@freebsd.org] On Behalf Of Doug Hardie
 Sent: Monday, March 26, 2012 11:54 AM
 To: Martin McCormick
 Cc: freebsd-questions@freebsd.org
 Subject: Re: Remote System Builds
 
 
 On 26 March 2012, at 11:20, Martin McCormick wrote:
 
  Is there yet any way to remotely rebuild a FreeBSD
  system? I have two FreeBSD systems on two remote campuses that
  presently run FreeBSD6.3. They need to be running FreeBSD9.0 and
  I don't really care how I get there as long as it can be done
  over the network. If we were physically there, I would put a
  CDROM in and blow them away since it is such a large jump.
 
  I can have staff members there install CDROM's that were
  remastered to use the serial console, but I am hoping that maybe
  we are moving past this sort of logistics.
 
  I just tried to unpack the 9.0 image using tar which has
  worked in the past to let one modify loader.conf but I got a
  bunch of errors this time about files that couldn't be created
  so maybe this is not the recommended headless installation
  technique any longer.
 
 I am going to be facing the same issue in a few months.  My experiences with
the
 serial console are that it is great for correcting small issues, trying to use
it for
 initial configuration is not going to be real easy.  I would like to be able
to build a
 custom CD for that specific machine that doesn't need any operator input.
They
 just install it and boot the machine. It would need to format the disk and do
the
 complete installation (base and uniquely configured ports etc.). Is that
 possible?

Our company is facing a jump from FreeBSD-4.11 to FreeBSD-8.1 later this year
(in a few months).

The challenge is recognized as:

1. Upgrade 3,000+ systems in a matter of 60-90 days.
2. Many of those systems need to be upgraded remotely where no technical staff
exists (e.g. India, Philippines, Canada, etc.)
3. The remote upgrade must be done via SSH and NFS
4. Machines being upgraded must reboot and come back onto the network without
local technical assistance

The technique that I developed to accomplish this is a shell script weighing in
at [currently] 1954 lines of code. In addition to the 1954 lines of code, there
are another 631 lines of code dedicated to specific migrations that have to be
performed specific to (say) jumping from 4.11 to 8.1 (e.g., you should remove
the nodev option from your NFS mounts in /etc/fstab, among other things). On
top of THAT, there's another 8778 lines of code dedicated to cruft removal
(lists of files/directories that are unique to either the source-binary distro
or the destination-binary distro; depending on the direction of migration).

I will be releasing the full script soon (in a couple weeks) and even though
it's not specifically targeted to your migration path (6.3 to 9.0), it can be
learning-tool to illustrate exactly HOW you can go about making that binary
migration a reality.

Fortunately, it's very easy for me to provide explicit instructions on how
exactly we jump from 4.11 to 8.1, or 8.1 back to 4.11, or even from 8.1 i386 to
8.1 amd64 (and back) ... the script that I've written takes a -nv syntax which
means don't actually do anything, but show me the explicit commands that I can
execute by-hand to migrate from one OS to the next as an in-place migration
which has the following output:

NOTE: The output below is a sample migration from 4.11 to 8.1-amd64

WARNING: This is not intended to be a full solution provided to the OP but
rather a conversation-starter that should illustrate not only how HARD and/or
DIFFICULT it is to do what the OP asked, but also to show how it IS POSSIBLE to
achieve.

WARNING: Also, it's worth noting that this procedure will NOT work to jump to
9.x because the binary distribution sets from 9.0 and higher are in a
different format. You can work around this by adjusting for this fact --
replacing syntax such as cat base/base.?? | tar ... to simply cat base.txz |
tar ... (accounting for the new monolithic distribution-sets in 9.0 and
higher).

=== BEGIN OUTPUT OF OUR BINARY MIGRATION SCRIPT BELOW ===
Rebuild / with repository 8.1-RELEASE-amd64
TEST-ONLY! No actions will be performed.
 Source 8.1-RELEASE-amd64 specific config file
. ./etc/8.1-RELEASE-amd64.conf
 Run 8.1-RELEASE-amd64 specific pre_install
pre_install
# Preflight sanity check (check release)
#Migration from 4.11-STABLE to 8.1-RELEASE-amd64 allowed
# Prevent disappearance of tar(1)
rm -Rfv /var/db/pkg/tar-1.5
# Move `/usr/local/etc/rc.d' to `/usr/local/etc/rc.d.xbak-2012-03-26.12:32:08'
mv -v /usr/local/etc/rc.d /usr/local/etc/rc.d.xbak-2012-03-26.12:32:08
mkdir -pv /usr/local/etc/rc.d
chmod -v 0755 /usr/local/etc/rc.d
chown -v root:wheel /usr/local/etc/rc.d
 Find/Remove core-dumps to free-up disk space
find -x / -maxdepth 2 -name '*.core' -type f | xargs rm -fv

Re: Remote System Builds

2012-03-26 Thread Matthew Seaman
On 26/03/2012 19:20, Martin McCormick wrote:
   I just tried to unpack the 9.0 image using tar which has
 worked in the past to let one modify loader.conf but I got a
 bunch of errors this time about files that couldn't be created
 so maybe this is not the recommended headless installation
 technique any longer.

To create a custom install CD?  You might find it better to build your
.iso or memstick images from the system sources.  See release(7).
The trick seems to be to make the 'system' target of the
/usr/src/release/Makefile which will install the system into a chroot.
You should then be able to edit files under that chroot.  Then just
'make release.iso' or 'make memstick' to create an installer image.

Cheers,

Matthew
-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature