ChorusOS 4.0 File System Administration Guide

1.2 File System Initialization

File system initialization proceeds in the following manner. After creating the pdevfs file systems, C_INIT(1M) creates a /dev/console device to which it writes system console messages. It then creates the other special files that correspond to the devices attached to the device tree. It also creates special files to access the memory banks and mounts the contents of the system image in /image/sys_bank as a FAT file system. It mounts other memory banks under /image/bank_identifier as well, if others are available. Thus, several file systems are mounted immediately after the system comes up, by the system itself:


$ rsh target mount
root_device on / (pdevfs)
devfs on /dev (pdevfs)
devfs on /image (pdevfs)
devfs on /tmp (pdevfs)
/dev/bd00 on /image/sys_bank (msdos)

Next, C_INIT(1M) looks for sysadm.ini(4CC), the system initialization file. Usually, it finds the system initialization file in /image/sys_bank/sysadm.ini, although it does this by probing the memory banks for the file and using the first instance it finds. (If it finds more than one sysadm.ini file, it displays a warning on the system console.) Finally, C_INIT(1M) executes the commands it finds in sysadm.ini, such as commands to set up network connections and commands to create special files for access to local media, such as hard disks, RAM disks and flash memory.

At this point, you may mount a root file system containing actors to run on the target system. You do this without unmounting the pseudo root node. The ChorusOS system allows you to mount a new root while the pseudo root is still mounted.

Unless you build everything into your system image or mount a root directory on a local device connected to the target system, you probably mount build_dir/root on the host workstation as the root directory for your target system. You generate this directory on the host workstation using the make root command in the directory where you build system images.

The command to mount the root file system is usually included in the sysadm.ini(4CC) file. The following example demonstrates what happens, however, when you mount a new root file system manually after having exported it through NFS from a host workstation:


$ rsh target mount
root_device on / (pdevfs)
devfs on /dev (pdevfs)
devfs on /image (pdevfs)
devfs on /tmp (pdevfs)
/dev/bd00 on /image/sys_bank (msdos)
$ rsh target mount host_IP_address:/export/target/root /
host_IP_address:/export/target/root on / (nfs)
$ rsh target mount
root_device on / (pdevfs)
devfs on /dev (pdevfs)
devfs on /image (pdevfs)
devfs on /tmp (pdevfs)
/dev/bd00 on /image/sys_bank (msdos)
host_IP_address:/export/target/root on / (nfs)
$ rsh target arun /bin/ls /
started aid = 2
Makefile        bin             etc             dev            image
lib             tmp
$ rsh target umount /
$ rsh target mount
root_device on / (pdevfs)
devfs on /dev (pdevfs)
devfs on /image (pdevfs)
devfs on /tmp (pdevfs)
/dev/bd00 on /image/sys_bank (msdos)

See the host workstation documentation for details about sharing this directory through NFS. If your host workstation is running the SolarisTM operating environment, you can use the share(1M) command to share the file system.