/[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.7 Revision 1.8
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.7 2005/10/06 15:58:16 jkt Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.8 2005/10/11 14:03:40 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
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>
11<author title="Author"> 11<author title="Author">
12 <mail link="citizen428@gentoo.org">Michael Kohl</mail> 12 <mail link="citizen428@gentoo.org">Michael Kohl</mail>
13</author> 13</author>
14<author title="Author"> 14<author title="Author">
15 Otavio R. Piske 15 <mail link="angusyoung@gentoo.org">Otavio R. Piske</mail>
16</author> 16</author>
17<author title="Author"> 17<author title="Author">
18 <mail link="ka0ttic@gentoo.org">Aaron Walker</mail> 18 <mail link="ka0ttic@gentoo.org">Aaron Walker</mail>
19</author> 19</author>
20 20
21<abstract> 21<abstract>
22This document gives some general information on FreeBSD, as well as 22This document gives some general information on FreeBSD, as well as
23installation instructions for Gentoo/FreeBSD. It also includes some reference 23installation instructions for Gentoo/FreeBSD. It also includes some reference
24for people interested in helping out with development. 24for people interested in helping out with development.
25</abstract> 25</abstract>
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>1.5</version> 31<version>1.6</version>
32<date>2005-10-06</date> 32<date>2005-10-10</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>
38<body> 38<body>
39 39
40<p> 40<p>
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 focuses mainly on the x86
47platform. FreeBSD is renowned for its stability, performance and security, thus 47platform. FreeBSD is renowned for its stability, performance and security, thus
141(available from a current FreeBSD installation as well as from within FreeSBIE) 141(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 142or by manually using the commands <c>fdisk</c>, <c>disklabel</c> and
143<c>newfs</c>. If you have never set up a FreeBSD system before, 143<c>newfs</c>. If you have never set up a FreeBSD system before,
144<c>sysinstall</c> may be the better option for you. If you face difficulties 144<c>sysinstall</c> may be the better option for you. If you face difficulties
145while partitioning or formatting your hard disks, have a look at the great 145while 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 146<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. 147Handbook</uri> or hop onto <c>#gentoo-bsd</c> on the Freenode IRC server.
148</p> 148</p>
149 149
150<p> 150<p>
151Once you're done setting up your disks, you have to create a mount point for 151Once you're done setting up your disks, you have to create a mount point for
152your Gentoo/FreeBSD installation and mount all the necessary partitions. 152your Gentoo/FreeBSD installation and mount all the necessary partitions.
153</p> 153</p>
154 154
155<pre caption="Creating a mount point and mounting partitions"> 155<pre caption="Creating a mount point and mounting partitions">
156# <i>mkdir /mnt/gfbsd</i> 156# <i>mkdir /mnt/gentoo</i>
157<comment>(Replace X with the correct numbers for your hard disk.)</comment> 157<comment>(Replace X with the correct numbers for your hard disk.)</comment>
158# <i>mount /dev/adXsXa /mnt/gfbsd</i> 158# <i>mount /dev/adXsXa /mnt/gentoo</i>
159</pre> 159</pre>
160 160
161<p> 161<p>
162Now that you have mounted the target partition, it is time to fetch and unpack 162Now that you have mounted the target partition, it is time to fetch and unpack
163a stage3 tarball. 163a stage3 tarball.
164</p> 164</p>
165 165
166<pre caption="Obtaining and unpacking a stage3 tarball"> 166<pre caption="Obtaining and unpacking a stage3 tarball">
167# <i>cd /mnt/gentoo/</i>
167<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> 168<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment>
168# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stage3-x86-fbsd-20051005.tar.bz2</i> 169# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/stage3-x86-fbsd-20051005.tar.bz2</i>
169# <i>cp stage3-x86-fbsd-20051005.tar.bz2 /mnt/gfbsd/</i>
170# <i>cd /mnt/gfbsd/</i>
171# <i>tar -jxvpf stage3-x86-fbsd-20051005.tar.bz2</i> 170# <i>tar -jxvpf stage3-x86-fbsd-20051005.tar.bz2</i>
171<comment>(A wrong make.conf was packaged with the current stage3 tarball. We'll now remove it.)</comment>
172# <i>rm -f /mnt/gentoo/etc/make.conf</i>
172<comment>(You can delete the tarball with the following command if you want to.)</comment> 173<comment>(You can delete the tarball with the following command if you want to.)</comment>
173# <i>rm stage3-x86-fbsd-20051005.tar.bz2</i> 174# <i>rm stage3-x86-fbsd-20051005.tar.bz2</i>
174<comment>(Create a home directory for root.)</comment>
175# <i>mkdir /mnt/gfbsd/root</i>
176</pre> 175</pre>
177 176
178<p> 177<p>
179Before chrooting into the newly-extracted stage, you first must obtain an up-to-date 178Before chrooting into the newly-extracted stage, you first must obtain an up-to-date
180copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this is to to get our latest 179copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this is to to get our latest
181snapshot which you than extract to <path>/usr/local/portage</path>. 180snapshot which you than extract to <path>/mnt/gentoo/usr/local/portage</path>
182</p> 181</p>
183 182
184<pre caption="Getting the Gentoo/FreeBSD portage overlay"> 183<pre caption="Getting the Gentoo/FreeBSD Portage overlay">
184# <i>mkdir /mnt/gentoo/usr/local/portage</i>
185# <i>cd /usr/local/portage</i> 185# <i>cd /mnt/gentoo/usr/local/portage</i>
186# <i>wget http://gentoo.osuosl.org/experimental/snapshots/portage-alt-overlay-latest.tar.bz2</i> 186# <i>wget http://gentoo.osuosl.org/experimental/snapshots/portage-alt-overlay-latest.tar.bz2</i>
187# <i>tar -xjf portage-alt-overlay-latest.tar.bz2</i> 187# <i>tar -xjf portage-alt-overlay-latest.tar.bz2</i>
188</pre> 188</pre>
189 189
190<p> 190<p>
191Alternatively, you can also use Subversion to check out the current version of the overlay. 191Alternatively, you can also use Subversion to check out the current version of
192If you are interested in this possibility, please refer to the <uri 192the overlay. If you are interested in this possibility, please refer to the
193link="http://www.gentoo.org/proj/en/gentoo-alt/overlay.xml">Gentoo/ALT overlay 193<uri link="/proj/en/gentoo-alt/overlay.xml">Gentoo/ALT overlay
194documentation</uri>. 194documentation</uri>.
195</p> 195</p>
196 196
197<p> 197<p>
198In order for your install to work, you need to mount the <path>/dev</path> 198In order for your install to work, you need to mount the <path>/dev</path>
199filesystem from the currently running system into the Gentoo/FreeBSD mount 199filesystem from the currently running system into the Gentoo/FreeBSD mount
200point before proceeding with the chroot. 200point before proceeding with the chroot.
201</p> 201</p>
202 202
203<pre caption="Mounting the /dev filesystem and chrooting"> 203<pre caption="Mounting the /dev filesystem and chrooting">
204# <i>mount -t devfs none /mnt/gfbsd/dev/</i> 204# <i>mount -t devfs none /mnt/gentoo/dev/</i>
205# <i>cp /etc/resolv.conf /mnt/gentoo/etc</i>
205# <i>chroot /mnt/gfbsd/ /bin/bash</i> 206# <i>chroot /mnt/gentoo/ /bin/bash</i>
206# <i>source /etc/profile</i> 207# <i>source /etc/profile</i>
207</pre> 208</pre>
208 209
209<p> 210<p>
210After you got hold of the Gentoo/FreeBSD overlay, it's time to link 211After you got hold of the Gentoo/FreeBSD overlay, it's time to link
211<path>/etc/make.profile</path> to the correct profile and add get your 212<path>/etc/make.profile</path> to the correct profile and add get your
212<path>/etc/make.conf</path> ready for Gentoo/FreeBSD. 213<path>/etc/make.conf</path> ready for Gentoo/FreeBSD.
213</p> 214</p>
214 215
215<pre caption="Setting up the profile and editing /etc/make.conf"> 216<pre caption="Setting up the profile and editing /etc/make.conf">
216# <i>ln -sf /usr/local/portage/portage-alt-overlay/profiles/default-bsd/fbsd/5.4/x86/ /etc/make.profile</i> 217# <i>ln -sf /usr/local/portage/portage-alt-overlay/profiles/default-bsd/fbsd/5.4/x86/ /etc/make.profile</i>
217<comment>(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf)</comment> 218<comment>(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf)</comment>
218# <i>ee /etc/make.conf</i> 219# <i>ee /etc/make.conf</i>
219<comment>(Please make sure you add at least the following entries:)</comment> 220<comment>(Please make sure you add at least the following entries:)</comment>
220CHOST="i686-gentoo-freebsd5.4" 221CHOST="i686-gentoo-freebsd5.4"
221ACCEPT_KEYWORDS="~x86-fbsd ~x86" 222ACCEPT_KEYWORDS="~x86-fbsd ~x86"
222FEATURES="-sandbox collision-protect" 223FEATURES="-sandbox collision-protect"
223PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay" 224PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay"
224</pre> 225</pre>
225 226
226<p> 227<p>
227Now, you have to obtain a copy of the main Gentoo Portage tree, which depending 228Now, you have to obtain a copy of the main Gentoo Portage tree, which depending
228on your connection might take quite a while. 229on your connection might take quite a while.
229</p> 230</p>
230 231
231<pre caption="Obtaining the portage tree"> 232<pre caption="Obtaining the Portage tree">
232# <i>emerge --sync</i> 233# <i>emerge --sync</i>
234<comment>(It's also possible to retrieve the Portage tree in another way:)</comment>
235# <i>cd /</i>
236# <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i>
237# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i>
238# <i>emerge --metadata</i>
233</pre> 239</pre>
234 240
235<p> 241<p>
236Congratulations, by the time you have reached this step you should have a 242Congratulations, by the time you have reached this step you should have a
237running Gentoo/FreeBSD system! If you want, you can now rebuild the system's 243running Gentoo/FreeBSD system! If you want, you can now rebuild the system's
238core packages. 244core packages.
239</p> 245</p>
240 246
241<pre caption="Rebuilding the FreeBSD core packages"> 247<pre caption="Rebuilding the FreeBSD core packages">
242# <i>emerge -e system</i> 248# <i>emerge -e system</i>
243</pre> 249</pre>
244 250
245<impo> 251<impo>
246Please make absolutely sure you add your new Gentoo/FreeBSD installation to the 252Please make absolutely sure you add your new Gentoo/FreeBSD installation to the
247configuration of your bootloader, otherwise you won't be able to boot your newly 253configuration of your bootloader, otherwise you won't be able to boot your newly
248installed system! If you don't have another bootloader installed, you should use 254installed system! If you don't have another bootloader installed, you should use
249<c>boot0</c>, as it is currently the only one supported by FreeBSD. 255<c>boot0</c>, as it is currently the only one supported by FreeBSD.
250</impo> 256</impo>
251 257
252<pre caption="Installing and setting up boot0"> 258<pre caption="Installing and setting up boot0">
253# <i>emerge boot0</i> 259# <i>emerge boot0</i>
254<comment>(Leave the chroot environment)</comment> 260<comment>(Leave the chroot environment)</comment>
255# <i>exit</i> 261# <i>exit</i>
256<comment>(Issued from outside the chroot)</comment> 262<comment>(Issued from outside the chroot)</comment>
257# <i>fdisk -b -B /mnt/gfbsd/boot/boot0 /dev/adX</i> 263# <i>fdisk -b -B /mnt/gentoo/boot/boot0 /dev/adX</i>
258# <i>chroot /mnt/gfbsd /bin/bash</i> 264# <i>chroot /mnt/gentoo /bin/bash</i>
259# <i>disklabel -B adXsY</i> 265# <i>disklabel -B adXsY</i>
260</pre> 266</pre>
261 267
262<p> 268<p>
263If you need additonal information on setting up <c>boot0</c>, please consult 269If you need additonal information on setting up <c>boot0</c>, please consult
264<uri link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html"> 270<uri link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">
265chapter 12</uri> of the FreeBSD handbook. 271chapter 12</uri> of the FreeBSD handbook.
266</p> 272</p>
267 273
268<p> 274<p>
269When you did <c>emerge system</c>, the sources for the FreeBSD kernel got 275When you did <c>emerge system</c>, the sources for the FreeBSD kernel got
270installed to <path>/usr/src/sys</path>. Configuring and compiling a custom 276installed to <path>/usr/src/sys</path>. Configuring and compiling a custom
271kernel is really different from compiling Linux, so if you are not familiar with 277kernel is really different from compiling Linux, so if you are not familiar with
272the process we encourage you to have a look at <uri 278the process we encourage you to have a look at <uri
273link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html"> 279link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html">

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20