scripting the buildworld/installworld process
chowse at charter.net
Sun Aug 31 13:25:23 PDT 2003
> > I'll be glad to post the scripts for review if anyone's interested.
> I'll take a look and test them for you also.
OK, any input or corrections welcome.
I definitly would be interested in more error checking and
reporting, and I'm thinking about using \time to append the
time it takes the long utilities to run to a file for comparison
------ This is the first one ------
# Update the system, run in multi-user mode
echo -n "Have you read /usr/src/UPDATING? [y/n]: "
if [ $a = n ] ; then
echo -n "Have you merged /etc/group and /usr/src/etc/group? [y/n]: "
if [ $b = n ] ; then
diff -c /etc/group /usr/src/etc/group | less
echo -n "Have you merged /etc/master.passwd and
/usr/src/etc/master.passwd? [y/n]: "
if [ $c = n ] ; then
diff -c /etc/master.passwd /usr/src/etc/master.passwd
# copy my customized make.conf
cp /disk2/larry/etc/make.conf /etc
# copy my customized kernel config file
cp /disk2/larry/usr/src/sys/i386/conf/CUSTOM /usr/src/sys/i386/conf
echo -n "Clean out /usr/obj? [y/n]: "
if [ $d = y ] ; then
chflags -R noschg *
rm -rf *
echo -n "Continue with build? [y/n]: "
if [ $e = n ] ; then
make -j4 buildworld
make buildkernel KERNCONF=GENERIC
make installkernel KERNCONF=GENERIC
cp /boot/kernel /boot/kernel.GENERIC
make buildkernel KERNCONF=CUSTOM
make installkernel KERNCONF=CUSTOM
echo "Reboot to single user mode and run /disk2/larry/bin/update2"
------ This is the second one ------
# Update the system, run in single user mode
echo -n "Continue with installworld? [y/n]: "
if [ $a = n ] ; then
if [ -d /etc.old ] ; then
rm -r /etc.old
cp -Rp /etc /etc.old
make all install
echo "Finished! Do ps and top work?"
> > 2. After reading man mergemaster, I see that the -a flag will run
> > mergemaster automatically and leave any new files in
> > I'd like to confirm that if I opt to run mergemaster -a,
> then I should
> > check/merge any files before leaving single user mode. It
> seems like
> > the right thing to do...?
> Correct, but I'll advise you run mergemaster manually. Margemaster is
> such a dangerous thing to run with -a on a system that has had so
> many mods to /etc
When I upgraded from 4.8-p3 to p4 recently, I ran mergemaster manually.
The only file I had to make a decision on was (I forget the name) the
one that prints the uname information when booting.
Just for the sake of discussion, let's say I did opt to run mergemaster
All I would have to do is check every file in /var/tmp/temproot and be
sure it didn't break anything by overwriting the older version, correct?
More information about the freebsd-questions