📄 3.t
字号:
/var/spool/uucp (uucp spooling area)/var/tmp (disk-based temporary directory)/var/users (root of per-machine user home directories).TE.PPThe \*(4B bootstrap routines pass the identity of the boot devicethrough to the kernel.The kernel then uses that device as its root filesystem.Thus, for example, if you boot from.Pn /dev/\*(Dk1a ,the kernel will use.Pn \*(Dk1aas its root filesystem. If.Pn /dev/\*(Dk1bis configured as a swap partition, it will be used as the initial swap area,otherwise the normal primary swap area (\c.Pn /dev/\*(Dk0b )will be used.The \*(4B bootstrap is backward compatible with \*(Ps,so you can replace your old bootstrap if you use itto boot your first \*(4B kernel.However, the \*(Ps bootstrap cannot access \*(4B filesystems,so if you plan to convert your filesystems to \*(4B,you must install a new bootstrap \fIbefore\fP doing the conversion.Note that SPARC users cannot build a \*(4B compatible versionof the bootstrap, so must \fInot\fP convert their root filesystemto the new \*(4B format..PPOnce you have extracted the \*(4B system and booted from it,you will have to build a kernel customized for your configuration.If you have any local device drivers,they will have to be incorporated into the new kernel.See section 4.1.3 and ``Building 4.3BSD UNIX Systems with Config'' (SMM:2)..PPIf converting from \*(Ps, your old filesystems should be converted.If you've modified the partitionsizes from the original \*(Ps ones, and are not already using the\*(4B disk labels, you will have to modify the default disk partitiontables in the kernel. Make the necessary table changes and bootyour custom kernel \fBBEFORE\fP trying to access any of your oldfilesystems! After doing this, if necessary, the remaining filesystemsmay be converted in place by running the \*(4B version of.Xr fsck (8)on each filesystem and allowing it to make the necessary corrections.The new version of.Xr fsckis more strict about the size of directories thanthe version supplied with \*(Ps.Thus the first time that it is run on a \*(Ps filesystem,it will produce messages of the form:.DS\fBDIRECTORY ...: LENGTH\fP xx \fBNOT MULTIPLE OF 512 (ADJUSTED)\fP.DELength ``xx'' will be the size of the directory;it will be expanded to the next multiple of 512 bytes.The new.Xr fsckwill also set default \fIinterleave\fP and\fInpsect\fP (number of physical sectors per track) values on olderfilesystems, in which these fields were unused spares; this correctionwill produce messages of the form:.DS\fBIMPOSSIBLE INTERLEAVE=0 IN SUPERBLOCK (SET TO DEFAULT)\fP\**\fBIMPOSSIBLE NPSECT=0 IN SUPERBLOCK (SET TO DEFAULT)\fP.DE.FSThe defaults are to set \fIinterleave\fP to 1 and\fInpsect\fP to \fInsect\fP.This is correct on most drives;it affects only performance (usually virtually unmeasurably)..FEFilesystems that have had their interleave and npsect valuesset will be diagnosed by the old.Xr fsckas having a bad superblock; the old.Xr fsckwill run only if given an alternate superblock(\fIfsck \-b32\fP),in which case it will re-zero these fields.The \*(4B kernel will internally set these fields to their defaultsif fsck has not done so; again, the \fI\-b32\fP option may benecessary for running the old.Xr fsck ..PPIn addition, \*(4B removes several limits on filesystem sizesthat were present in \*(Ps.The limited filesystemscontinue to work in \*(4B, but should be convertedas soon as it is convenientby running.Xr fsckwith the \fI\-c 2\fP option.The sequence \fIfsck \-p \-c 2\fP will update them all,fix the interleave and npsect fields,fix any incorrect directory lengths,expand maximum uid's and gid's to 32-bits,place symbolic links less than 60 bytes into their inode,and fill in directory type fields all at once.The new filesystem formats are incompatible with older systems.If you wish to continue using these filesystems with the oldersystems you should make only the compatible changes using\fIfsck \-c 1\fP..Sh 2 "Merging your files from \*(Ps into \*(4B".PPWhen your system is booting reliably and you have the \*(4B root and.Pn /usrfilesystems fully installed you will be readyto continue with the next step in the conversion process,merging your old files into the new system..PPIf you saved the files on a.Xr tartape, extract them into a scratch directory, say.Pn /usr/convert :.DS\fB#\fP \fImkdir /usr/convert\fP\fB#\fP \fIcd /usr/convert\fP\fB#\fP \fItar xp\fP.DE.PPThe data files marked in the previous table with a dagger (\(dg)may be used without change from the previous system.Those data files marked with a double dagger (\(dd) have syntax changes or substantial enhancements.You should start with the \*(4B version and carefullyintegrate any local changes into the new file.Usually these local changes can be incorporatedwithout conflict into the new file;some exceptions are noted below.The files marked with an asterisk (*) requireparticular attention and are discussed below..PPAs described in section 3.3,the most immediately obvious change in \*(4B is the reorganizationof the system filesystems.Users of certain recent vendor releases have seen this general organization,although \*(4B takes the reorganization a bit further.The directories most affected are.Pn /etc ,that now contains only system configuration files;.Pn /var ,a new filesystem containing per-system spool and log files; and.Pn /usr/share,that contains most of the text files shareable across architecturessuch as documentation and macros.System administration programs formerly in.Pn /etcare now found in.Pn /sbinand.Pn /usr/sbin .Various programs and data files formerly in.Pn /usr/libare now found in.Pn /usr/libexecand.Pn /usr/libdata ,respectively.Administrative files formerly in.Pn /usr/admare in.Pn /var/accountand, similarly, log files are now in.Pn /var/log .The directory.Pn /usr/ucbhas been merged into.Pn /usr/bin ,and the sources for programs in.Pn /usr/binare in.Pn /usr/src/usr.bin .Other source directories parallel the destination directories;.Pn /usr/src/etchas been greatly expanded, and.Pn /usr/src/shareis new.The source for the manual pages, in general, are with the sourcecode for the applications they document.Manual pages not closely corresponding to an application programare found in.Pn /usr/src/share/man .The locations of all man pages is listed in.Pn /usr/src/share/man/man0/man[1-8] .The manual page.Xr hier (7)has been updated and made more detailed;it is included in the printed documentation.You should review it to familiarize yourself with the new layout..PPA new utility,.Xr mtree (8),is provided to build and check filesystem hierarchieswith the proper contents, owners and permissions.Scripts are provided in.Pn /etc/mtree(and.Pn /usr/src/etc/mtree )for the root,.Pn /usrand.Pn /varfilesystems.Once a filesystem has been made for.Pn /var ,.Xr mtreecan be used to create a directory hierarchy thereor you can simply use tar to extract the prototype fromthe second file of the distribution tape..Sh 3 "Changes in the \f(CW/etc\fP directory".PPThe.Pn /etcdirectory now contains nearly all the host-specific configurationfiles.Note that some file formats have changed,and those configuration files containing pathnames are nearly all affectedby the reorganization.See the examples provided in.Pn /etc(installed from.Pn /usr/src/etc )as a guide.The following table lists some of the local configuration fileswhose locations and/or contents have changed..TSl l llfC lfC l.\*(Ps and Earlier \*(4B Comments_ _ _/etc/fstab /etc/fstab new format; see below/etc/inetd.conf /etc/inetd.conf pathnames of executables changed/etc/printcap /etc/printcap pathnames changed/etc/syslog.conf /etc/syslog.conf pathnames of log files changed/etc/ttys /etc/ttys pathnames of executables changed/etc/passwd /etc/master.passwd new format; see below/usr/lib/sendmail.cf /etc/sendmail.cf changed pathnames/usr/lib/aliases /etc/aliases may contain changed pathnames/etc/*.pid /var/run/*.pid .T&l l llfC lfC l.New in \*(Ps-Tahoe \*(4B Comments_ _ _/usr/games/dm.config /etc/dm.conf configuration for games (see \fIdm\fP\|(8))/etc/zoneinfo/localtime /etc/localtime timezone configuration/etc/zoneinfo /usr/share/zoneinfo timezone configuration.TE.ne 1.5i.TSl l llfC lfC l. New in \*(4B Comments_ _ _ /etc/aliases.db database version of the aliases file /etc/amd-home location database of home directories /etc/amd-vol location database of exported filesystems /etc/changelist \f(CW/etc/security\fP files to back up /etc/csh.cshrc system-wide csh(1) initialization file /etc/csh.login system-wide csh(1) login file /etc/csh.logout system-wide csh(1) logout file /etc/disklabels directory for saving disklabels /etc/exports NFS list of export permissions /etc/ftpwelcome message displayed for ftp users; see ftpd(8) /etc/kerberosIV Kerberos directory; see below /etc/man.conf lists directories searched by \fIman\fP\|(1) /etc/mtree directory for local mtree files; see mtree(8) /etc/netgroup NFS group list used in \f(CW/etc/exports\fP /etc/pwd.db non-secure hashed user data base file /etc/spwd.db secure hashed user data base file /etc/security daily system security checker.TE.PPSystem security changes require adding several new ``well-known'' groups to.Pn /etc/group .The groups that are needed by the system as distributed are:.TSl n l.name number purpose_wheel 0 users allowed superuser privilegedaemon 1 processes that need less than wheel privilegekmem 2 read access to kernel memorysys 3 access to kernel sourcestty 4 access to terminalsoperator 5 read access to raw disksbin 7 group for system binariesnews 8 group for newswsrc 9 write access to sourcesgames 13 access to gamesstaff 20 system staffguest 31 system guestsnobody 39 the least privileged grouputmp 45 access to utmp filesdialer 117 access to remote ports and dialers.TEOnly users in the ``wheel'' group are permitted to.Xr suto ``root''.Most programs that manage directories in.Pn /var/spoolnow run set-group-id to ``daemon'' so that users cannotdirectly access the files in the spool directories.The special files that access kernel memory,.Pn /dev/kmemand.Pn /dev/mem ,are made readable only by group ``kmem''.Standard system programs that require this access aremade set-group-id to that group.The group ``sys'' is intended to control access to kernel sources,and other sources belong to group ``wsrc.''Rather than make user terminals writable by all users,they are now placed in group ``tty'' and made only group writable.Programs that should legitimately have access to write on user terminalssuch as.Xr talkdand.Xr writenow run set-group-id to ``tty''.The ``operator'' group controls access to disks.By default, disks are readable by group ``operator'',so that programs such as.Xr dumpcan access the filesystem information without being set-user-id to ``root''.The.Xr shutdown (8)program is executable only by group operatorand is setuid to root so that members of group operator may shut downthe system without root access..PPThe ownership and modes of some directories have changed.The.Xr atprograms now run set-user-id ``root'' instead of ``daemon.''Also, the uucp directory no longer needs to be publicly writable,as.Xr tipreverts to privileged status to remove its lock files.After copying your version of.Pn /var/spool ,you should do:.DS\fB#\fP \fIchown \-R root /var/spool/at\fP\fB#\fP \fIchown \-R uucp.daemon /var/spool/uucp\fP\fB#\fP \fIchmod \-R o\-w /var/spool/uucp\fP.DE.PPThe format of the cron table,.Pn /etc/crontab ,has been changed to specify the user-id that should be used to run a process.The userid ``nobody'' is frequently useful for non-privileged programs.Local changes are now put in a separate file,.Pn /etc/crontab.local ..PPSome of the commands previously in.Pn /etc/rc.localhave been moved to.Pn /etc/rc ;several new functions are now handled by.Pn /etc/rc ,.Pn /etc/netstartand.Pn /etc/rc.local .You should look closely at the prototype version of these files
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -