Mercurial > hg > Members > kono > nitros9-code
view docs/nitros9guide/chap6.chapter @ 3295:6b7a7b233925 default tip
makefile: Allow PORTS with level1/2 mix
https://sourceforge.net/p/nitros9/feature-requests/10/
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Tue, 19 Apr 2022 18:12:17 +0200 |
parents | b00cf13c9f61 |
children |
line wrap: on
line source
<chapter id="sec6"> <title>Use of the System Disk</title> <para> Disk-based NitrOS-9 systems use a system disk to load many parts of the operating system during the system startup and to provide files frequently used during normal system operations. Therefore, the system disk is generally kept in disk drive zero ("/D0") when the system is running. </para> <para> Two files used during the system startup operation, <filename>OS9Boot</filename> and <filename>startup</filename> <emphasis>must</emphasis> reside in the system disk's root directory. Other files are organized into three directories: <filename class="directory">CMDS</filename> (commands), <filename class="directory">DEFS</filename> (system-wide definitions), and <filename class="directory">SYS</filename> (other system files). Other files and directories created by the system manager and/or users may also reside on the system disk. These frequently include each user s initial data directory. </para> <section id="sec6.1"> <title>The OS9Boot File</title> <para> The file called <filename>OS9Boot</filename> loaded into RAM memory by the "bootstrap" routine located in the NitrOS-9 firmware. It includes file managers, device drivers and descriptors, and any other modules which are permanently resident in memory. The NitrOS-9 distribution disk's <filename>OS9Boot</filename> file contains the following modules: </para> <informaltable frame="none"> <tgroup cols="2"> <colspec colwidth="1.5in"/> <colspec colwidth="3.5in"/> <tbody> <row> <entry>KernelP2</entry> <entry>NitrOS-9 Kernel, Part 2</entry> </row> <row> <entry>IOMan</entry> <entry>NitrOS-9 Input/Output Manager</entry> </row> <row> <entry>Init</entry> <entry>Initialization Data Module</entry> </row> <row> <entry>RBF</entry> <entry>Random Block (disk) File Manager</entry> </row> <row> <entry>SCF</entry> <entry>Sequential Character (terminal) File Manager</entry> </row> <row> <entry>PipeMan</entry> <entry>Pipe File Manager</entry> </row> <row> <entry>Piper</entry> <entry>Pipe Driver</entry> </row> <row> <entry>Pipe</entry> <entry>Pipe Device Descriptor</entry> </row> <row> <entry>CC3IO</entry> <entry>CoCo 3 Keyboard/Video Device Driver</entry> </row> <row> <entry>WindInt</entry> <entry>CoCo 3 Graphics Co-Module</entry> </row> <row> <entry>VDGInt</entry> <entry>CoCo 2 Compatible Graphics Co-Module</entry> </row> <row> <entry>Term</entry> <entry>Terminal Device Descriptor</entry> </row> <row> <entry>CC3Disk</entry> <entry>CoCo 3 Disk Driver</entry> </row> <row> <entry>DD, D0, D1</entry> <entry>Disk Device Descriptors</entry> </row> <row> <entry>Printer</entry> <entry>Printer Device Driver</entry> </row> <row> <entry>p</entry> <entry>Printer Device Descriptor</entry> </row> <row> <entry>Clock</entry> <entry>Real-Time Clock Module</entry> </row> <row> <entry>Clock2</entry> <entry>Second Part of Real-Time Clock Module</entry> </row> <row> <entry>SysGo</entry> <entry>System Startup Process</entry> </row> </tbody> </tgroup> </informaltable> <para> Users may create new bootstrap files which may include additional modules (see <command>OS9Gen</command> command). Any module loaded as part of the bootstrap cannot be unlinked and is stored in memory with a minimum of fragmentation. It may be advantageous to include in the OS9Boot file any module used constantly during normal system operation. This can be done with the OS9GEN command. </para> </section> <section id="sec6.2"> <title>The SYS Directory</title> <para> The directory <filename>/d0/SYS</filename> contains several important files: </para> <informaltable frame="none"> <tgroup cols="2"> <colspec colwidth="1in"/> <colspec colwidth="4in"/> <tbody> <row> <entry>password</entry> <entry>the system password file (see <command>login</command> command)</entry> </row> <row> <entry>errmsg</entry> <entry>the error message file</entry> </row> <row> <entry>helpmsg</entry> <entry>the help database file</entry> </row> </tbody> </tgroup> </informaltable> <para> These files (and the <filename class="directory">SYS</filename> directory itself) are not absolutely required to boot NitrOS-9, they are needed if <command>login</command>, <command>tsmon</command>, or <command>help</command> will be used. Users may add other system-wide files of similar nature if desired. </para> </section> <section id="sec6.3"> <title>The Startup File</title> <para> The file <filename>startup</filename> in the root directory is a shell procedure file which is automatically processed immediately after system startup. The user may include in <filename>startup</filename> any legal shell command line. Often this will include <command>setime</command> to start the system clock. If this file is not present the system will still start correctly but the user must run the SETIME command manually. </para> </section> <section id="sec6.4"> <title>The CMDS Directory</title> <para> The directory <filename class="directory">CMDS</filename> is the system-wide command object code directory, which is normally shared by all users as their working execution directory. If <command>shell</command> is not part of the <filename>OS9Boot</filename> file (and it shouldn't be in a Level 2 system), it must be present in this directory. The system startup process "sysgo" makes <filename class="directory">CMDS</filename> the initial execution directory. </para> </section> <section id="sec6.5"> <title>The DEFS Directory</title> <para> The directory <filename class="directory">DEFS</filename> is a directory that contains assembly language source code files which contain common system-wide symbolic definitions, and are normally included in assembly language programs by means of the NitrOS-9 Assembler "use" directive. The presence and use of this directory is optional, but highly recommended for any system used for assembly language programs. The files commonly contained in this directory are: </para> <informaltable frame="none"> <tgroup cols="2"> <colspec colwidth="1in"/> <colspec colwidth="4in"/> <tbody> <row> <entry>OS9Defs</entry> <entry>main system-wide definition file</entry> </row> <row> <entry>RBFDefs</entry> <entry>RBF file manager definition file</entry> </row> <row> <entry>SCFDefs</entry> <entry>SCF file manager definition file</entry> </row> <row> <entry>Systype</entry> <entry>System types definition file</entry> </row> </tbody> </tgroup> </informaltable> </section> <section id="sec6.6"> <title>Changing System Disks</title> <para> The system disk is not usually removed while the system is running, especially on multiuser systems. If it is, the <command>chx</command> and <command>chd</command> (if the working data directory was on the system disk) commands should be executed to reset the working directory pointers because the directories may be at different addresses on the new disk, for example: </para> <screen> chx /d0/cmds chd /d0 </screen> <para> In general, it is unwise to remove a disk and replace it with another if any paths are open to files resident on the disk. It is <emphasis>dangerous</emphasis> to exchange <emphasis>any</emphasis> disk if any files on it are open in WRITE or UPDATE modes. </para> </section> <section id="sec6.7"> <title>Making New System Disks</title> <para> To make a system disk, the following steps must be performed: <orderedlist numeration="arabic"> <listitem><para> The new disk must be formatted. </para></listitem> <listitem><para> The <filename>OS9Boot</filename> file must be created and linked by the <command>OS9Gen</command> or <command>Cobbler</command> commands. </para></listitem> <listitem><para> The <filename>startup</filename> file must be created or copied. </para></listitem> <listitem><para> The <filename class="directory">CMDS</filename> and <filename class="directory">SYS</filename> directories and the files they contain must be copied. </para></listitem> <listitem><para> For Level 2, the <filename>sysgo</filename> file in the root directory must be copied. </para></listitem> </orderedlist> Steps 2 through 5 may be performed manually, or automatically by any of the following methods: <orderedlist numeration="arabic"> <listitem><para> By a shell procedure file created by the user. </para></listitem> <listitem><para> By a shell procedure file generated by the <command>dsave</command> command </para></listitem> <listitem><para> By the <command>backup</command> command </para></listitem> </orderedlist> </para> </section> </chapter>