From owner-freebsd-questions Wed Feb 21 7:51:35 2001 Delivered-To: freebsd-questions@freebsd.org Received: from siafu.iconnect.co.ke (upagraha.iconnect.co.ke [209.198.248.2]) by hub.freebsd.org (Postfix) with ESMTP id BEC4137B69C for ; Wed, 21 Feb 2001 07:51:13 -0800 (PST) (envelope-from wash@iconnect.co.ke) Received: from [212.22.163.2] (helo=poeza.iconnect.co.ke) by siafu.iconnect.co.ke with esmtp (Exim 2.12 #1) id 14VbVF-00057Q-00; Wed, 21 Feb 2001 18:48:29 +0300 Received: from wash by poeza.iconnect.co.ke with local (Exim 3.20 #1) id 14VbYS-0009hb-00; Wed, 21 Feb 2001 18:51:48 +0300 Date: Wed, 21 Feb 2001 18:51:47 +0300 From: Odhiambo Washington To: gwq_uk@yahoo.com Cc: FBSD-Q Subject: Updating 3.5 --> 4.2 Message-ID: <20010221185147.A36082@poeza.iconnect.co.ke> Mail-Followup-To: Odhiambo Washington , gwq_uk@yahoo.com, FBSD-Q Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD poeza.iconnect.co.ke 4.2-STABLE FreeBSD 4.2-STABLE X-Mailer: Mutt http://www.mutt.org/ X-Location: Mombasa, KE, East Africa Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm attaching a portion of an email message from Ralf Engelschall explaining the solution to this. If you didn't upgrade from 3.5-STABLE to 4.0-STABLE right away, you ended up with lots of weird errors regarding perl and libc.=20 Ralf's email mentions 4.1.1-STABLE, since that was the latest version at=20 the time he wrote this. I still believe it applies. The fundamental issue is to buildworld with NO_PERL defined. Then build and install a GENERIC kernel and reboot with a 4.x kernel. Do the installworld, mergemaster and other stuff he lists, then comment out NO_PERL and rebuild and install a bunch of critical stuff. Then buildworld and installworld *again* from scratch, reboot and you're done. Whew! Fortunately, he give pretty good step-by-step instructions. At the beginning he uncomments a whole bunch of stuff, including all the COMPAT[123]X stuff. If you don't need that stuff on your box, there's no reason to build it. Customize his recipe for your own environment. I went from 3.5-STABLE to 4.1.1-STABLE using these instructions and it worked great. Good luck, ####################################################################### Upgrading from FreeBSD 3.5-STABLE to FreeBSD 4.1-STABLE ###################################################################### Ralf S. Engelschall , August 2000 o boot the old FreeBSD 3.x in multi-user mode o provide a particular build environment $ vi /etc/make.conf NOPERL=3Dtrue # else Perl would fail to build under 3.x initially NOPROFILE=3Dtrue # to speed up building MAKE_RSAINTL=3DYES # for non-US USA_RESIDENT=3DNO # dito. CFLAGS=3D -O -pipe # standard optimization COPTFLAGS=3D-O -pipe # dito. COMPAT1X=3Dyes # install compatibility libraries COMPAT20=3Dyes # dito. COMPAT21=3Dyes # dito. COMPAT22=3Dyes # dito. COMPAT3X=3Dyes # 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=3DGENERIC $ make installkernel KERNEL=3DGENERIC $ 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=3DFOO $ make installkernel KERNEL=3DFOO $ chflags noschg /kernel /FOO $ 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=3D20 $ 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=3D"YES" $ pkg_delete ssh-1.2.27 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=3Dtrue $ cd /usr/src/gnu/usr.bin/perl=3D20 $ (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 -Wash -- Odhiambo Washington Inter-Connect Ltd., wash@iconnect.co.ke 5th Flr Furaha Plaza Tel: 254 11 222604 Nkrumah Rd., Fax: 254 11 222636 PO Box 83613 MOMBASA, KE. Death to all fanatics!=20 --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE6k+QTA2k+MNyI/bERAp09AJ4u940G0T6q06gtJSSRT4KbwLMH6gCff4oQ SXphZRTaE5yL/2bIu2TS1BY= =wjHq -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message