/[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.40
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.40 2012/07/24 12:12:51 swift Exp $ -->
4 4
5<guide link="/doc/en/gentoo-freebsd.xml"> 5<guide disclaimer="obsolete" redirect="http://wiki.gentoo.org/wiki/Gentoo_FreeBSD">
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>8</version>
41<date>2007-01-02</date> 47<date>2012-07-24</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>
56sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance 62sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance
57and security, thus being used from small to huge companies all over the world. 63and security, thus being used from small to huge companies all over the world.
58</p> 64</p>
59 65
60<p> 66<p>
61FreeBSD's current production release is version 6.1, although the release of 6.2 67FreeBSD'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). 68version 6.2 and older versions of Gentoo/FreeBSD are discontinued and no
63Gentoo/FreeBSD development is ongoing on this latter version, while older 69longer supported.
64versions are discontinued and no longer supported.
65</p> 70</p>
66 71
67</body> 72</body>
68</section> 73</section>
69<section> 74<section>
70<title>What is Gentoo/FreeBSD?</title> 75<title>What is Gentoo/FreeBSD?</title>
71<body> 76<body>
77
78<fig link="/images/artwork/GentooFreeBSD-logo-20060515-200x200.png"
79linkto="/proj/en/desktop/artwork/artwork.xml"/>
72 80
73<p> 81<p>
74<uri link="/proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD</uri> is a subproject 82<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 83of the <uri link="/proj/en/gentoo-alt/">Gentoo/Alt project</uri>, with the
76goal of providing a fully-capable FreeBSD operating system featuring design 84goal of providing a fully-capable FreeBSD operating system featuring design
99 consistent. 107 consistent.
100 </li> 108 </li>
101 <li> 109 <li>
102 Contrary to the Linux kernel, FreeBSD development is not led by one person, 110 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 111 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 112 link="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/staff-committers.html">Core
105 Team</uri>. 113 Team</uri>.
106 </li> 114 </li>
107</ul> 115</ul>
108 116
109<p> 117<p>
197 205
198<note> 206<note>
199The output presented here will differ based on your network. 207The output presented here will differ based on your network.
200</note> 208</note>
201 209
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> 210</body>
219</section> 211</section>
220<section> 212<section>
221<title>Partitioning the Drive</title> 213<title>Partitioning the Drive</title>
222<body> 214<body>
249<p> 241<p>
250Here, we'll refrain from using the automatic layout, and create one giant root 242Here, 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 243partition, 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 244partition. 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 245MB/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 246the 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 247you do not adjust the mount point, it will overwrite the FreeSBIE
256environment!</e> As <path>/boot</path> is not a separate partition, you'll 248environment!</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 249need 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> 250arrow 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 251key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until
268When choosing a different mountpoint than <path>/</path> for your partition, 260When 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 261<c>sysinstall</c> will actually create a 'd' slice, which the bootloader won't
270boot from. To fix this, run the following: 262boot from. To fix this, run the following:
271</p> 263</p>
272 264
265<note>
266Please, make sure ad0s1 is unmounted before running the following command,
267otherwise it will not work.
268</note>
269
273<pre caption="Fixing the root partition letter"> 270<pre caption="Fixing the root partition letter">
274# <i>disklabel ad0s1 | sed 's/^ d:/ a:/g' | disklabel -w ad0s1</i> 271# <i>disklabel ad0s1 | sed 's/^ d:/ a:/' | disklabel -R ad0s1 /dev/stdin</i>
275</pre> 272</pre>
276 273
277<p> 274<p>
278This will finalize the partitioning process, and format the drive in UFS for 275This 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 276FreeBSD 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 277specified earlier (<path>/mnt/</path>). You can verify this worked by
281running <c>mount</c>: 278running <c>mount</c>:
282</p> 279</p>
283 280
284<pre caption="Verifying the new disk layout was mounted with mount"> 281<pre caption="Verifying the new disk layout was mounted with mount">
285# <i>mount</i> 282# <i>mount</i>
286... 283...
287/dev/ad0s1a on /mnt/gentoo (ufs, local) 284/dev/ad0s1a on /mnt (ufs, local)
288</pre> 285</pre>
289 286
290<p> 287<p>
291Now that you have mounted the target partition, it is time to start on the Gentoo 288Now that you have mounted the target partition, it is time to start on the
292setup. 289Gentoo setup.
293</p> 290</p>
294 291
295</body> 292</body>
296</section> 293</section>
297<section> 294<section>
299<body> 296<body>
300 297
301<p> 298<p>
302First, we need to download a stage3 tarball and unpack it into the chroot. 299First, we need to download a stage3 tarball and unpack it into the chroot.
303Point your browser to 300Point your browser to
304<uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the 301<uri>http://distfiles.gentoo.org/experimental/x86/freebsd/stages/</uri>, grab the
305latest snapshot, and unpack it into the mountpoint: 302latest snapshot, and unpack it into the mountpoint:
306</p> 303</p>
307 304
308<pre caption="Obtaining and unpacking a stage3 tarball"> 305<pre caption="Obtaining and unpacking a stage3 tarball">
309# <i>cd /mnt/gentoo/</i> 306# <i>cd /mnt/</i>
310<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> 307<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> 308# <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> 309# <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> 310<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> 311# <i>rm stage3-x86-freebsd-6.2-r1.tar.bz2</i>
315</pre> 312</pre>
316 313
317<note> 314<note>
318If you want you can use the transition overlay that contains semi-experimental 315If 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 316ebuilds 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 325filesystem from the currently running system into the Gentoo/FreeBSD mount
329point before proceeding with the chroot. 326point before proceeding with the chroot.
330</p> 327</p>
331 328
332<pre caption="Mounting the /dev filesystem and chrooting"> 329<pre caption="Mounting the /dev filesystem and chrooting">
333# <i>mount -t devfs none /mnt/gentoo/dev/</i> 330# <i>mount -t devfs none /mnt/dev/</i>
334# <i>cp /etc/resolv.conf /mnt/gentoo/etc</i> 331# <i>cp /etc/resolv.conf /mnt/etc/</i>
335# <i>chroot /mnt/gentoo/ /bin/bash</i> 332# <i>chroot /mnt/ /bin/bash</i>
336# <i>env-update &amp;&amp; source /etc/profile</i> 333# <i>env-update &amp;&amp; source /etc/profile</i>
337</pre> 334</pre>
338 335
339<p> 336<p>
340After you obtain the Gentoo/FreeBSD overlay, it's time to link 337After you obtain the Gentoo/FreeBSD overlay, it's time to link
341<path>/etc/make.profile</path> to the correct profile and get your 338<path>/etc/portage/make.profile</path> to the correct profile and get your
342<path>/etc/make.conf</path> ready for Gentoo/FreeBSD. 339<path>/etc/portage/make.conf</path> ready for Gentoo/FreeBSD.
343</p> 340</p>
344 341
345<p> 342<p>
346Now, you have to obtain a copy of the main Gentoo Portage tree, which depending 343Now, you have to obtain a copy of the main Gentoo Portage tree, which depending
347on your connection might take quite a while. 344on your connection might take quite a while.
349 346
350<pre caption="Obtaining the Portage tree"> 347<pre caption="Obtaining the Portage tree">
351# <i>emerge --sync</i> 348# <i>emerge --sync</i>
352<comment>(It's also possible to retrieve the Portage tree in another way:)</comment> 349<comment>(It's also possible to retrieve the Portage tree in another way:)</comment>
353# <i>cd /</i> 350# <i>cd /</i>
354# <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> 351# <i>wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2</i>
355# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i> 352# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i>
356# <i>emerge --metadata</i> 353# <i>emerge --metadata</i>
357</pre> 354</pre>
358 355
359<pre caption="Setting up the profile and editing /etc/make.conf"> 356<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> 357# <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.2/x86/ /etc/portage/make.profile</i>
361# <i>nano /etc/make.conf</i> 358# <i>nano /etc/portage/make.conf</i>
362<comment>(Please make sure you add at least the following entries:)</comment> 359<comment>(Please make sure you add at least the following entries:)</comment>
363CHOST="i486-gentoo-freebsd6.2" 360CHOST="i686-gentoo-freebsd6.2"
364FEATURES="collision-protect" 361FEATURES="collision-protect"
365</pre> 362</pre>
366 363
367<note> 364<note>
368The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as 365The <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 366<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 367use <path>/etc/portage/package.accept_keywords</path> to test packages, and
371working packages on <uri 368report working packages on <uri
372link="http://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%2FAlt">Bugzilla</uri>. 369link="http://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%2FAlt">Bugzilla</uri>.
373</note> 370</note>
374 371
375<p> 372<p>
376If you want, you can now rebuild the system's core packages. 373If you want, you can now rebuild the system's core packages.
383</body> 380</body>
384</section> 381</section>
385</chapter> 382</chapter>
386<chapter> 383<chapter>
387<title>Setting up for Booting</title> 384<title>Setting up for Booting</title>
385<section>
386<title>Set your time zone</title>
387<body>
388
389<p>
390First make sure your date and time is set correctly using <c>date
391yyyymmddHHMM</c>. Use UTC time.
392</p>
393
394<pre caption="Set the date and UTC time">
395<comment>(Check the clock)</comment>
396# <i>date</i>
397Mon Mar 6 00:14:13 UTC 2006
398
399<comment>(Set the current date and time if required)</comment>
400# <i>date 200603060016</i> <comment>(Format is yyyymmddHHMM)</comment>
401Mon Mar 6 00:16:00 UTC 2006
402</pre>
403
404<p>
405Next, set your time zone information by using the correct listing in
406<path>/usr/share/zoneinfo</path>.
407</p>
408
409<pre caption="Setting your timezone">
410# <i>ls /usr/share/zoneinfo</i>
411<comment>(Using Brussels as an example)</comment>
412# <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i>
413
414# <i>date</i>
415Wed Mar 8 00:46:05 CET 2006
416</pre>
417
418<p>
419Edit <path>/etc/timezone</path> to define the time zone you used
420previously.
421</p>
422
423<pre caption="Edit /etc/timezone">
424# <i>nano -w /etc/timezone</i>
425Europe/Brussels
426</pre>
427
428</body>
429</section>
388<section> 430<section>
389<title>Kernel Installation</title> 431<title>Kernel Installation</title>
390<body> 432<body>
391 433
392<p> 434<p>
489<pre caption="Installing and setting up boot0"> 531<pre caption="Installing and setting up boot0">
490# <i>emerge boot0</i> 532# <i>emerge boot0</i>
491<comment>(Leave the chroot environment)</comment> 533<comment>(Leave the chroot environment)</comment>
492# <i>exit</i> 534# <i>exit</i>
493<comment>(Issued from outside the chroot)</comment> 535<comment>(Issued from outside the chroot)</comment>
494# <i>fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX</i> 536# <i>fdisk -B -b /mnt/boot/boot0 /dev/adX</i>
495# <i>chroot /mnt/gentoo /bin/bash</i> 537# <i>chroot /mnt/ /bin/bash</i>
496# <i>disklabel -B adXsY</i> 538# <i>disklabel -B adXsY</i>
497</pre> 539</pre>
498 540
499<p> 541<p>
500If you need additional information on setting up <c>boot0</c>, please consult 542If you need additional information on setting up <c>boot0</c>, please consult
551 593
552grub&gt; quit 594grub&gt; quit
553</pre> 595</pre>
554 596
555<p> 597<p>
598To make the loader find the kernel on a specific slice (the default is 'a'),
599add a <c>vfs.root.mountfrom</c> line to the <path>/boot/loader.conf</path>
600file:
601</p>
602
603<pre caption="Tell the loader where to look for the kernel">
604# <i>echo 'vfs.root.mountfrom="ufs:ad0s1d"' >> /boot/loader.conf</i>
605</pre>
606
607<p>
556When you first boot, you may not receive a grub menu. If so, run this at the 608When you first boot, you may not receive a grub menu. If so, run this at the
557prompt: 609prompt:
558</p> 610</p>
559 611
560<pre caption="Booting the kernel with no menu"> 612<pre caption="Booting the kernel with no menu">
571<note> 623<note>
572For more information on configuring grub, please refer to the <uri 624For 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 625link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo
574Linux Handbook</uri>. 626Linux Handbook</uri>.
575</note> 627</note>
628
629<warn>
630Grub doesn't follow UFS symlinks so be sure to delete the
631<path>/boot/grub/menu.lst</path> symlink and to use <path>menu.lst</path> to
632setup Grub (<path>grub.conf</path> isn't used).
633</warn>
576 634
577</body> 635</body>
578</section> 636</section>
579<section> 637<section>
580<title>System configuration</title> 638<title>System configuration</title>
643 701
644<note> 702<note>
645For more information on domainnames and networking, please refer to the <uri 703For 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 704link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=8#doc_chap2">Gentoo
647Linux Handbook</uri>, and please read the documentation in 705Linux Handbook</uri>, and please read the documentation in
648<path>/etc/conf.d/net.example</path>. 706<path>/usr/share/doc/openrc-*/net.example.bz2</path>.
649</note> 707</note>
650 708
651<p> 709<p>
652In case you need to use another keyboard layout for your language, you have to 710In 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 711set 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.40

  ViewVC Help
Powered by ViewVC 1.1.20