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