! date

; Steps 1, 2

echo formatting RPV
! rm root.dsk
! touch root.dsk

echo formatting libraries
! rm libraries.dsk
! touch libraries.dsk

set sys break

set cpu0 config=hex_mode_installed=1

attach -r tape0 12.9MULTICS.tap
attach disk0 root.dsk
attach disk1 libraries.dsk

clrautoinput

; Step 3

; find_rpv_subsystem: Enter RPV data: M-> 
autoinput cold a11 ipc 3381 0a\n

; find_rpv_subsystem: Booting cold will destroy all data on the RPV.
;    Are you sure that you want to boot cold? M-> y
autoinput y\n

;Average seg length = 2.00
;VTOC size = 13495 pages, 26974 vtoces.
;53950 paging records.
;Constrained by average seg length.
;part hc 13495. 2500.
;part conf 15995. 4.
;part dump 72660. 2000.
;part log 72404. 256.
;part file 72149. 255.
;part bce 69949. 2200.

; request: M-> 
autoinput startover\n
autoinput asl 2.0\n
autoinput part hc low 2500\n
autoinput part conf low 4\n
autoinput part dump high 32000\n
autoinput part log high 256\n
autoinput part file high 255\n
autoinput part bce high 2200\n
autoinput list\n
autoinput end\n

; bce (early) 0301.4: M->
autoinput ddl dska_00a\n

; Step 4

; bce (early) 0301.4: M->
autoinput config\n
; M->
autoinput 1,$d\n
autoinput a\n

; Edit this line to set you time zone; delta is the number of hours from
; GMT, zone is the name of the zone.

autoinput clok -delta 8. -zone pst \n
autoinput iom  -tag a -port 0 -model iom -state on \n
autoinput iom  -tag b -port 1 -model iom -state on \n
; DPS8/70M
autoinput cpu  -tag a -port 7 -state on -type dps8 -model 70. -cache 8. \n
autoinput cpu  -tag b -port 6 -state off -type dps8 -model 70. -cache 8. \n
autoinput cpu  -tag c -port 5 -state off -type dps8 -model 70. -cache 8. \n
autoinput cpu  -tag d -port 4 -state off -type dps8 -model 70. -cache 8. \n
autoinput cpu  -tag e -port 3 -state off -type dps8 -model 70. -cache 8. \n
autoinput cpu  -tag f -port 2 -state off -type dps8 -model 70. -cache 8. \n
autoinput mem  -port a -size 4096. -state on \n
autoinput mem  -port b -size 4096. -state on \n
autoinput mem  -port c -size 4096. -state on \n
autoinput mem  -port d -size 4096. -state on \n
autoinput ipc  -type fips   -iom a -chn 13 -nchan 1 \n
autoinput prph -subsys dska -iom a -chn 13 -nchan 1 -model 3381. -number 16 \n
autoinput prph -device fnpd -iom a -chn 20 -model 6670. -state on \n
autoinput mpc  -ctlr mtpa   -iom a -chn 12 -nchan 1 -model 501. \n
autoinput prph -subsys tapa -iom a -chn 12 -nchan 1 -model 500. -number 16. \n
autoinput prph -device opca -iom a -chn 36 -model 6001. -ll 256. -state on \n
autoinput mpc  -ctlr   urpa -iom a -chn 15 -model 8004. -nchan 1 \n
autoinput prph -device rdra -iom a -chn 15 -model 301. \n
autoinput mpc  -ctlr   urpb -iom a -chn 16 -model 8004. -nchan 1 \n
autoinput prph -device puna -iom a -chn 16 -model 301. \n
autoinput mpc  -ctlr   urpc -iom a -chn 17 -model 8004. -nchan 1 \n
autoinput prph -device prta -iom a -chn 17 -model 1600. -train 600. -ll 136. \n
autoinput part -part hc -subsys dska -drive 00a \n
autoinput part -part dump -subsys dska -drive 00a \n
autoinput root -subsys dska -drive 00a \n
autoinput sst  -4k 2000. -16k 1000. -64k 500. -256k 250. \n
autoinput dbmj 64. 700. 400. 150. 60. 25. \n
autoinput tcd -apt 500. -itt 1000. \n
autoinput intk warm 0. rpvs star \n
autoinput parm dirw ttyb 8192.\n

autoinput \wf\n
autoinput 1,$p\n
autoinput w\n
autoinput q\n
; bce (early) 0000.0: M->
autoinput bce\n
;Current system time is: Friday, July 22, 1994 20:01:28 pdt.
;Is this correct? M-> 
autoinput y\n

autoinput boot -cold\n
autoinput y\n

; Step 5

autoinput \xCommand:\x
; Command:
autoinput init_vol root2 dska_00b -rlv\n
autoinput init_vol root3 dska_00c -rlv\n
autoinput shut\n

; Step 6
autoinput \ybce (boot) \y
; bce (boot)
autoinput config\n
autoinput /root/\n
autoinput s/$/ -subsys dska -drive 00b -subsys dska -drive 00c/p\n
autoinput w\n
autoinput q\n
; bce (boot)
autoinput reinit\n

; Step 7

; bce (boot)
autoinput boot\n

; Command:
autoinput \xCommand:\x
autoinput reload -nosetlvid\n
autoinput 12.9EXEC\n

; iload: Are there any more tapes to be reloaded?   M->
autoinput no\n

autoinput shut\n

; Step 7a

; bce (boot)
autoinput \ybce (boot)\y
autoinput boot standard\n

autoinput \xReady\x
autoinput admin\n
autoinput cvr -pv rpv -serial 0-1\n
autoinput avr -pv lib01 -lv libraries -model 3381 -serial 0-2\n
autoinput yes\n
autoinput avr -pv lib02 -lv libraries -model 3381 -serial 0-3\n
autoinput avr -pv lib03 -lv libraries -model 3381 -serial 0-4\n
autoinput ame\n

autoinput init_vol lib01 dska_01a\n
autoinput init_vol lib02 dska_01b\n
autoinput init_vol lib03 dska_01c\n
autoinput alv -all\n


; Steps 8, 9

autoinput admin\n
autoinput sis >lv rew *.SysAdmin rew *.SysDaemon\n
autoinput sa >lv s * sma *.SysAdmin sma *.SysDaemon\n
autoinput create >lv>root.acs\n
autoinput cvr -lv root -acs >lv>root.acs\n
autoinput create >lv>libraries.acs\n
autoinput cvr -lv libraries -acs >lv>libraries.acs\n
autoinput set_max_length >lv>*.acs 0\n
autoinput delete_acl >lv>*.acs\n

autoinput set_volume_quota libraries 200000\n
autoinput cd >library_dir_dir -lv libraries -quota 70000\n
autoinput an >library_dir_dir ldd\n
autoinput sa >ldd sma *.SysAdmin s * -rp\n
autoinput cd >libraries -lv libraries -quota 40000\n
autoinput an >libraries lib\n 
autoinput sa >lib sma *.SysAdmin s * -rp\n
autoinput ame\n

autoinput shut\n

; Step 10

; bce
autoinput \ybce (boot)\y
autoinput boot\n

; Command:
autoinput \xCommand:\x
autoinput alv -all\n
autoinput reload -nosetlvid\n
; Input tape label:   M->
autoinput 12.9LDD_STANDARD\n

; iload: Are there any more tapes to be reloaded?   M->
autoinput yes\n
; Input tape label:   M-> 
autoinput 12.9UNBUNDLED\n

; iload: Are there any more tapes to be reloaded?   M->
autoinput yes\n
; Input tape label:   M-> 
autoinput 12.9NET\n

; iload: Are there any more tapes to be reloaded?   M->
autoinput yes\n
; Input tape label:   M-> 
autoinput 12.9LIB\n

; iload: Are there any more tapes to be reloaded?   M->
autoinput yes\n
; Input tape label:   M-> 
autoinput 12.9AML\n

; iload: Are there any more tapes to be reloaded?   M->
autoinput yes\n
; Input tape label:   M-> 
autoinput 12.9MISC\n

; iload: Are there any more tapes to be reloaded?   M->
autoinput no\n

; Step 11

autoinput standard\n
autoinput admin\n
autoinput ec >system_library_tools>acct_start_up cold otw_\n

; Step 12

autoinput create_dir >user_dir_dir>SysAdmin>a>mcs.7.6c\n
autoinput cwd >user_dir_dir>SysAdmin>a>mcs.7.6c\n
autoinput cp >ldd>mcs>info>site_mcs.bind_fnp\n 
autoinput ac x ([segs >ldd>mcs>o>*.archive -absp])\n
autoinput bind_fnp site_mcs -list\n

autoinput cwd >user_dir_dir>SysAdmin>a\n
autoinput ted\n
autoinput r CMF.cmf\n
autoinput 1,$d\n
autoinput a\n
autoinput Service: login\s\n
autoinput Charge: none\s\n
autoinput Terminal_type: none\s\n
autoinput Line_type: none\s\n
autoinput Baud: 9600\s\n
autoinput FNP_required_up_time: 5\s\n
autoinput FNP:      D\s\n
autoinput \_\_\_type:            DN6670\s\n
autoinput \_\_\_memory:          64\s\n
autoinput \_\_\_lsla:            0\s\n
autoinput \_\_\_hsla:            1\s\n
autoinput \_\_\_image:           >user_dir_dir>SysAdmin>a>mcs.7.6c>site_mcs\s\n
autoinput \_\_\_service:         active\s\n
autoinput name: d.h000\s\n
autoinput attributes: hardwired\s\n
autoinput name: d.h001-d.h031\s\n
autoinput end\s\n
autoinput \wf\n
autoinput 1,$p\n
autoinput w\n
; ted: Do you want to w with the untrusted pathname >user_dir_dir>SysAdmin>a>CMF.cmf?
autoinput y\n
autoinput q\n
autoinput cv_cmf CMF.cmf\n
autoinput copy CMF.cdt >sc1>cdt -force\n

autoinput mq >net +3000\n

; Step 13

autoinput ame\n
autoinput stop_mpx d\n
autoinput multics\n
autoinput load_mpx d -check\n
autoinput admin\n
autoinput ec >tools>acct_start_up cold2\n
autoinput ame\n
autoinput word login\n
autoinput abs start\n
autoinput go\n

; Step 14

autoinput x repair salvquota > 2 -dcf -rebuild\n

autoinput admin\n
autoinput pause 120\n
autoinput ame\n

autoinput logout * * *\n

autoinput admin\n
autoinput pause 20\n
autoinput ame\n

autoinput shut\n
autoinput \ybce (boot) \y
autoinput die\n
autoinput y\n

autoinput \xReady\x
autoinput \z

boot iom0

echo Saving RPV as root.dsk.reloaded
! cp root.dsk root.dsk.reloaded

! date

quit
