/[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.14 Revision 1.15
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.14 2006/03/02 13:32:47 yoswink Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.15 2006/03/28 10:30:14 neysx 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
26 26
27<!-- The content of this document is licensed under the CC-BY-SA license --> 27<!-- The content of this document is licensed under the CC-BY-SA license -->
28<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 28<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
29<license/> 29<license/>
30 30
31<version>2.1</version> 31<version>2.2</version>
32<date>2006-03-02</date> 32<date>2006-03-24</date>
33 33
34<chapter> 34<chapter>
35<title>Introduction to FreeBSD</title> 35<title>Introduction to FreeBSD</title>
36<section> 36<section>
37<title>What is FreeBSD?</title> 37<title>What is FreeBSD?</title>
41<uri link="http://www.freebsd.org/">FreeBSD</uri> is a free (<uri 41<uri link="http://www.freebsd.org/">FreeBSD</uri> is a free (<uri
42link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>) 42link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>)
43Unix-like operating system. Back in 1993 when development of <uri 43Unix-like operating system. Back in 1993 when development of <uri
44link="http://www.386bsd.org/">386BSD</uri> stopped, two projects were born: 44link="http://www.386bsd.org/">386BSD</uri> stopped, two projects were born:
45<uri link="http://www.netbsd.org/">NetBSD</uri>, commonly known to run on a 45<uri link="http://www.netbsd.org/">NetBSD</uri>, commonly known to run on a
46huge number of architetures, and FreeBSD which focuses mainly on the x86 46huge number of architetures, and FreeBSD which supports the x86, amd64, ia64,
47platform. FreeBSD is renowned for its stability, performance and security, thus 47sparc64 and alpha platforms.FreeBSD is renowned for its stability, performance
48being used from small to huge companies all over the world. FreeBSD's current 48and security, thus being used from small to huge companies all over the world.
49production release version is 5.4, which is also used as the foundation for the 49FreeBSD's current production release version is 6.0, which is also used as the
50Gentoo/FreeBSD project. 50foundation for the Gentoo/FreeBSD project. The previous 5.x branch is being
51continued by the FreeBSD project as a service release, but is no more worked on by
52the Gentoo/FreeBSD developers.
51</p> 53</p>
52 54
53</body> 55</body>
54</section> 56</section>
55<section> 57<section>
56<title>What is Gentoo/FreeBSD?</title> 58<title>What is Gentoo/FreeBSD?</title>
57<body> 59<body>
58 60
59<p> 61<p>
60Gentoo/FreeBSD is an effort to provide a fully-capable FreeBSD operating system 62<uri link="proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD</uri> is a subproject of the
61with Gentoo's design sensibilities. The long-term goal of the Gentoo/BSD project 63<uri link="proj/en/gentoo-alt/">Gentoo/Alt project</uri>, with the goal of providing
62is to allow users to choose any combination of *BSD or Linux kernels, *BSD or 64a fully-capable FreeBSD operating system featuring the design sensibilities known from
63GNU libc, and *BSD or GNU userland tools. 65Gentoo Linux, like the init system and the portage package management system.
64</p> 66</p>
65 67
66</body> 68</body>
67</section> 69</section>
68<section> 70<section>
133and use it as a base for installing Gentoo/FreeBSD. Alternatively, you can also 135and use it as a base for installing Gentoo/FreeBSD. Alternatively, you can also
134use the excellent <uri link="http://www.freesbie.org/">FreeSBIE LiveCD</uri> as 136use the excellent <uri link="http://www.freesbie.org/">FreeSBIE LiveCD</uri> as
135an installation medium for Gentoo/FreeBSD. 137an installation medium for Gentoo/FreeBSD.
136</p> 138</p>
137 139
140<note>
141If you are intending to use FreeSBIE for installing Gentoo/FreeBSD, please make
142sure to use a version based on FreeBSD 6.0! Experimental versions can be downloaded
143from <uri link="http://torrent.freesbie.org/">FreeSBIE's Bittorrent tracker</uri> and
144version 20060118 has been tested to work for the purposes described in this document.
145</note>
146
138<p> 147<p>
139Before you can begin with the installation, you have to setup a hard disk for 148Before you can begin with the installation, you have to setup a hard disk for
140use with Gentoo/FreeBSD. This can either be done via <c>sysinstall</c> 149use with Gentoo/FreeBSD. This can either be done via <c>sysinstall</c>
141(available from a current FreeBSD installation as well as from within FreeSBIE) 150(available from a current FreeBSD installation as well as from within FreeSBIE)
142or by manually using the commands <c>fdisk</c>, <c>disklabel</c> and 151or by manually using the commands <c>fdisk</c>, <c>disklabel</c> and <c>newfs</c>.
143<c>newfs</c>. If you have never set up a FreeBSD system before, 152If you have never set up a FreeBSD system before, <c>sysinstall</c> may be the
144<c>sysinstall</c> may be the better option for you. If you face difficulties 153better option for you. In that case make sure that you don't use the sysinstall
154launched by FreeBSD's or FreeSBIE's installers, but use the following command instead:
155</p>
156
157<pre caption="Partitioning with sysinstall">
158# <i>sysinstall diskPartitionEditor diskPartitionWrite diskLabelEditor diskLabelCommit</i>
159</pre>
160
161<p>
162If you face difficulties
145while partitioning or formatting your hard disks, have a look at the great 163while partitioning or formatting your hard disks, have a look at the great
146<uri link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/">FreeBSD 164<uri link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/">FreeBSD
147Handbook</uri> or hop onto <c>#gentoo-bsd</c> on the Freenode IRC server. 165Handbook</uri> or hop onto <c>#gentoo-bsd</c> on the Freenode IRC server.
148</p> 166</p>
149 167
157<comment>(Replace X with the correct numbers for your hard disk.)</comment> 175<comment>(Replace X with the correct numbers for your hard disk.)</comment>
158# <i>mount /dev/adXsXa /mnt/gentoo</i> 176# <i>mount /dev/adXsXa /mnt/gentoo</i>
159</pre> 177</pre>
160 178
161<p> 179<p>
180If you're using the FreeSBIE LiveCD and you already had an UFS partition on
181your hard disk, it has already been mounted read-only to <path>/mnt/ufs.1</path>.
182If you want to use that location for your installation, you'll have to remount it
183in read-write mode:
184</p>
185
186<pre caption="Remounting a partition in read-write mode">
187# <i>ount -u -o rw /mnt/ufs.1</i>
188</pre>
189
190
191<p>
162Now that you have mounted the target partition, it is time to fetch and unpack 192Now that you have mounted the target partition, it is time to fetch and unpack
163a stage3 tarball. 193a stage3 tarball.
164</p> 194</p>
165 195
166<pre caption="Obtaining and unpacking a stage3 tarball"> 196<pre caption="Obtaining and unpacking a stage3 tarball">
167# <i>cd /mnt/gentoo/</i> 197# <i>cd /mnt/gentoo/</i>
168<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> 198<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment>
169# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/stage3-x86-fbsd-20051020.tar.bz2</i> 199# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/gentoo-freebsd-6.0-stage-20060221.tar.bz2</i>
170# <i>tar -jxvpf stage3-x86-fbsd-20051020.tar.bz2</i> 200# <i>tar -jxvpf gentoo-freebsd-6.0-stage-20060221</i>
171<comment>(You can delete the tarball with the following command if you want to.)</comment> 201<comment>(You can delete the tarball with the following command if you want to.)</comment>
172# <i>rm stage3-x86-fbsd-20051020.tar.bz2</i> 202# <i>rm gentoo-freebsd-6.0-stage-20060221</i>
173</pre> 203</pre>
174 204
175<p> 205<p>
176Before chrooting into the newly-extracted stage, you first must obtain an 206Before chrooting into the newly-extracted stage, you first must obtain an
177up-to-date copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this 207up-to-date copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this
213<path>/etc/make.profile</path> to the correct profile and add get your 243<path>/etc/make.profile</path> to the correct profile and add get your
214<path>/etc/make.conf</path> ready for Gentoo/FreeBSD. 244<path>/etc/make.conf</path> ready for Gentoo/FreeBSD.
215</p> 245</p>
216 246
217<pre caption="Setting up the profile and editing /etc/make.conf"> 247<pre caption="Setting up the profile and editing /etc/make.conf">
218# <i>ln -sf /usr/local/portage/portage-alt-overlay/profiles/default-bsd/fbsd/5.4/x86/ /etc/make.profile</i> 248# <i>ln -sf /usr/local/portage/portage-alt-overlay/profiles/default-bsd/fbsd/6.0/x86/ /etc/make.profile</i>
219<comment>(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf)</comment> 249<comment>(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf)</comment>
220# <i>ee /etc/make.conf</i> 250# <i>ee /etc/make.conf</i>
221<comment>(Please make sure you add at least the following entries:)</comment> 251<comment>(Please make sure you add at least the following entries:)</comment>
222CHOST="i686-gentoo-freebsd5.4" 252CHOST="i686-gentoo-freebsd6.0"
223ACCEPT_KEYWORDS="~x86-fbsd ~x86" 253ACCEPT_KEYWORDS="~x86-fbsd ~x86"
224FEATURES="-sandbox collision-protect" 254FEATURES="-sandbox collision-protect"
225PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay" 255PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay"
226</pre> 256</pre>
257
258<note>
259If you're installing using an old 5.4 stage, please replace "5.4" by "6.0" when symlinking the profile and
260setting the CHOST variable.
261</note>
227 262
228<p> 263<p>
229In order to boot correctly, you will need to create the <path>/proc</path> 264In order to boot correctly, you will need to create the <path>/proc</path>
230directory. 265directory.
231</p> 266</p>
277<p> 312<p>
278Please note that currently only the "Traditional" way of building the kernel is 313Please note that currently only the "Traditional" way of building the kernel is
279supported on Gentoo/FreeBSD! Also note that <c>make install</c> will probably 314supported on Gentoo/FreeBSD! Also note that <c>make install</c> will probably
280ask you for a <path>/boot/device.hints</path> file. A default version can be 315ask you for a <path>/boot/device.hints</path> file. A default version can be
281found in the <path>conf</path> subdirectory of the <c>GENERIC</c> configuration 316found in the <path>conf</path> subdirectory of the <c>GENERIC</c> configuration
282and is called <path>GENERIC.hints</path> 317and is called <path>GENERIC.hints</path>.
283</p> 318</p>
319
320<note>
321When building a kernel, you should use the command "make WERROR=NO_WERROR"
322because the Gentoo/FreeBSD developers have not yet been able to patch out all
323occurences of -Werror and the currently used GCC doesn't accept FreeBSD's
324extensions to the printf() funktion.
325</note>
284 326
285<p> 327<p>
286Now is the time to do some basic system configuration and settings. First, we 328Now is the time to do some basic system configuration and settings. First, we
287are going to setup the filesystem mounting points in <path>/etc/fstab</path>. 329are going to setup the filesystem mounting points in <path>/etc/fstab</path>.
288</p> 330</p>
351<pre caption="Installing and setting up boot0"> 393<pre caption="Installing and setting up boot0">
352# <i>emerge boot0</i> 394# <i>emerge boot0</i>
353<comment>(Leave the chroot environment)</comment> 395<comment>(Leave the chroot environment)</comment>
354# <i>exit</i> 396# <i>exit</i>
355<comment>(Issued from outside the chroot)</comment> 397<comment>(Issued from outside the chroot)</comment>
356# <i>fdisk -b -B /mnt/gentoo/boot/boot0 /dev/adX</i> 398# <i>fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX</i>
357# <i>chroot /mnt/gentoo /bin/bash</i> 399# <i>chroot /mnt/gentoo /bin/bash</i>
358# <i>disklabel -B adXsY</i> 400# <i>disklabel -B adXsY</i>
359</pre> 401</pre>
360 402
361<p> 403<p>
401spare time: 443spare time:
402</p> 444</p>
403 445
404<ul> 446<ul>
405 <li> 447 <li>
406 We need GCC and binutils hackers who are able to port FreeBSD's patches to
407 the original versions of these tools provided by our main Portage tree.
408 </li>
409 <li>
410 Working on current ebuilds: this means working closely with ebuild 448 Working on current ebuilds: this means working closely with ebuild
411 maintainers in order to create patches or modify ebuilds in a way that can 449 maintainers in order to create patches or modify ebuilds in a way that can
412 be accepted into the main tree. 450 be accepted into the main tree.
413 </li> 451 </li>
414 <li> 452 <li>
434 </li> 472 </li>
435</ul> 473</ul>
436 474
437</body> 475</body>
438</section> 476</section>
439<section>
440<title>Building the system and dealing with issues</title>
441<body>
442 477
443<p>
444Although Linux and FreeBSD both are Unix-like operating systems, there are some
445important differences you have to know about if you want to contribute to our
446development effort:
447</p>
448
449<ul>
450 <li>
451 FreeBSD doesn't use the GNU autotools (autoconf, automake, autoheader).
452 Instead, it uses its own implementation of <c>make</c>, putting
453 configuration options in external files and some .mk files that are
454 included with each Makefile. Although a lot of work has been put into
455 those .mk files, it is not hard to find some installations failing due to
456 a missing <c>${INSTALL}&nbsp;-d</c> somewhere. The easy way to deal with
457 this kind of problem is to read the Makefile to find the accompanying .mk
458 file, then open that file and try to figure out which part failed (this is
459 not really hard once you figure out where in the installation process it
460 stopped).
461 </li>
462 <li>
463 Besides, due to the fact that FreeBSD is a complete operating system, you
464 won't find things like a FreeBSD kernel tarball for download on a web site.
465 The system is meant to be concise, thus whenever you start making an ebuild
466 for something that uses system sources, you are very likely to run into
467 problems when it tries to access non-existent files or directories. This
468 generally occurs when a Makefile points to <path>${.CURDIR}/../sys</path>,
469 or when a Makefile has a source dependency on another system package. There
470 is no default rule on dealing with such issues, but generally one of the
471 following procedures helps:
472 <ul>
473 <li>
474 If the ebuild is trying to access kernel sources, patch it to point to
475 <path>/usr/src/sys</path>
476 </li>
477 <li>
478 If it's trying to access some other source that is provided by the
479 system, it's easier to add it to <c>$SRC_URI</c> and unpack it to
480 <c>$WORKDIR</c>
481 </li>
482 </ul>
483 </li>
484 <li>
485 In order to maintain a concise buildsystem, we have several tarballs which
486 are grouped by their functionality. This means that system libraries can be
487 found in the freebsd-lib tarball, which contains the sources you would
488 usually find in /usr/src/lib. On the other hand, freebsd-usrsbin contains
489 <path>/usr/sbin/*</path> tools and consists of sources from
490 <path>/usr/src/usr.sbin</path>.
491 </li>
492</ul>
493
494</body>
495</section>
496<section> 478<section>
497<title>Known issues</title> 479<title>Known issues</title>
498<body> 480<body>
499 481
500<p> 482<p>
508 now. You can just remove it from the dependencies of the script and report 490 now. You can just remove it from the dependencies of the script and report
509 that on our <uri link="http://bugs.gentoo.org/">bugzilla</uri>. Please 491 that on our <uri link="http://bugs.gentoo.org/">bugzilla</uri>. Please
510 remember to use the "Gentoo BSD" product for your submission. 492 remember to use the "Gentoo BSD" product for your submission.
511 </li> 493 </li>
512 <li>glib and gnome in general need a lot of fixes to be backported.</li> 494 <li>glib and gnome in general need a lot of fixes to be backported.</li>
495 <li>
496 The init system currently provided by Gentoo/FreeBSD's baselayout package is
497 not the same version used by Gentoo Linux and lacks some of its features. Work
498 on making newer versions working is underway.
499 </li>
513</ul> 500</ul>
514 501
515</body> 502</body>
516</section> 503</section>
517</chapter> 504</chapter>

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20