/[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.24 Revision 1.32
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.24 2007/04/04 14:22:45 nightmorph Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.32 2008/11/01 09:45:22 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
24 <mail link="flameeyes@gentoo.org">Diego Pettenò</mail> 24 <mail link="flameeyes@gentoo.org">Diego Pettenò</mail>
25</author> 25</author>
26<author title="Editor"> 26<author title="Editor">
27 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> 27 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
28</author> 28</author>
29<author title="Editor">
30 <mail link="cam@gentoo.org">Camille Huot</mail>
31</author>
29 32
30<abstract> 33<abstract>
31This document gives some general information on FreeBSD, as well as 34This document gives some general information on FreeBSD, as well as
32installation instructions for Gentoo/FreeBSD. It also includes some reference 35installation instructions for Gentoo/FreeBSD. It also includes some reference
33for people interested in helping out with development. 36for people interested in helping out with development.
35 38
36<!-- The content of this document is licensed under the CC-BY-SA license --> 39<!-- The content of this document is licensed under the CC-BY-SA license -->
37<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 40<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
38<license/> 41<license/>
39 42
40<version>2.7</version> 43<version>2.13</version>
41<date>2007-01-02</date> 44<date>2008-11-01</date>
42 45
43<chapter> 46<chapter>
44<title>Introduction to FreeBSD</title> 47<title>Introduction to FreeBSD</title>
45<section> 48<section>
46<title>What is FreeBSD?</title> 49<title>What is FreeBSD?</title>
56sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance 59sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance
57and security, thus being used from small to huge companies all over the world. 60and security, thus being used from small to huge companies all over the world.
58</p> 61</p>
59 62
60<p> 63<p>
61FreeBSD's current production release is version 6.1, although the release of 6.2 64FreeBSD's current production release is version 6.2. Gentoo/FreeBSD is based on
62is very near at the time of writing (Release Candidate 2 was released recently). 65this version and older versions of Gentoo/FreeBSD are discontinued and no
63Gentoo/FreeBSD development is ongoing on this latter version, while older 66longer supported.
64versions are discontinued and no longer supported.
65</p> 67</p>
66 68
67</body> 69</body>
68</section> 70</section>
69<section> 71<section>
197 199
198<note> 200<note>
199The output presented here will differ based on your network. 201The output presented here will differ based on your network.
200</note> 202</note>
201 203
202<p>
203Next, create the chroot for your installation:
204</p>
205
206<pre caption="Making the chroot directory">
207# <i>mkdir /mnt/gentoo</i>
208</pre>
209
210<note>
211There is a bug in the <uri
212link="http://dev.gentoo.org/~flameeyes/minimal-freesbie-drizzt.iso.bz2">
213minimal Freesbie CD</uri> that prevents the creation of the
214<path>/mnt/gentoo</path> mount point. To avoid this, use <path>/mnt</path>
215instead of <path>/mnt/gentoo</path> in the following sections.
216</note>
217
218</body> 204</body>
219</section> 205</section>
220<section> 206<section>
221<title>Partitioning the Drive</title> 207<title>Partitioning the Drive</title>
222<body> 208<body>
249<p> 235<p>
250Here, we'll refrain from using the automatic layout, and create one giant root 236Here, we'll refrain from using the automatic layout, and create one giant root
251partition, followed by a swap partition. Hit <b>c</b> to create a new 237partition, followed by a swap partition. Hit <b>c</b> to create a new
252partition. A dialog prompts you to enter a size. Go ahead and do so, using 238partition. A dialog prompts you to enter a size. Go ahead and do so, using
253MB/GB for setting different sizes, or C for cylinders. For root, choose FS as 239MB/GB for setting different sizes, or C for cylinders. For root, choose FS as
254the partition type, and set the mount point as <path>/mnt/gentoo</path>. <e>If 240the partition type, and set the mount point as <path>/mnt/</path>. <e>If
255you do not adjust the mount point, it will overwrite the FreeSBIE 241you do not adjust the mount point, it will overwrite the FreeSBIE
256environment!</e> As <path>/boot</path> is not a separate partition, you'll 242environment!</e> As <path>/boot</path> is not a separate partition, you'll
257need to disable soft-updates, or your system will not boot! To do so, use the 243need to disable soft-updates, or your system will not boot! To do so, use the
258arrow keys to navigate to your newly created partition, then hit the <b>s</b> 244arrow keys to navigate to your newly created partition, then hit the <b>s</b>
259key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until 245key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until
268When choosing a different mountpoint than <path>/</path> for your partition, 254When 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 255<c>sysinstall</c> will actually create a 'd' slice, which the bootloader won't
270boot from. To fix this, run the following: 256boot from. To fix this, run the following:
271</p> 257</p>
272 258
259<note>
260Please, make sure ad0s1 is unmounted before running the following command,
261otherwise it will not work.
262</note>
263
273<pre caption="Fixing the root partition letter"> 264<pre caption="Fixing the root partition letter">
274# <i>disklabel ad0s1 | sed 's/^ d:/ a:/g' | disklabel -w ad0s1</i> 265# <i>disklabel ad0s1 | sed 's/^ d:/ a:/' | disklabel -R ad0s1 /dev/stdin</i>
275</pre> 266</pre>
276 267
277<p> 268<p>
278This will finalize the partitioning process, and format the drive in UFS for 269This will finalize the partitioning process, and format the drive in UFS for
279FreeBSD to utilize. This will also mount the drive for you at the mount point 270FreeBSD to utilize. This will also mount the drive for you at the mount point
280specified earlier (<path>/mnt/gentoo</path>). You can verify this worked by 271specified earlier (<path>/mnt/</path>). You can verify this worked by
281running <c>mount</c>: 272running <c>mount</c>:
282</p> 273</p>
283 274
284<pre caption="Verifying the new disk layout was mounted with mount"> 275<pre caption="Verifying the new disk layout was mounted with mount">
285# <i>mount</i> 276# <i>mount</i>
286... 277...
287/dev/ad0s1a on /mnt/gentoo (ufs, local) 278/dev/ad0s1a on /mnt (ufs, local)
288</pre> 279</pre>
289 280
290<p> 281<p>
291Now that you have mounted the target partition, it is time to start on the Gentoo 282Now that you have mounted the target partition, it is time to start on the
292setup. 283Gentoo setup.
293</p> 284</p>
294 285
295</body> 286</body>
296</section> 287</section>
297<section> 288<section>
299<body> 290<body>
300 291
301<p> 292<p>
302First, we need to download a stage3 tarball and unpack it into the chroot. 293First, we need to download a stage3 tarball and unpack it into the chroot.
303Point your browser to 294Point your browser to
304<uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the 295<uri>http://distfiles.gentoo.org/experimental/x86/freebsd/stages/</uri>, grab the
305latest snapshot, and unpack it into the mountpoint: 296latest snapshot, and unpack it into the mountpoint:
306</p> 297</p>
307 298
308<pre caption="Obtaining and unpacking a stage3 tarball"> 299<pre caption="Obtaining and unpacking a stage3 tarball">
309# <i>cd /mnt/gentoo/</i> 300# <i>cd /mnt/</i>
310<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> 301<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment>
311# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/stage3-x86-freebsd-6.2_rc2.tar.bz2</i> 302# <i>wget http://distfiles.gentoo.org/experimental/x86/freebsd/stages/stage3-x86-freebsd-6.2-r1.tar.bz2</i>
312# <i>tar -jxvpf stage3-x86-freebsd-6.2_rc2.tar.bz2</i> 303# <i>tar -jxvpf stage3-x86-freebsd-6.2-r1.tar.bz2</i>
313<comment>(You can delete the tarball with the following command if you want to.)</comment> 304<comment>(You can delete the tarball with the following command if you want to.)</comment>
314# <i>rm stage3-x86-freebsd-6.2_rc2.tar.bz2</i> 305# <i>rm stage3-x86-freebsd-6.2-r1.tar.bz2</i>
315</pre> 306</pre>
316 307
317<note> 308<note>
318If you want you can use the transition overlay that contains semi-experimental 309If you want you can use the transition overlay that contains semi-experimental
319ebuilds with patches not yet in the main Portage tree, but does allow a wider 310ebuilds with patches not yet in the main Portage tree, but does allow a wider
328filesystem from the currently running system into the Gentoo/FreeBSD mount 319filesystem from the currently running system into the Gentoo/FreeBSD mount
329point before proceeding with the chroot. 320point before proceeding with the chroot.
330</p> 321</p>
331 322
332<pre caption="Mounting the /dev filesystem and chrooting"> 323<pre caption="Mounting the /dev filesystem and chrooting">
333# <i>mount -t devfs none /mnt/gentoo/dev/</i> 324# <i>mount -t devfs none /mnt/dev/</i>
334# <i>cp /etc/resolv.conf /mnt/gentoo/etc</i> 325# <i>cp /etc/resolv.conf /mnt/etc/</i>
335# <i>chroot /mnt/gentoo/ /bin/bash</i> 326# <i>chroot /mnt/ /bin/bash</i>
336# <i>env-update &amp;&amp; source /etc/profile</i> 327# <i>env-update &amp;&amp; source /etc/profile</i>
337</pre> 328</pre>
338 329
339<p> 330<p>
340After you obtain the Gentoo/FreeBSD overlay, it's time to link 331After you obtain the Gentoo/FreeBSD overlay, it's time to link
349 340
350<pre caption="Obtaining the Portage tree"> 341<pre caption="Obtaining the Portage tree">
351# <i>emerge --sync</i> 342# <i>emerge --sync</i>
352<comment>(It's also possible to retrieve the Portage tree in another way:)</comment> 343<comment>(It's also possible to retrieve the Portage tree in another way:)</comment>
353# <i>cd /</i> 344# <i>cd /</i>
354# <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> 345# <i>wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2</i>
355# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i> 346# <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i>
356# <i>emerge --metadata</i> 347# <i>emerge --metadata</i>
357</pre> 348</pre>
358 349
359<pre caption="Setting up the profile and editing /etc/make.conf"> 350<pre caption="Setting up the profile and editing /etc/make.conf">
360# <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.2/x86/ /etc/make.profile</i> 351# <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.2/x86/ /etc/make.profile</i>
361# <i>nano /etc/make.conf</i> 352# <i>nano /etc/make.conf</i>
362<comment>(Please make sure you add at least the following entries:)</comment> 353<comment>(Please make sure you add at least the following entries:)</comment>
363CHOST="i486-gentoo-freebsd6.2" 354CHOST="i686-gentoo-freebsd6.2"
364FEATURES="collision-protect" 355FEATURES="collision-protect"
365</pre> 356</pre>
366 357
367<note> 358<note>
368The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as 359The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as
384</section> 375</section>
385</chapter> 376</chapter>
386<chapter> 377<chapter>
387<title>Setting up for Booting</title> 378<title>Setting up for Booting</title>
388<section> 379<section>
380<title>Set your time zone</title>
381<body>
382
383<p>
384First make sure your date and time is set correctly using <c>date
385yyyymmddHHMM</c>. Use UTC time.
386</p>
387
388<pre caption="Set the date and UTC time">
389<comment>(Check the clock)</comment>
390# <i>date</i>
391Mon Mar 6 00:14:13 UTC 2006
392
393<comment>(Set the current date and time if required)</comment>
394# <i>date 200603060016</i> <comment>(Format is yyyymmddHHMM)</comment>
395Mon Mar 6 00:16:00 UTC 2006
396</pre>
397
398<p>
399Next, set your time zone information by using the correct listing in
400<path>/usr/share/zoneinfo</path>.
401</p>
402
403<pre caption="Setting your timezone">
404# <i>ls /usr/share/zoneinfo</i>
405<comment>(Using Brussels as an example)</comment>
406# <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i>
407
408# <i>date</i>
409Wed Mar 8 00:46:05 CET 2006
410</pre>
411
412<p>
413Edit <path>/etc/conf.d/clock</path> to define the time zone you used
414previously.
415</p>
416
417<pre caption="Edit /etc/conf.d/clock">
418# <i>nano -w /etc/conf.d/clock</i>
419TIMEZONE="Europe/Brussels"
420</pre>
421
422</body>
423</section>
424<section>
389<title>Kernel Installation</title> 425<title>Kernel Installation</title>
390<body> 426<body>
391 427
392<p> 428<p>
393If you ran <c>emerge -e system</c>, the sources for the FreeBSD kernel were 429If you ran <c>emerge -e system</c>, the sources for the FreeBSD kernel were
489<pre caption="Installing and setting up boot0"> 525<pre caption="Installing and setting up boot0">
490# <i>emerge boot0</i> 526# <i>emerge boot0</i>
491<comment>(Leave the chroot environment)</comment> 527<comment>(Leave the chroot environment)</comment>
492# <i>exit</i> 528# <i>exit</i>
493<comment>(Issued from outside the chroot)</comment> 529<comment>(Issued from outside the chroot)</comment>
494# <i>fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX</i> 530# <i>fdisk -B -b /mnt/boot/boot0 /dev/adX</i>
495# <i>chroot /mnt/gentoo /bin/bash</i> 531# <i>chroot /mnt/ /bin/bash</i>
496# <i>disklabel -B adXsY</i> 532# <i>disklabel -B adXsY</i>
497</pre> 533</pre>
498 534
499<p> 535<p>
500If you need additional information on setting up <c>boot0</c>, please consult 536If you need additional information on setting up <c>boot0</c>, please consult
551 587
552grub&gt; quit 588grub&gt; quit
553</pre> 589</pre>
554 590
555<p> 591<p>
592To make the loader find the kernel on a specific slice (the default is 'a'),
593add a <c>vfs.root.mountfrom</c> line to the <path>/boot/loader.conf</path>
594file:
595</p>
596
597<pre caption="Tell the loader where to look for the kernel">
598# <i>echo 'vfs.root.mountfrom="ufs:ad0s1d"' >> /boot/loader.conf</i>
599</pre>
600
601<p>
556When you first boot, you may not receive a grub menu. If so, run this at the 602When you first boot, you may not receive a grub menu. If so, run this at the
557prompt: 603prompt:
558</p> 604</p>
559 605
560<pre caption="Booting the kernel with no menu"> 606<pre caption="Booting the kernel with no menu">
571<note> 617<note>
572For more information on configuring grub, please refer to the <uri 618For more information on configuring grub, please refer to the <uri
573link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo 619link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo
574Linux Handbook</uri>. 620Linux Handbook</uri>.
575</note> 621</note>
622
623<warn>
624Grub doesn't follow UFS symlinks so be sure to delete the
625<path>/boot/grub/menu.lst</path> symlink and to use <path>menu.lst</path> to
626setup Grub (<path>grub.conf</path> isn't used).
627</warn>
576 628
577</body> 629</body>
578</section> 630</section>
579<section> 631<section>
580<title>System configuration</title> 632<title>System configuration</title>

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

  ViewVC Help
Powered by ViewVC 1.1.20