/[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.21 Revision 1.24
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.21 2006/10/06 21:48:25 nightmorph Exp $ --> 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"> 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
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>
25This document gives some general information on FreeBSD, as well as 31This document gives some general information on FreeBSD, as well as
26installation instructions for Gentoo/FreeBSD. It also includes some reference 32installation instructions for Gentoo/FreeBSD. It also includes some reference
27for people interested in helping out with development. 33for people interested in helping out with development.
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>
45link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>) 51link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>)
46Unix-like operating system. Back in 1993 when development of <uri 52Unix-like operating system. Back in 1993 when development of <uri
47link="http://www.386bsd.org/">386BSD</uri> stopped, two projects were born: 53link="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
49huge number of architectures, and FreeBSD which supports the x86, amd64, ia64, 55huge number of architectures, and FreeBSD which supports the x86, amd64, ia64,
50sparc64 and alpha platforms.FreeBSD is renowned for its stability, performance 56sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance
51and security, thus being used from small to huge companies all over the world. 57and security, thus being used from small to huge companies all over the world.
52FreeBSD's current production release version is 6.1, which is also used as the 58</p>
53foundation for the Gentoo/FreeBSD project. The previous 5.x branch is being 59
54continued by the FreeBSD project as a service release, but is no longer worked 60<p>
55on by the Gentoo/FreeBSD developers. 61FreeBSD's current production release is version 6.1, although the release of 6.2
62is very near at the time of writing (Release Candidate 2 was released recently).
63Gentoo/FreeBSD development is ongoing on this latter version, while older
64versions are discontinued and no longer supported.
56</p> 65</p>
57 66
58</body> 67</body>
59</section> 68</section>
60<section> 69<section>
141an installation medium for Gentoo/FreeBSD. 150an installation medium for Gentoo/FreeBSD.
142</p> 151</p>
143 152
144<note> 153<note>
145If you are intending to use FreeSBIE for installing Gentoo/FreeBSD, please make 154If you are intending to use FreeSBIE for installing Gentoo/FreeBSD, please make
146sure to use a version based on FreeBSD 6.0! Experimental versions can be downloaded 155sure to use a version based on FreeBSD 6.x, such as FreeSBIE 2.0 (or one of its
156release candidates). You can download it from <uri
147from <uri link="http://torrent.freesbie.org/">FreeSBIE's Bittorrent tracker</uri> and 157link="http://torrent.freesbie.org/">FreeSBIE's Bittorrent tracker</uri>.
148version 20060118 has been tested to work for the purposes described in this document.
149</note> 158</note>
150 159
151<p> 160<p>
152First, boot the CD in order to begin the installation process. You'll be 161First, boot the CD in order to begin the installation process. You'll be
153presented with a login screen. The username is <c>freesbie</c>, and there is 162presented with a login screen. The username is <c>freesbie</c>, and there is
242partition, followed by a swap partition. Hit <b>c</b> to create a new 251partition, followed by a swap partition. Hit <b>c</b> to create a new
243partition. A dialog prompts you to enter a size. Go ahead and do so, using 252partition. A dialog prompts you to enter a size. Go ahead and do so, using
244MB/GB for setting different sizes, or C for cylinders. For root, choose FS as 253MB/GB for setting different sizes, or C for cylinders. For root, choose FS as
245the partition type, and set the mount point as <path>/mnt/gentoo</path>. <e>If 254the partition type, and set the mount point as <path>/mnt/gentoo</path>. <e>If
246you do not adjust the mount point, it will overwrite the FreeSBIE 255you do not adjust the mount point, it will overwrite the FreeSBIE
247environment!</e>. As <path>/boot</path> is not a separate partition, you'll 256environment!</e> As <path>/boot</path> is not a separate partition, you'll
248need to disable soft-updates, or your system will not boot! To do so, use the 257need to disable soft-updates, or your system will not boot! To do so, use the
249arrow keys to navigate to your newly created partition, then hit the <b>s</b> 258arrow keys to navigate to your newly created partition, then hit the <b>s</b>
250key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until 259key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until
251the "Disk" line is highlighted, and hit <b>c</b> again to create a swap 260the "Disk" line is highlighted, and hit <b>c</b> again to create a swap
252partition. Generally, we recommend a swap space that is twice the size of your 261partition. Generally, we recommend a swap space that is twice the size of your
254it does not apply to swap. Now we're finished, so hit <b>q</b> to finish the 263it does not apply to swap. Now we're finished, so hit <b>q</b> to finish the
255process. 264process.
256</p> 265</p>
257 266
258<p> 267<p>
268When 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
270boot 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>
259This will finalize the partitioning process, and format the drive in UFS for 278This will finalize the partitioning process, and format the drive in UFS for
260FreeBSD to utilize. This will also mount the drive for you at the mount point 279FreeBSD to utilize. This will also mount the drive for you at the mount point
261specified earlier (<path>/mnt/gentoo</path>). You can verify this worked by 280specified earlier (<path>/mnt/gentoo</path>). You can verify this worked by
262running <c>mount</c>: 281running <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>
272Now that you have mounted the target partition, it is time to start on the Gentoo 291Now that you have mounted the target partition, it is time to start on the Gentoo
273setup. 292setup.
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>
299Before chrooting into the newly-extracted stage, you first must obtain an
300up-to-date copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this
301is 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> 318If 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> 319ebuilds 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> 320range 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>
314Alternatively, you can use Subversion to check out the current version of the
315overlay. To do this, please refer to the <uri
316link="/proj/en/gentoo-alt/contribute/index.xml?part=1&amp;chap=3">Gentoo/ALT 321link="/proj/en/gentoo-alt/contribute/index.xml?part=1&amp;chap=3">Gentoo/ALT
317overlay documentation</uri>. 322overlay documentation</uri>. Please note that the overlay is not critical and
318</p> 323you can easily install and use Gentoo/FreeBSD without it.
324</note>
319 325
320<p> 326<p>
321In order for your install to work, you need to mount the <path>/dev</path> 327In order for your install to work, you need to mount the <path>/dev</path>
322filesystem from the currently running system into the Gentoo/FreeBSD mount 328filesystem from the currently running system into the Gentoo/FreeBSD mount
323point before proceeding with the chroot. 329point before proceeding with the chroot.
329# <i>chroot /mnt/gentoo/ /bin/bash</i> 335# <i>chroot /mnt/gentoo/ /bin/bash</i>
330# <i>env-update &amp;&amp; source /etc/profile</i> 336# <i>env-update &amp;&amp; source /etc/profile</i>
331</pre> 337</pre>
332 338
333<p> 339<p>
334After you got hold of the Gentoo/FreeBSD overlay, it's time to link 340After you obtain the Gentoo/FreeBSD overlay, it's time to link
335<path>/etc/make.profile</path> to the correct profile and add get your 341<path>/etc/make.profile</path> to the correct profile and get your
336<path>/etc/make.conf</path> ready for Gentoo/FreeBSD. 342<path>/etc/make.conf</path> ready for Gentoo/FreeBSD.
337</p> 343</p>
338 344
339<p> 345<p>
340Now, you have to obtain a copy of the main Gentoo Portage tree, which depending 346Now, you have to obtain a copy of the main Gentoo Portage tree, which depending
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>
357CHOST="i686-gentoo-freebsd6.1" 363CHOST="i486-gentoo-freebsd6.2"
358ACCEPT_KEYWORDS="~x86-fbsd"
359FEATURES="-sandbox collision-protect" 364FEATURES="collision-protect"
360PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay"
361</pre> 365</pre>
362 366
363<note> 367<note>
364Sandbox is disabled as it has not yet been ported to Gentoo/FreeBSD. 368The <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 370use <path>/etc/portage/package.keywords</path> to test packages, and report
367<note> 371working packages on <uri
368You can have a very limited system by using ~x86-fbsd keyword alone; you might 372link="http://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%2FAlt">Bugzilla</uri>.
369want to put ~x86 in your ACCEPT_KEYWORDS if you want access to more packages
370but you might find broken dependencies and non-working packages; please rather
371use package.keywords when testing packages and report working ones on <uri
372link="http://bugs.gentoo.org">Bugzilla</uri> for the product Gentoo/Alt.
373</note> 373</note>
374 374
375<p> 375<p>
376If you want, you can now rebuild the system's core packages. 376If you want, you can now rebuild the system's core packages.
377</p> 377</p>
468</pre> 468</pre>
469 469
470<p> 470<p>
471This will give us a complete kernel to work with. Now we'll need to setup the 471This will give us a complete kernel to work with. Now we'll need to setup the
472bootloader for the kernel to boot. The next chapter will discuss two methods of 472bootloader for the kernel to boot. The next chapter will discuss two methods of
473setting up the bootloader: <c>grub</c> and <c>boot0</c>. 473setting 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
484bootloader until <c>grub</c> was introduced into ports with UFS slice support.
485To 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>
500If you need additional information on setting up <c>boot0</c>, please consult
501<uri
502link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">chapter
50312</uri> of the FreeBSD handbook. Now it's time to do some basic system
504configuration and settings.
505</p>
506
507<p>
508The 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>
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
533grub&gt; <i>boot</i> 568grub&gt; <i>boot</i>
534</pre> 569</pre>
535 570
536<p> 571<note>
537The next section will look at using the alternative bootloader, <c>boot0</c>. 572For more information on configuring grub, please refer to the <uri
538</p> 573link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo
539 574Linux 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
548bootloader until <c>grub</c> was introduced into ports with UFS slice support.
549To 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>
564If you need additional information on setting up <c>boot0</c>, please consult
565<uri
566link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">chapter
56712</uri> of the FreeBSD handbook. Now it's time to do some basic system
568configuration 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>
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
623DNSDOMAIN="homenetwork" 629network interface)</comment>
630dns_domain_lo="homenetwork"
624</pre> 631</pre>
625 632
626<p> 633<p>
627If you have a NIS domain, you need to define it in the 634If 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>
634NISDOMAIN="my-nisdomain" 641nis_domain_lo="my-nisdomain"
635</pre> 642</pre>
643
644<note>
645For 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
647Linux Handbook</uri>, and please read the documentation in
648<path>/etc/conf.d/net.example</path>.
649</note>
636 650
637<p> 651<p>
638In case you need to use another keyboard layout for your language, you have to 652In case you need to use another keyboard layout for your language, you have to
639set the correct value in <path>/etc/conf.d/syscons</path>. The following example 653set the correct value in <path>/etc/conf.d/syscons</path>. The following example
640uses the Spanish layout, so you'll have to adjust it to your need if you want to 654uses the Spanish layout, so you'll have to adjust it to your need if you want to
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>
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>

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

  ViewVC Help
Powered by ViewVC 1.1.20