/[gentoo]/xml/htdocs/doc/en/gentoo-freebsd.xml
Gentoo

Diff of /xml/htdocs/doc/en/gentoo-freebsd.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.24 Revision 1.41
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.24 2007/04/04 14:22:45 nightmorph Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.41 2012/08/01 22:08:58 nightmorph Exp $ -->
4 4
5<guide link="/doc/en/gentoo-freebsd.xml"> 5<guide disclaimer="obsolete">
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>
24 <mail link="flameeyes@gentoo.org">Diego Pettenò</mail> 24 <mail link="flameeyes@gentoo.org">Diego Pettenò</mail>
25</author> 25</author>
26<author title="Editor"> 26<author title="Editor">
27 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> 27 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
28</author> 28</author>
29<author title="Editor">
30 <mail link="cam@gentoo.org">Camille Huot</mail>
31</author>
32<author title="Editor">
33 <mail link="klondike" />
34</author>
29 35
30<abstract> 36<abstract>
31This document gives some general information on FreeBSD, as well as 37This document gives some general information on FreeBSD, as well as
32installation instructions for Gentoo/FreeBSD. It also includes some reference 38installation instructions for Gentoo/FreeBSD. It also includes some reference
33for people interested in helping out with development. 39for people interested in helping out with development.
35 41
36<!-- The content of this document is licensed under the CC-BY-SA license --> 42<!-- The content of this document is licensed under the CC-BY-SA license -->
37<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 43<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
38<license/> 44<license/>
39 45
40<version>2.7</version> 46<version>9</version>
41<date>2007-01-02</date> 47<date>2012-08-01</date>
42 48
43<chapter> 49<chapter>
44<title>Introduction to FreeBSD</title> 50<title>Introduction to FreeBSD</title>
45<section> 51<section>
46<title>What is FreeBSD?</title> 52<title>What is FreeBSD?</title>
47<body> 53<body>
54
55<impo>
56Be sure to read the Gentoo/FreeBSD <uri
57link="http://wiki.gentoo.org/wiki/Gentoo_FreeBSD">wiki page</uri> for up-to-date
58installation instructions.
59</impo>
48 60
49<p> 61<p>
50<uri link="http://www.freebsd.org/">FreeBSD</uri> is a free (<uri 62<uri link="http://www.freebsd.org/">FreeBSD</uri> is a free (<uri
51link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>) 63link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>)
52Unix-like operating system. Back in 1993 when development of <uri 64Unix-like operating system. Back in 1993 when development of <uri
56sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance 68sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance
57and security, thus being used from small to huge companies all over the world. 69and security, thus being used from small to huge companies all over the world.
58</p> 70</p>
59 71
60<p> 72<p>
61FreeBSD's current production release is version 6.1, although the release of 6.2 73FreeBSD's current production release is version 7.1. Gentoo/FreeBSD is based on
62is very near at the time of writing (Release Candidate 2 was released recently). 74version 6.2 and older versions of Gentoo/FreeBSD are discontinued and no
63Gentoo/FreeBSD development is ongoing on this latter version, while older 75longer supported.
64versions are discontinued and no longer supported.
65</p> 76</p>
66 77
67</body> 78</body>
68</section> 79</section>
69<section> 80<section>
70<title>What is Gentoo/FreeBSD?</title> 81<title>What is Gentoo/FreeBSD?</title>
71<body> 82<body>
83
84<fig link="/images/artwork/GentooFreeBSD-logo-20060515-200x200.png"
85linkto="/proj/en/desktop/artwork/artwork.xml"/>
72 86
73<p> 87<p>
74<uri link="/proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD</uri> is a subproject 88<uri link="/proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD</uri> is a subproject
75of the <uri link="/proj/en/gentoo-alt/">Gentoo/Alt project</uri>, with the 89of the <uri link="/proj/en/gentoo-alt/">Gentoo/Alt project</uri>, with the
76goal of providing a fully-capable FreeBSD operating system featuring design 90goal of providing a fully-capable FreeBSD operating system featuring design
99 consistent. 113 consistent.
100 </li> 114 </li>
101 <li> 115 <li>
102 Contrary to the Linux kernel, FreeBSD development is not led by one person, 116 Contrary to the Linux kernel, FreeBSD development is not led by one person,
103 but instead managed by a small group of people called the <uri 117 but instead managed by a small group of people called the <uri
104 link="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/staff-core.html">Core 118 link="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/staff-committers.html">Core
105 Team</uri>. 119 Team</uri>.
106 </li> 120 </li>
107</ul> 121</ul>
108 122
109<p> 123<p>
197 211
198<note> 212<note>
199The output presented here will differ based on your network. 213The output presented here will differ based on your network.
200</note> 214</note>
201 215
202<p>
203Next, create the chroot for your installation:
204</p>
205
206<pre caption="Making the chroot directory">
207# <i>mkdir /mnt/gentoo</i>
208</pre>
209
210<note>
211There is a bug in the <uri
212link="http://dev.gentoo.org/~flameeyes/minimal-freesbie-drizzt.iso.bz2">
213minimal Freesbie CD</uri> that prevents the creation of the
214<path>/mnt/gentoo</path> mount point. To avoid this, use <path>/mnt</path>
215instead of <path>/mnt/gentoo</path> in the following sections.
216</note>
217
218</body> 216</body>
219</section> 217</section>
220<section> 218<section>
221<title>Partitioning the Drive</title> 219<title>Partitioning the Drive</title>
222<body> 220<body>
249<p> 247<p>
250Here, we'll refrain from using the automatic layout, and create one giant root 248Here, we'll refrain from using the automatic layout, and create one giant root
251partition, followed by a swap partition. Hit <b>c</b> to create a new 249partition, followed by a swap partition. Hit <b>c</b> to create a new
252partition. A dialog prompts you to enter a size. Go ahead and do so, using 250partition. A dialog prompts you to enter a size. Go ahead and do so, using
253MB/GB for setting different sizes, or C for cylinders. For root, choose FS as 251MB/GB for setting different sizes, or C for cylinders. For root, choose FS as
254the partition type, and set the mount point as <path>/mnt/gentoo</path>. <e>If 252the partition type, and set the mount point as <path>/mnt/</path>. <e>If
255you do not adjust the mount point, it will overwrite the FreeSBIE 253you do not adjust the mount point, it will overwrite the FreeSBIE
256environment!</e> As <path>/boot</path> is not a separate partition, you'll 254environment!</e> As <path>/boot</path> is not a separate partition, you'll
257need to disable soft-updates, or your system will not boot! To do so, use the 255need to disable soft-updates, or your system will not boot! To do so, use the
258arrow keys to navigate to your newly created partition, then hit the <b>s</b> 256arrow keys to navigate to your newly created partition, then hit the <b>s</b>
259key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until 257key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until
268When choosing a different mountpoint than <path>/</path> for your partition, 266When 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 267<c>sysinstall</c> will actually create a 'd' slice, which the bootloader won't
270boot from. To fix this, run the following: 268boot from. To fix this, run the following:
271</p> 269</p>
272 270
271<note>
272Please, make sure ad0s1 is unmounted before running the following command,
273otherwise it will not work.
274</note>
275
273<pre caption="Fixing the root partition letter"> 276<pre caption="Fixing the root partition letter">
274# <i>disklabel ad0s1 | sed 's/^ d:/ a:/g' | disklabel -w ad0s1</i> 277# <i>disklabel ad0s1 | sed 's/^ d:/ a:/' | disklabel -R ad0s1 /dev/stdin</i>
275</pre> 278</pre>
276 279
277<p> 280<p>
278This will finalize the partitioning process, and format the drive in UFS for 281This will finalize the partitioning process, and format the drive in UFS for
279FreeBSD to utilize. This will also mount the drive for you at the mount point 282FreeBSD to utilize. This will also mount the drive for you at the mount point
280specified earlier (<path>/mnt/gentoo</path>). You can verify this worked by 283specified earlier (<path>/mnt/</path>). You can verify this worked by
281running <c>mount</c>: 284running <c>mount</c>:
282</p> 285</p>
283 286
284<pre caption="Verifying the new disk layout was mounted with mount"> 287<pre caption="Verifying the new disk layout was mounted with mount">
285# <i>mount</i> 288# <i>mount</i>
286... 289...
287/dev/ad0s1a on /mnt/gentoo (ufs, local) 290/dev/ad0s1a on /mnt (ufs, local)
288</pre> 291</pre>
289 292
290<p> 293<p>
291Now that you have mounted the target partition, it is time to start on the Gentoo 294Now that you have mounted the target partition, it is time to start on the
292setup. 295Gentoo setup.
293</p> 296</p>
294 297
295</body> 298</body>
296</section> 299</section>
297<section> 300<section>
299<body> 302<body>
300 303
301<p> 304<p>
302First, we need to download a stage3 tarball and unpack it into the chroot. 305First, we need to download a stage3 tarball and unpack it into the chroot.
303Point your browser to 306Point your browser to
304<uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the 307<uri>http://distfiles.gentoo.org/experimental/x86/freebsd/stages/</uri>, grab the
305latest snapshot, and unpack it into the mountpoint: 308latest snapshot, and unpack it into the mountpoint:
306</p> 309</p>
307 310
308<pre caption="Obtaining and unpacking a stage3 tarball"> 311<pre caption="Obtaining and unpacking a stage3 tarball">
309# <i>cd /mnt/gentoo/</i> 312# <i>cd /mnt/</i>
310<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> 313<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment>
311# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/stage3-x86-freebsd-6.2_rc2.tar.bz2</i> 314# <i>wget http://distfiles.gentoo.org/experimental/x86/freebsd/stages/stage3-x86-freebsd-6.2-r1.tar.bz2</i>
312# <i>tar -jxvpf stage3-x86-freebsd-6.2_rc2.tar.bz2</i> 315# <i>tar -jxvpf stage3-x86-freebsd-6.2-r1.tar.bz2</i>
313<comment>(You can delete the tarball with the following command if you want to.)</comment> 316<comment>(You can delete the tarball with the following command if you want to.)</comment>
314# <i>rm stage3-x86-freebsd-6.2_rc2.tar.bz2</i> 317# <i>rm stage3-x86-freebsd-6.2-r1.tar.bz2</i>
315</pre> 318</pre>
316 319
317<note> 320<note>
318If you want you can use the transition overlay that contains semi-experimental 321If you want you can use the transition overlay that contains semi-experimental
319ebuilds with patches not yet in the main Portage tree, but does allow a wider 322ebuilds with patches not yet in the main Portage tree, but does allow a wider
328filesystem from the currently running system into the Gentoo/FreeBSD mount 331filesystem from the currently running system into the Gentoo/FreeBSD mount
329point before proceeding with the chroot. 332point before proceeding with the chroot.
330</p> 333</p>
331 334
332<pre caption="Mounting the /dev filesystem and chrooting"> 335<pre caption="Mounting the /dev filesystem and chrooting">
333# <i>mount -t devfs none /mnt/gentoo/dev/</i> 336# <i>mount -t devfs none /mnt/dev/</i>
334# <i>cp /etc/resolv.conf /mnt/gentoo/etc</i> 337# <i>cp /etc/resolv.conf /mnt/etc/</i>
335# <i>chroot /mnt/gentoo/ /bin/bash</i> 338# <i>chroot /mnt/ /bin/bash</i>
336# <i>env-update &amp;&amp; source /etc/profile</i> 339# <i>env-update &amp;&amp; source /etc/profile</i>
337</pre> 340</pre>
338 341
339<p> 342<p>
340After you obtain the Gentoo/FreeBSD overlay, it's time to link 343After you obtain the Gentoo/FreeBSD overlay, it's time to link
341<path>/etc/make.profile</path> to the correct profile and get your 344<path>/etc/portage/make.profile</path> to the correct profile and get your
342<path>/etc/make.conf</path> ready for Gentoo/FreeBSD. 345<path>/etc/portage/make.conf</path> ready for Gentoo/FreeBSD.
343</p> 346</p>
344 347
345<p> 348<p>
346Now, you have to obtain a copy of the main Gentoo Portage tree, which depending 349Now, you have to obtain a copy of the main Gentoo Portage tree, which depending
347on your connection might take quite a while. 350on your connection might take quite a while.
349 352
350<pre caption="Obtaining the Portage tree"> 353<pre caption="Obtaining the Portage tree">
351# <i>emerge --sync</i> 354# <i>emerge --sync</i>
352<comment>(It's also possible to retrieve the Portage tree in another way:)</comment> 355<comment>(It's also possible to retrieve the Portage tree in another way:)</comment>
353# <i>cd /</i> 356# <i>cd /</i>
354# <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> 357# <i>wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2</i>
355# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i> 358# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i>
356# <i>emerge --metadata</i> 359# <i>emerge --metadata</i>
357</pre> 360</pre>
358 361
359<pre caption="Setting up the profile and editing /etc/make.conf"> 362<pre caption="Setting up the profile and editing /etc/portage/make.conf">
360# <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.2/x86/ /etc/make.profile</i> 363# <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.2/x86/ /etc/portage/make.profile</i>
361# <i>nano /etc/make.conf</i> 364# <i>nano /etc/portage/make.conf</i>
362<comment>(Please make sure you add at least the following entries:)</comment> 365<comment>(Please make sure you add at least the following entries:)</comment>
363CHOST="i486-gentoo-freebsd6.2" 366CHOST="i686-gentoo-freebsd6.2"
364FEATURES="collision-protect" 367FEATURES="collision-protect"
365</pre> 368</pre>
366 369
367<note> 370<note>
368The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as 371The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as
369<c>~x86</c>, but please <e>do not</e> put <c>~x86</c> in ACCEPT_KEYWORDS. Rather 372<c>~x86</c>, but please <e>do not</e> put <c>~x86</c> in ACCEPT_KEYWORDS. Rather
370use <path>/etc/portage/package.keywords</path> to test packages, and report 373use <path>/etc/portage/package.accept_keywords</path> to test packages, and
371working packages on <uri 374report working packages on <uri
372link="http://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%2FAlt">Bugzilla</uri>. 375link="http://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%2FAlt">Bugzilla</uri>.
373</note> 376</note>
374 377
375<p> 378<p>
376If you want, you can now rebuild the system's core packages. 379If you want, you can now rebuild the system's core packages.
383</body> 386</body>
384</section> 387</section>
385</chapter> 388</chapter>
386<chapter> 389<chapter>
387<title>Setting up for Booting</title> 390<title>Setting up for Booting</title>
391<section>
392<title>Set your time zone</title>
393<body>
394
395<p>
396First make sure your date and time is set correctly using <c>date
397yyyymmddHHMM</c>. Use UTC time.
398</p>
399
400<pre caption="Set the date and UTC time">
401<comment>(Check the clock)</comment>
402# <i>date</i>
403Mon Mar 6 00:14:13 UTC 2006
404
405<comment>(Set the current date and time if required)</comment>
406# <i>date 200603060016</i> <comment>(Format is yyyymmddHHMM)</comment>
407Mon Mar 6 00:16:00 UTC 2006
408</pre>
409
410<p>
411Next, set your time zone information by using the correct listing in
412<path>/usr/share/zoneinfo</path>.
413</p>
414
415<pre caption="Setting your timezone">
416# <i>ls /usr/share/zoneinfo</i>
417<comment>(Using Brussels as an example)</comment>
418# <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i>
419
420# <i>date</i>
421Wed Mar 8 00:46:05 CET 2006
422</pre>
423
424<p>
425Edit <path>/etc/timezone</path> to define the time zone you used
426previously.
427</p>
428
429<pre caption="Edit /etc/timezone">
430# <i>nano -w /etc/timezone</i>
431Europe/Brussels
432</pre>
433
434</body>
435</section>
388<section> 436<section>
389<title>Kernel Installation</title> 437<title>Kernel Installation</title>
390<body> 438<body>
391 439
392<p> 440<p>
489<pre caption="Installing and setting up boot0"> 537<pre caption="Installing and setting up boot0">
490# <i>emerge boot0</i> 538# <i>emerge boot0</i>
491<comment>(Leave the chroot environment)</comment> 539<comment>(Leave the chroot environment)</comment>
492# <i>exit</i> 540# <i>exit</i>
493<comment>(Issued from outside the chroot)</comment> 541<comment>(Issued from outside the chroot)</comment>
494# <i>fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX</i> 542# <i>fdisk -B -b /mnt/boot/boot0 /dev/adX</i>
495# <i>chroot /mnt/gentoo /bin/bash</i> 543# <i>chroot /mnt/ /bin/bash</i>
496# <i>disklabel -B adXsY</i> 544# <i>disklabel -B adXsY</i>
497</pre> 545</pre>
498 546
499<p> 547<p>
500If you need additional information on setting up <c>boot0</c>, please consult 548If you need additional information on setting up <c>boot0</c>, please consult
551 599
552grub&gt; quit 600grub&gt; quit
553</pre> 601</pre>
554 602
555<p> 603<p>
604To make the loader find the kernel on a specific slice (the default is 'a'),
605add a <c>vfs.root.mountfrom</c> line to the <path>/boot/loader.conf</path>
606file:
607</p>
608
609<pre caption="Tell the loader where to look for the kernel">
610# <i>echo 'vfs.root.mountfrom="ufs:ad0s1d"' >> /boot/loader.conf</i>
611</pre>
612
613<p>
556When you first boot, you may not receive a grub menu. If so, run this at the 614When you first boot, you may not receive a grub menu. If so, run this at the
557prompt: 615prompt:
558</p> 616</p>
559 617
560<pre caption="Booting the kernel with no menu"> 618<pre caption="Booting the kernel with no menu">
571<note> 629<note>
572For more information on configuring grub, please refer to the <uri 630For more information on configuring grub, please refer to the <uri
573link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo 631link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo
574Linux Handbook</uri>. 632Linux Handbook</uri>.
575</note> 633</note>
634
635<warn>
636Grub doesn't follow UFS symlinks so be sure to delete the
637<path>/boot/grub/menu.lst</path> symlink and to use <path>menu.lst</path> to
638setup Grub (<path>grub.conf</path> isn't used).
639</warn>
576 640
577</body> 641</body>
578</section> 642</section>
579<section> 643<section>
580<title>System configuration</title> 644<title>System configuration</title>
643 707
644<note> 708<note>
645For more information on domainnames and networking, please refer to the <uri 709For more information on domainnames and networking, please refer to the <uri
646link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=8#doc_chap2">Gentoo 710link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=8#doc_chap2">Gentoo
647Linux Handbook</uri>, and please read the documentation in 711Linux Handbook</uri>, and please read the documentation in
648<path>/etc/conf.d/net.example</path>. 712<path>/usr/share/doc/openrc-*/net.example.bz2</path>.
649</note> 713</note>
650 714
651<p> 715<p>
652In case you need to use another keyboard layout for your language, you have to 716In case you need to use another keyboard layout for your language, you have to
653set the correct value in <path>/etc/conf.d/syscons</path>. The following example 717set the correct value in <path>/etc/conf.d/syscons</path>. The following example

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.20