📄 bproc.8
字号:
.tr |.th "BOOT PROCEDURES" VIII 2/11/75.sh NAMEboot procedures \*- UNIX startup.sh DESCRIPTION.it "How to start UNIX.||"UNIX is started by placing it in coreat location zero and transferring to zero.Since the system is not reenterable,it is necessary to read it in from disk or tape..s3The.it tpcommand places a bootstrap programon theotherwise unused block zero of the tape.The DECtape version of this program iscalled.it tboot,the magtape version.it mboot.If.it tbootor.it mbootis read into location zero andexecuted there,it will type `=' on the console,read in a.it tpentry name,load that entry into core,and transfer to zero.Thus one way to run UNIXis to maintain the system code on a tape using.it tp.Caution: the file /usr/mdec/tboot(DECtape)or /usr/mdec/mboot(magtape)must be present when the tape is made!When a boot is required,execute (somehow) a programwhich reads in and jumps tothe first block of the tape.In response to the `='prompt,type the entry name of the system on the tape(we use plain `unix').It is strongly recommended that a current version ofthe system be maintained in this way,even if it is usually booted from disk..s3The standardDEC ROM which loads DECtape is sufficient toread in.it tboot,but themagtape ROM loads block one, not zero.If no suitable ROM is available,magtape and DECtape programs are presented below which may bemanually placed in core and executed..s3The system can also be booted from a disk filewith the aid of the.it ubootprogram.When read into location 0 and executed,.it ubootreads a single character (either.bd por.bd kfor RP or RK, both drive 0)to specify which device is to besearched.Then itreads a UNIX pathname from the console,finds the corresponding file on the given device,loads that file into core location zero,and transfers to it..it Ubootoperates under verysevere space constraints.It supplies no prompts, except that itechoes a carriage return and line feed after the.bd por.bd k.No diagnostic is provided if the indicated file cannot be found,nor is there any means of correcting typographical errors in thefile name except to start the program over.If it fails to find the file, however,it jumps back to its start,so another trycan be attempted,starting again with the.bd por.bd k.Notice that.it ubootwill only load a file from drive 0,and the file system it searches must startat the beginning of the disk..it Ubootitself usually resides in the otherwise unusedblock 0of the disk,so it can be loaded by ROM program;.it mkfscan be used to put it there when the file system is created.It can also be loaded from a.it tptape as described above..s3.it "The switches.||"The console switches play an important role in theuse and especially the booting of UNIX.During operation,the console switches areexamined 60 times per second,and the contents of the address specified by the switchesare displayed in the display register.(This is not true on the 11/40since there is no display register on that machine.)If the switch address is even,the address is interpreted in kernel (system)space;if odd,the rounded-down address is interpreted inthe current user space..s3If any diagnostics are produced by the system,they are printed on the console only ifthe switches are non-zero.Thus it is wise to have a non-zero value in theswitches at all times..s3During the startup of thesystem,the.it initprogram (VIII)reads the switches andwill come up single-userif the switches are set to 173030..s3It is unwise to have a non-existent address in theswitches.This causes a bus error in the system(displayed as 177777)at the rate of 60 times per second.If there is a transfer of more than16ms duration on a device with a data ratefaster than the bus error timeout(about 10\*us)then a permanent disk non-existent-memory error will occur..s3.it "ROM programs.||"Here are some programs which are suitable forinstalling in read-only memories,or for manual keying into coreif no ROM is present.Each program is position-independentbut should be placed well above location 0so it will not be overwritten.Each reads a block from thebeginning of a device into core locationzero.The octal words constituting the program arelisted on the left..s3.ne 5.nfDECtape (drive 0) from endzone:.if n .ta 3 11 15 23 38.if t .ta .3i 1i 1.4i 2i 3.5i 012700 mov $tcba,r0 177346 010040 mov r0,\*-(r0) / use tc addr for wc 012710 mov $3,(r0) / read bn forward 000003 105710 1: tstb (r0) / wait for ready 002376 bge 1b 112710 movb $5,(r0) / read (forward) 000005 000777 br \fB.\fR / loop; now halt and start at 0.s3DECtape (drive 0) with search: 012700 1: mov $tcba,r0 177346 010040 mov r0,\*-(r0) / use tc addr for wc 012740 mov $4003,\*-(r0) / read bn reverse 004003 005710 2: tst (r0) 002376 bge 2b / wait for error 005760 tst \*-2(r0) / loop if not end zone 177776 002365 bge 1b 012710 mov $3,(r0) / read bn forward 000003 105710 2: tstb (r0) / wait for ready 002376 bge 2b 112710 movb $5,(r0) / read (forward) 000005 105710 2: tstb (r0) / wait for ready 002376 bge 2b 005007 clr pc / transfer to zero.s3.fiCaution: both of these DECtape programs will (literally) blow a fuseif 2 drives are dialed to zero..s3.nfMagtape from load point: 012700 mov $mtcma,r0 172526 010040 mov r0,\*-(r0) / usr mt addr for wc 012740 mov $60003,\*-(r0) / read 9\*-track 060003 000777 br \fB.\fR / loop; now halt and start at 0.s3RK (drive 0): 012700 mov $rkda,r0 177412 005040 clr \*-(r0) / rkda cleared by start 010040 mov r0,\*-(r0) 012740 mov $5,\*-(r0) 000005 105710 1: tstb (r0) 002376 bge 1b 005007 clr pc.s3.ne 11RP (drive 0) 012700 mov $rpmr,r0 176726 005040 clr \*-(r0) 005040 clr \*-(r0) 005040 clr \*-(r0) 010040 mov r0,\*-(r0) 012740 mov $5,\*-(r0) 000005 105710 1: tstb (r0) 002376 bge 1b 005007 clr pc.dt.sh FILES/unix \*- UNIX code.br/usr/mdec/mboot \*- \fItp\fR magtape bootstrap.br/usr/mdec/tboot \*- \fItp\fR DECtape bootstrap.br/usr/mdec/uboot \*- file system bootstrap.sh "SEE ALSO"tp (I), init (VIII)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -