• 検索結果がありません。

ネットワークを使用する場合

ドキュメント内 M11-JZSH01 (ページ 36-45)

第 2 章  製品の使用方法 7

2.3  弊社ドライバソフトウェアを使用する

2.4.2  ネットワークを使用する場合

・ 

/opt/cpz-netboot/hosts

127.0.0.1 localhost 192.168.1.100 kitty

192.168.1.110 greenart

# The following lines are desirable for IPv6 capable hosts

# (added automatically by netbase upgrade) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts

・ 

/opt/cpz-netboot/etc/resolv.conf

nameserver 127.0.0.1

・ 

/opt/network/interfaces 

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface

# automatically added when upgrading auto lo

iface lo inet loopback

# The first network card - this entry was created during the Debian installation

# (network, broadcast and gateway are optional)

# automatically added when upgrading auto eth0

iface eth0 inet static

address 192.168.1.110

netmask 255.255.255.0

network 192.168.1.0

broadcast 192.168.1.255 gateway 192.168.1.1

 

(4) ホストマシン側の/etcディレクトリの設定 

ホストマシン側の/etcディレクトリのネットワーク関連は、以下の内容になっています。ご使用の ネットワーク環境に合わせて、変更してください。変更する場合は、前述の/opt/cpz-netboot/etc ディレクトリも併せて変更してください。 

・ 

/etc/dhcp3/dhcpd.conf

use-host-decl-names on;

ddns-update-style ad-hoc;

default-lease-time 600;

max-lease-time 7200;

subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.100;

option routers 192.168.1.100;

}

host greenart {

hardware ethernet 00:80:62:xx:xx:xx;

fixed-address greenart;

filename "/root/cpz-netboot/boot/vmlinuz";

option root-path "/root/cpz-netboot";

}

option option-128 code 128 = string;

option option-128 "DODES";

option option-129 code 129 = string;

option option-129 "ip=:::::eth0:";

hardware ethernet 00:80:62:xx:xx:xx;は、ご使用のCPZ-SH03のMACアドレスを指定してください。

CPZ-SH03のMACアドレスの確認方法は『54ページ  3.3.1  CPZ-SH03のMACアドレス確認方

法』を参照してください。

dhcpパッケージのバージョンが古いと、 dhcpd.confファイルのフォーマットが異なることにより

option指定の行でエラーなります。

以下のようにoption指定の行を変更します。

option option-128 "DODES";

option option-129 "ip=:::::eth0:";

・ 

/etc/exports

# /etc/exports: the access control list for filesystems which may be exported

# to NFS clients. See exports(5).

/opt greenart(rw,no_root_squash,insecure,sync)

・ 

/etc/hostname 

kitty

・ 

/etc/hosts 

127.0.0.1 localhost.localdomain localhost debian 192.168.1.100 kitty

192.168.1.110 greenart

# The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts

・ 

/etc/network/interfaces 

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

# The loopback network interface auto lo

iface lo inet loopback

# The primary network interface auto eth0

iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 network 192.168.1.0

gateway 192.168.1.1

■ホストマシンの準備(Red Hat編)

CPZ-SH03とホストマシンを接続し、ネットワーク経由でCPZ-SH03を起動する準備をします。

(1) ネットワークブートパッケージのインストール

ネットワークブートに必要なパッケージがホストマシンにインストールされていることを確認し ます。 

[root@kitty ~]# rpm -qa | grep dhcp dhcp-x.xxxx

[root@kitty ~]# rpm -qa | grep tftp-server tftp-server-x.xxxx

 

インストールされていない場合は、rpmコマンドでインストールを行います。 

[root@kitty ~]# rpm -ivh {CDのパス}/RedHat/RPMS/dhcp-x.xxxx [root@kitty ~]# rpm -ivh {CDのパス}/RedHat/RPMS/tftp-server-x.xxxx

(2) 開発キットCDから必要なファイルを展開

USB-CD

あるいは 内蔵

CDドライブに開発キットCDをセットし、マウントします。

(ここでは、/cdromディレクトリにマウントしたものとして記載します。)

以下のように必要なファイルをホストマシンに展開します。

[root@kitty ~]# cd /opt

[root@kitty opt]# tar zxf /cdrom/cpz-netboot/cpz-netboot-20060301.tar.gz [root@kitty opt]# cp -a /cdrom/cpz-base/* /opt/cpz-netboot  

(3) /opt/cpz-netboot/etcディレクトリの設定

展開した状態では、

/opt/cpz-netboot/etcディレクトリのネットワーク関連は、以下の内容になってい

ます。ご使用のネットワーク環境に合わせて、変更してください。変更する場合は、ホストマシン の/etcディレクトリも併せて変更してください。

変更箇所は後述します。

・ 

/opt/cpz-netboot/etc/fstab

# /etc/fstab: static file system information.

#

# <file system> <mount point> <type> <options> <dump> <pass>

kitty:/opt/cpz-netboot / nfs defaults  1 1

proc /proc proc defaults  0 0

・ 

/opt/cpz-netboot/etc/hostname 

greenart

・ 

/opt/cpz-netboot/hosts

127.0.0.1 localhost 192.168.1.100 kitty 192.168.1.110 greenart

# The following lines are desirable for IPv6 capable hosts

# (added automatically by netbase upgrade) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

・ 

/opt/cpz-netboot/etc/resolv.conf

nameserver 127.0.0.1

・ 

/opt/network/interfaces 

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface

# automatically added when upgrading auto lo

iface lo inet loopback

# The first network card - this entry was created during the Debian installation

# (network, broadcast and gateway are optional)

# automatically added when upgrading auto eth0

iface eth0 inet static address 192.168.1.110 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255

gateway 192.168.1.1  

(4) ホストマシンの/etcディレクトリの設定

ホストマシン側の/etcディレクトリのネットワーク関連は、以下の内容になっています。ご使用の ネットワーク環境に合わせて、変更してください。変更する場合は、前述の/opt/cpz-netboot/etc ディレクトリも併せて変更してください。 

・ 

/etc/dhcpd.conf

#

# Sample configuration file for ISC dhcpd for Debian

#

# $Id: dhcpd.conf,v 1.4.2.2 2002/07/10 03:50:33 peloy Exp $

#

use-host-decl-names on;

ddns-update-style ad-hoc;

default-lease-time 600;

max-lease-time 7200;

subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.110 192.168.1.110;

option routers 192.168.1.110;

}

host greenart {

hardware ethernet 00:80:62:xx:xx:xx;

fixed-address greenart;

filename "/opt/cpz-netboot/boot/vmlinuz";

option root-path "/opt/cpz-netboot";

}

option option-128 code 128 = string;

option option-128 "DODES";

option option-129 code 129 = string;

option option-129 "ip=:::::eth0:";

hardware ethernet 00:80:62:xx:xx:xx;は、ご使用のCPZ-SH03のMACアドレスを指定してください。

CPZ-SH03のMACアドレスの確認方法は『54ページ  3.3.1  CPZ-SH03のMACアドレス確認方

法』を参照してください。

dhcpパッケージのバージョンが古いと、 dhcpd.confファイルのフォーマットが異なることにより

option指定の行でエラーなります。

以下のようにoption指定の行を変更します。

option option-128 "DODES";

option option-129 "ip=:::::eth0:";

・ 

/etc/exports

# /etc/exports: the access control list for filesystems which may be exported

# to NFS clients. See exports(5).

/opt greenart(rw,no_root_squash,insecure,sync)

・ 

/etc/hosts 

127.0.0.1 localhost.localdomain localhost debian 192.168.1.100 kitty

192.168.1.110 greenart

・ 

/etc/sysconfig/network-scripts/ifcfg-eth0 

DEVICE=eth0

ONBOOT=yes BOOTPROTO=static IPADDR=192.168.1.100 NETMASK=255.255.255.0

・ 

/etc/xinet.d/tftp 

service tftp {

socket_type = dgram

protocol = udp

wait = yes

user = root

server = /usr/sbin/in.tftpd server_args = -s /tftpboot

disable = no

per_source = 11

cps = 100 2

flags = IPv4

}

※ 網掛けの箇所にご注意ください

■ネットワーク経由でCPZ-SH03を起動

CPZ-SH03基板上のDSW2の 1,2をOFF、3,4をONにします。

CPZ-SH03のLAN1とホストマシンのLAN、および

クロスのシリアルで接続し、ホストマシン上で、

ターミナルエミュレーター(minicom)を起動後、CPZ-SH03の電源を入れます。

(ネットワーク経由でCPZ-SH03を起動する場合、ホストマシン上で、 nfsサーバ、dhcpdが動いてい

る必要があります。動いていない場合、/etc/init.dディレクトリの関連するデーモンをスタートして ください。)

約25秒後、『10ページ 

2.1.2  クロスのシリアルケーブルで接続する場合』と同様の起動メッセー

ジが表示され始めます。

Linux version 2.4.17 (root@kitty) (gcc version 3.0.4) #1 Mon Jun 27 15:24:43 JST 2005

On node 0 totalpages: 16384 zone(0): 16384 pages.

zone(1): 0 pages.

zone(2): 0 pages.

Kernel command line: mem=64M sh_mv=SH03 console=ttySC1,115200

root=/dev/nfs nfsroot=192.168.1.100:/opt/cpz-netboot ip=192.168.1.110::192.168.1.110:255.255.255.0:greenart::off ip=:::::eth0:

Setting GDB trap vector to 0x80000100         ・

        ・         ・

Starting internet superserver: inetd.

Starting deferred execution scheduler: atd.

Starting periodic command scheduler: cron.

Debian GNU/Linux testing/unstable greenart ttySC1 greenart login:

ここで、“root”と入力し、ログインします。

以上で、ネットワーク経由での起動は完了です。試しに、lsコマンドと実行すると、以下の様な表 示になります。これは、ホストマシン上の/root/cpz-netbootディレクトリと同じ内容です。 

greenart:~# ls /

bin cpz-base-2.4-20060320.tar.gz etc initrd opt sbin var boot cpz-base-2.6-20060320.tar.gz floppy lib proc tmp cdrom dev home mnt root usr greenart:~#

ドキュメント内 M11-JZSH01 (ページ 36-45)

関連したドキュメント