M-Systems Flash Disk Pioneers 91-SR-005-10-7L, DiskOnChip Appendix I Making a Root File System

Page 19

Using the DiskOnChip with Linux OS

Appendix I: Making a Root File System

To create your own root file system, perform the following steps:

1.Make the following directories:

#cd /diskonchip

#mkdir bin dev etc lib mnt proc sbin tmp usr var

2.Create devices in the /dev directory. You can either do this manually or just copy the /dev directory from the HDD. If you wish to save space, it is possible to remove non-required devices (i.e. if you don’t have a SCSI drive, then remove all the sd* devices).

#cp -dpR /dev /diskonchip

This command copies many unnecessary inodes to the DiskOnChip. Removing them causes no problem, as long as you make sure that the ones listed in the sample file system are present.

3.Copy and configure the files in the /etc directory:

# cp -dr /etc/rc.d /diskonchip/etc (for RedHat)

or

#cp -dr /sbin/init.d /diskonchip/sbin (for SuSE)

#cp -d /etc/inittab /diskonchip/etc

4.Copy the password file and make sure that each user has its default shell installed:

#cp /etc/passwd /diskonchip/etc

# cp /etc/shadow /diskonchip/etc (it is possible that you do not have this)

#cp /etc/group /diskonchip/etc

5.Create the file /etc/fsstab that contains the list of files to be mounted:

#vi /diskonchip/etc/fstab

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

/dev/fla1 /

ext2

defaults 1 1

/proc

/proc proc

defaults 0 0

Press <ESC>, ‘:’, ‘w’ and ‘q’ to save the file.

Note: It is possible to add more devices here. For more information, refer to the man pages.

7.There are several programs that need to be copied to have a functional environment. Other programs are not as important, although it would be rather difficult to work without them. All other programs that are

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

19

Image 19
Contents Using the DiskOnChip with Linux OS Limited Warranty Contents Hardware Requirements for the DiskOnChip IntroductionUtilities Diskette Content Requirements for Installation of the DiskOnChip into LinuxLinux Driver for DiskOnChip Updating the Firmware Installing the DiskOnChip as an Additional DriveIf the /dev/fd0 doesn’t appear in the first column, type Floppy drive must be active. Verify this by typingCheck dependencies Configure the kernel as followsAdding the Driver to the Kernel Remove the old object filesMake the inodes for the DiskOnChip Booting the Compiled Kernel from HDDCreating a Linux Partition on the DiskOnChip Mount the file system to a directory Creating a Native Linux File System on the DiskOnChipRecheck the partition table Save the new partition table disregard any fdisk warningsCreating a Root File System Introduction Booting Linux from the DiskOnChipCreate the list of files to be mounted OverviewPopulating the File System Run the scriptCopying the Kernel, Updating the Boot Sector and Rebooting Reboot and load DOS, and reinstall the original firmware TroubleshootingLinux will now boot from the DiskOnChip Most likely, you forgot to do Sys.com Additional Information and ToolsAppendix I Making a Root File System Diskonchip/bin/programname Copy the library loaders as follows For exampleYou now have pLilo sources There are 5 files that you will need to patch Appendix III Applying a Patch ManuallyUsing the DiskOnChip with Linux OS Atidim Industrial Park P.O.B How to Contact UsTel Aviv 61580, Israel