⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻
📖 第 1 页 / 共 2 页
字号:
.TLSetting UpUnix\- Seventh Edition.AUCharles B. HaleyDennis M. Ritchie.AI.MH.PPThe distribution tape can be used only on a DEC PDP11/45or PDP11/70 with RP03, RP04, RP05, RP06 disks and witha TU10, TU16, or TE16 tape drive.It consists of some preliminary bootstrapping programs followed bytwo file system images;if needed, after the initial construction of the file systemsindividual files can be extracted. (See restor(1)).PPIf you are set up to do it,it might be a good idea immediately to make a copy of thetape to guard against disaster.The tape is 9-track 800 BPI and contains some 512-byte recordsfollowed by many 10240-byte records.There are interspersed tapemarks..PPThe system as distributed contains binary imagesof the system and all the user level programs, along with sourceand manual sections for them\(emabout2100 files altogether.The binary images,along with otherthings needed to flesh out the file system enough so UNIX will run,are to be put on one file system called the `root file system'.The file system size required is about 5000 blocks.The file second system has all of the source and documentation.Altogether it amounts to more than 18,000 512-byte blocks..SHMaking a Disk From Tape.PPPerform the following bootstrap procedure to obtaina disk with a root file system on it..IP 1.Mount the magtape on drive 0 at load point..IP 2.Mount a formatted disk pack on drive 0..IP 3.Key in and execute at 100000.RT.DS  TU10			  TU16/TE16012700			Use the DEC ROM or other172526			means to load block 1010040			(i.e. second block) at 800 BPI012740			into location 0 and transfer060003			to 0.000777.DE.IPThe tape should move and the CPU loop.(The TU10 code is.Inot.Rthe DEC bulk ROM for tape;it reads block 0, not block 1.).IP 4.If you used the above TU10 code, halt and restart theCPU at 0, otherwise continue to the next step..IP 5.The console should type.DS.IBoot:.R.DECopy the magtape to disk by the following procedure.The machine's printouts are shown in italic,explanatory comments are within ( ).Terminate each line you type by carriage return or line-feed.There are two classes of tape drives:the name `tm' is used for the TU10, and `ht' is used forthe TU16 or TE16.There are also two classes of disks:`rp' is used for the RP03, and `hp' is used for theRP04/5/6..PPIf you should make a mistake while typing, the character '#'erases the last character typed up to the beginning of the line,and the character '@' erases the entire line typed.Some consoles cannot print lower case letters, adjust theinstructions accordingly..DS(bring in the program mkfs)\fI:\|\fRtm(0,3)		(use `ht(0,3)' for the TU16/TE16)\fIfile system size:\fR 5000\fIfile system:\fR rp(0,0)		(use `hp(0,0)' for RP04/5/6).Iisize = XXm/n = XX.R(after a while).Iexit calledBoot:.R.DEThis step makes an empty file system..IP 6.The next thing to do is to restore the dataonto the new empty file system. To do this you respond tothe `\fI:\fR' printed in the last step with.DS(bring in the program restor)\fI:\|\fRtm(0,4)		(`ht(0,4)' for TU16/TE16)\fItape?\fR tm(0,5)	(use `ht(0,5)' for TU16/TE16)\fIdisk?\fR rp(0,0)		(use `hp(0,0)' for RP04/5/6)\fILast chance before scribbling on disk.\fR (you type return)(the tape moves, perhaps 5-10 minutes pass)\fIend of tape\fR.IBoot:.R.DEYou now have a UNIX root file system..SHBooting UNIX.PPYou probably havethe bootstrap running, left over from the last step above;if not,repeat the boot process (step 3) again.Then use one of the following:.DS\fI:\|\fRrp(0,0)rptmunix		(for RP03 and TU10)\fI:\|\fRrp(0,0)rphtunix		(for RP03 and TU16/TE16)\fI:\|\fRhp(0,0)hptmunix		(for RP04/5/6 and TU10)\fI:\|\fRhp(0,0)hphtunix		(for RP04/5/6 and TU16/TE16).DEThe machine should type the following:.DS.Imem = xxx#.R.DEThe.Imem.Rmessage gives the memory available to user programsin bytes..PPUNIX is now running,and the `UNIX Programmer's manual' applies;references below of the form X(Y) mean the subsection namedX in section Y of the manual.The `#' is the prompt from the Shell,and indicates you are the super-user.The user name of the super-user is `root'if you should find yourself in multi-user mode andneed to log in;the password is also `root'..PPTo simplify your life later, rename the appropriate versionof the system as specified above plain `unix.'For example, use mv (1) as follows if you have an RP04/5/6 anda TU16 tape:.DSmv hphtunix unix.DEIn the future, when you reboot,you can type just.DShp(0,0)unix.DEto the `:' prompt.(Choose appropriately among `hp', `rp', `ht', `tm'according to your configuration)..PPYou now need to make some special file entriesin the dev directory. These specify what sort of disk youare running on, what sort of tape drive you have,and where the file systems are. For simplicity, this recipe creates fixed device names.These names will be used below, and some of them are built intovarious programs, so they are most convenient.However, the names do not always represent the actual major andminor device in the manner suggested in section 4 of theProgrammer's Manual.For example, `rp3' will be used for the name of the file systemon which the user file system is put, even though it might be on an RP06and is not logical device 3.Also, this sequence will put the user file system on the samedisk drive as the root, which is not the best placeif you have more than one drive.Thus the prescription below should be taken only as one exampleof where to put things.See also the section on `Disk layout' below..PPIn any event, change to the dev directory (cd(1)) and, if you like,examine and perhaps change the makefile there (make (1))..DScd /devcat makefile.DEThen, use one of.DSmake rp03make rp04make rp05make rp06.DEdepending on which disk you have.Then, use one of.DSmake tmmake ht.DEdepending on which tape you have.The file `rp0' refers to the root file system;`swap' to the swap-space file system; `rp3' to theuser file system.The devices `rrp0' and `rrp3' are the `raw' versionsof the disks.Also, `mt0' is tape drive 0, at 800 BPI;`rmt0' is the raw tape, on which large records can be readand written;`nrmt0' is raw tape with the quirk that it does not rewindon close, which is a subterfuge that permitsmultifile tapes to be handled..PPThe next thing to do is to extract the rest of the data fromthe tape.Comments are enclosed in ( ); don't type these.The number in the first command is thesize of the file system;it differs between RP03, RP04/5, and RP06..DS/etc/mkfs /dev/rp3 74000	(153406 if on RP04/5, 322278 on RP06)(The above command takes about 2-3 minutes on an RP03)dd if=/dev/nrmt0 of=/dev/null bs=20b files=6	(skip 6 files on the tape)restor rf /dev/rmt0 /dev/rp3	(restore the file system)(Reply with a `return' (CR) to the `Last chance' message)(The restor takes about 20-30 minutes).DEAll of the data on the tape has been extracted..PPYou may at this point mount the sourcefile system (mount(1)). To do this type the following:.DS/etc/mount /dev/rp3 /usr.DEThe source and manualpages are now available in subdirectories of /usr..PPThe above mount command is only needed if youintend to play around with source on a singleuser system, which you are going to do next.The file system is mounted automatically when multi-usermode is entered, by a command in the file/etc/rc. (See `Disk Layout' below)..PPBefore anything further is done the bootstrapblock on the disk (block 0) should be filled in.This is done using the command.DSdd if=/usr/mdec/rpuboot of=/dev/rp0 count=1.DEif you have the RP03, or.DSdd if=/usr/mdec/hpuboot of=/dev/rp0 count=1.DEif you have an RP04/5/6.Now the DEC disk bootstraps are usable.See Boot Procedures(8) for further information..PPBefore UNIX is turned up completely,a few configuration dependent exercises must beperformed.At this point,it would be wise to read all of the manuals(especially `Regenerating System Software')and to augment this reading with hand to handcombat..SHReconfiguration.PPThe UNIX system running is configured to runwith the given diskand tape, a console, and no other device.This is certainly not the correctconfiguration.You will have to correct the configuration table to reflectthe true state of your machine..PPIt is wise at this point to know how to recompile the system.Print (cat(1))the file /usr/sys/conf/makefile.This file is input to the program `make(1)' whichif invoked with `make all' will recompile all ofthe system source andinstall it in the correct libraries..PPThe program mkconf(1) prepares files thatdescribe a given configuration (See mkconf(1)).In the /usr/sys/conf directory,the four files\fIxy\fRconfwere input to mkconf to produce the four versions of the system\fIxy\fRunix.Pick the appropriate one, and edit it to add lines describing your own configuration.(Remember the console typewriter is automatically included;don't count it in the kl specification.)Then run mkconf;it will generate the files l.s(trap vectors) c.c (configuration table),and mch0.s.Take a careful look atl.s to make sure that all the devices that youhave are assembled in the correct interrupt vectors.If your configuration is non-standard, you willhave to modify l.s to fit your configuration..PPThere are certain magic numbers andconfiguration parameters imbedded in variousdevice drivers that you may want to change.The device addresses of each deviceare defined in each driver.In case you have any non-standard deviceaddresses,just change the address and recompile.(The device drivers are in the directory/usr/sys/dev.).PPThe DC11 driver is set to run 4 lines.This can be changed in dc.c..PPThe DH11 driver is set to handle 3 DH11's witha full complement of 48 lines.If you have less, or more, you may want to edit dh.c..PPThe DN11 driver will handle 4 DN's.Edit dn.c..PPThe DU11 driver can only handle a single DU.This cannot be easily changed..PPThe KL/DL driver is set up to runa single DL11-A, -B, or -C (the console)and no DL11-E's.To change this, editkl.c to have NKL11 reflect the total number ofDL11-ABC's andNDL11 to reflect the number of DL11-E's.So far as the driver is concerned,the difference between the devices istheir address..PPAll of the disk and tape drivers(rf.c, rk.c, rp.c, tm.c, tc.c,hp.c, ht.c)are set up to run 8 drives and should notneed to be changed.The big disk drivers (rp.c and hp.c)have partition tables in them which youmay want to experiment with..PPAfter all the correctionshave been made,use `make(1)' to recompile the system (orrecompile individually if you wish: use the makefileas a guide).If you compiled individually, say `make unix' in thedirectory /usr/sys/conf.The final object file (unix) should bemoved to the root, and then booted to try it out.It is best to name it /nunix so as not to destroythe working system until you're sure it does work.See Boot Procedures(8) for a discussionof booting.Note:  before taking the system down,always (!!) performa sync(1)to force delayed output to the disk..SHSpecial Files.PPNext you must put in special files for the new devices inthe directory /dev using mknod(1).Print the configuration file

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -