/[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.16 Revision 1.17
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.16 2006/03/30 08:41:57 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.17 2006/05/03 01:01:04 rane 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.3</version> 31<version>2.4</version>
32<date>2006-03-24</date> 32<date>2006-05-03</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 supports the x86, amd64, ia64, 46huge number of architectures, and FreeBSD which supports the x86, amd64, ia64,
47sparc64 and alpha platforms.FreeBSD is renowned for its stability, performance 47sparc64 and alpha platforms.FreeBSD is renowned for its stability, performance
48and security, thus being used from small to huge companies all over the world. 48and security, thus being used from small to huge companies all over the world.
49FreeBSD's current production release version is 6.0, which is also used as the 49FreeBSD's current production release version is 6.0, which is also used as the
50foundation for the Gentoo/FreeBSD project. The previous 5.x branch is being 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 51continued by the FreeBSD project as a service release, but is no more worked on by
142sure to use a version based on FreeBSD 6.0! Experimental versions can be downloaded 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 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. 144version 20060118 has been tested to work for the purposes described in this document.
145</note> 145</note>
146 146
147<note>
148We use <c>ee</c> as a default editor in this guide but you can choose
149<c>vim</c>, <c>nano</c> or any other editor you like to configure your system.
150</note>
151
147<p> 152<p>
148Before you can begin with the installation, you have to setup a hard disk for 153Before you can begin with the installation, you have to setup a hard disk for
149use with Gentoo/FreeBSD. This can either be done via <c>sysinstall</c> 154use with Gentoo/FreeBSD. This can either be done via <c>sysinstall</c>
150(available from a current FreeBSD installation as well as from within FreeSBIE) 155(available from a current FreeBSD installation as well as from within FreeSBIE)
151or by manually using the commands <c>fdisk</c>, <c>disklabel</c> and <c>newfs</c>. 156or by manually using the commands <c>fdisk</c>, <c>disklabel</c> and <c>newfs</c>.
185 190
186<pre caption="Remounting a partition in read-write mode"> 191<pre caption="Remounting a partition in read-write mode">
187# <i>mount -u -o rw /mnt/ufs.1</i> 192# <i>mount -u -o rw /mnt/ufs.1</i>
188</pre> 193</pre>
189 194
190
191<p> 195<p>
192Now that you have mounted the target partition, it is time to fetch and unpack 196Now that you have mounted the target partition, it is time to fetch and unpack
193a stage3 tarball. 197a stage3 tarball.
194</p> 198</p>
195 199
242After you got hold of the Gentoo/FreeBSD overlay, it's time to link 246After you got hold of the Gentoo/FreeBSD overlay, it's time to link
243<path>/etc/make.profile</path> to the correct profile and add get your 247<path>/etc/make.profile</path> to the correct profile and add get your
244<path>/etc/make.conf</path> ready for Gentoo/FreeBSD. 248<path>/etc/make.conf</path> ready for Gentoo/FreeBSD.
245</p> 249</p>
246 250
247<pre caption="Setting up the profile and editing /etc/make.conf">
248# <i>ln -sf /usr/local/portage/portage-alt-overlay/profiles/default-bsd/fbsd/6.0/x86/ /etc/make.profile</i>
249<comment>(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf)</comment>
250# <i>ee /etc/make.conf</i>
251<comment>(Please make sure you add at least the following entries:)</comment>
252CHOST="i686-gentoo-freebsd6.0"
253ACCEPT_KEYWORDS="~x86-fbsd ~x86"
254FEATURES="-sandbox collision-protect"
255PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay"
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>
262
263<p>
264In order to boot correctly, you will need to create the <path>/proc</path>
265directory.
266</p>
267
268<pre caption="Creating the /proc directory">
269# <i>mkdir /proc</i>
270</pre>
271
272<p> 251<p>
273Now, you have to obtain a copy of the main Gentoo Portage tree, which depending 252Now, you have to obtain a copy of the main Gentoo Portage tree, which depending
274on your connection might take quite a while. 253on your connection might take quite a while.
275</p> 254</p>
276 255
281# <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> 260# <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i>
282# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i> 261# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i>
283# <i>emerge --metadata</i> 262# <i>emerge --metadata</i>
284</pre> 263</pre>
285 264
265<pre caption="Setting up the profile and editing /etc/make.conf">
266# <i>ln -sf /usr/local/portage/portage-alt-overlay/profiles/default-bsd/fbsd/6.0/x86/ /etc/make.profile</i>
267<comment>(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf)</comment>
268# <i>ee /etc/make.conf</i>
269<comment>(Please make sure you add at least the following entries:)</comment>
270CHOST="i686-gentoo-freebsd6.0"
271ACCEPT_KEYWORDS="~x86-fbsd"
272FEATURES="-sandbox collision-protect"
273PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay"
274</pre>
275
276<note>
277You can have a very limited system by using ~x86-fbsd keyword alone; you might
278want to put ~x86 in your ACCEPT_KEYWORDS if you want access to more packages
279but you might find broken dependencies and non-working packages; please rather
280use package.keywords when testing packages and report working ones on <uri
281link="http://bugs.gentoo.org">Bugzilla</uri> for the product Gentoo/Alt.
282</note>
283
284<p>
285In order to boot correctly, you will need to create the <path>/proc</path>
286directory.
287</p>
288
289<pre caption="Creating the /proc directory">
290# <i>mkdir /proc</i>
291</pre>
292
286<p> 293<p>
287If you want, you can now rebuild the system's core packages. 294If you want, you can now rebuild the system's core packages.
288</p> 295</p>
289 296
290<pre caption="Rebuilding the FreeBSD core packages (Optional)"> 297<pre caption="Rebuilding the FreeBSD core packages (Optional)">
314supported on Gentoo/FreeBSD! Also note that <c>make install</c> will probably 321supported on Gentoo/FreeBSD! Also note that <c>make install</c> will probably
315ask you for a <path>/boot/device.hints</path> file. A default version can be 322ask you for a <path>/boot/device.hints</path> file. A default version can be
316found in the <path>conf</path> subdirectory of the <c>GENERIC</c> configuration 323found in the <path>conf</path> subdirectory of the <c>GENERIC</c> configuration
317and is called <path>GENERIC.hints</path>. 324and is called <path>GENERIC.hints</path>.
318</p> 325</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
323occurrences of -Werror and the currently used GCC doesn't accept FreeBSD's
324extensions to the printf() function.
325</note>
326 326
327<p> 327<p>
328Now 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
329are 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>.
330</p> 330</p>
343<p> 343<p>
344Now would also be a good time to set up your network connection before the final 344Now would also be a good time to set up your network connection before the final
345reboot. 345reboot.
346</p> 346</p>
347 347
348<pre caption="Setting up your network"> 348<p>
349# <i>ee /etc/conf.d/net</i> 349You can find all the information necessary to configure your network in the
350<comment>(This is just an example which you have to adjust for your network.)</comment> 350<uri link="/doc/en/handbook/handbook-x86.xml?part=4&amp;chap=1">Gentoo
351ifconfig_rl0=("192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255") 351Handbook</uri>.
352routes_rl0=("-net 0.0.0.0 -host 192.168.0.1")
353</pre>
354
355<p> 352</p>
353
354<p>
356To have your network interface activated at boot time, you have to add it to the default runlevel. 355To have your network interface activated at boot time, you have to add it to
356the default runlevel.
357</p> 357</p>
358 358
359<pre caption="Adding your network adapter to the default runlevel"> 359<pre caption="Adding your network adapter to the default runlevel">
360# <i>rc-update add net.rl0 default</i> 360# <i>rc-update add net.rl0 default</i>
361</pre> 361</pre>
362 362
363<p> 363<p>
364Your system's hostname can be changed in <path>/etc/hostname</path>. 364Your system's hostname can be changed in <path>/etc/conf.dhostname</path>.
365</p> 365</p>
366 366
367<pre caption="Setting up the machine's hostname"> 367<pre caption="Setting up the machine's hostname">
368# <i>echo "YOUR_HOSTNAME_HERE" > /etc/hostname</i> 368# <i>ee /etc/conf.d/hostname</i>
369<comment>(Set the HOSTNAME variable to your hostname)</comment>
370HOSTNAME="tux"
371</pre>
372
373<p>
374You should also configure your domain name, which is done in the
375<path>/etc/conf.d/domainname</path> file:
376</p>
377
378<pre caption="Setting the domainname">
379# <i>ee /etc/conf.d/domainname</i>
380<comment>(Set the DNSDOMAIN variable to your domain name)</comment>
381DNSDOMAIN="homenetwork"
382</pre>
383
384<p>
385If you have a NIS domain, you need to define it in the
386<path>/etc/conf.d/domainname</path> file:
387</p>
388
389<pre caption="Setting the NIS domainname">
390# <i>ee /etc/conf.d/domainname</i>
391<comment>(Set the NISDOMAIN variable to your NIS domain name)</comment>
392NISDOMAIN="my-nisdomain"
369</pre> 393</pre>
370 394
371<p> 395<p>
372In case you need to use another keyboard layout for your language, you have to 396In case you need to use another keyboard layout for your language, you have to
373set the correct value in <path>/etc/conf.d/syscons</path>. The following example 397set the correct value in <path>/etc/conf.d/syscons</path>. The following example
399# <i>chroot /mnt/gentoo /bin/bash</i> 423# <i>chroot /mnt/gentoo /bin/bash</i>
400# <i>disklabel -B adXsY</i> 424# <i>disklabel -B adXsY</i>
401</pre> 425</pre>
402 426
403<p> 427<p>
404If you need additonal information on setting up <c>boot0</c>, please consult 428If you need additional information on setting up <c>boot0</c>, please consult
405<uri 429<uri
406link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">chapter 430link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">chapter
40712</uri> of the FreeBSD handbook. 43112</uri> of the FreeBSD handbook.
408</p> 432</p>
409 433

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20