| 1 | <?xml version="1.0" encoding="UTF-8"?> |
1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.22 2006/11/25 04:04:43 nightmorph Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.23 2007/01/03 03:08:25 nightmorph Exp $ --> |
| 3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 4 | |
4 | |
| 5 | <guide link="/doc/en/gentoo-freebsd.xml"> |
5 | <guide link="/doc/en/gentoo-freebsd.xml"> |
| 6 | <title>A short guide to Gentoo/FreeBSD</title> |
6 | <title>A short guide to Gentoo/FreeBSD</title> |
| 7 | |
7 | |
| 8 | <author title="Author"> |
8 | <author title="Author"> |
| 9 | <mail link="ignacio.arquelatour@gmail.com">Ignacio Arque-Latour</mail> |
9 | <mail link="ignacio.arquelatour@gmail.com">Ignacio Arque-Latour</mail> |
| 10 | </author> |
10 | </author> |
| 11 | <author title="Author"> |
11 | <author title="Author"> |
| 12 | <mail link="citizen428@gentoo.org">Michael Kohl</mail> |
12 | <mail link="citizen428@gentoo.org">Michael Kohl</mail> |
| 13 | </author> |
13 | </author> |
| 14 | <author title="Author"> |
14 | <author title="Author"> |
| 15 | <mail link="angusyoung@gentoo.org">Otavio R. Piske</mail> |
15 | <mail link="angusyoung@gentoo.org">Otavio R. Piske</mail> |
| 16 | </author> |
16 | </author> |
| 17 | <author title="Author"> |
17 | <author title="Author"> |
| 18 | <mail link="ka0ttic@gentoo.org">Aaron Walker</mail> |
18 | <mail link="ka0ttic@gentoo.org">Aaron Walker</mail> |
| 19 | </author> |
19 | </author> |
| 20 | <author title="Author"> |
20 | <author title="Author"> |
| 21 | <mail link="chriswhite@gentoo.org">Chris White</mail> |
21 | <mail link="chriswhite@gentoo.org">Chris White</mail> |
| 22 | </author> |
22 | </author> |
|
|
23 | <author title="Contributor"> |
|
|
24 | <mail link="flameeyes@gentoo.org">Diego Pettenò</mail> |
|
|
25 | </author> |
|
|
26 | <author title="Editor"> |
|
|
27 | <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> |
|
|
28 | </author> |
| 23 | |
29 | |
| 24 | <abstract> |
30 | <abstract> |
| 25 | This document gives some general information on FreeBSD, as well as |
31 | This document gives some general information on FreeBSD, as well as |
| 26 | installation instructions for Gentoo/FreeBSD. It also includes some reference |
32 | installation instructions for Gentoo/FreeBSD. It also includes some reference |
| 27 | for people interested in helping out with development. |
33 | for people interested in helping out with development. |
| 28 | </abstract> |
34 | </abstract> |
| 29 | |
35 | |
| 30 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
36 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 31 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
37 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 32 | <license/> |
38 | <license/> |
| 33 | |
39 | |
| 34 | <version>2.6</version> |
40 | <version>2.7</version> |
| 35 | <date>2006-10-06</date> |
41 | <date>2007-01-02</date> |
| 36 | |
42 | |
| 37 | <chapter> |
43 | <chapter> |
| 38 | <title>Introduction to FreeBSD</title> |
44 | <title>Introduction to FreeBSD</title> |
| 39 | <section> |
45 | <section> |
| 40 | <title>What is FreeBSD?</title> |
46 | <title>What is FreeBSD?</title> |
| 41 | <body> |
47 | <body> |
| 42 | |
48 | |
| 43 | <p> |
49 | <p> |
| 44 | <uri link="http://www.freebsd.org/">FreeBSD</uri> is a free (<uri |
50 | <uri link="http://www.freebsd.org/">FreeBSD</uri> is a free (<uri |
| 45 | link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>) |
51 | link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>) |
| 46 | Unix-like operating system. Back in 1993 when development of <uri |
52 | Unix-like operating system. Back in 1993 when development of <uri |
| 47 | link="http://www.386bsd.org/">386BSD</uri> stopped, two projects were born: |
53 | link="http://www.386bsd.org/">386BSD</uri> stopped, two projects were born: |
| 48 | <uri link="http://www.netbsd.org/">NetBSD</uri>, commonly known to run on a |
54 | <uri link="http://www.netbsd.org/">NetBSD</uri>, commonly known to run on a |
| 49 | huge number of architectures, and FreeBSD which supports the x86, amd64, ia64, |
55 | huge number of architectures, and FreeBSD which supports the x86, amd64, ia64, |
| 50 | sparc64 and alpha platforms.FreeBSD is renowned for its stability, performance |
56 | sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance |
| 51 | and security, thus being used from small to huge companies all over the world. |
57 | and security, thus being used from small to huge companies all over the world. |
| 52 | FreeBSD's current production release version is 6.1, which is also used as the |
58 | </p> |
| 53 | foundation for the Gentoo/FreeBSD project. The previous 5.x branch is being |
59 | |
| 54 | continued by the FreeBSD project as a service release, but is no longer worked |
60 | <p> |
| 55 | on by the Gentoo/FreeBSD developers. |
61 | FreeBSD's current production release is version 6.1, although the release of 6.2 |
|
|
62 | is very near at the time of writing (Release Candidate 2 was released recently). |
|
|
63 | Gentoo/FreeBSD development is ongoing on this latter version, while older |
|
|
64 | versions are discontinued and no longer supported. |
| 56 | </p> |
65 | </p> |
| 57 | |
66 | |
| 58 | </body> |
67 | </body> |
| 59 | </section> |
68 | </section> |
| 60 | <section> |
69 | <section> |
| 61 | <title>What is Gentoo/FreeBSD?</title> |
70 | <title>What is Gentoo/FreeBSD?</title> |
| 62 | <body> |
71 | <body> |
| 63 | |
72 | |
| 64 | <p> |
73 | <p> |
| 65 | <uri link="/proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD</uri> is a subproject |
74 | <uri link="/proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD</uri> is a subproject |
| 66 | of the <uri link="/proj/en/gentoo-alt/">Gentoo/Alt project</uri>, with the |
75 | of the <uri link="/proj/en/gentoo-alt/">Gentoo/Alt project</uri>, with the |
| 67 | goal of providing a fully-capable FreeBSD operating system featuring design |
76 | goal of providing a fully-capable FreeBSD operating system featuring design |
| 68 | sensibilities taken from Gentoo Linux, such as the init system and the Portage |
77 | sensibilities taken from Gentoo Linux, such as the init system and the Portage |
| 69 | package management system. |
78 | package management system. |
| 70 | </p> |
79 | </p> |
| … | |
… | |
| 131 | <title>Booting the CD</title> |
140 | <title>Booting the CD</title> |
| 132 | <body> |
141 | <body> |
| 133 | |
142 | |
| 134 | <p> |
143 | <p> |
| 135 | After this short introduction, it's about time to finally install |
144 | After this short introduction, it's about time to finally install |
| 136 | Gentoo/FreeBSD. Unfortunately, we currently lack our own installation media, so |
145 | Gentoo/FreeBSD. Unfortunately, we currently lack our own installation media, so |
| 137 | you have to choose between two alternative installation methods. The first |
146 | you have to choose between two alternative installation methods. The first |
| 138 | would be to use an existing FreeBSD installation to partition your hard drive |
147 | would be to use an existing FreeBSD installation to partition your hard drive |
| 139 | and use it as a base for installing Gentoo/FreeBSD. This guide will describe how |
148 | and use it as a base for installing Gentoo/FreeBSD. This guide will describe how |
| 140 | to use the <uri link="http://www.freesbie.org/">FreeSBIE LiveCD</uri> as |
149 | to use the <uri link="http://www.freesbie.org/">FreeSBIE LiveCD</uri> as |
| 141 | an installation medium for Gentoo/FreeBSD. |
150 | an installation medium for Gentoo/FreeBSD. |
| 142 | </p> |
151 | </p> |
| 143 | |
152 | |
| 144 | <note> |
153 | <note> |
| 145 | If you are intending to use FreeSBIE for installing Gentoo/FreeBSD, please make |
154 | If you are intending to use FreeSBIE for installing Gentoo/FreeBSD, please make |
| 146 | sure to use a version based on FreeBSD 6.0! Experimental versions can be downloaded |
155 | sure to use a version based on FreeBSD 6.x, such as FreeSBIE 2.0 (or one of its |
|
|
156 | release candidates). You can download it from <uri |
| 147 | from <uri link="http://torrent.freesbie.org/">FreeSBIE's Bittorrent tracker</uri> and |
157 | link="http://torrent.freesbie.org/">FreeSBIE's Bittorrent tracker</uri>. |
| 148 | version 20060118 has been tested to work for the purposes described in this document. |
|
|
| 149 | </note> |
158 | </note> |
| 150 | |
159 | |
| 151 | <p> |
160 | <p> |
| 152 | First, boot the CD in order to begin the installation process. You'll be |
161 | First, boot the CD in order to begin the installation process. You'll be |
| 153 | presented with a login screen. The username is <c>freesbie</c>, and there is |
162 | presented with a login screen. The username is <c>freesbie</c>, and there is |
| 154 | no password. Next, run <c>sudo su</c> to become root, and optionally setup a |
163 | no password. Next, run <c>sudo su</c> to become root, and optionally setup a |
| 155 | password. If you want to pass time during the installation process, you can run |
164 | password. If you want to pass time during the installation process, you can run |
| 156 | <c>startx</c> to enter into an Xfce environment, suitable for web browsing, |
165 | <c>startx</c> to enter into an Xfce environment, suitable for web browsing, |
| 157 | AIM, and other things. Unlike Linux, FreeBSD bases the name of your interface |
166 | AIM, and other things. Unlike Linux, FreeBSD bases the name of your interface |
| 158 | on the driver for the interface. For example, the Intel EtherExpress driver |
167 | on the driver for the interface. For example, the Intel EtherExpress driver |
| 159 | (fxp) appears as fxp0 (driver fxp, first network card). To see what your |
168 | (fxp) appears as fxp0 (driver fxp, first network card). To see what your |
| 160 | interface is, use <c>ifconfig</c>: |
169 | interface is, use <c>ifconfig</c>: |
| 161 | </p> |
170 | </p> |
| 162 | |
171 | |
| 163 | <pre caption="Finding out the network interface name using ifconfig"> |
172 | <pre caption="Finding out the network interface name using ifconfig"> |
| … | |
… | |
| 244 | MB/GB for setting different sizes, or C for cylinders. For root, choose FS as |
253 | MB/GB for setting different sizes, or C for cylinders. For root, choose FS as |
| 245 | the partition type, and set the mount point as <path>/mnt/gentoo</path>. <e>If |
254 | the partition type, and set the mount point as <path>/mnt/gentoo</path>. <e>If |
| 246 | you do not adjust the mount point, it will overwrite the FreeSBIE |
255 | you do not adjust the mount point, it will overwrite the FreeSBIE |
| 247 | environment!</e> As <path>/boot</path> is not a separate partition, you'll |
256 | environment!</e> As <path>/boot</path> is not a separate partition, you'll |
| 248 | need to disable soft-updates, or your system will not boot! To do so, use the |
257 | need to disable soft-updates, or your system will not boot! To do so, use the |
| 249 | arrow keys to navigate to your newly created partition, then hit the <b>s</b> |
258 | arrow keys to navigate to your newly created partition, then hit the <b>s</b> |
| 250 | key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until |
259 | key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until |
| 251 | the "Disk" line is highlighted, and hit <b>c</b> again to create a swap |
260 | the "Disk" line is highlighted, and hit <b>c</b> again to create a swap |
| 252 | partition. Generally, we recommend a swap space that is twice the size of your |
261 | partition. Generally, we recommend a swap space that is twice the size of your |
| 253 | RAM. Choose SWAP as the partition type, and don't worry about soft-updates, as |
262 | RAM. Choose SWAP as the partition type, and don't worry about soft-updates, as |
| 254 | it does not apply to swap. Now we're finished, so hit <b>q</b> to finish the |
263 | it does not apply to swap. Now we're finished, so hit <b>q</b> to finish the |
| 255 | process. |
264 | process. |
| 256 | </p> |
265 | </p> |
| 257 | |
266 | |
| 258 | <p> |
267 | <p> |
|
|
268 | When choosing a different mountpoint than <path>/</path> for your partition, |
|
|
269 | <c>sysinstall</c> will actually create a 'd' slice, which the bootloader won't |
|
|
270 | boot from. To fix this, run the following: |
|
|
271 | </p> |
|
|
272 | |
|
|
273 | <pre caption="Fixing the root partition letter"> |
|
|
274 | # <i>disklabel ad0s1 | sed 's/^ d:/ a:/g' | disklabel -w ad0s1</i> |
|
|
275 | </pre> |
|
|
276 | |
|
|
277 | <p> |
| 259 | This will finalize the partitioning process, and format the drive in UFS for |
278 | This will finalize the partitioning process, and format the drive in UFS for |
| 260 | FreeBSD to utilize. This will also mount the drive for you at the mount point |
279 | FreeBSD to utilize. This will also mount the drive for you at the mount point |
| 261 | specified earlier (<path>/mnt/gentoo</path>). You can verify this worked by |
280 | specified earlier (<path>/mnt/gentoo</path>). You can verify this worked by |
| 262 | running <c>mount</c>: |
281 | running <c>mount</c>: |
| 263 | </p> |
282 | </p> |
| 264 | |
283 | |
| 265 | <pre caption="Verifying the new disk layout was mounted with mount"> |
284 | <pre caption="Verifying the new disk layout was mounted with mount"> |
| 266 | # <i>mount</i> |
285 | # <i>mount</i> |
| 267 | ... |
286 | ... |
| 268 | /dev/ad0s1d on /mnt/gentoo (ufs, local) |
287 | /dev/ad0s1a on /mnt/gentoo (ufs, local) |
| 269 | </pre> |
288 | </pre> |
| 270 | |
289 | |
| 271 | <p> |
290 | <p> |
| 272 | Now that you have mounted the target partition, it is time to start on the Gentoo |
291 | Now that you have mounted the target partition, it is time to start on the Gentoo |
| 273 | setup. |
292 | setup. |
| 274 | </p> |
293 | </p> |
| 275 | |
294 | |
| 276 | </body> |
295 | </body> |
| 277 | </section> |
296 | </section> |
| 278 | <section> |
297 | <section> |
| 279 | <title>Gentoo Setup</title> |
298 | <title>Gentoo Setup</title> |
| 280 | <body> |
299 | <body> |
| 281 | |
300 | |
| 282 | <p> |
301 | <p> |
| 283 | First, we need to download a stage3 tarball and unpack it into the chroot. |
302 | First, we need to download a stage3 tarball and unpack it into the chroot. |
| 284 | Point your browser to |
303 | Point your browser to |
| 285 | <uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the |
304 | <uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the |
| 286 | latest snapshot, and unpack it into the mountpoint: |
305 | latest snapshot, and unpack it into the mountpoint: |
| 287 | </p> |
306 | </p> |
| 288 | |
307 | |
| 289 | <pre caption="Obtaining and unpacking a stage3 tarball"> |
308 | <pre caption="Obtaining and unpacking a stage3 tarball"> |
| 290 | # <i>cd /mnt/gentoo/</i> |
309 | # <i>cd /mnt/gentoo/</i> |
| 291 | <comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> |
310 | <comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> |
| 292 | # <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/gentoo-freebsd-6.1-stage-20060802.tar.bz2</i> |
311 | # <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/stage3-x86-freebsd-6.2_rc2.tar.bz2</i> |
| 293 | # <i>tar -jxvpf gentoo-freebsd-6.1-stage-20060802.tar.bz2</i> |
312 | # <i>tar -jxvpf stage3-x86-freebsd-6.2_rc2.tar.bz2</i> |
| 294 | <comment>(You can delete the tarball with the following command if you want to.)</comment> |
313 | <comment>(You can delete the tarball with the following command if you want to.)</comment> |
| 295 | # <i>rm gentoo-freebsd-6.1-stage-20060802.tar.bz2</i> |
314 | # <i>rm stage3-x86-freebsd-6.2_rc2.tar.bz2</i> |
| 296 | </pre> |
|
|
| 297 | |
|
|
| 298 | <p> |
|
|
| 299 | Before chrooting into the newly-extracted stage, you first must obtain an |
|
|
| 300 | up-to-date copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this |
|
|
| 301 | is to to get our latest snapshot which you then extract to |
|
|
| 302 | <path>/mnt/gentoo/usr/local/portage</path>. |
|
|
| 303 | </p> |
315 | </pre> |
| 304 | |
316 | |
| 305 | <pre caption="Getting the Gentoo/FreeBSD Portage overlay"> |
317 | <note> |
| 306 | # <i>cd /mnt/gentoo/usr/local/portage</i> |
318 | If you want you can use the transition overlay that contains semi-experimental |
| 307 | # <i>wget http://gentoo.osuosl.org/experimental/snapshots/portage-alt-overlay-latest.tar.bz2</i> |
319 | ebuilds with patches not yet in the main Portage tree, but does allow a wider |
| 308 | # <i>tar -xjf portage-alt-overlay-latest.tar.bz2</i> |
320 | range of supported packages, please refer to the <uri |
| 309 | <comment>(You now can safely delete the snapshot with the following command.)</comment> |
|
|
| 310 | # <i>rm portage-alt-overlay-latest.tar.bz2</i> |
|
|
| 311 | </pre> |
|
|
| 312 | |
|
|
| 313 | <p> |
|
|
| 314 | Alternatively, you can use Subversion to check out the current version of the |
|
|
| 315 | overlay. To do this, please refer to the <uri |
|
|
| 316 | link="/proj/en/gentoo-alt/contribute/index.xml?part=1&chap=3">Gentoo/ALT |
321 | link="/proj/en/gentoo-alt/contribute/index.xml?part=1&chap=3">Gentoo/ALT |
| 317 | overlay documentation</uri>. |
322 | overlay documentation</uri>. Please note that the overlay is not critical and |
| 318 | </p> |
323 | you can easily install and use Gentoo/FreeBSD without it. |
|
|
324 | </note> |
| 319 | |
325 | |
| 320 | <p> |
326 | <p> |
| 321 | In order for your install to work, you need to mount the <path>/dev</path> |
327 | In order for your install to work, you need to mount the <path>/dev</path> |
| 322 | filesystem from the currently running system into the Gentoo/FreeBSD mount |
328 | filesystem from the currently running system into the Gentoo/FreeBSD mount |
| 323 | point before proceeding with the chroot. |
329 | point before proceeding with the chroot. |
| 324 | </p> |
330 | </p> |
| 325 | |
331 | |
| 326 | <pre caption="Mounting the /dev filesystem and chrooting"> |
332 | <pre caption="Mounting the /dev filesystem and chrooting"> |
| 327 | # <i>mount -t devfs none /mnt/gentoo/dev/</i> |
333 | # <i>mount -t devfs none /mnt/gentoo/dev/</i> |
| 328 | # <i>cp /etc/resolv.conf /mnt/gentoo/etc</i> |
334 | # <i>cp /etc/resolv.conf /mnt/gentoo/etc</i> |
| 329 | # <i>chroot /mnt/gentoo/ /bin/bash</i> |
335 | # <i>chroot /mnt/gentoo/ /bin/bash</i> |
| 330 | # <i>env-update && source /etc/profile</i> |
336 | # <i>env-update && source /etc/profile</i> |
| 331 | </pre> |
337 | </pre> |
| 332 | |
338 | |
| 333 | <p> |
339 | <p> |
| … | |
… | |
| 339 | <p> |
345 | <p> |
| 340 | Now, you have to obtain a copy of the main Gentoo Portage tree, which depending |
346 | Now, you have to obtain a copy of the main Gentoo Portage tree, which depending |
| 341 | on your connection might take quite a while. |
347 | on your connection might take quite a while. |
| 342 | </p> |
348 | </p> |
| 343 | |
349 | |
| 344 | <pre caption="Obtaining the Portage tree"> |
350 | <pre caption="Obtaining the Portage tree"> |
| 345 | # <i>emerge --sync</i> |
351 | # <i>emerge --sync</i> |
| 346 | <comment>(It's also possible to retrieve the Portage tree in another way:)</comment> |
352 | <comment>(It's also possible to retrieve the Portage tree in another way:)</comment> |
| 347 | # <i>cd /</i> |
353 | # <i>cd /</i> |
| 348 | # <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> |
354 | # <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> |
| 349 | # <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i> |
355 | # <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i> |
| 350 | # <i>emerge --metadata</i> |
356 | # <i>emerge --metadata</i> |
| 351 | </pre> |
357 | </pre> |
| 352 | |
358 | |
| 353 | <pre caption="Setting up the profile and editing /etc/make.conf"> |
359 | <pre caption="Setting up the profile and editing /etc/make.conf"> |
| 354 | # <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.1/x86/ /etc/make.profile</i> |
360 | # <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.2/x86/ /etc/make.profile</i> |
| 355 | # <i>nano /etc/make.conf</i> |
361 | # <i>nano /etc/make.conf</i> |
| 356 | <comment>(Please make sure you add at least the following entries:)</comment> |
362 | <comment>(Please make sure you add at least the following entries:)</comment> |
| 357 | CHOST="i686-gentoo-freebsd6.1" |
363 | CHOST="i486-gentoo-freebsd6.2" |
| 358 | ACCEPT_KEYWORDS="~x86-fbsd" |
|
|
| 359 | FEATURES="-sandbox collision-protect" |
364 | FEATURES="collision-protect" |
| 360 | PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay" |
|
|
| 361 | </pre> |
365 | </pre> |
| 362 | |
366 | |
| 363 | <note> |
367 | <note> |
| 364 | Sandbox is disabled as it has not yet been ported to Gentoo/FreeBSD. |
368 | The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as |
| 365 | </note> |
369 | <c>~x86</c>, but please <e>do not</e> put <c>~x86</c> in ACCEPT_KEYWORDS. Rather |
| 366 | |
370 | use <path>/etc/portage/package.keywords</path> to test packages, and report |
| 367 | <note> |
371 | working packages on <uri |
| 368 | You can have a very limited system by using ~x86-fbsd keyword alone; you might |
372 | link="http://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%2FAlt">Bugzilla</uri>. |
| 369 | want to put ~x86 in your ACCEPT_KEYWORDS if you want access to more packages |
|
|
| 370 | but you might find broken dependencies and non-working packages; please rather |
|
|
| 371 | use package.keywords when testing packages and report working ones on <uri |
|
|
| 372 | link="http://bugs.gentoo.org">Bugzilla</uri> for the product Gentoo/Alt. |
|
|
| 373 | </note> |
373 | </note> |
| 374 | |
374 | |
| 375 | <p> |
375 | <p> |
| 376 | If you want, you can now rebuild the system's core packages. |
376 | If you want, you can now rebuild the system's core packages. |
| 377 | </p> |
377 | </p> |
| 378 | |
378 | |
| 379 | <pre caption="Rebuilding the FreeBSD core packages (optional)"> |
379 | <pre caption="Rebuilding the FreeBSD core packages (optional)"> |
| 380 | # <i>emerge -e system</i> |
380 | # <i>emerge -e system</i> |
| 381 | </pre> |
381 | </pre> |
| 382 | |
382 | |
| 383 | </body> |
383 | </body> |
| 384 | </section> |
384 | </section> |
| 385 | </chapter> |
385 | </chapter> |
| 386 | <chapter> |
386 | <chapter> |
| 387 | <title>Setting up for Booting</title> |
387 | <title>Setting up for Booting</title> |
| … | |
… | |
| 458 | </pre> |
458 | </pre> |
| 459 | |
459 | |
| 460 | <p> |
460 | <p> |
| 461 | <c>config</c> has created a GENERIC build directory for us in the parent |
461 | <c>config</c> has created a GENERIC build directory for us in the parent |
| 462 | directory. <c>cd</c> into it, then run the following to do a complete build: |
462 | directory. <c>cd</c> into it, then run the following to do a complete build: |
| 463 | </p> |
463 | </p> |
| 464 | |
464 | |
| 465 | <pre caption="Building and installing the kernel"> |
465 | <pre caption="Building and installing the kernel"> |
| 466 | # <i>cd ../compile/GENERIC</i> |
466 | # <i>cd ../compile/GENERIC</i> |
| 467 | # <i>make cleandepend && make depend && make && make install</i> |
467 | # <i>make cleandepend && make depend && make && make install</i> |
| 468 | </pre> |
468 | </pre> |
| 469 | |
469 | |
| 470 | <p> |
470 | <p> |
| 471 | This will give us a complete kernel to work with. Now we'll need to setup the |
471 | This will give us a complete kernel to work with. Now we'll need to setup the |
| 472 | bootloader for the kernel to boot. The next chapter will discuss two methods of |
472 | bootloader for the kernel to boot. The next chapter will discuss two methods of |
| 473 | setting up the bootloader: <c>grub</c> and <c>boot0</c>. |
473 | setting up the bootloader: <c>boot0</c> and <c>grub</c>. |
|
|
474 | </p> |
|
|
475 | |
|
|
476 | </body> |
|
|
477 | </section> |
|
|
478 | <section> |
|
|
479 | <title>Setting up the bootloader (boot0)</title> |
|
|
480 | <body> |
|
|
481 | |
|
|
482 | <impo> |
|
|
483 | <c>boot0</c> is the FreeBSD bootloader. Previously, it was the only supported |
|
|
484 | bootloader until <c>grub</c> was introduced into ports with UFS slice support. |
|
|
485 | To install and configure <c>boot0</c>, run the following. Remember to replace |
|
|
486 | <c>adXsY</c> with the actual number and slice of your disk. |
|
|
487 | </impo> |
|
|
488 | |
|
|
489 | <pre caption="Installing and setting up boot0"> |
|
|
490 | # <i>emerge boot0</i> |
|
|
491 | <comment>(Leave the chroot environment)</comment> |
|
|
492 | # <i>exit</i> |
|
|
493 | <comment>(Issued from outside the chroot)</comment> |
|
|
494 | # <i>fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX</i> |
|
|
495 | # <i>chroot /mnt/gentoo /bin/bash</i> |
|
|
496 | # <i>disklabel -B adXsY</i> |
|
|
497 | </pre> |
|
|
498 | |
|
|
499 | <p> |
|
|
500 | If you need additional information on setting up <c>boot0</c>, please consult |
|
|
501 | <uri |
|
|
502 | link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">chapter |
|
|
503 | 12</uri> of the FreeBSD handbook. Now it's time to do some basic system |
|
|
504 | configuration and settings. |
|
|
505 | </p> |
|
|
506 | |
|
|
507 | <p> |
|
|
508 | The next section will look at using the alternative bootloader, <c>grub</c>. |
| 474 | </p> |
509 | </p> |
| 475 | |
510 | |
| 476 | </body> |
511 | </body> |
| 477 | </section> |
512 | </section> |
| 478 | <section> |
513 | <section> |
| 479 | <title>Setting up the bootloader (grub)</title> |
514 | <title>Setting up the bootloader (grub)</title> |
| 480 | <body> |
515 | <body> |
| 481 | |
516 | |
| 482 | <p> |
517 | <p> |
| 483 | As of grub 0.97-r1, UFS slices are readable to <c>grub</c>. This lets us use |
518 | As of grub 0.97-r1, UFS slices are readable to <c>grub</c>. This lets us use |
| 484 | <c>grub</c> as a bootloader, the prefered method for those coming from a Linux |
519 | <c>grub</c> as a bootloader, the prefered method for those coming from a Linux |
| 485 | background. To begin, emerge <c>grub</c> and setup the label as bootable. |
520 | background. To begin, emerge <c>grub</c> and setup the label as bootable. |
| 486 | Remember to replace <c>adXsY</c> with the actual number and slice of your disk. |
521 | Remember to replace <c>adXsY</c> with the actual number and slice of your disk. |
| 487 | </p> |
522 | </p> |
| 488 | |
523 | |
| … | |
… | |
| 521 | When you first boot, you may not receive a grub menu. If so, run this at the |
556 | When you first boot, you may not receive a grub menu. If so, run this at the |
| 522 | prompt: |
557 | prompt: |
| 523 | </p> |
558 | </p> |
| 524 | |
559 | |
| 525 | <pre caption="Booting the kernel with no menu"> |
560 | <pre caption="Booting the kernel with no menu"> |
| 526 | grub> <i>find /boot/grub/stage1</i> |
561 | grub> <i>find /boot/grub/stage1</i> |
| 527 | <comment>(The output here is what you'll use in the next command)</comment> |
562 | <comment>(The output here is what you'll use in the next command)</comment> |
| 528 | (hd0,0,d) |
563 | (hd0,0,d) |
| 529 | |
564 | |
| 530 | grub> <i>kernel (hd0,0,d)/boot/loader</i> |
565 | grub> <i>kernel (hd0,0,d)/boot/loader</i> |
| 531 | [FreeBSD-a.out, loadaddr=0x200000, text=0x1000, data=0x3a000, bss=0x0, entry=0x200000] |
566 | [FreeBSD-a.out, loadaddr=0x200000, text=0x1000, data=0x3a000, bss=0x0, entry=0x200000] |
| 532 | |
567 | |
| 533 | grub> <i>boot</i> |
568 | grub> <i>boot</i> |
| 534 | </pre> |
569 | </pre> |
| 535 | |
570 | |
| 536 | <p> |
571 | <note> |
| 537 | The next section will look at using the alternative bootloader, <c>boot0</c>. |
572 | For more information on configuring grub, please refer to the <uri |
| 538 | </p> |
573 | link="/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2">Gentoo |
| 539 | |
574 | Linux Handbook</uri>. |
| 540 | </body> |
575 | </note> |
| 541 | </section> |
|
|
| 542 | <section> |
|
|
| 543 | <title>Setting up the bootloader (boot0)</title> |
|
|
| 544 | <body> |
|
|
| 545 | |
|
|
| 546 | <impo> |
|
|
| 547 | <c>boot0</c> is the FreeBSD bootloader. Previously, it was the only supported |
|
|
| 548 | bootloader until <c>grub</c> was introduced into ports with UFS slice support. |
|
|
| 549 | To install and configure <c>boot0</c>, run the following. Remember to replace |
|
|
| 550 | <c>adXsY</c> with the actual number and slice of your disk. |
|
|
| 551 | </impo> |
|
|
| 552 | |
|
|
| 553 | <pre caption="Installing and setting up boot0"> |
|
|
| 554 | # <i>emerge boot0</i> |
|
|
| 555 | <comment>(Leave the chroot environment)</comment> |
|
|
| 556 | # <i>exit</i> |
|
|
| 557 | <comment>(Issued from outside the chroot)</comment> |
|
|
| 558 | # <i>fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX</i> |
|
|
| 559 | # <i>chroot /mnt/gentoo /bin/bash</i> |
|
|
| 560 | # <i>disklabel -B adXsY</i> |
|
|
| 561 | </pre> |
|
|
| 562 | |
|
|
| 563 | <p> |
|
|
| 564 | If you need additional information on setting up <c>boot0</c>, please consult |
|
|
| 565 | <uri |
|
|
| 566 | link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">chapter |
|
|
| 567 | 12</uri> of the FreeBSD handbook. Now it's time to do some basic system |
|
|
| 568 | configuration and settings. |
|
|
| 569 | </p> |
|
|
| 570 | |
576 | |
| 571 | </body> |
577 | </body> |
| 572 | </section> |
578 | </section> |
| 573 | <section> |
579 | <section> |
| 574 | <title>System configuration</title> |
580 | <title>System configuration</title> |
| 575 | <body> |
581 | <body> |
| 576 | |
582 | |
| 577 | <p> |
583 | <p> |
| 578 | First, we are going to setup the filesystem mounting points in |
584 | First, we are going to setup the filesystem mounting points in |
| 579 | <path>/etc/fstab</path>. |
585 | <path>/etc/fstab</path>. |
| 580 | </p> |
586 | </p> |
| 581 | |
587 | |
| 582 | <pre caption="Editing the filesystem in /etc/fstab"> |
588 | <pre caption="Editing the filesystem in /etc/fstab"> |
| 583 | # <i>nano /etc/fstab</i> |
589 | # <i>nano /etc/fstab</i> |
| 584 | <comment>(This is an example, replace X and Y with the correct numbers for your hard disk.)</comment> |
590 | <comment>(This is an example, replace X and Y with the correct numbers for your hard disk.)</comment> |
| … | |
… | |
| 607 | </p> |
613 | </p> |
| 608 | |
614 | |
| 609 | <pre caption="Setting up the machine's hostname"> |
615 | <pre caption="Setting up the machine's hostname"> |
| 610 | # <i>nano /etc/conf.d/hostname</i> |
616 | # <i>nano /etc/conf.d/hostname</i> |
| 611 | <comment>(Set the HOSTNAME variable to your hostname)</comment> |
617 | <comment>(Set the HOSTNAME variable to your hostname)</comment> |
| 612 | HOSTNAME="tux" |
618 | HOSTNAME="tux" |
| 613 | </pre> |
619 | </pre> |
| 614 | |
620 | |
| 615 | <p> |
621 | <p> |
| 616 | You should also configure your domain name, which is done in the |
622 | You should also configure your domain name, which is done in the |
| 617 | <path>/etc/conf.d/domainname</path> file: |
623 | <path>/etc/conf.d/domainname</path> file: |
| 618 | </p> |
624 | </p> |
| 619 | |
625 | |
| 620 | <pre caption="Setting the domainname"> |
626 | <pre caption="Setting the domainname"> |
| 621 | # <i>nano /etc/conf.d/domainname</i> |
627 | # <i>nano /etc/conf.d/domainname</i> |
| 622 | <comment>(Set the DNSDOMAIN variable to your domain name)</comment> |
628 | <comment>(Set the dns_domain variable to your domain name, and lo to your local |
| 623 | DNSDOMAIN="homenetwork" |
629 | network interface)</comment> |
|
|
630 | dns_domain_lo="homenetwork" |
| 624 | </pre> |
631 | </pre> |
| 625 | |
632 | |
| 626 | <p> |
633 | <p> |
| 627 | If you have a NIS domain, you need to define it in the |
634 | If you have a NIS domain, you need to define it in the |
| 628 | <path>/etc/conf.d/domainname</path> file: |
635 | <path>/etc/conf.d/domainname</path> file: |
| 629 | </p> |
636 | </p> |
| 630 | |
637 | |
| 631 | <pre caption="Setting the NIS domainname"> |
638 | <pre caption="Setting the NIS domainname"> |
| 632 | # <i>nano /etc/conf.d/domainname</i> |
639 | # <i>nano /etc/conf.d/domainname</i> |
| 633 | <comment>(Set the NISDOMAIN variable to your NIS domain name)</comment> |
640 | <comment>(Set the nis_domain variable to your NIS domain name, and lo to your local network interface)</comment> |
| 634 | NISDOMAIN="my-nisdomain" |
641 | nis_domain_lo="my-nisdomain" |
| 635 | </pre> |
642 | </pre> |
|
|
643 | |
|
|
644 | <note> |
|
|
645 | For more information on domainnames and networking, please refer to the <uri |
|
|
646 | link="/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2">Gentoo |
|
|
647 | Linux Handbook</uri>, and please read the documentation in |
|
|
648 | <path>/etc/conf.d/net.example</path>. |
|
|
649 | </note> |
| 636 | |
650 | |
| 637 | <p> |
651 | <p> |
| 638 | In case you need to use another keyboard layout for your language, you have to |
652 | In case you need to use another keyboard layout for your language, you have to |
| 639 | set the correct value in <path>/etc/conf.d/syscons</path>. The following example |
653 | set the correct value in <path>/etc/conf.d/syscons</path>. The following example |
| 640 | uses the Spanish layout, so you'll have to adjust it to your need if you want to |
654 | uses the Spanish layout, so you'll have to adjust it to your need if you want to |
| 641 | use another one. |
655 | use another one. |
| 642 | </p> |
656 | </p> |
| 643 | |
657 | |
| 644 | <pre caption="Changing your keyboard layout (Optional)"> |
658 | <pre caption="Changing your keyboard layout (Optional)"> |
| 645 | # <i>nano /etc/conf.d/syscons</i> |
659 | # <i>nano /etc/conf.d/syscons</i> |
| 646 | KEYMAP="spanish.iso.acc" |
660 | KEYMAP="spanish.iso.acc" |
| 647 | <comment>(Possible layouts can be found in /usr/share/syscons/keymaps).</comment> |
661 | <comment>(Possible layouts can be found in /usr/share/syscons/keymaps).</comment> |
| 648 | </pre> |
662 | </pre> |
| 649 | |
663 | |
| 650 | <p> |
664 | <p> |
| … | |
… | |
| 730 | use help in this area. |
744 | use help in this area. |
| 731 | </li> |
745 | </li> |
| 732 | <li> |
746 | <li> |
| 733 | Contacts: we need people who can get in touch with FreeBSD developers to |
747 | Contacts: we need people who can get in touch with FreeBSD developers to |
| 734 | maintain contacts between us and the original project to exchange patches |
748 | maintain contacts between us and the original project to exchange patches |
| 735 | and discuss various problems and their solutions. Note that this should |
749 | and discuss various problems and their solutions. Note that this should |
| 736 | never involve any kind of spamming of mailing lists or IRC channels. |
750 | never involve any kind of spamming of mailing lists or IRC channels. |
| 737 | </li> |
751 | </li> |
| 738 | <li> |
752 | <li> |
| 739 | Testing: the more people are actively using Gentoo/FreeBSD, the more bugs |
753 | Testing: the more people are actively using Gentoo/FreeBSD, the more bugs |
| 740 | will be discovered, which helps us improving the quality of the port. If |
754 | will be discovered, which helps us improving the quality of the port. If |
| 741 | you are good at describing bugs or problems, we definitely want to hear |
755 | you are good at describing bugs or problems, we definitely want to hear |
| 742 | from you. |
756 | from you. |
| 743 | </li> |
757 | </li> |
| 744 | <li> |
758 | <li> |
| 745 | Other areas where we need help include: system ebuilds, baselayout, |
759 | Other areas where we need help include: system ebuilds, creation of |
| 746 | creation of installation CDs, documentation, kernel hacking. |
760 | installation CDs, documentation, kernel hacking. |
| 747 | </li> |
761 | </li> |
| 748 | </ul> |
762 | </ul> |
| 749 | |
763 | |
| 750 | </body> |
764 | </body> |
| 751 | </section> |
765 | </section> |
| 752 | |
766 | |
| 753 | <section> |
767 | <section> |
| 754 | <title>Known issues</title> |
768 | <title>Known issues</title> |
| 755 | <body> |
769 | <body> |
| 756 | |
770 | |
| 757 | <p> |
771 | <p> |
| 758 | At the moment, there are still quite a lot of known issues. Here are the ones |
772 | At the moment, there are still quite a lot of known issues. Here are the ones |
| 759 | really worth noting: |
773 | really worth noting: |
| 760 | </p> |
774 | </p> |
| 761 | |
775 | |
| 762 | <ul> |
776 | <ul> |
| 763 | <li> |
777 | <li> |
| 764 | Some init scripts depend on the clock service which we don't provide right |
778 | Some init scripts depend on the clock service which we don't provide right |
| 765 | now. You can just remove it from the dependencies of the script and report |
779 | now. You can just remove it from the dependencies of the script and report |
| 766 | that on our <uri link="http://bugs.gentoo.org/">bugzilla</uri>. Please |
780 | that on our <uri link="http://bugs.gentoo.org/">Bugzilla</uri>. Please |
| 767 | remember to use the "Gentoo BSD" product for your submission. |
781 | remember to use the "Gentoo/Alt" product for your submission. |
| 768 | </li> |
|
|
| 769 | <li>glib and gnome in general need a lot of fixes to be backported.</li> |
|
|
| 770 | <li> |
|
|
| 771 | The init system currently provided by Gentoo/FreeBSD's baselayout package is |
|
|
| 772 | not the same version used by Gentoo Linux and lacks some of its features. Work |
|
|
| 773 | on making newer versions working is underway. |
|
|
| 774 | </li> |
782 | </li> |
| 775 | </ul> |
783 | </ul> |
| 776 | |
784 | |
| 777 | </body> |
785 | </body> |
| 778 | </section> |
786 | </section> |
| 779 | </chapter> |
787 | </chapter> |
| 780 | |
788 | |
| 781 | <chapter> |
789 | <chapter> |
| 782 | <title>Contact</title> |
790 | <title>Contact</title> |
| 783 | <section> |
791 | <section> |
| 784 | <body> |
792 | <body> |
| 785 | |
793 | |
| 786 | <p> |
794 | <p> |
| 787 | A list of Gentoo/FreeBSD developers can be found at the <uri |
795 | A list of Gentoo/FreeBSD developers can be found at the <uri |
| 788 | link="/proj/en/gentoo-alt/bsd/fbsd/">project page</uri>. Other ways to contact |
796 | link="/proj/en/gentoo-alt/bsd/fbsd/">project page</uri>. Other ways to contact |