| 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.31 2004/03/27 09:37:30 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-config.xml,v 1.32 2004/03/29 19:11:27 swift Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | <section> |
10 | <section> |
| 11 | <title>Filesystem Information</title> |
11 | <title>Filesystem Information</title> |
| 12 | <subsection> |
12 | <subsection> |
| 13 | <title>What is fstab?</title> |
13 | <title>What is fstab?</title> |
| 14 | <body> |
14 | <body> |
| 15 | |
15 | |
| 16 | <p> |
16 | <p> |
| 17 | Under Linux, all partitions used by the system must be listed in |
17 | Under Linux, all partitions used by the system must be listed in |
| 18 | <path>/etc/fstab</path>. This file contains the mountpoints of those partitions |
18 | <path>/etc/fstab</path>. This file contains the mountpoints of those partitions |
| 19 | (where they are seen in the file system structure), how they should be mounted |
19 | (where they are seen in the file system structure), how they should be mounted |
| 20 | (special options) and when (automatically or not, can users mount those or not, |
20 | (special options) and when (automatically or not, can users mount those or not, |
| 21 | etc.). |
21 | etc.). |
| 22 | </p> |
22 | </p> |
| … | |
… | |
| 63 | </li> |
63 | </li> |
| 64 | </ul> |
64 | </ul> |
| 65 | |
65 | |
| 66 | <p> |
66 | <p> |
| 67 | So start <c>nano</c> (or your favorite editor) to create your |
67 | So start <c>nano</c> (or your favorite editor) to create your |
| 68 | <path>/etc/fstab</path>: |
68 | <path>/etc/fstab</path>: |
| 69 | </p> |
69 | </p> |
| 70 | |
70 | |
| 71 | <pre caption="Opening /etc/fstab"> |
71 | <pre caption="Opening /etc/fstab"> |
| 72 | # <i>nano -w /etc/fstab</i> |
72 | # <i>nano -w /etc/fstab</i> |
| 73 | </pre> |
73 | </pre> |
| 74 | |
74 | |
| 75 | <p> |
75 | <p> |
| 76 | Let us take a look at how we write down the options for the <path>/boot</path> |
76 | Let us take a look at how we write down the options for the <path>/boot</path> |
| 77 | partition. This is just an example, so if your architecture doesn't require a |
77 | partition. This is just an example, so if your architecture doesn't require a |
| 78 | <path>/boot</path> partition (such as PPC), don't copy it verbatim. |
78 | <path>/boot</path> partition (such as <b>PPC</b>), don't copy it verbatim. |
| 79 | </p> |
79 | </p> |
| 80 | |
80 | |
| 81 | <p> |
81 | <p> |
| 82 | In our default x86 partitioning example <path>/boot</path> is the |
82 | In our default x86 partitioning example <path>/boot</path> is the |
| 83 | <path>/dev/hda1</path> partition, with <c>ext2</c> as filesystem. It shouldn't |
83 | <path>/dev/hda1</path> partition, with <c>ext2</c> as filesystem. It shouldn't |
| 84 | be mounted automatically (<c>noauto</c>) but does need to be checked. So we |
84 | be mounted automatically (<c>noauto</c>) but does need to be checked. So we |
| 85 | would write down: |
85 | would write down: |
| 86 | </p> |
86 | </p> |
| 87 | |
87 | |
| 88 | <pre caption="An example /boot line for /etc/fstab"> |
88 | <pre caption="An example /boot line for /etc/fstab"> |
| 89 | /dev/hda1 /boot ext2 noauto 1 2 |
89 | /dev/hda1 /boot ext2 noauto 1 2 |
| 90 | </pre> |
90 | </pre> |
| 91 | |
91 | |
| 92 | <p> |
92 | <p> |
| 93 | Now, to improve performance, most users would want to add the <c>noatime</c> |
93 | Now, to improve performance, most users would want to add the <c>noatime</c> |
| … | |
… | |
| 123 | |
123 | |
| 124 | none /proc proc defaults 0 0 |
124 | none /proc proc defaults 0 0 |
| 125 | none /dev/shm tmpfs defaults 0 0 |
125 | none /dev/shm tmpfs defaults 0 0 |
| 126 | |
126 | |
| 127 | /dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 |
127 | /dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 |
| 128 | </pre> |
128 | </pre> |
| 129 | |
129 | |
| 130 | <p> |
130 | <p> |
| 131 | <c>auto</c> makes <c>mount</c> guess for the filesystem (recommended for |
131 | <c>auto</c> makes <c>mount</c> guess for the filesystem (recommended for |
| 132 | removable media as they can be created with one of many filesystems) and |
132 | removable media as they can be created with one of many filesystems) and |
| 133 | <c>user</c> makes it possible for non-root users to mount the CD. |
133 | <c>user</c> makes it possible for non-root users to mount the CD. |
| 134 | </p> |
134 | </p> |
| 135 | |
135 | |
| 136 | <p> |
136 | <p> |
| 137 | Now use the above example to create your <path>/etc/fstab</path>. If you are a |
137 | Now use the above example to create your <path>/etc/fstab</path>. If you are a |
| 138 | SPARC-user, you should add the following line to your <path>/etc/fstab</path> |
138 | <b>SPARC</b>-user, you should add the following line to your |
|
|
139 | <path>/etc/fstab</path> |
| 139 | too: |
140 | too: |
| 140 | </p> |
141 | </p> |
| 141 | |
142 | |
| 142 | <pre caption="Adding openprom filesystem to /etc/fstab"> |
143 | <pre caption="Adding openprom filesystem to /etc/fstab"> |
| 143 | none /proc/openprom openpromfs defaults 0 0 |
144 | none /proc/openprom openpromfs defaults 0 0 |
| 144 | </pre> |
145 | </pre> |
| 145 | |
146 | |
| 146 | <p> |
147 | <p> |
| 147 | If you need <c>usbfs</c>, add the following line to <path>/etc/fstab</path>: |
148 | If you need <c>usbfs</c>, add the following line to <path>/etc/fstab</path>: |
| 148 | </p> |
149 | </p> |
| 149 | |
150 | |
| 150 | <pre caption="Adding usbfs filesystem to /etc/fstab"> |
151 | <pre caption="Adding usbfs filesystem to /etc/fstab"> |
| 151 | none /proc/bus/usb usbfs defaults 0 0 |
152 | none /proc/bus/usb usbfs defaults 0 0 |
| 152 | </pre> |
153 | </pre> |
| 153 | |
154 | |
| … | |
… | |
| 393 | Open up <path>/etc/rc.conf</path> and enjoy all the comments in that file :) |
394 | Open up <path>/etc/rc.conf</path> and enjoy all the comments in that file :) |
| 394 | </p> |
395 | </p> |
| 395 | |
396 | |
| 396 | <pre caption="Opening /etc/rc.conf"> |
397 | <pre caption="Opening /etc/rc.conf"> |
| 397 | # <i>nano -w /etc/rc.conf</i> |
398 | # <i>nano -w /etc/rc.conf</i> |
| 398 | </pre> |
399 | </pre> |
| 399 | |
400 | |
| 400 | <p> |
401 | <p> |
| 401 | As you can see, this file is well commented to help you set up the necessary |
402 | As you can see, this file is well commented to help you set up the necessary |
| 402 | configuration variables. Take special care with the <c>KEYMAP</c> setting: if |
403 | configuration variables. Take special care with the <c>KEYMAP</c> setting: if |
| 403 | you select the wrong <c>KEYMAP</c> you will get weird results when typing on |
404 | you select the wrong <c>KEYMAP</c> you will get weird results when typing on |
| 404 | your keyboard. |
405 | your keyboard. |
| 405 | </p> |
406 | </p> |
| 406 | |
407 | |
| 407 | <note> |
408 | <note> |
| 408 | Users of USB-based SPARC systems and SPARC clones might need to select an i386 |
409 | Users of USB-based <b>SPARC</b> systems and <b>SPARC</b> clones might need to |
| 409 | keymap (such as "us") instead of "sunkeymap". |
410 | select an i386 keymap (such as "us") instead of "sunkeymap". |
| 410 | </note> |
411 | </note> |
| 411 | |
412 | |
| 412 | <p> |
413 | <p> |
| 413 | PPC uses x86 keymaps on most systems. Users who want to be able to use ADB |
414 | <b>PPC</b> uses x86 keymaps on most systems. Users who want to be able to use |
| 414 | keymaps on boot have to enable ADB keycode sendings in their kernel and have to |
415 | ADB keymaps on boot have to enable ADB keycode sendings in their kernel and have |
| 415 | set a mac/ppc keymap in <path>rc.conf</path>. |
416 | to set a mac/ppc keymap in <path>rc.conf</path>. |
| 416 | </p> |
417 | </p> |
| 417 | |
418 | |
| 418 | <p> |
419 | <p> |
| 419 | When you're finished configuring <path>/etc/rc.conf</path>, save and exit, then |
420 | When you're finished configuring <path>/etc/rc.conf</path>, save and exit, then |
| 420 | continue with <uri link="?part=1&chap=9">Configuring the Bootloader</uri>. |
421 | continue with <uri link="?part=1&chap=9">Configuring the Bootloader</uri>. |
| 421 | </p> |
422 | </p> |
| 422 | |
423 | |
| 423 | </body> |
424 | </body> |
| 424 | </section> |
425 | </section> |
| 425 | </sections> |
426 | </sections> |