If your C5 system has a flash device (such as Intel28fxxx or AMD29fxxx based flash device) that you want to use to support a local file system, you can use the C5 system utilities to prepare the flash disk, and create and populate a local file system. It is assumed that you have already been able to mount a root directory through NFS. See Section 6.2, “Mounting a Root File System over NFS” for details. It is also assumed that no valuable data has been written to the flash. If you have important data on the flash memory, you must back it up before trying this example.
Before you can prepare the flash memory, you must be able to access it. Set the FLASH feature and makes sure that the appropriate flash driver is included in the system image then, build the new system image that supports a flash disk and reboot the target system with the new system image. For example, if you are using TFTP to download onto a target, then you might do so as follows:
$ cd build_dir $ configurator -set FLASH=true $ configurator -set UFS=true $ make chorus $ cp chorus.RAM /tftpboot $ rsh target reboot |
The default sysadm.ini( 4CC) system initialization file contains commands that create special files for FLASH disks, so you probably do not need to create any special files at this point.
![]() | Caution |
|---|---|
The following step in this example initializes the disk, erasing all existing data. Be sure to back up existing data on the disk before proceeding. | |
Before creating for the first time a flash filesystem, you may requires to format the flash. The operation creates and writes all the meta data which are necessary to manage the flash. For example:
$ rsh target format /dev/rflash0a Flash formated : 1560576 bytes available for data |
Note this command prints the size of the available space on flash memory. This information is usefull to write the disktab entry.
In order to label the flash disk, you first need an appropriate entry in disktab(4CC). The following example disktab fragment could be used with an flash disk to create one partition:
intel28fxxxflash2Meg:\
:ns#4:nt#4:nc#4096 \
:pa#2894:oa#4:ta=MSDOS: \
:pc#3048:oc#0:tc=unused: |
Once the disktab file contains the entry describing the flash disk geometry, you can proceed to label the flash disk. For example:
$ rsh target disklabel -w -r /dev.flash0c intel28fxxxflash2Meg |
After the flash is labelled, you can create file systems on the flash partition:
$ rsh target newfs /dev/flash0a |
Finally, before using the file systems, you should check them:
$ rsh target fsck -y /dev/flash0a |
After you have checked the file system you created, you can mount them into your existing file system hierarchy and use them.