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

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

  ViewVC Help
Powered by ViewVC 1.1.20