1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
3 | |
3 | |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
6 | |
6 | |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-config.xml,v 1.63 2005/06/11 17:52:26 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-config.xml,v 1.64 2005/06/11 18:25:09 fox2mike Exp $ --> |
8 | |
8 | |
9 | <sections> |
9 | <sections> |
10 | |
10 | |
11 | <version>2.5</version> |
11 | <version>2.6</version> |
12 | <date>2005-06-11</date> |
12 | <date>2005-06-11</date> |
13 | |
13 | |
14 | <section> |
14 | <section> |
15 | <title>Filesystem Information</title> |
15 | <title>Filesystem Information</title> |
16 | <subsection> |
16 | <subsection> |
17 | <title>What is fstab?</title> |
17 | <title>What is fstab?</title> |
18 | <body> |
18 | <body> |
19 | |
19 | |
20 | <p> |
20 | <p> |
21 | Under Linux, all partitions used by the system must be listed in |
21 | Under Linux, all partitions used by the system must be listed in |
22 | <path>/etc/fstab</path>. This file contains the mountpoints of those partitions |
22 | <path>/etc/fstab</path>. This file contains the mountpoints of those partitions |
23 | (where they are seen in the file system structure), how they should be mounted |
23 | (where they are seen in the file system structure), how they should be mounted |
24 | and with what special options (automatically or not, whether users can mount |
24 | and with what special options (automatically or not, whether users can mount |
25 | them or not, etc.) |
25 | them or not, etc.) |
26 | </p> |
26 | </p> |
… | |
… | |
232 | First open <path>/etc/conf.d/net</path> with your favorite editor (<c>nano</c> |
232 | First open <path>/etc/conf.d/net</path> with your favorite editor (<c>nano</c> |
233 | is used in this example): |
233 | is used in this example): |
234 | </p> |
234 | </p> |
235 | |
235 | |
236 | <pre caption="Opening /etc/conf.d/net for editing"> |
236 | <pre caption="Opening /etc/conf.d/net for editing"> |
237 | # <i>nano -w /etc/conf.d/net</i> |
237 | # <i>nano -w /etc/conf.d/net</i> |
238 | </pre> |
238 | </pre> |
239 | |
239 | |
240 | <p> |
240 | <p> |
241 | The first variable you'll find is called <c>config_eth0</c>. As you can probably |
241 | The first variable you'll find is called <c>config_eth0</c>. As you can probably |
242 | imagine, this variable configured the eth0 network interface. If the interface |
242 | imagine, this variable configured the eth0 network interface. If the interface |
243 | needs to automatically obtain an IP address through DHCP, you should set it |
243 | needs to automatically obtain an IP address through DHCP, you should set it |
244 | like so: |
244 | like so: |
245 | </p> |
245 | </p> |
246 | |
246 | |
247 | <pre caption="Automatically obtaining an IP for eth0"> |
247 | <pre caption="Automatically obtaining an IP address for eth0"> |
248 | config_eth0=( "dhcp" ) |
248 | config_eth0=( "dhcp" ) |
249 | </pre> |
249 | </pre> |
250 | |
250 | |
251 | <p> |
251 | <p> |
252 | However, if you have to enter your own IP address, netmask and gateway, you need |
252 | However, if you have to enter your own IP address, netmask and gateway, you need |
253 | to set both <c>config_eth0</c> and <c>routes_eth0</c>: |
253 | to set both <c>config_eth0</c> and <c>routes_eth0</c>: |
254 | </p> |
254 | </p> |
255 | |
255 | |
256 | <pre caption="Manually setting IP information for eth0"> |
256 | <pre caption="Manually setting IP information for eth0"> |
257 | config_eth0=( "192.168.0.2 netmask 255.255.255.0" ) |
257 | config_eth0=( "192.168.0.2 netmask 255.255.255.0" ) |
258 | routes_eth0=( "default gw 192.168.0.1" ) |
258 | routes_eth0=( "default gw 192.168.0.1" ) |
259 | </pre> |
259 | </pre> |
260 | |
260 | |
261 | <p> |
261 | <p> |
262 | If you have several network interfaces repeat the above steps for |
262 | If you have several network interfaces repeat the above steps for |