--
MikePatterson - 14 Mar 2005
scrub the existing software tree (
rm -r /{vendor,xhbin}
, clear out
/fsys1/.software
, recreate links, etc).
Set capo's
access-rights
to:
freebsd5.cscf capo arch= admin=cscf.cs
Since I know already from
XhierOnFreeBSD2 that I can just brand the binaries, I'll try copying over /.software/arch/{xhier,mfcf-basics,os-extras} from debian30 and then brand 'em.
1>(root)@debian30.math[104]% pwd
/fsys1/.software/arch
1>(root)@debian30.math[105]% rdist -c -w xhier freebsd5.cscf:/tmp
updating host freebsd5.cscf
installing: /tmp/xhier
installing: /tmp/xhier/servers
installing: /tmp/xhier/servers/xh-merge-inetd-conf
Then
mv /tmp/xhier /fsys1/.software/arch
on freebsd5.cscf. Do the same thing for mfcf-basics and os-extras.
freebsd5# ./hostnames
ELF binary type "0" not known.
./hostnames: Exec format error. Binary file not executable.
freebsd5# brandelf -t Linux hostnames
freebsd5# ./hostnames
freebsd5.cscf freebsd5.cscf freebsd5
freebsd5#
woo hoo.
Now I've branded all the ELF stuff in
/fsys1/.software/arch/*/{bin,maintenance,servers}
... make a backup of /fsys1/.software/arch in case I screw this up and need to start again.
cscf.cs# xh-first-time -v freebsd5.cscf
xh-first-time FYI: checking to see if "freebsd5.cscf" is accessible.
xh-first-time FYI: Checking the architecture claimed by "freebsd5.cscf".
xh-first-time warning: The remote host hasn't specified an architecture
xh-first-time warning: in /software/xhier/config/local/allowed-types.
xh-first-time warning: Assuming for now that it has the same type as the
xh-first-time warning: local host, namely "SunOS5.8-Sun4".
xh-first-time FYI: Checking the basic "/software" structure.
xh-first-time: basic check of "freebsd5.cscf" failed.
/tmp/tempware/mfcf-basics/bin/absolute: Exec format error. Binary file not executable.
So I tried
chflags schg absolute
in
/tmp/tempware/mfcf-basics/bin
(so it couldn't remove the file next time) and now I get:
rm: /tmp/tempware/mfcf-basics/bin/absolute: Operation not permitted
rm: /tmp/tempware/mfcf-basics/bin: Directory not empty
rm: /tmp/tempware/mfcf-basics: Directory not empty
rm: /tmp/tempware: Directory not empty
mkdir: /tmp/tempware: File exists
xh-first-time FYI: Checking the basic "/software" structure.
xh-first-time: Unable to copy "xh-check" to host "freebsd5.cscf":
xh-first-time: ./mfcf-basics/bin/absolute: Can't open './mfcf-basics/bin/absolute': File exists
cscf.cs# xh-distribute -h freebsd5.cscf -t admin xhier
xh-distribute warning: the host "freebsd5.cscf" doesn't receive
xh-distribute warning: admin type files for
xh-distribute warning: this package (xhier)
xh-distribute warning: from this host (cscf.cs).
Of course, it helps if the file I branded as a Linux binary actually was such. On debian30, make a quick and dirty change to access-rights and tell it it sends arch to freebsd5.
1>(root)@debian30.math[102]% grep freebsd5 access-rights
freebsd5.cscf capo arch=debian30.math admin=cscf.cs
1>(root)@debian30.math[103]%
I think I got somewhere this time:
1>(root)@debian30.math[105]% xh-first-time -v freebsd5.cscf
xh-first-time FYI: checking to see if "freebsd5.cscf" is accessible.
xh-first-time FYI: Checking the architecture claimed by "freebsd5.cscf".
xh-first-time warning: The remote host hasn't specified an architecture
xh-first-time warning: in /software/xhier/config/local/allowed-types.
xh-first-time warning: Assuming for now that it has the same type as the
xh-first-time warning: local host, namely "Debian3.0-IA32".
xh-first-time FYI: Checking the basic "/software" structure.
xh-first-time FYI: Verifying access rights to "freebsd5.cscf".
xh-first-time FYI: Making sure "freebsd5.cscf" requests basic packages.
xh-first-time FYI: The target host "freebsd5.cscf" doesn't appear
xh-first-time FYI: to be configured to receive
xh-first-time FYI: these packages: os-extras mfcf-basics xhier,
xh-first-time FYI: so they will be added to:
xh-first-time FYI: "/software/xhier,dev/data/client-requests/freebsd5.cscf".
xh-first-time FYI: Copying the parts of the basic packages
xh-first-time FYI: needed for bootstrapping.
xh-first-time warning: Not sending "share" files,
xh-first-time warning: assuming "freebsd5.cscf" already
xh-first-time warning: has them (e.g. via NFS).
xh-first-time FYI: Copying arch/xhier to arch/xhier
xh-first-time FYI: Copying arch/mfcf-basics to arch/mfcf-basics
xh-first-time FYI: Copying arch/os-extras to arch/os-extras
xh-first-time FYI: Removing /software/xhier/man
xh-first-time FYI: Removing /software/mfcf-basics/man
xh-first-time FYI: Removing /software/os-extras/man
xh-first-time FYI: Configuring "freebsd5.cscf" to avoid "targets" files.
xh-first-time FYI: Updating "freebsd5.cscf:/.software/local/xhier/config/local/requests".
xh-first-time FYI: Making "freebsd5.cscf:/bin/showpath" if needed.
xh-first-time FYI: Initializing "freebsd5.cscf:/.software/admin/xhier/data/access-rights".
/software/xhier/servers/xh-set-access-rights: Command not found.
xh-first-time FYI: Making "freebsd5.cscf:/.software/admin/xhier/config/local/allowed-types".
xh-first-time FYI: (if it's not there)
xh-first-time FYI: Crude check for missing NFS mounts.
xh-first-time: The shared parts of the "xhier" package
xh-first-time: seem to be absent from "freebsd5.cscf".
xh-first-time: Perhaps they need to be NFS mounted
xh-first-time: and then symlinked to.
1>(root)@debian30.math[106]%
Edit
/fsys1/.software/local/xhier/data/architecture
- let's call this
FreeBSD5-IA32. Just cos I happened to see that file.
cscf.cs# xh-distribute -h freebsd5.cscf -t admin xhier
xh-distribute warning: the host "freebsd5.cscf" doesn't receive
xh-distribute warning: admin type files for
xh-distribute warning: this package (xhier)
xh-distribute warning: from this host (cscf.cs).
cscf.cs#
Hrm. I wonder if I can set up allowed-types:
freebsd5# ls -l /fsys1/.software/admin/xhier/config/local/
total 0
-rw-r--r-- 1 root wheel 0 Mar 14 16:40 allowed-types
freebsd5#
While I'm here,
cd /vendor && mkdir etc && cd etc && cp /etc/{passwd,master.passwd,group} .
.
Looking at
XhierOneZeroOne28Feb2005, I see that Ray suggests we can xh-first-time from the admin machine. So let's try that... nope:
cscf.cs# xh-first-time -v freebsd5.cscf
xh-first-time FYI: checking to see if "freebsd5.cscf" is accessible.
xh-first-time FYI: Checking the architecture claimed by "freebsd5.cscf".
xh-first-time warning: The remote host hasn't specified an architecture
xh-first-time warning: in /software/xhier/config/local/allowed-types.
xh-first-time warning: Assuming for now that it has the same type as the
xh-first-time warning: local host, namely "SunOS5.8-Sun4".
xh-first-time FYI: Checking the basic "/software" structure.
xh-first-time: basic check of "freebsd5.cscf" failed.
/tmp/tempware/mfcf-basics/bin/absolute: Exec format error. Binary file not executable.
xh-first-time: /software etc. must be created before proceeding.
xh-first-time: /tmp/tempware/xhier/maintenance/xh-check [-m]
xh-first-time: may be handy in creating the required paths.
xh-first-time FYI: Verifying access rights to "freebsd5.cscf".
xh-first-time warning: Host "freebsd5.cscf" isn't configured to receive
xh-first-time warning: architecture specific (i.e. "arch") files
xh-first-time warning: from this host (cscf.cs),
xh-first-time warning: so it had better be getting them via NFS
xh-first-time warning: or from some other machine.
The funny thing is, if I replace the /tmp/tempware's absolute with the "real" arch one, xh-check runs just ducky. Unsurprisingly, capo does the same thing. I tried the same trick as before with chflags to no effect:
capo# xh-first-time -v freebsd5.cscf
xh-first-time FYI: checking to see if "freebsd5.cscf" is accessible.
xh-first-time FYI: Checking the architecture claimed by "freebsd5.cscf".
xh-first-time warning: The remote host hasn't specified an architecture
xh-first-time warning: in /software/xhier/config/local/allowed-types.
xh-first-time warning: Assuming for now that it has the same type as the
xh-first-time warning: local host, namely "SunOS5.8-Sun4".
rm: /tmp/tempware/mfcf-basics/bin/absolute: Operation not permitted
rm: /tmp/tempware/mfcf-basics/bin: Directory not empty
rm: /tmp/tempware/mfcf-basics: Directory not empty
rm: /tmp/tempware: Directory not empty
mkdir: /tmp/tempware: File exists
xh-first-time FYI: Checking the basic "/software" structure.
xh-first-time: Unable to copy "xh-check" to host "freebsd5.cscf":
xh-first-time: ./mfcf-basics/bin/absolute: Can't open './mfcf-basics/bin/absolute': File exists
capo#
After some poking, it looks like it might actually be failing because xh-first-time tries to extract the tarball (again?) and fails since it can't overwrite absolute.