Home | History | Annotate | Line # | Download | only in mac68k
upgrade revision 1.11
      1  1.11    ross 	$NetBSD: upgrade,v 1.11 1998/05/09 03:49:30 ross Exp $	
      2  1.10   perry 
      3  1.11    ross The upgrade to NetBSD _VER is a binary upgrade; it can be quite difficult
      4  1.11    ross to advance to a later version by recompiling from source due primarily
      5  1.11    ross to interdepencies in the various components.
      6   1.6   ender 
      7   1.7  scottr No automated upgrade procedure exists for upgrading to release _VER for the
      8   1.7  scottr NetBSD/mac68k architecture.  The current procedure is essentially to perform
      9   1.5   ender a new install from scratch.  It is hoped that there will be a good upgrade
     10   1.5   ender procedure for future releases.  Please feel free to volunteer to help
     11   1.5   ender replace these installation tools.
     12   1.5   ender 
     13   1.5   ender The following steps outline the current upgrade procedure.  These steps
     14   1.5   ender should help ease the upgrade process.  Please read these instructions
     15   1.5   ender carefully and completely before proceeding:
     16   1.5   ender 
     17   1.5   ender 1) Since upgrading involves replacing the kernel and most of the system
     18   1.5   ender    binaries, it has the potential to cause data loss.  You are strongly
     19   1.5   ender    advised to BACK UP ANY IMPORTANT DATA ON YOUR DISK, whether on the
     20   1.5   ender    NetBSD partition or on another operating system's partition, before
     21   1.5   ender    beginning the upgrade process.  Although the upgrade should not
     22   1.5   ender    damage your filesystem(s) in any way, you never know what may happen.
     23   1.5   ender 
     24   1.8   ender 2) Download the distribution sets you want from the "mac68k/binary/sets"
     25   1.5   ender    subdirectory of the NetBSD _VER distribution.  You will need the base
     26   1.5   ender    set and the kernel at a minimum.  Be sure to download the files in
     27   1.5   ender    _binary_ mode.  If you will be upgrading from within NetBSD, make sure
     28   1.5   ender    that you place the distribution sets on a filesystem you will be able to
     29   1.5   ender    reach from single-user mode.
     30   1.5   ender 
     31   1.5   ender 3) Install the _VER kernel.  You may either use the Installer utility
     32   1.8   ender    (included in the "installation/misc" subdirectory) or install from
     33   1.8   ender    within NetBSD (the latter is recommended for speed reasons).  If you
     34   1.8   ender    choose the former, proceed as you normally would.  If you choose to
     35   1.8   ender    install from within NetBSD, then boot (or shutdown) into single-user
     36   1.8   ender    mode and do the following:
     37   1.5   ender 
     38   1.5   ender      cd /
     39   1.8   ender      tar -zxvpf /path/to/kern.tgz
     40   1.5   ender 
     41   1.9   ender    There is no need to backup your old kernel explicitly since it will be
     42   1.8   ender    incapable of running many of the newer binaries you are about to
     43   1.8   ender    install (unless, of course, you have a backup copy of your older
     44   1.9   ender    binaries and want to revert to them for some reason).  However, you
     45   1.9   ender    might want to keep a backup if you are upgrading from within NetBSD just
     46   1.9   ender    in case the newer kernel has trouble booting your machine. 
     47   1.5   ender 
     48   1.5   ender 4) If you are installing using the Installer, skip to step 5.  Otherwise,
     49   1.5   ender    reboot into NetBSD in single-user mode.  Run 'fsck -f' and then mount all
     50   1.5   ender    local partitions read/write.  Usually 'mount -a -t nonfs' should do the
     51   1.5   ender    trick, but if you have several partitions on the same disk, take note of
     52   1.5   ender    the fact that a change in partition numbering may have moved a few of
     53   1.5   ender    your partitions around.  You can do a 'disklabel sdX' (where X is a
     54   1.5   ender    drive on which you have NetBSD partitions) to see how the partitions are
     55   1.9   ender    currently layed out.  It is likely that a partition has shifted into the
     56   1.9   ender    'sdXd' or 'sdXe' slots, slots that often were not available under
     57   1.9   ender    previous releases of NetBSD.  If this is the case, you will need to
     58   1.9   ender    manually mount your root partition  (via 'mount -w /') and edit your
     59   1.9   ender    /etc/fstab file to reflect the new partition layout.  Unless you are
     60   1.9   ender    familiar with 'ex' or 'ed', the easiest way to fix your /etc/fstab file
     61   1.9   ender    is probably to simply do a 'cat > /etc/fstab' and type in the corrected
     62   1.9   ender    file in its entirety.
     63   1.5   ender 
     64   1.5   ender 5) Install the distribution sets.  Keep in mind that the NetBSD _VER
     65   1.8   ender    distribution takes up a considerably larger amount of disk space than
     66   1.8   ender    did the 1.2 or 1.2.1 distributions.  If you are using the Installer,
     67   1.8   ender    proceed normally (remember that you will need to mount non-root
     68   1.8   ender    partitions by hand using the MiniShell before installing).  If you are
     69   1.8   ender    installing from within NetBSD, do the following:
     70   1.5   ender 
     71   1.5   ender      cd /
     72   1.8   ender      tar --unlink -zxvpf /path/to/base.tgz
     73   1.5   ender 
     74   1.5   ender    It is crucial that you use the '--unlink' flag when invoking tar or you
     75   1.5   ender    will fail to correctly overwrite some files.  Keep in mind that there is
     76   1.5   ender    no going back once you have installed the base set short of a complete
     77   1.8   ender    re-install of an earlier distribution.  Continue with the appropriate
     78   1.8   ender    command line for each of the other sets you wish to install except for
     79   1.8   ender    the etc set.  If you are in the Installer, open up the Minishell and do
     80   1.8   ender    the following:
     81   1.5   ender 
     82   1.5   ender      cd /tmp
     83   1.5   ender      exit
     84   1.5   ender 
     85   1.9   ender    Ignore the warning message this will cause.  Now, use the Installer to
     86   1.9   ender    install the etc set (it will install into /tmp instead of the /etc
     87   1.9   ender    directory). 
     88   1.5   ender 
     89   1.5   ender    If you are in NetBSD, do the following instead:
     90   1.5   ender 
     91   1.5   ender      cd /tmp
     92   1.8   ender      tar --unlink -zxvpf /path/to/etc.tgz
     93   1.5   ender 
     94   1.5   ender 6) If you are in the Installer, quit it and boot into NetBSD in single-user
     95   1.5   ender    mode.  From there, 'cd' to the /tmp/etc directory and compare each file
     96   1.5   ender    there with your old files in /etc.  You will probably want to replace
     97   1.5   ender    some of your system configuration files, or incorporate some of the
     98   1.5   ender    changes in the new versions into yours.  You should take note of the
     99   1.8   ender    following when upgrading to the NetBSD _VER etc.tgz set:
    100   1.5   ender 
    101   1.5   ender    * The first file to pay attention to is /etc/rc.conf.  This file did not
    102   1.5   ender    exist under NetBSD 1.2, but it is used to configure the rc scripts
    103   1.8   ender    under NetBSD _VER.  Edit the file to your preferences, making sure
    104   1.8   ender    that you change the line that says:
    105   1.5   ender 
    106   1.5   ender      rc_configured=NO
    107   1.5   ender 
    108   1.5   ender    to read:
    109   1.5   ender 
    110   1.5   ender      rc_configured=YES
    111   1.5   ender 
    112   1.5   ender    This will enable all of the options you have configured in /etc/rc.conf.
    113   1.5   ender 
    114   1.5   ender    * The next important item to take note of is the new networking
    115   1.5   ender    configuration files.  If you currently have an /etc/hostname.xxN file
    116   1.8   ender    (fill in the xx with either ae or sn and the X with a number), you will
    117   1.8   ender    need to convert it into an ifconfig.xxN file before networking
    118   1.8   ender    automatically works.  The format for the new file is simply the
    119   1.8   ender    arguments which you would give to ifconfig on the command line.  The
    120   1.8   ender    following is an example of the minimal ifconfig.xxN file:
    121   1.5   ender 
    122   1.5   ender      inet hostname.domain.dom netmask 0xffffff00
    123   1.5   ender 
    124   1.5   ender    Read the ifconfig(8) man page for more details on arguments to ifconfig.
    125   1.5   ender    Be sure to set
    126   1.5   ender 
    127   1.5   ender      auto_ifconfig=YES
    128   1.5   ender 
    129   1.5   ender    in /etc/rc.conf to ensure that your network interfaces will be brought
    130   1.5   ender    up automatically on boot.
    131   1.5   ender 
    132   1.9   ender    * Several of the options given to many of the file systems have changed,
    133   1.5   ender    and some of the file systems have changed names.  IT IS IMPERATIVE THAT
    134   1.5   ender    YOU CHANGE ANY INSTANCES OF "ufs" IN /etc/fstab TO "ffs".  To find out
    135   1.5   ender    more about different filesystem options, read the man page for the
    136   1.9   ender    associated mount command (e.g. mount_mfs(8) for MFS filesystems; note:
    137   1.5   ender    FFS type filesystems are documented in the mount(8) man page).  If you
    138   1.5   ender    have not already done so, you may also need to correct /etc/fstab for
    139   1.5   ender    a shift in the partition numbering scheme.  See step (4) above for more
    140   1.5   ender    details.
    141   1.5   ender 
    142   1.5   ender    * You will also probably want to upgrade your device nodes at this time
    143   1.5   ender    as well.  Make sure you have installed the latest MAKEDEV script (it
    144   1.5   ender    should be included in the etc set) and perform the following commands:
    145   1.5   ender 
    146   1.5   ender      cd /dev
    147   1.5   ender      sh MAKEDEV all
    148   1.5   ender 
    149   1.5   ender 
    150   1.5   ender 7) A number of binaries have changed their locations from NetBSD 1.2.1 to
    151   1.5   ender    NetBSD _VER (most of these have moved from /sbin to /usr/sbin).  A few
    152   1.5   ender    binaries have been removed.  It is probably best if you scan the
    153   1.5   ender    modification dates of the files in the /sbin directory.  If there are
    154   1.5   ender    files in the directory which have newer counterparts in the /usr/sbin
    155   1.5   ender    directory, it is a very good idea to remove the older files (you will
    156   1.5   ender    probably run into difficulties later if you choose not to do this). 
    157   1.5   ender    You should also check the /sbin, /bin, /usr/bin/, and /usr/sbin
    158   1.5   ender    directories for old binaries that are no longer part of the NetBSD
    159   1.5   ender    distribution and delete them as well.  In general, all the files in a
    160   1.5   ender    particular distribution should have similar modification dates, so
    161   1.5   ender    looking at these is a good way of determining a file's age.
    162   1.5   ender 
    163   1.5   ender 8) Run 'fsck -f' to make sure that your filesystem is still consistent.  If
    164   1.5   ender    fsck reports any errors, fix them by answering 'y' to its suggested
    165   1.5   ender    solutions (note: if there are a large number of errors, you may wish
    166   1.5   ender    to stop and run 'fsck -fy' to automatically answer "yes" instead).
    167   1.5   ender 
    168   1.5   ender 9) Exit from single-user mode and it should continue to boot into
    169   1.5   ender    multi-user mode.
    170   1.5   ender 
    171   1.5   ender At this point you have successfully upgraded to NetBSD _VER.
    172