M-Systems Flash Disk Pioneers 91-SR-005-10-7L Benutzerhandbuch

Seite von 25
 
Using the DiskOnChip with Linux OS 
91-SR-005-10-7L REV. 2.0 
19 
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