📄 configuring-the-redboot-environment.html
字号:
>Under Red Hat 7 you must address files by absolute pathnames, for example: <TT
CLASS="FILENAME"
>/tftpboot/boot.img</TT
> not <TT
CLASS="FILENAME"
>/boot.img</TT
>, as you may have done with
other implementations.
On systems newer than Red Hat 7 (7.1 and beyond), filenames are once again relative to the
<TT
CLASS="FILENAME"
>/tftpboot</TT
> directory.</P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN2786">Enable BOOTP/DHCP server on Red Hat Linux</H3
><P
>First, ensure that you have
the proper package, <TT
CLASS="COMPUTEROUTPUT"
>dhcp</TT
> (not <TT
CLASS="COMPUTEROUTPUT"
>dhcpd</TT
>) installed. The DHCP server provides Dynamic Host Configuration,
that is, IP address and other data to hosts on a network. It does this in
different ways. Next, there can be a fixed relationship between a certain
node and the data, based on that node’s unique Ethernet Station Address
(ESA, sometimes called a MAC address). The other possibility is simply to
assign addresses that are free. The sample DHCP configuration file shown does
both. Refer to the DHCP documentation for more details.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN2797"><P
><B
>Example 1-1. Sample DHCP configuration file</B
></P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>--------------- /etc/dhcpd.conf -----------------------------
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 198.41.0.4, 128.9.0.107;
option domain-name “bogus.com”;
allow bootp;
shared-network BOGUS {
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.101;
range 192.168.1.1 192.168.1.254;
}
}
host mbx {
hardware ethernet 08:00:3E:28:79:B8;
fixed-address 192.168.1.20;
filename “/tftpboot/192.168.1.21/zImage”;
default-lease-time -1;
server-name “srvr.bugus.com”;
server-identifier 192.168.1.101;
option host-name “mbx”;
} </PRE
></TD
></TR
></TABLE
></DIV
><P
>Once the DHCP package has been installed and the configuration file
set up, type:<TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
># <TT
CLASS="USERINPUT"
><B
>service dhcpd start</B
></TT
></PRE
></TD
></TR
></TABLE
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN2803">Enable DNS server on Red Hat Linux</H3
><P
>First, ensure that you have the proper
RPM package, <TT
CLASS="COMPUTEROUTPUT"
>caching-nameserver</TT
>
installed. Then change the configuration
(in <TT
CLASS="FILENAME"
>/etc/named.conf</TT
>) so that the
<TT
CLASS="COMPUTEROUTPUT"
>forwarders</TT
> point to the primary
nameservers for your machine, normally using the nameservers listed in
<TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
>.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN2813"><P
><B
>Example 1-2. Sample <TT
CLASS="FILENAME"
>/etc/named.conf</TT
> for Red Hat Linux 7.x</B
></P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>--------------- /etc/named.conf -----------------------------
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
forward first;
forwarders {
212.242.40.3;
212.242.40.51;
};
};
//
// a caching only nameserver config
//
// Uncomment the following for Red Hat Linux 7.2 or above:
// controls {
// inet 127.0.0.1 allow { localhost; } keys { rndckey; };
// };
// include "/etc/rndc.key";
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
}; </PRE
></TD
></TR
></TABLE
></DIV
><P
>Make sure the server is started with the command:
<TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
># <TT
CLASS="USERINPUT"
><B
>service named start</B
></TT
></PRE
></TD
></TR
></TABLE
> and is
started on next reboot with the command
<TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
># <TT
CLASS="USERINPUT"
><B
>chkconfig named on</B
></TT
></PRE
></TD
></TR
></TABLE
>
Finally, you may wish to change
<TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
> to use
<TT
CLASS="COMPUTEROUTPUT"
>127.0.0.1</TT
> as the nameserver for your
local machine.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN2824">RedBoot network gateway</H3
><P
>RedBoot cannot communicate with
machines on different subnets because it does not support routing. It always
assumes that it can get to an address directly, therefore it always tries
to ARP and then send packets directly to that unit. This means that whatever
it talks to must be on the same subnet. If you need to talk to a host on a
different subnet (even if it's on the same ‘wire’), you need to
go through an ARP proxy, providing that there is a Linux box connected to
the network which is able to route to the TFTP server. For example: <TT
CLASS="FILENAME"
>/proc/sys/net/ipv4/conf/<TT
CLASS="REPLACEABLE"
><I
><interface></I
></TT
>/proxy_arp </TT
>where <TT
CLASS="REPLACEABLE"
><I
><interface></I
></TT
>should be replaced with whichever network interface
is directly connected to the board.</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN2834">Verification</H2
><P
>Once your network setup
has been configured, perform simple verification tests as follows: <P
></P
><UL
><LI
><P
>Reboot your system, to enable the setup, and then try to ‘ping’
the target board from a host.</P
></LI
><LI
><P
>Once communication has been established, try to ping
a host using the RedBoot ping command - both by IP address and hostname.</P
></LI
><LI
><P
>Try using the RedBoot load command to download a file
from a host.</P
></LI
></UL
></P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="resource-usage.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ecos-ref.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="redboot-commands-and-examples.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>RedBoot Resource Usage</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="getting-started-with-redboot.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>RedBoot Commands and Examples</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -