📄 3.t
字号:
.\" Copyright (c) 1980, 1986, 1988, 1993.\" The Regents of the University of California. 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..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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..\".\" @(#)3.t 8.1 (Berkeley) 7/27/93.\".ds lq ``.ds rq ''.ds RH "Upgrading a \*(Ps System.ds CF \*(Dy.Sh 1 "Upgrading a \*(Ps system".PPThis section describes the procedure for upgrading a \*(Pssystem to \*(4B. This procedure may vary according to the version ofthe system running before conversion.If you are converting from aSystem V system, some of this section will still apply (in particular,the filesystem conversion). However, many of the system configurationfiles are different, and the executable file formats are completelyincompatible..PPIn particular be wary when using this information to upgradea \*(Ps HP300 system.There are at least four different versions of ``\*(Ps'' out there:.IP 1)HPBSD 1.x from Utah..brThis was the original version of \*(Ps for HP300s from which theother variants (and \*(4B) are derived.It is largely a \*(Ps system with Sun's NFS 3.0 filesystem code andsome \*(Ps-Tahoe features (e.g. networking code).Since the filesystem code is 4.2/4.3 vintage and the filesystemhierarchy is largely \*(Ps, most of this section should apply..IP 2)MORE/bsd from Mt. Xinu..brThis is a \*(Ps-Tahoe vintage system with Sun's NFS 4.0 filesystem codeupgraded with Tahoe UFS features.The instructions for \*(Ps-Tahoe should largely apply..IP 3)\*(Ps-Reno from CSRG..brAt least one site bootstrapped HP300 support from the Reno distribution.The Reno filesystem code was somewhere between \*(Ps and \*(4B: the VFS switchhad been added but many of the UFS features (e.g. ``inline'' symlinks)were missing.The filesystem hierarchy reorganization first appeared in this release.Be extremely careful following these instructions if you areupgrading from the Reno distribution..IP 4)HPBSD 2.0 from Utah..brAs if things were not bad enough already,this release has the \*(4B filesystem and networking codeas well as some utilities, but still has a \*(Ps hierarchy.No filesystem conversions are necessary for this upgrade,but files will still need to be moved around..Sh 2 "Installation overview".PPIf you are running \*(Ps, upgrading your systeminvolves replacing your kernel and system utilities.In general, there are three possible ways to install a new \*(Bs distribution:(1) boot directly from the distribution tape, use it to load new binariesonto empty disks, and then merge or restore any existing configuration filesand filesystems;(2) use an existing \*(Ps or later system to extract the root and.Pn /usrfilesystems from the distribution tape,boot from the new system, then merge or restore existingconfiguration files and filesystems; or(3) extract the sources from the distribution tape onto an existing system,and use that system to cross-compile and install \*(4B.For this release, the second alternative is strongly advised,with the third alternative reserved as a last resort.In general, older binaries will continue to run under \*(4B,but there are many exceptions that are on the critical pathfor getting the system running.Ideally, the new system binaries (root and.Pn /usrfilesystems) should be installed on spare disk partitions,then site-specific files should be merged into them.Once the new system is up and fully merged, the previous root and.Pn /usrfilesystems can be reused.Other existing filesystems can be retained and used,except that (as usual) the new.Xr fsckshould be run before they are mounted..PPIt is \fBSTRONGLY\fP advised that you make full dumps of each filesystembefore beginning, especially any that you intend to modify in placeduring the merge.It is also desirable to run filesystem checksof all filesystems to be converted to \*(4B before shutting down.This is an excellent time to review your disk configurationfor possible tuning of the layout.Most systems will need to provide a new filesystem for system usemounted on.Pn /var(see below).However, the.Pn /tmpfilesystem can be an MFS virtual-memory-resident filesystem,potentially freeing an existing disk partition.(Additional swap space may be desirable as a consequence.)See.Xr mount_mfs (8)..PPThe recommended installation procedure includes the following steps.The order of these steps will probably vary according to local needs..IP \(buExtract root and.Pn /usrfilesystems from the distribution tapes..IP \(buExtract kernel and/or user-level sources from the distribution tapeif space permits.This can serve as the backup documentation as needed..IP \(buConfigure and boot a kernel for the local system.This can be delayed if the generic kernel from the distributionsupports enough hardware to proceed..IP \(buBuild a skeletal.Pn /varfilesystem (see.Xr mtree (8))..IP \(buMerge site-dependent configuration files from.Pn /etcand.Pn /usr/libinto the new.Pn /etcdirectory.Note that many file formats and contents have changed; see section 3.4of this document..IP \(buCopy or merge files from.Pn /usr/adm ,.Pn /usr/spool ,.Pn /usr/preserve ,.Pn /usr/lib ,and other locations into.Pn /var ..IP \(buMerge local macros, dictionaries, etc. into.Pn /usr/share ..IP \(buMerge and update local software to reflect the system changes..IP \(buTake off the rest of the morning, you've earned it!.PPSection 3.2 lists the files to be saved as part of the conversion process.Section 3.3 describes the bootstrap process.Section 3.4 discusses the merger of the saved files back into the new system.Section 3.5 gives an overview of the majorbug fixes and changes between \*(Ps and \*(4B.Section 3.6 provides general hints on possible problems to beaware of when converting from \*(Ps to \*(4B..Sh 2 "Files to save".PPThe following list enumerates the standard set of files you will want tosave and suggests directories in which site-specific files should be present.This list will likely be augmented with non-standard files youhave added to your system.If you do not have enough space to create parallelfilesystems, you should create a.Xr tarimage of the following files before the new filesystems are created.The rest of this subsection describes where theses fileshave moved and how they have changed..TSlfC c l./.cshrc \(dg root csh startup script (moves to \f(CW/root/.cshrc\fP)/.login \(dg root csh login script (moves to \f(CW/root/.login\fP)/.profile \(dg root sh startup script (moves to \f(CW/root/.profile\fP)/.rhosts \(dg for trusted machines and users (moves to \f(CW/root/.rhosts\fP)/etc/disktab \(dd in case you changed disk partition sizes/etc/fstab * disk configuration data/etc/ftpusers \(dg for local additions/etc/gettytab \(dd getty database/etc/group * group data base/etc/hosts \(dg for local host information/etc/hosts.equiv \(dg for local host equivalence information/etc/hosts.lpd \(dg printer access file/etc/inetd.conf * Internet services configuration data/etc/named* \(dg named configuration files/etc/netstart \(dg network initialization/etc/networks \(dg for local network information/etc/passwd * user data base/etc/printcap * line printer database/etc/protocols \(dd in case you added any local protocols/etc/rc * for any local additions/etc/rc.local * site specific system startup commands/etc/remote \(dg auto-dialer configuration/etc/services \(dd for local additions/etc/shells \(dd list of valid shells/etc/syslog.conf * system logger configuration/etc/securettys * merged into ttys/etc/ttys * terminal line configuration data/etc/ttytype * merged into ttys/etc/termcap \(dd for any local entries that may have been added/lib \(dd for any locally developed language processors/usr/dict/* \(dd for local additions to words and papers/usr/include/* \(dd for local additions/usr/lib/aliases * mail forwarding data base (moves to \f(CW/etc/aliases\fP)/usr/lib/crontab * cron daemon data base (moves to \f(CW/etc/crontab\fP)/usr/lib/crontab.local * local cron daemon data base (moves to \f(CW/etc/crontab.local\fP)/usr/lib/lib*.a \(dg for local libraries/usr/lib/mail.rc \(dg system-wide mail(1) initialization (moves to \f(CW/etc/mail.rc\fP)/usr/lib/sendmail.cf * sendmail configuration (moves to \f(CW/etc/sendmail.cf\fP)/usr/lib/tmac/* \(dd for locally developed troff/nroff macros (moves to \f(CW/usr/share/tmac/*\fP)/usr/lib/uucp/* \(dg for local uucp configuration files/usr/man/manl * for manual pages for locally developed programs (moves to \f(CW/usr/local/man\fP)/usr/spool/* \(dg for current mail, news, uucp files, etc. (moves to \f(CW/var/spool\fP)/usr/src/local \(dg for source for locally developed programs/sys/conf/HOST \(dg configuration file for your machine (moves to \f(CW/sys/<arch>/conf\fP)/sys/conf/files.HOST \(dg list of special files in your kernel (moves to \f(CW/sys/<arch>/conf\fP)/*/quotas * filesystem quota files (moves to \f(CW/*/quotas.user\fP).TE.DS\(dg\|Files that can be used from \*(Ps without change.\(dd\|Files that need local changes merged into \*(4B files.*\|Files that require special work to merge and are discussed in section 3.4..DE.Sh 2 "Installing \*(4B".PPThe next step is to build a working \*(4B system.This can be done by following the steps in section 2 ofthis document for extracting the root and.Pn /usrfilesystems from the distribution tape onto unused disk partitions.For the SPARC, the root filesystem dump on the tape could also beextracted directly.For the HP300 and DECstation, the raw disk image can be copiedinto an unused partition and this partition can then be dumpedto create an image that can be restored.The exact procedure chosen will depend on the disk configurationand the number of suitable disk partitions that may be used.It is also desirable to run filesystem checksof all filesystems to be converted to \*(4B before shutting down.In any case, this is an excellent time to review your disk configurationfor possible tuning of the layout.Section 2.5 and.Xr config (8)are required reading..LPThe filesystem in \*(4B has been reorganized in an effort tomeet several goals:.IP 1)The root filesystem should be small..IP 2)There should be a per-architecture centrally-shareable read-only.Pn /usrfilesystem..IP 3)Variable per-machine directories should be concentrated belowa single mount point named.Pn /var ..IP 4)Site-wide machine independent shareable text files should be separatedfrom architecture specific binary files and should be concentrated belowa single mount point named.Pn /usr/share ..LPThese goals are realized with the following general layouts.The reorganized root filesystem has the following directories:.TSlfC l./etc (config files)/bin (user binaries needed when single-user)/sbin (root binaries needed when single-user)/local (locally added binaries used only by this machine)/tmp (mount point for memory based filesystem)/dev (local devices)/home (mount point for AMD)/var (mount point for per-machine variable directories)/usr (mount point for multiuser binaries and files).TE.LPThe reorganized.Pn /usrfilesystem has the following directories:.TSlfC l./usr/bin (user binaries)/usr/contrib (software contributed to \*(4B)/usr/games (binaries for games, score files in \f(CW/var\fP)/usr/include (standard include files)/usr/lib (lib*.a from old \f(CW/usr/lib\fP)/usr/libdata (databases from old \f(CW/usr/lib\fP)/usr/libexec (executables from old \f(CW/usr/lib\fP)/usr/local (locally added binaries used site-wide)/usr/old (deprecated binaries)/usr/sbin (root binaries)/usr/share (mount point for site-wide shared text)/usr/src (mount point for sources).TE.LPThe reorganized.Pn /usr/sharefilesystem has the following directories:.TSlfC l./usr/share/calendar (various useful calendar files)/usr/share/dict (dictionaries)/usr/share/doc (\*(4B manual sources)/usr/share/games (games text files)/usr/share/groff_font (groff font information)/usr/share/man (typeset manual pages)/usr/share/misc (dumping ground for random text files)/usr/share/mk (templates for \*(4B makefiles)/usr/share/skel (template user home directory files)/usr/share/tmac (various groff macro packages)/usr/share/zoneinfo (information on time zones).TE.LPThe reorganized.Pn /varfilesystem has the following directories:.TSlfC l./var/account (accounting files, formerly \f(CW/usr/adm\fP)/var/at (\fIat\fP\|(1) spooling area)/var/backups (backups of system files)/var/crash (crash dumps)/var/db (system-wide databases, e.g. tags)/var/games (score files)/var/log (log files)/var/mail (users mail)/var/obj (hierarchy to build \f(CW/usr/src\fP)/var/preserve (preserve area for vi)/var/quotas (directory to store quota files)/var/run (directory to store *.pid files)/var/rwho (rwho databases)/var/spool/ftp (home directory for anonymous ftp)/var/spool/mqueue (sendmail spooling directory)/var/spool/news (news spooling area)/var/spool/output (printer spooling area)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -