upgrade revision 1.3
1 $NetBSD: upgrade,v 1.3 1998/05/09 03:49:31 ross Exp $ 2 3The upgrade to NetBSD _VER is a binary upgrade; it can be quite difficult 4to advance to a later version by recompiling from source due primarily 5to interdepencies in the various components. 6 7To do the upgrade, you must have the appropriate kernel-copy floppy 8image on a disk, and the upgr12.fs floppy image on another. You must 9also have at least the "base12" binary distribution set available, 10so that you can upgrade with it, using one of the upgrade methods 11described above. Finally, you must have sufficient disk space 12available to install the new binaries. Since the old binaries are 13being overwritten in place, you only need space for the new binaries, 14which weren't previously on the system. If you have a few megabytes 15free on each of your root and /usr partitions, you should have enough 16space. 17 18Since upgrading involves replacing the boot blocks on your NetBSD 19partition, the kernel, and most of the system binaries, it has the 20potential to cause data loss. You are strongly advised to BACK UP ANY 21IMPORTANT DATA ON YOUR DISK, whether on the NetBSD partition or on 22another operating system's partition, before beginning the upgrade 23process. 24 25To upgrade your system, follow the following instructions: 26 27 Boot your machine using of the appropriate kernel-copy floppy. 28 29 You will be prompted to insert a file system floppy. Remove 30 the kernel-copy floppy and insert the upgr12 floppy, then hit 31 any key to continue booting. 32 33 While booting, you will probably see several warnings. You 34 should be warned that no swap space is present, and that 35 init(8) cannot find /etc/rc. Do not be alarmed, these are 36 completely normal. When you reach the prompt asking you for a 37 shell name, just hit return. 38 39 You will be presented with some information about the upgrade 40 process and a warning message, and will be asked if you wish 41 to proceed with the upgrade process. If you answer 42 negatively, the upgrade process will stop, and your disk will 43 not be modified. If you answer affirmatively, the upgrade 44 process will begin, and your disk will be modified. You may 45 hit Control-C to stop the upgrade process at any time. 46 However, if you hit it at an inopportune moment, your system 47 may be left in an inconsistent (and possibly unusable) state. 48 49 You will be asked if you wish to upgrade your file systems to 50 the new file system format. If you do, reply affirmatively. 51 If you don't have your file systems upgraded now, you should 52 probably do it manually after the install process is complete, 53 by using "fsck -c 2". Read the fsck(8) manual page for more 54 details. Note that this step is only important when upgrading 55 from a pre-NetBSD 1.0 release. 56 57 The upgrade program will then check your root file system, 58 and, if you approved, will upgrade it to the new file system 59 format. It will then mount your root file system on /mnt. 60 61 If your file systems are being upgraded, the upgrade script 62 will copy the new fsck(8) program to your hard disk and 63 upgrade your remaining file systems. 64 65 The upgrade program will then automatically replace the boot 66 blocks on your disk with newer versions, and mount all of your 67 file systems under /mnt. (In other words, your root partition 68 will be mounted on /mnt, your /usr partition on /mnt/usr, etc.) 69 70 If you don't already have the NetBSD distribution sets on your 71 disk, look in the installation section for information on how 72 to transfer them to your disk. 73 74 If you have only one floppy drive, and don't have the disk 75 space to copy all of the distribution onto the hard drive, you 76 can do the following: 77 78 Install a kernel on the hard drive as detailed a few 79 paragraphs below, then boot off the hard drive. Now 80 you can copy and install distribution sets 81 incrementally from your lone floppy drive. 82 83 Once the distribution sets are transferred to your disk, 84 continue here. (Obviously, if the NetBSD distribution sets 85 are already on your disk, because you've transferred them 86 before starting the upgrade process, you don't need to 87 transfer them again now!) 88 89 After the software has been transferred to the machine (or 90 mounted, in the case of upgrading via NFS), change into the 91 directory containing the "base12" distribution set. Once you 92 are there, run the "Set_tmp_dir" command, and hit return at 93 the prompt to select the default answer for the temporary 94 directory's path name. (It should be the path name of the 95 directory that you're in.) 96 97 Run the command "Extract base12" to upgrade the base 98 distribution. 99 100 Repeat the above two steps for all of the sets you wish to 101 upgrade. (For each, change into the directory containing the 102 set, run "Set_tmp_dir" and accept the default path name, then 103 run the "Extract <setname>" command.) 104 105 If you were previously using the security distribution set, 106 you MUST upgrade to the new version, or you will not be able 107 to log in when the upgrade process is complete. Similarly, if 108 you were not previously using the security set, you must NOT 109 upgrade to the new version. 110 111 When you are done upgrading all of the distribution sets you 112 wish to upgrade, issue the command "Cleanup". It will clean 113 up the installation, by remaking some system databases. When 114 it is complete, you should use "halt" to halt the system. 115 116 When the system is halted, remove the "upgr12" floppy from 117 the floppy drive, and replace it with the NetBSD 1.2 118 kernel-copy floppy that you previously booted from. Reboot 119 with that floppy. 120 121 Once again, you will be prompted to insert a file system 122 floppy. DO NOT replace the kernel-copy floppy, just hit any 123 key. 124 125 Again, While booting, you may see several warnings. You may 126 be warned that no swap space is present, that init(8) cannot 127 find /etc/rc, and that one or more databases with names like 128 "pwd.db" cannot be found. Do not be alarmed, as, again, these 129 are completely normal. Hit return at the prompt asking you 130 for a shell name. 131 132 You will be presented with a shell prompt, at which you should 133 enter the "copy_kernel" command. It will ask you what 134 partition to copy the kernel to, and you should reply with the 135 name of your root partition (e.g. sd0a or wd0a). 136 137 You will be asked if you are sure that you want to copy the 138 kernel. Reply affirmatively, and it will check the file 139 system on your root partition, mount it, and copy the kernel. 140 Once the kernel is copied, you should use "halt" to halt the 141 system. 142 143 Once the system is halted, remove the kernel-copy floppy from 144 the floppy disk drive, and hit any key to reboot. 145 146Your system has now been upgraded to NetBSD 1.2. 147 148 After a new kernel has been copied to your hard disk, your 149 machine is a complete NetBSD 1.2 system. However, that 150 doesn't mean that you're finished with the upgrade process. 151 There are several things that you should do, or might have to 152 do, to insure that the system works properly. 153 154 First, if you did not upgrade your file systems to the new 155 file system format during the upgrade process, and you are 156 upgrading from a pre-1.0 NetBSD, you may want to do so now, 157 with "fsck -c 2". If you are unsure about the process, it's 158 suggested that you read the fsck(8) manual page. 159 160 Second, you will probably want to get the etc12 distribution, 161 extract it, and compare its contents with those in your /etc/ 162 directory. You will probably want to replace some of your 163 system configuration files, or incorporate some of the changes 164 in the new versions into yours. 165 166 Third, you will probably want to update the set of device 167 nodes you have in /dev. If you've changed the contents of 168 /dev by hand, you will need to be careful about this, but if 169 not, you can just cd into /dev, and run the command "sh 170 MAKEDEV all". 171 172 Fourth, you must deal with certain changes in the formats of 173 some of the configuration files. The most notable change is 174 that the "options" given to many of the file systems in 175 /etc/fstab or by hand have changed, and some of the file 176 systems have changed names. *IMPORTANT*: ANY INSTANCES OF "ufs" 177 IN /etc/fstab MUST BE CHANGED TO "ffs". To find out what the 178 new options are, it's suggested that you read the manual page 179 for the file systems' mount commands, for example mount_nfs(8) 180 for NFS. (Note that the information for mounts of type "ffs", 181 i.e. Fast File Systems, are contained in the mount(8) man 182 page.) 183 184 Finally, you will want to delete old binaries that were part 185 of the version of NetBSD that you upgraded from and have since 186 been removed from the NetBSD distribution. If you are 187 upgrading from a pre-1.0 NetBSD, you might also 188 want to recompile any locally-built binaries, to take 189 advantage of the shared libraries. (Note that any new 190 binaries that you build will be dynamically linked, and 191 therefore take advantage of the shared libraries, by default. 192 For information on how to make statically linked binaries, 193 see the cc(1) and ld(1) manual pages.) 194