.\"	$NetBSD: upgrade,v 1.28 2009/04/23 01:56:48 snj Exp $
.\"
.\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
The upgrade path to
.Nx \*V
documented here is by binary sets.
.Pp
To do the upgrade, you must have the
.Nx
kernel on
.Tn AmigaDOS
and you must transfer the miniroot file system
.Pa miniroot.fs
onto the swap partition of the
.Nx
hard disk.
You must also have at least the
.Sy base
binary distribution set available.
Finally, you must have sufficient disk space available to install the new
binaries.
Since the old binaries are being overwritten in place, you only need
space for the new binaries, which weren't previously on the system.  This is
typically not more than a few megabytes.
.Pp
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
.Nx
partition or on another operating system's partition, before
beginning the upgrade process.
.Pp
To upgrade your system, begin by transferring the miniroot file system
onto the hard disk partition used by
.Nx
for swapping, as described in the "Preparing
your System for
.Nx
Installation" section above.
.Pp
Now boot up
.Nx ,
with bootblocks installed
.(Note
This description is for V40 (OS 3.1) ROMs.
For older ROMs, there might be small differences.
Check your
.Tn AmigaDOS
documentation to learn about the exact procedure.
Booting using bootblocks doesn't work at all on some systems, and may
require a mountable file system on others.
.Note)
.Pp
Reboot your machine, holding down both mouse buttons if you
have a 2-button mouse, the outer mouse buttons if you have
a 3-button mouse.
On the DraCo, press the left mouse button instead,
when the boot screen prompts you for it.
.Pp
From the boot menu, select
.Ic Boot Options .
Select the swap partition with the miniroot, and then
.Ic ok .
Select
.Ic Boot
now.
The machine will boot the bootblock, which will prompt you for a command line.
You have a few seconds to change the default.
Entering an empty line will accept the
default.
.Pp
The bootblock uses command lines of the form:
.br
.Ar \ \ \ \ file Op Ar options
.br
where
.Ar file
is the kernel file name on the partition where the
boot block is on, and
.Ar options
may contain the same as described in the INSTALL section.
.Pp
For installing, use
.Dl Ic "netbsd -b"
.Pp
If you machine has a split memory space, like, e.g., DraCo
machines, use this instead:
.Pp
.Dl Ic "netbsd -bn2"
.Pp
.
.Ss2 Once your kernel boots
.
You should see the screen clear and some information about
your system as the kernel configures the hardware.
Note which hard disk device is configured that contains your root
.Pq Pa /
and swap partitions.
When prompted for the root device, type
.Li sd0b
(replacing
.Sq Li 0
with the disk number that
.Nx
used for
your root/swap device).
When prompted for a dump device, answer
.Sq Ic none
for the upgrade.
(For a normal boot, you would tell it one of the swap devices).
When prompted for the root file system type, confirm
.Sq Ic generic ,
which will auto-detect it.
.Pp
You will be presented with some information about the upgrade
process and a warning message, and will be asked if you wish
to proceed with the upgrade process.
If you answer negatively, the upgrade process will stop, and your disk will
not be modified.
If you answer affirmatively, the upgrade process will begin,
and your disk will be modified.
You may press
.Key CONTROL-C
to stop the upgrade process at any time.
However, if you press it at an inopportune moment, your system
may be left in an inconsistent (and possibly unusable) state.
.Pp
You will now be greeted and reminded of the fact that this is a
potentially dangerous procedure and that you should not upgrade the
.Sy etc
set.
.Pp
When you decide to proceed, you will be prompted to enter your root disk.
After you've done this, it will be checked
automatically to make sure that the file system is in a sane
state before making any modifications.
After this is done, you will be asked if you want to configure your network.
.Pp
You are now allowed to edit your fstab, but normally you don't have to.
Note that the upgrade-kit uses its own copy of the fstab.
Whatever you do here
.Em won't
affect your actual fstab.
After you are satisfied with your fstab, the upgrade-kit will check
all file systems mentioned in it.
When they're ok, they will be mounted.
.Pp
You will now be asked if your sets are stored on a normally
mounted file system.
You should answer
.Sq Ic y
to this question if
you have the sets stored on a file system that was present in the fstab.
The actions you should take for the set extraction
are pretty logical (we think).
.Pp
After you have extracted the sets, the upgrade kit will proceed
with setting the timezone and installing the kernel and bootcode.
This is all exactly the same as described in the installation
section.
.Pp
.Em Your system has now been upgraded to
.Nx \*V .
.Pp
After a new kernel has been copied to your hard disk, your
machine is a complete
.Nx \*V
system.
However, that doesn't mean that you're finished with the upgrade process.
There are several things that you should do, or might have to
do, to insure that the system works properly.
.Pp
You will probably want to get the
.Sy etc
distribution,
extract it, and compare its contents with those in your
.Pa /etc
directory.
You will probably want to replace some of your
system configuration files, or incorporate some of the changes
in the new versions into yours.
.Pp
You will want to delete old binaries that were part
of the version of
.Nx
that you upgraded from and have since
been removed from the
.Nx
distribution.
