/[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.11 Revision 1.12
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.11 2005/12/06 12:32:46 jkt Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.12 2005/12/20 19:12:53 cam 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 <mail link="angusyoung@gentoo.org">Otavio R. Piske</mail> 15 <mail link="angusyoung@gentoo.org">Otavio R. Piske</mail>
16</author> 16</author>
17<author title="Author"> 17<author title="Author">
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# <i>cd /mnt/gentoo/</i>
168<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>
169# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/stage3-x86-fbsd-20051020.tar.bz2</i> 169# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/stage3-x86-fbsd-20051020.tar.bz2</i>
170# <i>tar -jxvpf stage3-x86-fbsd-20051020.tar.bz2</i> 170# <i>tar -jxvpf stage3-x86-fbsd-20051020.tar.bz2</i>
171<comment>(You can delete the tarball with the following command if you want to.)</comment> 171<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> 172# <i>rm stage3-x86-fbsd-20051020.tar.bz2</i>
173</pre> 173</pre>
174 174
175<p> 175<p>
176Before chrooting into the newly-extracted stage, you first must obtain an up-to-date 176Before chrooting into the newly-extracted stage, you first must obtain an
177copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this is to to get our latest 177up-to-date copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this
178snapshot which you then extract to <path>/mnt/gentoo/usr/local/portage</path> 178is to to get our latest snapshot which you then extract to
179<path>/mnt/gentoo/usr/local/portage</path>.
179</p> 180</p>
180 181
181<pre caption="Getting the Gentoo/FreeBSD Portage overlay"> 182<pre caption="Getting the Gentoo/FreeBSD Portage overlay">
182# <i>cd /mnt/gentoo/usr/local/portage</i> 183# <i>cd /mnt/gentoo/usr/local/portage</i>
183# <i>wget http://gentoo.osuosl.org/experimental/snapshots/portage-alt-overlay-latest.tar.bz2</i> 184# <i>wget http://gentoo.osuosl.org/experimental/snapshots/portage-alt-overlay-latest.tar.bz2</i>
184# <i>tar -xjf portage-alt-overlay-latest.tar.bz2</i> 185# <i>tar -xjf portage-alt-overlay-latest.tar.bz2</i>
185<comment>(You now can safely delete the snapshot with the following command.)</comment> 186<comment>(You now can safely delete the snapshot with the following command.)</comment>
186# <i>rm portage-alt-overlay-latest.tar.bz2</i> 187# <i>rm portage-alt-overlay-latest.tar.bz2</i>
187</pre> 188</pre>
188 189
189<p> 190<p>
190Alternatively, you can also use Subversion to check out the current version of 191Alternatively, you can also use Subversion to check out the current version of
191the overlay. If you are interested in this possibility, please refer to the 192the overlay. If you are interested in this possibility, please refer to the
192<uri link="/proj/en/gentoo-alt/overlay.xml">Gentoo/ALT overlay 193<uri link="/proj/en/gentoo-alt/overlay.xml">Gentoo/ALT overlay
193documentation</uri>. 194documentation</uri>.
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>
227In order to boot correctly, you will need to create the <path>/proc</path> directory. 228In order to boot correctly, you will need to create the <path>/proc</path>
229directory.
228</p> 230</p>
229 231
230<pre caption="Creating the /proc directory"> 232<pre caption="Creating the /proc directory">
231# <i>mkdir /proc</i> 233# <i>mkdir /proc</i>
232</pre> 234</pre>
233 235
234<p> 236<p>
235Now, you have to obtain a copy of the main Gentoo Portage tree, which depending 237Now, you have to obtain a copy of the main Gentoo Portage tree, which depending
236on your connection might take quite a while. 238on your connection might take quite a while.
237</p> 239</p>
238 240
239<pre caption="Obtaining the Portage tree"> 241<pre caption="Obtaining the Portage tree">
240# <i>emerge --sync</i> 242# <i>emerge --sync</i>
241<comment>(It's also possible to retrieve the Portage tree in another way:)</comment> 243<comment>(It's also possible to retrieve the Portage tree in another way:)</comment>
242# <i>cd /</i> 244# <i>cd /</i>
243# <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> 245# <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i>
244# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i> 246# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i>
245# <i>emerge --metadata</i> 247# <i>emerge --metadata</i>
246</pre> 248</pre>
247 249
248<p> 250<p>
249If you want, you can now rebuild the system's core packages. 251If you want, you can now rebuild the system's core packages.
250</p> 252</p>
251 253
252<pre caption="Rebuilding the FreeBSD core packages (Optional)"> 254<pre caption="Rebuilding the FreeBSD core packages (Optional)">
253# <i>emerge -e system</i> 255# <i>emerge -e system</i>
254</pre> 256</pre>
255 257
256<p> 258<p>
257When you did <c>emerge -e system</c>, the sources for the FreeBSD kernel got 259When you did <c>emerge -e system</c>, the sources for the FreeBSD kernel got
258installed to <path>/usr/src/sys</path>. If you skipped this step, you can get 260installed to <path>/usr/src/sys</path>. If you skipped this step, you can get
259them in the following way: 261them in the following way:
260</p> 262</p>
261 263
262<pre caption="Geting the FreeBSD kernel sources"> 264<pre caption="Geting the FreeBSD kernel sources">
263# <i>emerge freebsd-sources</i> 265# <i>emerge freebsd-sources</i>
264</pre> 266</pre>
265 267
266<p> 268<p>
267Configuring and compiling a custom kernel is really different from compiling Linux, 269Configuring and compiling a custom kernel is really different from compiling
268so if you are not familiar with the process we encourage you to have a look at 270Linux, so if you are not familiar with the process we encourage you to have a
271look at <uri
269<uri link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html"> 272link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html">
270chapter 8</uri> of the FreeBSD handbook. 273chapter 8</uri> of the FreeBSD handbook.
271</p> 274</p>
272 275
273<p> 276<p>
274Please note that currently only the "Traditional" way of building the kernel is 277Please note that currently only the "Traditional" way of building the kernel is
275supported on Gentoo/FreeBSD! Also note that <c>make install</c> will probably 278supported on Gentoo/FreeBSD! Also note that <c>make install</c> will probably
276ask you for a <path>/boot/device.hints</path> file. A default version can be 279ask you for a <path>/boot/device.hints</path> file. A default version can be
277found in the <path>conf</path> subdirectory of the <c>GENERIC</c> configuration 280found in the <path>conf</path> subdirectory of the <c>GENERIC</c> configuration
278and is called <path>GENERIC.hints</path> 281and is called <path>GENERIC.hints</path>
279</p> 282</p>
280 283
281<p> 284<p>
282Now is the time to do some basic system configuration and settings. First, we are 285Now is the time to do some basic system configuration and settings. First, we
283going to setup the filesystem mounting points in <path>/etc/fstab</path> 286are going to setup the filesystem mounting points in <path>/etc/fstab</path>.
284</p> 287</p>
285 288
286<pre caption="Editing the filesystem in /etc/fstab"> 289<pre caption="Editing the filesystem in /etc/fstab">
287# <i>ee /etc/fstab</i> 290# <i>ee /etc/fstab</i>
288<comment>(This is an example, replace X and Y with the correct numbers for your hard disk.)</comment> 291<comment>(This is an example, replace X and Y with the correct numbers for your hard disk.)</comment>
289#Device Mountpoint Fstype Options Dump Pass 292#Device Mountpoint Fstype Options Dump Pass
290/dev/adXsYb none swap sw 0 0 293/dev/adXsYb none swap sw 0 0
291/dev/adXsYa / ufs rw 1 1 294/dev/adXsYa / ufs rw 1 1
292/dev/adXsYe /usr/home ufs rw 2 2 295/dev/adXsYe /usr/home ufs rw 2 2
293/dev/adXsYd /tmp ufs rw 2 2 296/dev/adXsYd /tmp ufs rw 2 2
294/dev/acdX /cdrom cd9660 ro,noauto 0 0 297/dev/acdX /cdrom cd9660 ro,noauto 0 0
295</pre> 298</pre>
296 299
297<p> 300<p>
298Now would also be a good time to set up your network connection before the final 301Now would also be a good time to set up your network connection before the final
303# <i>ee /etc/conf.d/net</i> 306# <i>ee /etc/conf.d/net</i>
304<comment>(This is just an example which you have to adjust for your network.)</comment> 307<comment>(This is just an example which you have to adjust for your network.)</comment>
305ifconfig_rl0=("192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255") 308ifconfig_rl0=("192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255")
306routes_rl0=("-net 0.0.0.0 -host 192.168.0.1") 309routes_rl0=("-net 0.0.0.0 -host 192.168.0.1")
307</pre> 310</pre>
308 311
309<p> 312<p>
310To change your hostname you have to edit <path>/etc/hostname</path>. 313To change your hostname you have to edit <path>/etc/hostname</path>.
311</p> 314</p>
312 315
313<pre caption="Setting up the machine's hostname"> 316<pre caption="Setting up the machine's hostname">
314# <i>echo "YOUR_HOSTNAME_HERE" > /etc/hostname</i> 317# <i>echo "YOUR_HOSTNAME_HERE" > /etc/hostname</i>
315</pre> 318</pre>
316 319
317<p> 320<p>
318In case you need to use another keyboard layout for your language, you have to set the 321In case you need to use another keyboard layout for your language, you have to
319correct value in <path>/etc/conf.d/syscons</path>. The following example uses the Spanish 322set the correct value in <path>/etc/conf.d/syscons</path>. The following example
320layout, so you'll have to adjust it to your need if you want to use another one. 323uses the Spanish layout, so you'll have to adjust it to your need if you want to
324use another one.
321</p> 325</p>
322 326
323<pre caption="Changing your keyboard layout (Optional)"> 327<pre caption="Changing your keyboard layout (Optional)">
324# <i>ee /etc/conf.d/syscons</i> 328# <i>ee /etc/conf.d/syscons</i>
325KEYMAP="spanish.iso.acc" 329KEYMAP="spanish.iso.acc"
326<comment>(Possible layouts can be found in /usr/share/syscons/keymaps).</comment> 330<comment>(Possible layouts can be found in /usr/share/syscons/keymaps).</comment>
327</pre> 331</pre>
328 332
329<impo> 333<impo>
330Please make absolutely sure you add your new Gentoo/FreeBSD installation to the 334Please make absolutely sure you add your new Gentoo/FreeBSD installation to the
331configuration of your bootloader, otherwise you won't be able to boot your newly 335configuration of your bootloader, otherwise you won't be able to boot your newly
332installed system! If you don't have another bootloader installed, you should use 336installed system! If you don't have another bootloader installed, you should use
333<c>boot0</c>, as it is currently the only one supported by FreeBSD. In this case 337<c>boot0</c>, as it is currently the only one supported by FreeBSD. In this case
334please don't forget to use your other operating systems to <c>boot0</c>'s 338please don't forget to use your other operating systems to <c>boot0</c>'s
335configuration. 339configuration.
336</impo> 340</impo>
337 341
338<pre caption="Installing and setting up boot0"> 342<pre caption="Installing and setting up boot0">
339# <i>emerge boot0</i> 343# <i>emerge boot0</i>
340<comment>(Leave the chroot environment)</comment> 344<comment>(Leave the chroot environment)</comment>
341# <i>exit</i> 345# <i>exit</i>
342<comment>(Issued from outside the chroot)</comment> 346<comment>(Issued from outside the chroot)</comment>
343# <i>fdisk -b -B /mnt/gentoo/boot/boot0 /dev/adX</i> 347# <i>fdisk -b -B /mnt/gentoo/boot/boot0 /dev/adX</i>
344# <i>chroot /mnt/gentoo /bin/bash</i> 348# <i>chroot /mnt/gentoo /bin/bash</i>
345# <i>disklabel -B adXsY</i> 349# <i>disklabel -B adXsY</i>
346</pre> 350</pre>
347 351
348<p> 352<p>
349If you need additonal information on setting up <c>boot0</c>, please consult 353If you need additonal information on setting up <c>boot0</c>, please consult
354<uri
350<uri link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html"> 355link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">chapter
351chapter 12</uri> of the FreeBSD handbook. 35612</uri> of the FreeBSD handbook.
352</p>
353
354<p> 357</p>
358
359<p>
355Now would be a good time to set a password for the <c>root</c> user and to add 360Now would be a good time to set a password for the <c>root</c> user and to add
356another user account for your day-to-day work. 361another user account for your day-to-day work.
357</p> 362</p>
358 363
359<pre caption="Changing the root password and adding a new user"> 364<pre caption="Changing the root password and adding a new user">
360# <i>passwd</i> 365# <i>passwd</i>
361<comment>(If you need help in adding a user please consult the FreeBSD handbook).</comment> 366<comment>(If you need help in adding a user please consult the FreeBSD handbook).</comment>
362# <i>adduser</i> 367# <i>adduser</i>
363</pre> 368</pre>
364 369
365<p> 370<p>
366Congratulations, you have just finished your Gentoo/FreeBSD installation which you 371Congratulations, you have just finished your Gentoo/FreeBSD installation which
367can start exploring after the final reboot. Have fun! 372you can start exploring after the final reboot. Have fun!
368</p> 373</p>
369 374
370<pre caption="Rebooting the system"> 375<pre caption="Rebooting the system">
371# <i>exit</i> 376# <i>exit</i>
372# <i>reboot</i> 377# <i>reboot</i>
373</pre> 378</pre>
374 379
375</body> 380</body>
376</section> 381</section>
377</chapter> 382</chapter>
378 383
379<chapter> 384<chapter>
380<title>Developing for Gentoo/FreeBSD</title> 385<title>Developing for Gentoo/FreeBSD</title>
381<section> 386<section>
382<title>How to help</title> 387<title>How to help</title>
383<body> 388<body>
384 389
385<p> 390<p>
386There are many things you could help with, depending on your skill level and 391There are many things you could help with, depending on your skill level and
387spare time: 392spare time:
388</p> 393</p>
389 394
390<ul> 395<ul>
391 <li> 396 <li>
392 We need GCC and binutils hackers who are able to port FreeBSD's patches to 397 We need GCC and binutils hackers who are able to port FreeBSD's patches to
393 the original versions of these tools provided by our main Portage tree. 398 the original versions of these tools provided by our main Portage tree.
394 </li> 399 </li>
395 <li> 400 <li>
396 Working on current ebuilds: this means working closely with ebuild maintainers 401 Working on current ebuilds: this means working closely with ebuild
397 in order to create patches or modify ebuilds in a way that can be accepted 402 maintainers in order to create patches or modify ebuilds in a way that can
398 into the main tree. 403 be accepted into the main tree.
399 </li> 404 </li>
400 <li> 405 <li>
401 Security: if you are into security, we need you! Although security 406 Security: if you are into security, we need you! Although security
402 advisories from the FreeBSD project are tracked and fixed, we can always 407 advisories from the FreeBSD project are tracked and fixed, we can always
403 use help in this area. 408 use help in this area.
404 </li> 409 </li>
405 <li> 410 <li>
406 Contacts: we need people who can get in touch with FreeBSD developers to 411 Contacts: we need people who can get in touch with FreeBSD developers to
407 maintain contacts between us and the original project to exchange patches 412 maintain contacts between us and the original project to exchange patches
408 and discuss various problems and their solutions. Note that this should 413 and discuss various problems and their solutions. Note that this should
409 never involve any kind of spamming of mailing lists or IRC channels. 414 never involve any kind of spamming of mailing lists or IRC channels.
410 </li> 415 </li>
411 <li> 416 <li>
412 Testing: the more people are actively using Gentoo/FreeBSD, the more bugs 417 Testing: the more people are actively using Gentoo/FreeBSD, the more bugs
413 will be discovered, which helps us improving the quality of the port. If 418 will be discovered, which helps us improving the quality of the port. If

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20