Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!scsing.switch.ch!news.dfn.de!news.dfn.de!Germany.EU.net!EU.net!uunet!epiwrl.entropic.com!usenet From: kenh@wrl.epi.com (Ken Hornstein) Newsgroups: comp.os.386bsd.questions Subject: Re: [NetBSD] Help me sup(1) to -current! Date: 5 Jul 1994 17:34:28 -0400 Organization: Entropic Research Laboratory, Washington DC Lines: 120 Message-ID: <2vcjl4$kp5@sparc2.entropic.com> References: <2utskh$dpp@dopey.cc.utexas.edu> Reply-To: kenh@wrl.epi.com NNTP-Posting-Host: sparc2.entropic.com In article <2utskh$dpp@dopey.cc.utexas.edu>, Vax <vax@dopey.cc.utexas.edu> wrote: >There is nothing in any of the FAQs about how one should sup(1) to -current, >as far as I can tell. As a 386BSD-0.1 -> pk -> NetBSD-0.[89] user, >I know there are a few pitfalls in upgrading your OS. As I understand >it, new binaries may not work with old kernels, and so forth, so; >How (exactly) do I go about upgrading? What is the stability of -current? I posted these instructions a few weeks ago to the current-users mailing list; they should still work for you. Note: if you plan on running netbsd-current, you should really get on the current-users mailing list; people occasionally post upgrade instructions there and from other people's e-mail you can judge the stability of current (and get fixes to problems you might have building the latest sources). Send mail to majordomo@sun-lamp.cs.berkeley.edu with "help" in the body for more info. --Ken To: current-users@sun-lamp.cs.berkeley.edu Subject: 0.9 -> current upgrade instructions Date: Mon, 20 Jun 1994 14:40:19 -0400 From: Ken Hornstein <kenh@wrl.epi.com> Enjoy. As always, feedback is welcome. UPGRADING TO NETBSD-CURRENT FROM 0.9 (tested under i386 ONLY) BACK UP YOUR DATA FIRST (unless you like living on the edge) Download the latest binary snapshot, available off of your favorite NetBSD ftp site, and put the resulting files on your hard drive somewhere (if you don't have enough space to hold them all, you shouldn't be running -current). You should get all the *.gz files and the generic kernels (you only need the generic kernel appropriate for your system). Copy the -current generic kernel into root, calling it "netbsd.new" or something similar. Also copy the zcat and tar binaries into another location (I personally used /var/tmp). It would also be a good idea to back up all the files you've changed in /etc, if you haven't already done so. Boot the machine using this kernel into single-user mode (using the "-s" switch at the boot prompt). The machine should come up with no problems. If it doesn't come up normally, then you've got a serious problem, and should probably not try to upgrade. Commands that look in the kernel like "ps" won't work, but things like "ls" and "tar" should be fine. If you're paranoid, you might want to spend a few minutes browsing around the system making sure everything works reasonably well (but most importantly that zcat and tar work). NOTE: Since you booted single-user, you'll need to remount root read-write (mount -u /) and mount the rest of the filesystems (mount -a, or whatever is appropriate for you). YOU ARE ON THE BRINK OF NO RETURN!! Ok, ready? Sitting in root, use the copies of gzip and tar you saved to extract out the binaries distributions over the current system binaries. Use something like: cd / /var/tmp/zcat /your/gzip/file/here | /var/tmp/tar --extract --verbose \ --unlink --file - In case you're wondering, the --unlink is necessary to make sure binaries that are being used get replaced and that symlinks get updated correctly. The order that you do this stuff in really isn't important, but I would do bin and sbin, then lib, libexec, usr/bin, usr/sbin, and then the rest. If you want to reassure yourself that things are working, you can see if the binaries in /bin and /sbin work; again, things that use the kernel will NOT work, but other binaries should work fine. The shared binaries in /usr/bin and /usr/sbin will NOT work until you have extracted /usr/lib and /usr/libexec. After you've extracted everything, run sync a few times, unmount all your filesystems (except /, obviously) and reboot. Hold your breath ... The system should boot fine. If it didn't, well, you're fucked. Get out your backup and try again (you DID make a backup and still have the installation floppies, right?). You'll probably need to merge the changes you made in /etc with what's there now. Go ahead and do that now. Now, you're running current. You can either live with the binary distribution you have and be happy, or upgrade to the latest source tree. You'll need to upgrade to the latest source tree if you want to compile a new kernel. I can't give you a well-defined procedure because it's a lot trickier, but here is a general guideline: extract all the sources (the are done relative to /usr). first off, install the man pages (cd /usr/src/include; make install). It's a good idea to remove the ENTIRE /usr/include hiearchy, otherwise you'll have weird problems when it comes time to build groff. Try building a new kernel; you might need to install a new config to do this (I didn't have to). You also might need to install other utilities to get this to work; I had to install a new /bin/sh, since the old one had a bug that was tickled by the kernel compile. Assuming this works, boot using your new kernel (but SAVE THE OLD ONE!). You might have to boot single user (lpd from the binary snapshot caused my new kernel to panic; go figure :-) ). Compile new libraries out of /lib and install them. See if you can compile programs using your new shared and static libraries. Compile and install a new gcc, gas, and ld. Compile and install everything else. (Note: don't attempt the above unless you really know what the hell you are doing. Save backup copies of the kernel and the tar and zcat binaries so you can undo any screwups that you do) These above instructions have worked for me; I can't guarantee that they will work for you. But I'd like to hear about it if you have problems.