From owner-freebsd-current Sun Dec 1 7:15:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B38CD37B401; Sun, 1 Dec 2002 07:15:08 -0800 (PST) Received: from newsguy.com (smtp.newsguy.com [129.250.170.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EB1343EAF; Sun, 1 Dec 2002 07:15:08 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com (200-163-23-191-bsace7016.dsl.telebrasilia.net.br [200.163.23.191]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id HAA35333; Sun, 1 Dec 2002 07:15:00 -0800 (PST) Message-ID: <3DEA2774.DCE1CACD@newsguy.com> Date: Sun, 01 Dec 2002 13:15:00 -0200 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en,pt-BR,pt,en-GB,en-US,ja MIME-Version: 1.0 To: Ruslan Ermilov Cc: current@FreeBSD.ORG, re@FreeBSD.ORG, Warner Losh , Doug Barton , Peter Wemm Subject: Re: [REPORT] Upgrade from 4.0-RELEASE to 5.0-CURRENT References: <20021201150303.GA6369@sunbay.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG There I go reply to all... IIRC, we never supported upgrade to 4.0 or 4.1 from anybut but the *latest* version in the 3.x series. I sure hope we adopt the same policy here. Ruslan Ermilov wrote: > > [ > current@ Cc:'ed because it'll be useful to a number of upgraders. > dougb@ Cc:'ed to be aware of possible mergemaster(8) problems. > imp@ Cc:'ed to be aware of incorrect UPDATING instruction. > peter@ Cc:'ed to LOL about foot-shooting with anti-foot-shooting. > re@ Cc:'ed to consider approving the attached patches. > ] > > Hi! > > Following is the report from my attempt to upgrade 4.0-RELEASE > system to 5.0-CURRENT. First, I'd like to say that I succedded > in it: > > FreeBSD 4.0-RELEASE FreeBSD 4.0-RELEASE #0: Mon Mar 20 22:50:22 GMT 2000 root@monster.cdrom.com:/usr/src/sys/compile/GENERIC i386 > FreeBSD 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Dec 1 13:52:37 GMT 2002 ru@:/usr/obj/ru/mnt/usr/src/sys/GENERIC i386 > > 4.0-RELEASE system was installed on a spare disk by newfs'ing the > `a' partition and extracting the `bin' distribution on top of it > from the 4.0-RELEASE 1st CD, thanks again to Charlie Brewster > for sending me one. > > The /etc/make.conf's contents was a mere NOPROFILE=YES. > > Buildworld was attempted under a non-root account. The installed > make(1) did not pass the regression tests, and this required a patch > to src/Makefile (attach #1) to survive; the patch allows one to > build and use the new make(1) under non-root, without the need to > overwrite /usr/bin/make. (This patch, with Warner's suggestion > incorporated, is currently considered by re@ for approval.) > > Other than that, both buildworld and buildkernel of the GENERIC > kernel went just fine. > > The next step was to install the new kernel and modules, as outlined > in UPDATING. > > As a prerequisite step (following the instructions from UPDATING) > I've created the /boot/device.hints file, and attempted to > installkernel. This failed with ``You must activate /boot/device.hints > in loader.conf.'' from kern.post.mk because 4.0 does not have > /boot/defaults/loader.conf. (Rather than creating it by hands, I > took another approach, see below.) > > As was documented in rev. 1.219 of UPDATING, after installing a > kernel (which I did not yet succeded in), it is highly recommended > to install new loader(8), and generally, upgrade /boot. > > WARNING! The relevant instruction from UPDATING, > > cd src/sys/boot ; make install > > will NOT work as is on most of old systems -- if run as is, make(1) > will use stuff from /usr/share/mk which may be incompatible with > sys/boot/ makefiles. Adding the -m `pwd`/../../share/mk did not > help either because now make(1) was attempting to run 4.0's install(1) > which does not understand the new -b option (INSTALLFLAGS=-b in > sys/boot/i386/loader/Makefile), in particular. Another problem > with 4.0 install(1) is that it removes source files by default, > while new versions of install(1) (4.3-STABLE and onwards) copy it > by default, so if you attempted to run it as is, it will wipe out > some already built stuff from /usr/obj, making the next installworld > attempt to fail. > > To overcome this, I needed to use the installworld environment [with > an up-to-date src/share/mk/ and install(1)] to install sys/boot/. > Fortunately, we have the SUBDIR_OVERRIDE knob in Makefile.inc1 that > was helpful here. > > So, my next attempt was to run, from src/, the following command: > > make installworld SUBDIR_OVERRIDE=sys/boot > > This would upgrade /boot, and (as part of the upgrade) install > /boot/defaults/loader.conf that is needed for installkernel to > proceed (see above). Unfortunately, this has failed to pass the > `installcheck' anti-foot-shooting check from Makefile.inc1, which > installworld depends on: > > 1. smmsp user was missing from /etc/passwd and /etc/group > 2. installed 4.0 kernel did not have the sigaction(2) syscall > > I've attempted to overcome 1) as suggested by UPDATING, by running > the ``mergemaster -p'' (from src/usr.sbin/mergemaster/). This did > not work well because mergemaster(8) attempted to use stat(1) which > is not present in 4.0. OK, it was trivial (in my case) to update > /etc/master.passwd and /etc/group by hands and run ``pwd_mkdb -p > /etc/master.passwd'' afterwards. > > I couldn't overcome 2) for obvious reason -- I was in the middle > of attempting to install a new kernel! Isn't this itself a sort > of foot-shooting? :-) > > The solution was to make the `installcheck' a no-op by: > > make installworld SUBDIR_OVERRIDE=sys/boot \ > -DNO_SENDMAIL DISTDIR= > > After this, ``make installkernel'' succeeded, but I noticed another > glitch. installkernel, as coded in Makefile.inc1, uses user's PATH > and hence /usr/bin/install (4.0 version) that deletes source files > by default. So, if you attempt to installkernel for the second > time, it will fail. The tiny patch to fix this is in attach #2. > > After rebooting with the new kernel in single user mode, ``make > installworld'' went fine and finally, I've merged the rest of etc/ > and just proceeded into multi-user mode by pressing ^D. > > Thanks for listening so far! :-) > > re@'s (or anyone else with re@'s permission), feel free to commit > these patches if you see any profit here, as I won't be able to > in the next 17 hours. > > Cheers, > -- > Ruslan Ermilov Sysadmin and DBA, > ru@sunbay.com Sunbay Software AG, > ru@FreeBSD.org FreeBSD committer, > +380.652.512.251 Simferopol, Ukraine > > http://www.FreeBSD.org The Power To Serve > http://www.oracle.com Enabling The Information Age > > ------------------------------------------------------------------------ > Name: p1 > p1 Type: Plain Text (text/plain) > Encoding: quoted-printable > > Name: p2 > p2 Type: Plain Text (text/plain) > Encoding: quoted-printable > > Part 1.2Type: application/pgp-signature -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@linux.bsdconspiracy.net "Fundamentalist Debianites, core children of the Linuxen.... sounds like it could come from the Book of Mormon, or Tolkien on a bad day..." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message