M-Systems Flash Disk Pioneers DiskOnChip Overview, Populating the File System, Run the script

Page 14

Using the DiskOnChip with Linux OS

5.1.2 Overview

A root file system must contain everything that is needed to support a full Linux system. To achieve this, the disk must include the minimum requirements for a Linux system:

Basic file system structure

Minimum set of directories: /dev, /proc, /bin, /etc, /lib, /usr, /tmp

Basic set of commands: sh, ls, cp, mv, etc.

Minimum set of config files: rc, inittab, fstab, etc.

Devices: /dev/hd*, /dev/tty*, /dev/fd0, etc.

Runtime libraries to provide basic functions used by utilities

5.1.3 Populating the File System

From this point on, it is assumed that the DiskOnChip is mounted to the /diskonchip directory.

The sample script copy2doc that is provided with the driver is located in directory /tmp/doc- driver. This sample script is created for RedHat 5, SuSE 5.2 and Caldera and is customized for RedHat

5.It might be necessary to change the script according to your distribution. Files that are specific to a distribution can be found in the script with the distribution name written after it. To exclude a file, make sure the ‘#’ mark is present at the beginning of the line. To include a file, make sure the ‘#’ mark is removed.

The sample script only copies the basic files that are needed for booting. For any other operation, it is necessary to add more files.

To create a root file system based on the sample script copy2doc, perform the following steps:

1.Go to the /diskonchip directory:

#cd /diskonchip

2.If necessary, customize the sample script (for other distributions):

#vi /tmp/doc-driver/copy2doc

3.Run the script:

#sh /tmp/doc-driver/copy2doc

4.Create the list of files to be mounted:

#vi /diskonchip/etc/fstab

5.Press <INS> to start editing and insert the following lines:

/dev/fla1 /

ext2

defaults 1 1

/proc

/proc proc

defaults 0 0

91-SR-005-10-7L REV. 2.0

14

Image 14
Contents Using the DiskOnChip with Linux OS Limited Warranty Contents Introduction Hardware Requirements for the DiskOnChipRequirements for Installation of the DiskOnChip into Linux Utilities Diskette ContentLinux Driver for DiskOnChip Installing the DiskOnChip as an Additional Drive Updating the FirmwareFloppy drive must be active. Verify this by typing If the /dev/fd0 doesn’t appear in the first column, typeRemove the old object files Configure the kernel as followsAdding the Driver to the Kernel Check dependenciesBooting the Compiled Kernel from HDD Make the inodes for the DiskOnChipCreating a Linux Partition on the DiskOnChip Save the new partition table disregard any fdisk warnings Creating a Native Linux File System on the DiskOnChipRecheck the partition table Mount the file system to a directoryBooting Linux from the DiskOnChip Creating a Root File System IntroductionRun the script OverviewPopulating the File System Create the list of files to be mountedCopying the Kernel, Updating the Boot Sector and Rebooting Linux will now boot from the DiskOnChip TroubleshootingReboot and load DOS, and reinstall the original firmware Most likely, you forgot to do Additional Information and Tools Sys.comAppendix I Making a Root File System Diskonchip/bin/programname For example Copy the library loaders as followsYou now have pLilo sources Appendix III Applying a Patch Manually There are 5 files that you will need to patchUsing the DiskOnChip with Linux OS Tel Aviv 61580, Israel How to Contact UsAtidim Industrial Park P.O.B