/[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.29
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.29 2007/05/17 15:50:28 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
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.11</version>
41<date>2007-01-02</date> 44<date>2007-05-17</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
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
273<pre caption="Fixing the root partition letter"> 259<pre caption="Fixing the root partition letter">
274# <i>disklabel ad0s1 | sed 's/^ d:/ a:/g' | disklabel -w ad0s1</i> 260# <i>disklabel ad0s1 | sed 's/^ d:/ a:/' | disklabel -R ad0s1 /dev/stdin</i>
275</pre> 261</pre>
276 262
277<p> 263<p>
278This will finalize the partitioning process, and format the drive in UFS for 264This 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 265FreeBSD 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 266specified earlier (<path>/mnt/</path>). You can verify this worked by
281running <c>mount</c>: 267running <c>mount</c>:
282</p> 268</p>
283 269
284<pre caption="Verifying the new disk layout was mounted with mount"> 270<pre caption="Verifying the new disk layout was mounted with mount">
285# <i>mount</i> 271# <i>mount</i>
286... 272...
287/dev/ad0s1a on /mnt/gentoo (ufs, local) 273/dev/ad0s1a on /mnt (ufs, local)
288</pre> 274</pre>
289 275
290<p> 276<p>
291Now that you have mounted the target partition, it is time to start on the Gentoo 277Now that you have mounted the target partition, it is time to start on the Gentoo
292setup. 278setup.
304<uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the 290<uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the
305latest snapshot, and unpack it into the mountpoint: 291latest snapshot, and unpack it into the mountpoint:
306</p> 292</p>
307 293
308<pre caption="Obtaining and unpacking a stage3 tarball"> 294<pre caption="Obtaining and unpacking a stage3 tarball">
309# <i>cd /mnt/gentoo/</i> 295# <i>cd /mnt/</i>
310<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> 296<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> 297# <i>wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/stage3-x86-freebsd-6.2.tar.bz2</i>
312# <i>tar -jxvpf stage3-x86-freebsd-6.2_rc2.tar.bz2</i> 298# <i>tar -jxvpf stage3-x86-freebsd-6.2.tar.bz2</i>
313<comment>(You can delete the tarball with the following command if you want to.)</comment> 299<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> 300# <i>rm stage3-x86-freebsd-6.2.tar.bz2</i>
315</pre> 301</pre>
316 302
317<note> 303<note>
318If you want you can use the transition overlay that contains semi-experimental 304If 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 305ebuilds 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 314filesystem from the currently running system into the Gentoo/FreeBSD mount
329point before proceeding with the chroot. 315point before proceeding with the chroot.
330</p> 316</p>
331 317
332<pre caption="Mounting the /dev filesystem and chrooting"> 318<pre caption="Mounting the /dev filesystem and chrooting">
333# <i>mount -t devfs none /mnt/gentoo/dev/</i> 319# <i>mount -t devfs none /mnt/dev/</i>
334# <i>cp /etc/resolv.conf /mnt/gentoo/etc</i> 320# <i>cp /etc/resolv.conf /mnt/etc/</i>
335# <i>chroot /mnt/gentoo/ /bin/bash</i> 321# <i>chroot /mnt/ /bin/bash</i>
336# <i>env-update &amp;&amp; source /etc/profile</i> 322# <i>env-update &amp;&amp; source /etc/profile</i>
337</pre> 323</pre>
338 324
339<p> 325<p>
340After you obtain the Gentoo/FreeBSD overlay, it's time to link 326After you obtain the Gentoo/FreeBSD overlay, it's time to link
358 344
359<pre caption="Setting up the profile and editing /etc/make.conf"> 345<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> 346# <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.2/x86/ /etc/make.profile</i>
361# <i>nano /etc/make.conf</i> 347# <i>nano /etc/make.conf</i>
362<comment>(Please make sure you add at least the following entries:)</comment> 348<comment>(Please make sure you add at least the following entries:)</comment>
363CHOST="i486-gentoo-freebsd6.2" 349CHOST="i686-gentoo-freebsd6.2"
364FEATURES="collision-protect" 350FEATURES="collision-protect"
365</pre> 351</pre>
366 352
367<note> 353<note>
368The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as 354The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as
384</section> 370</section>
385</chapter> 371</chapter>
386<chapter> 372<chapter>
387<title>Setting up for Booting</title> 373<title>Setting up for Booting</title>
388<section> 374<section>
375<title>Set your time zone</title>
376<body>
377
378<p>
379First make sure your date and time is set correctly using <c>date
380yyyymmddHHMM</c>. Use UTC time.
381</p>
382
383<pre caption="Set the date and UTC time">
384<comment>(Check the clock)</comment>
385# <i>date</i>
386Mon Mar 6 00:14:13 UTC 2006
387
388<comment>(Set the current date and time if required)</comment>
389# <i>date 200603060016</i> <comment>(Format is yyyymmddHHMM)</comment>
390Mon Mar 6 00:16:00 UTC 2006
391</pre>
392
393<p>
394Next, set your time zone information by using the correct listing in
395<path>/usr/share/zoneinfo</path>.
396</p>
397
398<pre caption="Setting your timezone">
399# <i>ls /usr/share/zoneinfo</i>
400<comment>(Using Brussels as an example)</comment>
401# <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i>
402
403# <i>date</i>
404Wed Mar 8 00:46:05 CET 2006
405</pre>
406
407<p>
408Edit <path>/etc/conf.d/clock</path> to define the time zone you used
409previously.
410</p>
411
412<pre caption="Edit /etc/conf.d/clock">
413# <i>nano -w /etc/conf.d/clock</i>
414TIMEZONE="Europe/Brussels"
415</pre>
416
417</body>
418</section>
419<section>
389<title>Kernel Installation</title> 420<title>Kernel Installation</title>
390<body> 421<body>
391 422
392<p> 423<p>
393If you ran <c>emerge -e system</c>, the sources for the FreeBSD kernel were 424If you ran <c>emerge -e system</c>, the sources for the FreeBSD kernel were
489<pre caption="Installing and setting up boot0"> 520<pre caption="Installing and setting up boot0">
490# <i>emerge boot0</i> 521# <i>emerge boot0</i>
491<comment>(Leave the chroot environment)</comment> 522<comment>(Leave the chroot environment)</comment>
492# <i>exit</i> 523# <i>exit</i>
493<comment>(Issued from outside the chroot)</comment> 524<comment>(Issued from outside the chroot)</comment>
494# <i>fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX</i> 525# <i>fdisk -B -b /mnt/boot/boot0 /dev/adX</i>
495# <i>chroot /mnt/gentoo /bin/bash</i> 526# <i>chroot /mnt/ /bin/bash</i>
496# <i>disklabel -B adXsY</i> 527# <i>disklabel -B adXsY</i>
497</pre> 528</pre>
498 529
499<p> 530<p>
500If you need additional information on setting up <c>boot0</c>, please consult 531If you need additional information on setting up <c>boot0</c>, please consult
551 582
552grub&gt; quit 583grub&gt; quit
553</pre> 584</pre>
554 585
555<p> 586<p>
587To make the loader find the kernel on a specific slice (the default is 'a'),
588add a <c>vfs.root.mountfrom</c> line to the <path>/boot/loader.conf</path>
589file:
590</p>
591
592<pre caption="Tell the loader where to look for the kernel">
593# <i>echo 'vfs.root.mountfrom="ufs:ad0s1d"' >> /boot/loader.conf</i>
594</pre>
595
596<p>
556When you first boot, you may not receive a grub menu. If so, run this at the 597When you first boot, you may not receive a grub menu. If so, run this at the
557prompt: 598prompt:
558</p> 599</p>
559 600
560<pre caption="Booting the kernel with no menu"> 601<pre caption="Booting the kernel with no menu">
571<note> 612<note>
572For more information on configuring grub, please refer to the <uri 613For 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 614link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo
574Linux Handbook</uri>. 615Linux Handbook</uri>.
575</note> 616</note>
617
618<warn>
619Grub doesn't follow UFS symlinks so be sure to delete the
620<path>/boot/grub/menu.lst</path> symlink and to use <path>menu.lst</path> to
621setup Grub (<path>grub.conf</path> isn't used).
622</warn>
576 623
577</body> 624</body>
578</section> 625</section>
579<section> 626<section>
580<title>System configuration</title> 627<title>System configuration</title>

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

  ViewVC Help
Powered by ViewVC 1.1.20