Date: Wed, 19 Dec 2001 11:49:02 +0200 From: Vikash Badal / PCS <VikashB@ComparexAfrica.co.za> To: 'Piotr Wozniak' <piotr.wozniak@cs.put.poznan.pl>, freebsd-stable@FreeBSD.org Subject: RE: make buildworld failed (upgrade system from 3.5 to 4.x STABLE ) Message-ID: <501BF453CDCFD111A6E40080C83DAC04E4BB94@PSICS001>
next in thread | raw e-mail | index | archive | help
Hi below is the procedure I used to upgrade from 3.2 to 3.5
and then to 4.4
Hope it helps
Upgrade from 3.5 STABLE to 4.1.1 RELEASE
=============================
edit supfile
entries should be:
-----
*default host=localcvsup
*default tag=RELENG_4_1_1_RELEASE
*default release=cvs
*default base=/usr
*default prefix=/usr
*default delete use-rel-suffix
src-all
----
o boot the old FreeBSD 3.x in multi-user mode
o provide a particular build environment
$ vi /etc/make.conf
NOPERL=true # else Perl would fail to build under 3.x
initially
NOPROFILE=true # to speed up building
MAKE_RSAINTL=YES # for non-US
USA_RESIDENT=NO # dito.
CFLAGS=-O -pipe # standard optimization
COPTFLAGS=-O -pipe # dito.
COMPAT1X=yes # install compatibility libraries
COMPAT20=yes # dito.
COMPAT21=yes # dito.
COMPAT22=yes # dito.
COMPAT3X=yes # dito.
o provide boot-strapping run-time environment
$ mkdir -p /usr/obj/usr/src/lib/libc
$ ldconfig -R /usr/obj/usr/src/lib/libc
o build the world initially (still under FreeBSD 3.x run-time)
$ cd /usr/obj
$ chflags -R noschg *
$ rm -rf *
$ cd /usr/src
$ make buildworld
o build and install new GENERIC kernel+modules
$ make buildkernel KERNEL=GENERIC
$ make installkernel KERNEL=GENERIC
$ chflags noschg /kernel.GENERIC /GENERIC
$ mv /kernel.GENERIC /kernel.GENERIC.3
$ mv /GENERIC /kernel.GENERIC
$ chflags schg /kernel.GENERIC
o upgrade FOO kernel config from 3.x to 4.x
$ vi /sys/i386/conf/FOO
- remove "config kernel ...", "bio", "tty", "net", "conflicts"
- remove unnecessary quotations
- remove "pnp" device
- remove "acd0" device
- remove obsolete options (check output of "config FOO")
- replace some "xxx0" with "xxx" (compare LINT for details)
- replace "controller" & "disk" with "device"
- replace "wdc0" with "ata0" plus more "ata*" from GENERIC
- replace "bpfilter" with "bpf"
- replace "isa?" with "atkbdc?" for "atkbd0" and "psm0" device
o build and install new FOO kernel+modules
$ make buildkernel KERNEL=FIREWALL
$ make installkernel KERNEL=FIREWALL
$ chflags noschg /kernel /FIREWALL
$ mv /kernel /kernel.3
$ mv /FOO /kernel
$ chflags schg /kernel
o upgrade devices
$ cd /usr/src/sbin/mknod && make install
$ cp /usr/src/etc/MAKEDEV* /dev
$ cd /dev
$ sh MAKEDEV all
- make sure really all devices for disks exists:
for N in the list of disks
sh MAKEDEV N # eg ad0
for M in the list of slices
sh MAKEDEV NsMa # eg ad0s1a
- edit /etc/fstab and replace "wd0" with "ad0"
o upgrade boot blocks and loader
$ cd /sys/boot && make install
o boot FreeBSD 4.x kernel (still with 3.x user-land) in single-user
mode
$ shutdown -r now
> boot -s
$ mount -a
o install the world
$ cd /usr/src/gnu/usr.bin/texinfo/install-info
$ make install
$ ldconfig -R /usr/obj/usr/src/lib/libc
$ cd /usr/src
$ make installworld
$ cd /usr/src/release/sysinstall && make all install
o upgrade /etc
$ cp -rp /etc /etc.old
$ mergemaster -v -s
o final adjustments for new FreeBSD 4.x user-land
$ touch /var/log/security
$ touch /var/log/cron
$ rm /var/cron/log*
o switch to new shipped OpenSSH [OPTIONAL!]
$ ssh-keygen -f /etc/ssh/ssh_host_key
$ ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key
$ vi /etc/rc.conf
sshd_enable="YES"
$ pkg_delete ssh-1.2.26
$ vi /etc/ssh/ssh/sshd_config
change permitrootlogin to yes
o boot FreeBSD 4.x kernel and user-land in multi-user mode
$ shutdown -r now
o rebuild some criticial programs to avoid spurious segfaults
under the forthcoming final "buildworld/installworld" step
$ vi /etc/make.conf
#NOPERL=true
$ cd /usr/src/gnu/usr.bin/perl
$ (cd libperl && make all install)
$ (cd perl && make all install)
$ make clean all install
$ cd /usr/src/usr.bin/lex && make clean all install
$ cd /usr/src/usr.bin/yacc && make clean all install
$ cd /usr/src/gnu/usr.bin/as && make clean all install
$ cd /usr/src/gnu/usr.bin/cc && make clean all install
$ cd /usr/src/gnu/lib/libgcc && make clean all install
o build and install the world finally from scratch (under FreeBSD
4.x run-time)
$ cd /usr/obj
$ chflags -R noschg *
$ rm -rf *
$ cd /usr/src
$ make buildworld
$ make installworld
o rebuild the kernel with the final tools
$ cd /sys/i386/conf
$ config FOO
$ cd /sys/compile/FOO
$ make depend all
$ make install
o reboot to switch to the final FreeBSD 4.x system
$ shutdown -r now
Upgrade from 4.1.1 to 4.4
=============================
edit supfile
entries should be:
-----
*default host=localcvsup
*default tag=RELENG_4_4
*default release=cvs
*default base=/usr
*default prefix=/usr
*default delete use-rel-suffix
src-all
----
execute the command
cvsup -g -L 2 -Z supfile
edit /etc/make.conf
add the following lines:
-------
MAKE_RSAINTL=NO
USA_RESIDENT=NO
CFLAGS=-O -pipe
COPTFLAGS=-O -pipe
COMPAT1X=YES
COMPAT20=YES
COMPAT21=YES
COMPAT22=YES
COMPAT3X=YES
----------
cd /usr/src
make buildworld
cd /usr/src/sys/i386/conf
config -g FIREWALL
cd ../../compile/FIREWALL
make depend && make && make install && shutdown -r now
after reboot
cd /usr/src
make installworld
mergemaster -v [ this is interactive ]
cd /dev
sh MAKEDEV all
cd /usr/src/release/sysinstall
make all install
shutdown -r now
-----Original Message-----
From: Piotr Wozniak [mailto:piotr.wozniak@cs.put.poznan.pl]
Sent: 19 December 2001 11:41
To: freebsd-stable@FreeBSD.org
Subject: make buildworld failed
Hi,
I'd like to upgrade system from 3.5 to 4.x STABLE
(tag in supfile was RELENG_4) but 'make buildworld'
stops and following error occurs:
-----------------------------------------------------------------------
c++ -O -pipe
-I/usr1/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
-I/usr1/src/gnu/usr.bin/gperf -c
/usr1/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/new.cc
/usr1/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/new.cc:80:
warning:
`catch', `throw', and `try' are all C++ reserved words
/usr1/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/new.cc: In
function
`void operator delete(void *)':
/usr1/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/new.cc:82:
declaration
of `operator delete(void *)' throws different exceptions...
<internal>:82: ...from previous declaration here
*** Error code 1
Stop.
*** Error code 1
------------------------------------------------------------------------
What can I do? Please help :)
Piotr Wozniak
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?501BF453CDCFD111A6E40080C83DAC04E4BB94>
