/[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.26
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.26 2007/05/10 22:00:51 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.9</version>
41<date>2007-01-02</date> 44<date>2007-05-10</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>
197 200
198<note> 201<note>
199The output presented here will differ based on your network. 202The output presented here will differ based on your network.
200</note> 203</note>
201 204
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> 205</body>
219</section> 206</section>
220<section> 207<section>
221<title>Partitioning the Drive</title> 208<title>Partitioning the Drive</title>
222<body> 209<body>
249<p> 236<p>
250Here, we'll refrain from using the automatic layout, and create one giant root 237Here, 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 238partition, 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 239partition. 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 240MB/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 241the 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 242you do not adjust the mount point, it will overwrite the FreeSBIE
256environment!</e> As <path>/boot</path> is not a separate partition, you'll 243environment!</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 244need 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> 245arrow 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 246key, 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 256<c>sysinstall</c> will actually create a 'd' slice, which the bootloader won't
270boot from. To fix this, run the following: 257boot from. To fix this, run the following:
271</p> 258</p>
272 259
273<pre caption="Fixing the root partition letter"> 260<pre caption="Fixing the root partition letter">
274# <i>disklabel ad0s1 | sed 's/^ d:/ a:/g' | disklabel -w ad0s1</i> 261# <i>disklabel ad0s1 | sed 's/^ d:/ a:/' > label</i>
262# <i>disklabel -R ad0s1 label</i>
275</pre> 263</pre>
276 264
277<p> 265<p>
278This will finalize the partitioning process, and format the drive in UFS for 266This 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 267FreeBSD 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 268specified earlier (<path>/mnt/</path>). You can verify this worked by
281running <c>mount</c>: 269running <c>mount</c>:
282</p> 270</p>
283 271
284<pre caption="Verifying the new disk layout was mounted with mount"> 272<pre caption="Verifying the new disk layout was mounted with mount">
285# <i>mount</i> 273# <i>mount</i>
286... 274...
287/dev/ad0s1a on /mnt/gentoo (ufs, local) 275/dev/ad0s1a on /mnt (ufs, local)
288</pre> 276</pre>
289 277
290<p> 278<p>
291Now that you have mounted the target partition, it is time to start on the Gentoo 279Now that you have mounted the target partition, it is time to start on the Gentoo
292setup. 280setup.
304<uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the 292<uri>http://gentoo.osuosl.org/experimental/x86/freebsd/stages/</uri>, grab the
305latest snapshot, and unpack it into the mountpoint: 293latest snapshot, and unpack it into the mountpoint:
306</p> 294</p>
307 295
308<pre caption="Obtaining and unpacking a stage3 tarball"> 296<pre caption="Obtaining and unpacking a stage3 tarball">
309# <i>cd /mnt/gentoo/</i> 297# <i>cd /mnt/</i>
310<comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment> 298<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> 299# <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> 300# <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> 301<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> 302# <i>rm stage3-x86-freebsd-6.2.tar.bz2</i>
315</pre> 303</pre>
316 304
317<note> 305<note>
318If you want you can use the transition overlay that contains semi-experimental 306If 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 307ebuilds 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 316filesystem from the currently running system into the Gentoo/FreeBSD mount
329point before proceeding with the chroot. 317point before proceeding with the chroot.
330</p> 318</p>
331 319
332<pre caption="Mounting the /dev filesystem and chrooting"> 320<pre caption="Mounting the /dev filesystem and chrooting">
333# <i>mount -t devfs none /mnt/gentoo/dev/</i> 321# <i>mount -t devfs none /mnt/dev/</i>
334# <i>cp /etc/resolv.conf /mnt/gentoo/etc</i> 322# <i>cp /etc/resolv.conf /mnt/etc/</i>
335# <i>chroot /mnt/gentoo/ /bin/bash</i> 323# <i>chroot /mnt/ /bin/bash</i>
336# <i>env-update &amp;&amp; source /etc/profile</i> 324# <i>env-update &amp;&amp; source /etc/profile</i>
337</pre> 325</pre>
338 326
339<p> 327<p>
340After you obtain the Gentoo/FreeBSD overlay, it's time to link 328After you obtain the Gentoo/FreeBSD overlay, it's time to link
384</section> 372</section>
385</chapter> 373</chapter>
386<chapter> 374<chapter>
387<title>Setting up for Booting</title> 375<title>Setting up for Booting</title>
388<section> 376<section>
377<title>Set your time zone</title>
378<body>
379
380<p>
381First make sure your date and time is set correctly using <c>date
382yyyymmddHHMM</c>. Use UTC time.
383</p>
384
385<pre caption="Set the date and UTC time">
386<comment>(Check the clock)</comment>
387# <i>date</i>
388Mon Mar 6 00:14:13 UTC 2006
389
390<comment>(Set the current date and time if required)</comment>
391# <i>date 200603060016</i> <comment>(Format is yyyymmddHHMM)</comment>
392Mon Mar 6 00:16:00 UTC 2006
393</pre>
394
395<p>
396Next, set your time zone information by using the correct listing in
397<path>/usr/share/zoneinfo</path>.
398</p>
399
400<pre caption="Setting your timezone">
401# <i>ls /usr/share/zoneinfo</i>
402<comment>(Using Brussels as an example)</comment>
403# <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i>
404
405# <i>date</i>
406Wed Mar 8 00:46:05 CET 2006
407</pre>
408
409<p>
410Edit <path>/etc/conf.d/clock</path> to define the time zone you used
411previously.
412</p>
413
414<pre caption="Edit /etc/conf.d/clock">
415# <i>nano -w /etc/conf.d/clock</i>
416TIMEZONE="Europe/Brussels"
417</pre>
418
419</body>
420</section>
421<section>
389<title>Kernel Installation</title> 422<title>Kernel Installation</title>
390<body> 423<body>
391 424
392<p> 425<p>
393If you ran <c>emerge -e system</c>, the sources for the FreeBSD kernel were 426If you ran <c>emerge -e system</c>, the sources for the FreeBSD kernel were
489<pre caption="Installing and setting up boot0"> 522<pre caption="Installing and setting up boot0">
490# <i>emerge boot0</i> 523# <i>emerge boot0</i>
491<comment>(Leave the chroot environment)</comment> 524<comment>(Leave the chroot environment)</comment>
492# <i>exit</i> 525# <i>exit</i>
493<comment>(Issued from outside the chroot)</comment> 526<comment>(Issued from outside the chroot)</comment>
494# <i>fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX</i> 527# <i>fdisk -B -b /mnt/boot/boot0 /dev/adX</i>
495# <i>chroot /mnt/gentoo /bin/bash</i> 528# <i>chroot /mnt/ /bin/bash</i>
496# <i>disklabel -B adXsY</i> 529# <i>disklabel -B adXsY</i>
497</pre> 530</pre>
498 531
499<p> 532<p>
500If you need additional information on setting up <c>boot0</c>, please consult 533If you need additional information on setting up <c>boot0</c>, please consult
551 584
552grub&gt; quit 585grub&gt; quit
553</pre> 586</pre>
554 587
555<p> 588<p>
589To make the loader find the kernel on a specific slice (the default is 'a'),
590add a <c>vfs.root.mountfrom</c> line to the <path>/boot/loader.conf</path>
591file:
592</p>
593
594<pre caption="Tell the loader where to look for the kernel">
595# <i>echo 'vfs.root.mountfrom="ufs:ad0s1d"' >> /boot/loader.conf</i>
596</pre>
597
598<p>
556When you first boot, you may not receive a grub menu. If so, run this at the 599When you first boot, you may not receive a grub menu. If so, run this at the
557prompt: 600prompt:
558</p> 601</p>
559 602
560<pre caption="Booting the kernel with no menu"> 603<pre caption="Booting the kernel with no menu">
571<note> 614<note>
572For more information on configuring grub, please refer to the <uri 615For 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 616link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo
574Linux Handbook</uri>. 617Linux Handbook</uri>.
575</note> 618</note>
619
620<warn>
621Grub doesn't follow UFS symlinks so be sure to delete the
622<path>/boot/grub/menu.lst</path> symlink and to use <path>menu.lst</path> to
623setup Grub (<path>grub.conf</path> isn't used).
624</warn>
576 625
577</body> 626</body>
578</section> 627</section>
579<section> 628<section>
580<title>System configuration</title> 629<title>System configuration</title>

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

  ViewVC Help
Powered by ViewVC 1.1.20