Aug 30, 2002
								Comp-flash.html

		    SBC������ѥ��ȡ��ե�å���Υ����å�
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               (http://www-online.kek.jp/~inoue/para-CAMAC/
                                   Work/Comp-flash.html)


			�⥨�ͥ륮����®�︦�浡��
			   ��γ�Ҹ��ҳ˸����
                         ʪ��������饤�󥰥롼��
				��� ����


	��Ū

	    ����CAMAC�ǻ��Ѥ���SBC�Ǥϡ�����ѥ��ȥե�å����ˡ��֡��Ȳ�ǽ��
	    Linux�����ƥ���ۤ���ɬ�פ����롣 ����ѥ��ȥե�å����˥����ƥ�
	    ���ۤ������κǽ�Υ��ƥåפȤ��ơ�Linux�����ƥफ�饢�������Ǥ���
	�������ȡ��ޤ�����ѥ��ȥե�å��������֤����֡��ȥ���������ư�Ǥ���
	�������Ȥ��ǧ���롣

	(1). ����ѥ��ȥե�å������ΰ�����
	(2). �ե����륷���ƥ�κ���������ӥ������������å�
	(3). �֡��ȥ�������������
	(4). �֡��ȥ��������ε�ư

  --------------------------------------------------------------------


 (1). ����ѥ��ȥե�å������ΰ�����

	����ѥ��ȥե�å����˥ѡ��ƥ�������������롣

[root@onlsbc1 inoue]# df -k
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda2              7360792   2016432   4970448  29% /
none                    152332         0    152332   0% /dev/shm
[root@onlsbc1 inoue]# /sbin/fdisk /dev/hdc

���ޥ�� (m �ǥإ��): p

�ǥ����� /dev/hdc: �إå� 16, ������ 63, ������ 993
��˥å� = �������� of 1008 * 512 �Х���

 �ǥХ��� �֡���   ����      ����  �֥��å�   ID  �����ƥ�
/dev/hdc1   *         1       993    500440+   6  FAT16

���ޥ�� (m �ǥإ��): m
���ޥ�ɤ�ư��
   a   �֡��Ȳ�ǽ�ե饰��Ĥ���
   b   bsd �ǥ�������٥���Խ�����
   c   dos �ߴ��ե饰��Ĥ���
   d   ��������
   l   ���Τ��ΰ西���פ�ꥹ��ɽ������
   m   ���Υ�˥塼��ɽ������
   n   ���������������
   o   �����˶��� DOS �ΰ�ơ��֥���������
   p   �ΰ�ơ��֥��ɽ������
   q   �ѹ�����¸�����˽�λ����
   s   ���� Sun �ǥ�������٥���������
   t   �ΰ�Υ����ƥ� ID ���ѹ�����
   u   ɽ��/���ܥ�˥åȤ��ѹ�����
   v   �ΰ�ơ��֥��ȹ礹��
   w   �ơ��֥��ǥ������˽񤭹��ߡ���λ����
   x   ���̤ʵ�ǽ (�������ѡ�������)

���ޥ�� (m �ǥإ��): d
�ΰ��ֹ� (1-4): 1

���ޥ�� (m �ǥإ��): p

�ǥ����� /dev/hdc: �إå� 16, ������ 63, ������ 993
��˥å� = �������� of 1008 * 512 �Х���

 �ǥХ��� �֡���   ����      ����  �֥��å�   ID  �����ƥ�

���ޥ�� (m �ǥإ��): n
���ޥ�ɥ��������
   e   ��ĥ
   p   �����ΰ� (1-4)
p
�ΰ��ֹ� (1-4): 1
�ǽ� ������ (1-993, ����� 1): 
����� 1 ��Ȥ��ޤ�
���� ������ �ޤ��� +������ �ޤ��� +������M �ޤ��� +������K (1-993, ����� 993): 
����� 993 ��Ȥ��ޤ�

���ޥ�� (m �ǥإ��): p

�ǥ����� /dev/hdc: �إå� 16, ������ 63, ������ 993
��˥å� = �������� of 1008 * 512 �Х���

 �ǥХ��� �֡���   ����      ����  �֥��å�   ID  �����ƥ�
/dev/hdc1             1       993    500440+  83  Linux

���ޥ�� (m �ǥإ��): w
�ΰ�ơ��֥�ϸ򴹤���ޤ�����

ioctl() ��ƤӽФ����ΰ�ơ��֥����ɹ��ߤ��ޤ���
�ǥ�������Ʊ�������ޤ���
[root@onlsbc1 inoue]# 


 (2). �ե����륷���ƥ�κ���������ӥ������������å�

	/dev/hdc1�ѡ��ƥ������� ext3�ե����륷���ƥ��������롣

[root@onlsbc1 boot]# /sbin/mke2fs -j /dev/hdc1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
125488 inodes, 500440 blocks
25022 blocks (5.00%) reserved for the super user
First data block=1
62 block groups
8192 blocks per group, 8192 fragments per group
2024 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@onlsbc1 boot]#

	/dev/hdc1 �ǥХ�����ޥ���Ȥ��롣

[root@onlsbc1 boot]# mount -t ext3 /dev/hdc1 /mnt1
[root@onlsbc1 boot]# df -k
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda2              7360792   1977636   5009244  29% /
/dev/hda5             10475668    119324   9824196   2% /home
none                    152332         0    152332   0% /dev/shm
/dev/hda1               545484     17744    500032   4% /mnt
/dev/hdc1               484602      8239    451341   2% /mnt1
[root@onlsbc1 boot]# s -laR /mnt1
bash: s: command not found
[root@onlsbc1 boot]# ls -laR /mnt1
/mnt1:
��� 17
drwxr-xr-x    3 root     root         1024  8�� 30 10:21 .
drwxr-xr-x   20 root     root         4096  8�� 26 15:16 ..
drwx------    2 root     root        12288  8�� 30 10:21 lost+found

/mnt1/lost+found:
��� 13
drwx------    2 root     root        12288  8�� 30 10:21 .
drwxr-xr-x    3 root     root         1024  8�� 30 10:21 ..
[root@onlsbc1 boot]#

	����ѥ��ȡ��ե�å��塢/dev/hdc1 �ǥХ���������ƤΥե�����������롣
	
[root@onlsbc1 boot]# rm -rf /mnt1/lost+found
[root@onlsbc1 boot]# ls -laR /mnt1
/mnt1:
��� 5
drwxr-xr-x    2 root     root         1024  8�� 30 10:27 .
drwxr-xr-x   20 root     root         4096  8�� 26 15:16 ..
[root@onlsbc1 boot]#

	����ѥ��ȡ��ե�å��塢/dev/hdc1 �ǥХ�����˥ե�������ɤ߽񤭤Ǥ���
	���Ȥ��ǧ���롣

[root@onlsbc1 boot]# vi /mnt1/testfile
test data
"/mnt1/testfile" [New] 1L, 10C written
[root@onlsbc1 boot]# cat /mnt1/testfile
test data

[root@onlsbc1 boot]# ls -laR /mnt1
/mnt1:
��� 6
drwxr-xr-x    2 root     root         1024  8�� 30 10:32 .
drwxr-xr-x   20 root     root         4096  8�� 26 15:16 ..
-rw-r--r--    1 root     root           11  8�� 30 10:32 testfile
[root@onlsbc1 boot]# rm -f /mnt1/testfile
[root@onlsbc1 boot]# ls -laR /mnt1
/mnt1:
��� 5
drwxr-xr-x    2 root     root         1024  8�� 30 10:34 .
drwxr-xr-x   20 root     root         4096  8�� 26 15:16 ..
[root@onlsbc1 boot]#

	����ѥ��ȡ��ե�å���ؤ��ɤ߽񤭤�����ˤǤ��롣


 (3). �֡��ȥ�������������



---xxxx

 (4). �֡��ȥ��������ε�ư