Mark's Upgrading to NetBSD 1.3 How-To
WARNING: The information in this page is grossly out-dated. I will leave the pages up in case they might be of some use.
NOTE: I have not used NetBSD for more than 2 years! I have not used MacOS or Mac hardware in more than three years. If you have questions, you are probably better off e-mailing the NetBSD mailing lists rather than me.
Note:This document was originally written by me. Colin Wood reworked and augmented it greatly. With 1.3,
it became a part of the main installation documents. However, I felt
it might be useful to also have it as a separate document. So I have
put it into HTML and provide it here. I have also added a few more
things based on my experiences upgrading my Centris 650 from 1.2E to
1.3. Please read the disclaimer.
If you are installing for the first time, or plan to start from
scratch, see Larry Kollar's
Installation Guide.
Upgrading a previously-installed NetBSD System
The upgrade to NetBSD 1.3 is a binary upgrade; it would be prohibitive
to make users upgrade by compiling and installing the 1.3 sources, and
it would be very difficult to even compile a set of instructions that
allowed them to do so. Because of the many changes to the system, it
is difficult and impractical to upgrade by recompiling from the sources
and installing.
No automated upgrade procedure exists for upgrading to release 1.3.2 for the
NetBSD/mac68k architecture. The current procedure is essentially to perform
a new install from scratch. It is hoped that there will be a good upgrade
procedure for future releases. Please feel free to volunteer to help
replace these installation tools.
The following steps outline the current upgrade procedure. These steps
should help ease the upgrade process. Please read these instructions
carefully and completely before proceeding:
- Since upgrading involves replacing the kernel and most of the system
binaries, it has the potential to cause data loss. You are strongly
advised to BACK UP ANY IMPORTANT DATA ON YOUR DISK, whether on the
NetBSD partition or on another operating system's partition, before
beginning the upgrade process. Although the upgrade should not
damage your filesystem(s) in any way, you never know what may happen.
- Download the distribution sets you want from the "mac68k/binary/sets"
subdirectory of the NetBSD 1.3 distribution. You will need the base
set and the kernel at a minimum. Be sure to download the files in
binary mode. If you will be upgrading from within NetBSD, make sure
that you place the distribution sets on a filesystem you will be able to
reach from single-user mode.
- The first thing that I recommend you do, is to prepare your
/etc files. You will probably want to replace
some of your system configuration files, or incorporate some of the
changes in the new versions into yours. To do so, as root,
do the following:
cd /tmp
tar -zxvpf /path/to/etc.tgz
cd etc
Now, in the /tmp/etc directory, make any changes to the new files that
you will need. You might want to compare files in your current /etc
directory with the new files in your /tmp/etc directory. In
particular, the files that you will need to change are:
- Once you have edited all the files in /tmp/etc, you will make
a new tarfile by doing the following:
cd ..
tar cvf etc-new.tar etc
mv etc-new.tar /path/to/other/tarfiles
Now, just to be extra safe, I also recommend making a backup of your
current /etc directory. To do so, you do the following:
cd /
tar cvf etc-old.tar etc
mv etc-old.tar /path/to/other/tarfiles
- Install the 1.3 kernel. You may either use the Installer utility
(included in the "installation/misc" subdirectory) or install from
within NetBSD (the latter is recommended for speed reasons). If you
choose the former, proceed as you normally would. If you choose to
install from within NetBSD, then boot (or shutdown) into single-user
mode and do the following:
cd /
tar -zxvpf /path/to/kern.tgz
There is no need to backup your old kernel explicitly since it will be
incapable of running many of the newer binaries you are about to
install (unless, of course, you have a backup copy of your older
binaries and want to revert to them for some reason). However, you
might want to keep a backup if you are upgrading from within NetBSD just
in case the newer kernel has trouble booting your machine.
- If you are installing using the Installer, skip to step 7. Otherwise,
reboot into NetBSD in single-user mode. Run 'fsck -f' and then mount all
local partitions read/write. Usually 'mount -a -t nonfs' should do the
trick, but if you have several partitions on the same disk, take note of
the fact that a change in partition numbering may have moved a few of
your partitions around. You can do a 'disklabel sdX' (where X is a
drive on which you have NetBSD partitions) to see how the partitions are
currently layed out. It is likely that a partition has shifted into the
'sdXd' or 'sdXe' slots, slots that often were not available under
previous releases of NetBSD. If this is the case, you will need to
manually mount your root partition (via 'mount -w /') and edit your
/etc/fstab file to reflect the new partition layout. Unless you are
familiar with 'ex' or 'ed', the easiest way to fix your /etc/fstab file
is probably to simply do a 'cat > /etc/fstab' and type in the corrected
file in its entirety.
- Install the distribution sets. Keep in mind that the NetBSD 1.3
distribution takes up a considerably larger amount of disk space than
did the 1.2 or 1.2.1 distributions. If you are using the Installer,
proceed normally (remember that you will need to mount non-root
partitions by hand using the MiniShell before installing). If you are
installing from within NetBSD, do the following:
cd /
tar --unlink -zxvpf /path/to/base.tgz
It is crucial that you use the '--unlink' flag when invoking tar or you
will fail to correctly overwrite some files. Keep in mind that there is
no going back once you have installed the base set short of a complete
re-install of an earlier distribution. Continue with the appropriate
command line for each of the other sets you wish to install except for
the etc set.
- Now, we will install the new etc tarfile that we prepared in step 4.
If you are in the Installer, quit it and boot into NetBSD in single-user
mode. From there, do the following:
cd /
tar --unlink -zxvpf /path/to/etc.tgz
tar --unlink -zxvpf /path/to/etc-new.tgz
In doing so, you first install the "official" etc file which also
includes some files that go into /var and /dev as well.
Then, you install the /etc files that you edited in step 4
above. Again, by using the --unlink option, we are overwriting
the distribution versions, with your edited copies. If you run into
problems, you can always restore your old /etc files by
doing:
tar --unlink -zxvpf /path/to/etc-old.tgz
Finally, it is a good idea to re-make your devices again for 1.3. To do
this, you should:
cd /dev
sh MAKEDEV all
- A number of binaries have changed their locations from NetBSD 1.2.1 to
NetBSD 1.3 (most of these have moved from /sbin to /usr/sbin). A few
binaries have been removed. It is probably best if you scan the
modification dates of the files in the /sbin directory. If there are
files in the directory which have newer counterparts in the /usr/sbin
directory, it is a very good idea to remove the older files (you will
probably run into difficulties later if you choose not to do this).
You should also check the /sbin, /bin, /usr/bin/, and /usr/sbin
directories for old binaries that are no longer part of the NetBSD
distribution and delete them as well. In general, all the files in a
particular distribution should have similar modification dates, so
looking at these is a good way of determining a file's age.
- Run 'fsck -f' to make sure that your filesystem is still consistent. If
fsck reports any errors, fix them by answering 'y' to its suggested
solutions (note: if there are a large number of errors, you may wish
to stop and run 'fsck -fy' to automatically answer "yes" instead).
- Exit from single-user mode and it should continue to boot into multi-user mode.
At this point you have successfully upgraded to NetBSD 1.3.
Note:This document was originally written by me. Colin Wood reworked and augmented it greatly. With 1.3,
it became a part of the main installation documents. However, I felt
it might be useful to also have it as a separate document. So I have
put it into HTML and provide it here. I have also added a few more
things based on my experiences upgrading my Centris 650 from 1.2E to
1.3. Please read the disclaimer.
Back to my Mark's MacBSD How-To Index.
Last updated, 98-09-19.
URL for this page: http://www2.giganet.net/~mark/NetBSD/howtos/upgrade-howto.html