Annotation of wikisrc/guide/upgrading.mdwn, revision 1.3

1.1       jdf         1: # Upgrading NetBSD
                      2: 
                      3: This chapter describes the binary upgrade of a NetBSD system. There are a
                      4: variety of alternatives to perform this procedure, and the following sections
                      5: will guide you through them.
                      6: 
                      7: ## Using sysinst
                      8: 
                      9: ### Overview
                     10: 
                     11: To do the upgrade, you must have some form of bootable media (CD-ROM, USB
                     12: drive, network, etc.) available and at least the base and kern distribution
                     13: sets. Since files already installed on the system are overwritten in place,
                     14: you only need additional free space for files which weren't previously
                     15: installed or to account for growth of the sets between releases. Usually this
                     16: is not more than a few megabytes.
                     17: 
                     18: ### Note
                     19: 
                     20: Since upgrading involves replacing the kernel, boot blocks, and most of the
                     21: system binaries, it has the potential to cause data loss. Before beginning,
                     22: you are strongly advised to back up any important data on the NetBSD partition
                     23: or on any other partitions on your disk, most importantly `/etc`.
                     24: 
                     25: The upgrade procedure is similar to an installation, but without the hard disk
                     26: partitioning. sysinst will attempt to merge the settings stored in your `/etc`
                     27: directory with the new version of NetBSD. Also, file systems are checked
                     28: before unpacking the sets. Fetching the binary sets is done in the same manner
                     29: as in the installation procedure.
                     30: 
                     31: ### The INSTALL document
                     32: 
                     33: Before doing an upgrade it is essential to read the release information and
                     34: upgrading notes in one of the `INSTALL` files: this is the official
                     35: description of the upgrade procedure, with platform specific information and
                     36: important details. It can be found in the root directory of the NetBSD release
                     37: (on the install CD or on the FTP server).
                     38: 
                     39: It is advisable to print the INSTALL document out. It is available in four
                     40: formats: `.txt`, `.ps`, `.more`, and `.html`.
                     41: 
                     42: ### Performing the upgrade
                     43: 
                     44: The following section provides an overview of the binary upgrade process. Most
                     45: of the following sysinst dialogs are similar to those of the installation
                     46: process. More verbose descriptions and explanations of the dialogs are
                     47: available in [[Example installation|guide/exinst]].
                     48: 
                     49: After selecting the installation language and the keyboard type, the main menu
                     50: appears. Choosing option `b: Upgrade NetBSD on a hard disk` will start the the
                     51: upgrade process.
                     52: 
1.3     ! jdf        53: ![Starting the upgrade](/guide/images/upgrading_main.png)  
        !            54: **Starting the upgrade**
1.1       jdf        55: 
                     56: This dialog will request permission to continue with the upgrade. At this point
                     57: nothing has been changed yet and the upgrade can still be cancelled. This is a
                     58: good time to ask yourself whether you have made a backup, and if you know for
                     59: certain that you will be able to restore from it.
                     60: 
1.3     ! jdf        61: ![Continuing the upgrade](/guide/images/upgrading_confirm.png)  
1.2       jdf        62: **Continuing the upgrade**
1.1       jdf        63: 
                     64: After choosing to continue with `Yes`, the next dialog will ask you to specify
                     65: the hard disk with the NetBSD system that shall be upgraded. If more than one
                     66: disk is available a list of the disks will be displayed.
                     67: 
1.3     ! jdf        68: ![Choosing the hard drive](/guide/images/upgrading_select-disc.png)  
1.2       jdf        69: **Choosing the hard drive**
1.1       jdf        70: 
                     71: The system used for the example has only one hard disk available: `wd0`.
                     72: 
                     73: The following dialog provides a menu to choose the installation type. The
                     74: choices are `Full installation`, `Minimal installation`, or `Custom
                     75: installation`.
                     76: 
1.3     ! jdf        77: ![Choosing the distribution filesets](/guide/images/install_install-type.png)  
1.2       jdf        78: **Choosing the distribution filesets**
1.1       jdf        79: 
                     80: At this point, sysinst will perform a check of the file system to ensure its
                     81: integrity.
                     82: 
1.3     ! jdf        83: ![File system check](/guide/images/upgrading_fsck.png)  
1.2       jdf        84: **File system check**
1.1       jdf        85: 
                     86: The next step is to choose which type of bootblocks to install.
                     87: 
1.3     ! jdf        88: ![Choosing bootblocks](/guide/images/install_bootblocks.png)  
1.2       jdf        89: **Choosing bootblicks**
1.1       jdf        90: 
                     91: The next dialog will ask how much information should be displayed during the
                     92: extraction of the distribution sets.
                     93: 
1.3     ! jdf        94: ![Upgrade process - verbosity level](/guide/images/install_verbosity.png)  
1.2       jdf        95: **Upgrade process - verbosity level**
1.1       jdf        96: 
                     97: The following dialog asks for the install method of choice and provides a list
                     98: of possible options. The install medium contains the new NetBSD distribution
                     99: sets. You will be prompted for different information depending on which option
                    100: you choose. For example, a CD-ROM or DVD install requires you to specify which
                    101: device to use and which directory the sets are in, while an FTP install
                    102: requires you to configure your network and specify the hostname of an FTP
                    103: server. More details can be found in
                    104: [[Choosing the installation media|guide/exinst#choosing_the_installation_media]].
                    105: 
1.3     ! jdf       106: ![Install medium](/guide/images/install_medium.png)  
1.2       jdf       107: **Install medium**
1.1       jdf       108: 
                    109: sysinst will now unpack the distribution sets, replacing your old binaries.
                    110: After unpacking these sets, it runs the postinstall script to clean up various
                    111: things. If no problems occur, you are done. If postinstall produces errors, you
                    112: will have to manually resolve the issues it brings up. See postinstall's man
                    113: page for more information. You should also read the remarks in `INSTALL` about
                    114: upgrading, as specific compatibility issues are documented there.
                    115: 
1.3     ! jdf       116: ![Upgrade complete](/guide/images/upgrading_complete.png)  
1.2       jdf       117: **Upgrade complete**
1.1       jdf       118: 
                    119: When you are back at the main menu, remove the boot medium (if applicable) and
                    120: reboot. Have fun with your new version of NetBSD!
                    121: 
                    122: ## Using sysupgrade
                    123: 
                    124: The sysupgrade utility (currently found in `pkgsrc/sysutils/sysupgrade`) allows
                    125: you to upgrade a running system to a newer binary release.
                    126: 
                    127: ### Note
                    128: 
                    129: Please be aware that, as of August 2012, sysupgrade is a farily new tool and is
                    130: still undergoing field testing. Use with care. In particular, upgrades across
                    131: major binary releases might not work properly yet because of the lack of a
                    132: reboot between the kernel installation and the unpacking of the sets. That said,
                    133: you may find this tool very convenient to track NetBSD-current or stable NetBSD
                    134: branches.
                    135: 
                    136: One of the benefits of sysupgrade is that it is an integrated and
                    137: almost-unattended solution: the tool fetches the new kernel and distribution
                    138: sets from remote sites if you desire and performs the upgrade without user
                    139: intervention until new changes to the configuration files need to be merged.
                    140: 
                    141: Let's assume you are running NetBSD/amd64 6.0 and you wish to upgrade to NetBSD
                    142: 6.1. The procedure to do so would be to run the following command:
                    143: 
                    144:     # sysupgrade auto ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.1/amd64
                    145:       
                    146: 
                    147: And that's all that it takes. This will proceed to download the kernel and
                    148: sets appropriate for your machine, unpack them and assist you in merging new
                    149: configuration changes. Do not forget to reboot afterwards.
                    150: 
                    151: For more details, please see the included sysupgrade(8) manual page and the
                    152: `/usr/pkg/etc/sysupgrade.conf` configuration file.
                    153: 

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb