/[gentoo]/xml/htdocs/doc/en/gentoo-freebsd.xml
Gentoo

Contents of /xml/htdocs/doc/en/gentoo-freebsd.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.42 - (show annotations) (download) (as text)
Sat Aug 3 16:23:41 2013 UTC (13 months, 2 weeks ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.41: +3 -3 lines
File MIME type: application/xml
Link to https://wiki.gentoo.org/wiki/Gentoo_FreeBSD

1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-freebsd.xml,v 1.41 2012/08/01 22:08:58 nightmorph Exp $ -->
4
5 <guide disclaimer="obsolete" redirect="https://wiki.gentoo.org/wiki/Gentoo_FreeBSD">
6 <title>A short guide to Gentoo/FreeBSD</title>
7
8 <author title="Author">
9 <mail link="ignacio.arquelatour@gmail.com">Ignacio Arque-Latour</mail>
10 </author>
11 <author title="Author">
12 <mail link="citizen428@gentoo.org">Michael Kohl</mail>
13 </author>
14 <author title="Author">
15 <mail link="angusyoung@gentoo.org">Otavio R. Piske</mail>
16 </author>
17 <author title="Author">
18 <mail link="ka0ttic@gentoo.org">Aaron Walker</mail>
19 </author>
20 <author title="Author">
21 <mail link="chriswhite@gentoo.org">Chris White</mail>
22 </author>
23 <author title="Contributor">
24 <mail link="flameeyes@gentoo.org">Diego Pettenò</mail>
25 </author>
26 <author title="Editor">
27 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
28 </author>
29 <author title="Editor">
30 <mail link="cam@gentoo.org">Camille Huot</mail>
31 </author>
32 <author title="Editor">
33 <mail link="klondike" />
34 </author>
35
36 <abstract>
37 This document gives some general information on FreeBSD, as well as
38 installation instructions for Gentoo/FreeBSD. It also includes some reference
39 for people interested in helping out with development.
40 </abstract>
41
42 <!-- The content of this document is licensed under the CC-BY-SA license -->
43 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
44 <license/>
45
46 <version>10</version>
47 <date>2012-08-01</date>
48
49 <chapter>
50 <title>Introduction to FreeBSD</title>
51 <section>
52 <title>What is FreeBSD?</title>
53 <body>
54
55 <impo>
56 Be sure to read the Gentoo/FreeBSD <uri
57 link="http://wiki.gentoo.org/wiki/Gentoo_FreeBSD">wiki page</uri> for up-to-date
58 installation instructions.
59 </impo>
60
61 <p>
62 <uri link="http://www.freebsd.org/">FreeBSD</uri> is a free (<uri
63 link="http://www.freebsd.org/copyright/freebsd-license.html">license</uri>)
64 Unix-like operating system. Back in 1993 when development of <uri
65 link="http://www.386bsd.org/">386BSD</uri> stopped, two projects were born:
66 <uri link="http://www.netbsd.org/">NetBSD</uri>, commonly known to run on a
67 huge number of architectures, and FreeBSD which supports the x86, amd64, ia64,
68 sparc64 and alpha platforms. FreeBSD is renowned for its stability, performance
69 and security, thus being used from small to huge companies all over the world.
70 </p>
71
72 <p>
73 FreeBSD's current production release is version 7.1. Gentoo/FreeBSD is based on
74 version 6.2 and older versions of Gentoo/FreeBSD are discontinued and no
75 longer supported.
76 </p>
77
78 </body>
79 </section>
80 <section>
81 <title>What is Gentoo/FreeBSD?</title>
82 <body>
83
84 <fig link="/images/artwork/GentooFreeBSD-logo-20060515-200x200.png"
85 linkto="/proj/en/desktop/artwork/artwork.xml"/>
86
87 <p>
88 <uri link="/proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD</uri> is a subproject
89 of the <uri link="/proj/en/gentoo-alt/">Gentoo/Alt project</uri>, with the
90 goal of providing a fully-capable FreeBSD operating system featuring design
91 sensibilities taken from Gentoo Linux, such as the init system and the Portage
92 package management system.
93 </p>
94
95 </body>
96 </section>
97 <section>
98 <title>FreeBSD and Linux</title>
99 <body>
100
101 <p>
102 Users migrating from Linux to FreeBSD commonly consider the two operating
103 systems "almost the same". In fact, FreeBSD really shares a lot of similarities
104 with Linux distributions in general. Nevertheless, it has some key differences
105 that are worth noting:
106 </p>
107
108 <ul>
109 <li>
110 Contrary to Linux, which actually only refers to the kernel, FreeBSD is a
111 complete operating system, consisting of a C library, userland tools and
112 much more. This development approach makes the overall system very
113 consistent.
114 </li>
115 <li>
116 Contrary to the Linux kernel, FreeBSD development is not led by one person,
117 but instead managed by a small group of people called the <uri
118 link="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors/staff-committers.html">Core
119 Team</uri>.
120 </li>
121 </ul>
122
123 <p>
124 Besides, FreeBSD also has some technical differences which set it apart
125 from Linux. Some of them are very important to know, even if you don't plan on
126 joining the Gentoo/FreeBSD development effort:
127 </p>
128
129 <ul>
130 <li>
131 To get run-time dynamic linking functions like <c>dlopen()</c>, programs do
132 not need to be linked against libdl like on GNU/Linux. Instead they are
133 linked against libc.
134 </li>
135 <li>
136 FreeBSD doesn't have an official tool for kernel compilation, thus you'll
137 have to resolve feature dependencies on your own.
138 </li>
139 <li>
140 FreeBSD uses UFS/UFS-2 as its filesystems and has no official support for
141 e.g. ReiserFS or XFS. However, there are projects for adding read-only
142 support for these filesystems. Accessing ext2/ext3 partitions is already
143 possible, but you cannot install your system on them.
144 </li>
145 </ul>
146
147 </body>
148 </section>
149 </chapter>
150
151 <chapter>
152 <title>Installing Gentoo/FreeBSD</title>
153 <section>
154 <title>Booting the CD</title>
155 <body>
156
157 <p>
158 After this short introduction, it's about time to finally install
159 Gentoo/FreeBSD. Unfortunately, we currently lack our own installation media, so
160 you have to choose between two alternative installation methods. The first
161 would be to use an existing FreeBSD installation to partition your hard drive
162 and use it as a base for installing Gentoo/FreeBSD. This guide will describe how
163 to use the <uri link="http://www.freesbie.org/">FreeSBIE LiveCD</uri> as
164 an installation medium for Gentoo/FreeBSD.
165 </p>
166
167 <note>
168 If you are intending to use FreeSBIE for installing Gentoo/FreeBSD, please make
169 sure to use a version based on FreeBSD 6.x, such as FreeSBIE 2.0 (or one of its
170 release candidates). You can download it from <uri
171 link="http://torrent.freesbie.org/">FreeSBIE's Bittorrent tracker</uri>.
172 </note>
173
174 <p>
175 First, boot the CD in order to begin the installation process. You'll be
176 presented with a login screen. The username is <c>freesbie</c>, and there is
177 no password. Next, run <c>sudo su</c> to become root, and optionally setup a
178 password. If you want to pass time during the installation process, you can run
179 <c>startx</c> to enter into an Xfce environment, suitable for web browsing,
180 AIM, and other things. Unlike Linux, FreeBSD bases the name of your interface
181 on the driver for the interface. For example, the Intel EtherExpress driver
182 (fxp) appears as fxp0 (driver fxp, first network card). To see what your
183 interface is, use <c>ifconfig</c>:
184 </p>
185
186 <pre caption="Finding out the network interface name using ifconfig">
187 # <i>ifconfig</i>
188 fxp0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
189 options=8&lt;VLAN_MTU&gt;
190 inet6 fe80::2d0::b7ff:febc:4fe3%fxp0 prefixlen 64 scopeid 0x1
191 inet 192.168.0.106 netmask 0xffffff00 broadcast 192.168.0.255
192 ether 00:d0:b7:bc:4f:e3
193 media: Ethernet autoselect (100baseTX &lt;full-duplex&gt;)
194 status: active
195 lo0: flags=8007&lt;LOOPBACK,MULTICAST&gt; mtu 16384
196 </pre>
197
198 <p>
199 If the original DHCP request during the CD bootup failed, you can use the
200 <c>dhclient</c> command to obtain an IP:
201 </p>
202
203 <pre caption="Obtaining a DHCP address using dhclient">
204 # <i>dhclient fxp0</i>
205 DHCPDISCOVER on fxp0 to 255.255.255.255 port 67 interval 9
206 DHCPOFFER from 192.168.0.1
207 DHCPREQUEST on fxp0 to 255.255.255.255 port 67
208 DHCPACK from 192.168.0.1
209 bound to 192.168.0.106 -- renewal in 302400 seconds
210 </pre>
211
212 <note>
213 The output presented here will differ based on your network.
214 </note>
215
216 </body>
217 </section>
218 <section>
219 <title>Partitioning the Drive</title>
220 <body>
221
222 <p>
223 Now that we have a mount point, it's time to partition the drive. This is done
224 with the <c>sysinstall</c> command:
225 </p>
226
227 <pre caption="Running the sysinstall command to fdisk the drive">
228 # <i>sysinstall diskPartitionEditor diskPartitionWrite</i>
229 </pre>
230
231 <p>
232 We recommend that you use the default layout. Press enter at the dialog, then
233 press <b>a</b> followed by <b>q</b> to accept the default layout. The next
234 screen will present you with the option of a bootloader. For this option,
235 choose "None" as we'll be installing the bootloader later on. Next comes the
236 actual partition sizing and mount points.
237 </p>
238
239 <p>
240 This next step also uses <c>sysinstall</c>, but with different arguments:
241 </p>
242
243 <pre caption="Running sysinstall to setup partition sizing and mount points">
244 # <i>sysinstall diskLabelEditor diskLabelCommit</i>
245 </pre>
246
247 <p>
248 Here, we'll refrain from using the automatic layout, and create one giant root
249 partition, followed by a swap partition. Hit <b>c</b> to create a new
250 partition. A dialog prompts you to enter a size. Go ahead and do so, using
251 MB/GB for setting different sizes, or C for cylinders. For root, choose FS as
252 the partition type, and set the mount point as <path>/mnt/</path>. <e>If
253 you do not adjust the mount point, it will overwrite the FreeSBIE
254 environment!</e> As <path>/boot</path> is not a separate partition, you'll
255 need to disable soft-updates, or your system will not boot! To do so, use the
256 arrow keys to navigate to your newly created partition, then hit the <b>s</b>
257 key, until "Newfs" contains no <b>+S</b>. Now navigate the arrow keys until
258 the "Disk" line is highlighted, and hit <b>c</b> again to create a swap
259 partition. Generally, we recommend a swap space that is twice the size of your
260 RAM. Choose SWAP as the partition type, and don't worry about soft-updates, as
261 it does not apply to swap. Now we're finished, so hit <b>q</b> to finish the
262 process.
263 </p>
264
265 <p>
266 When choosing a different mountpoint than <path>/</path> for your partition,
267 <c>sysinstall</c> will actually create a 'd' slice, which the bootloader won't
268 boot from. To fix this, run the following:
269 </p>
270
271 <note>
272 Please, make sure ad0s1 is unmounted before running the following command,
273 otherwise it will not work.
274 </note>
275
276 <pre caption="Fixing the root partition letter">
277 # <i>disklabel ad0s1 | sed 's/^ d:/ a:/' | disklabel -R ad0s1 /dev/stdin</i>
278 </pre>
279
280 <p>
281 This will finalize the partitioning process, and format the drive in UFS for
282 FreeBSD to utilize. This will also mount the drive for you at the mount point
283 specified earlier (<path>/mnt/</path>). You can verify this worked by
284 running <c>mount</c>:
285 </p>
286
287 <pre caption="Verifying the new disk layout was mounted with mount">
288 # <i>mount</i>
289 ...
290 /dev/ad0s1a on /mnt (ufs, local)
291 </pre>
292
293 <p>
294 Now that you have mounted the target partition, it is time to start on the
295 Gentoo setup.
296 </p>
297
298 </body>
299 </section>
300 <section>
301 <title>Gentoo Setup</title>
302 <body>
303
304 <p>
305 First, we need to download a stage3 tarball and unpack it into the chroot.
306 Point your browser to
307 <uri>http://distfiles.gentoo.org/experimental/x86/freebsd/stages/</uri>, grab the
308 latest snapshot, and unpack it into the mountpoint:
309 </p>
310
311 <pre caption="Obtaining and unpacking a stage3 tarball">
312 # <i>cd /mnt/</i>
313 <comment>(Any other Gentoo mirror which includes the experimental/ directory will also work.)</comment>
314 # <i>wget http://distfiles.gentoo.org/experimental/x86/freebsd/stages/stage3-x86-freebsd-6.2-r1.tar.bz2</i>
315 # <i>tar -jxvpf stage3-x86-freebsd-6.2-r1.tar.bz2</i>
316 <comment>(You can delete the tarball with the following command if you want to.)</comment>
317 # <i>rm stage3-x86-freebsd-6.2-r1.tar.bz2</i>
318 </pre>
319
320 <note>
321 If you want you can use the transition overlay that contains semi-experimental
322 ebuilds with patches not yet in the main Portage tree, but does allow a wider
323 range of supported packages, please refer to the <uri
324 link="/proj/en/gentoo-alt/contribute/index.xml?part=1&amp;chap=3">Gentoo/ALT
325 overlay documentation</uri>. Please note that the overlay is not critical and
326 you can easily install and use Gentoo/FreeBSD without it.
327 </note>
328
329 <p>
330 In order for your install to work, you need to mount the <path>/dev</path>
331 filesystem from the currently running system into the Gentoo/FreeBSD mount
332 point before proceeding with the chroot.
333 </p>
334
335 <pre caption="Mounting the /dev filesystem and chrooting">
336 # <i>mount -t devfs none /mnt/dev/</i>
337 # <i>cp /etc/resolv.conf /mnt/etc/</i>
338 # <i>chroot /mnt/ /bin/bash</i>
339 # <i>env-update &amp;&amp; source /etc/profile</i>
340 </pre>
341
342 <p>
343 After you obtain the Gentoo/FreeBSD overlay, it's time to link
344 <path>/etc/portage/make.profile</path> to the correct profile and get your
345 <path>/etc/portage/make.conf</path> ready for Gentoo/FreeBSD.
346 </p>
347
348 <p>
349 Now, you have to obtain a copy of the main Gentoo Portage tree, which depending
350 on your connection might take quite a while.
351 </p>
352
353 <pre caption="Obtaining the Portage tree">
354 # <i>emerge --sync</i>
355 <comment>(It's also possible to retrieve the Portage tree in another way:)</comment>
356 # <i>cd /</i>
357 # <i>wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2</i>
358 # <i>tar -xjf portage-latest.tar.bz2 -C /usr/</i>
359 # <i>emerge --metadata</i>
360 </pre>
361
362 <pre caption="Setting up the profile and editing /etc/portage/make.conf">
363 # <i>ln -sf /usr/portage/profiles/default-bsd/fbsd/6.2/x86/ /etc/portage/make.profile</i>
364 # <i>nano /etc/portage/make.conf</i>
365 <comment>(Please make sure you add at least the following entries:)</comment>
366 CHOST="i686-gentoo-freebsd6.2"
367 FEATURES="collision-protect"
368 </pre>
369
370 <note>
371 The <c>~x86-fbsd</c> keyword does not yet fully cover the same tree as
372 <c>~x86</c>, but please <e>do not</e> put <c>~x86</c> in ACCEPT_KEYWORDS. Rather
373 use <path>/etc/portage/package.accept_keywords</path> to test packages, and
374 report working packages on <uri
375 link="http://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%2FAlt">Bugzilla</uri>.
376 </note>
377
378 <p>
379 If you want, you can now rebuild the system's core packages.
380 </p>
381
382 <pre caption="Rebuilding the FreeBSD core packages (optional)">
383 # <i>emerge -e system</i>
384 </pre>
385
386 </body>
387 </section>
388 </chapter>
389 <chapter>
390 <title>Setting up for Booting</title>
391 <section>
392 <title>Set your time zone</title>
393 <body>
394
395 <p>
396 First make sure your date and time is set correctly using <c>date
397 yyyymmddHHMM</c>. Use UTC time.
398 </p>
399
400 <pre caption="Set the date and UTC time">
401 <comment>(Check the clock)</comment>
402 # <i>date</i>
403 Mon Mar 6 00:14:13 UTC 2006
404
405 <comment>(Set the current date and time if required)</comment>
406 # <i>date 200603060016</i> <comment>(Format is yyyymmddHHMM)</comment>
407 Mon Mar 6 00:16:00 UTC 2006
408 </pre>
409
410 <p>
411 Next, set your time zone information by using the correct listing in
412 <path>/usr/share/zoneinfo</path>.
413 </p>
414
415 <pre caption="Setting your timezone">
416 # <i>ls /usr/share/zoneinfo</i>
417 <comment>(Using Brussels as an example)</comment>
418 # <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i>
419
420 # <i>date</i>
421 Wed Mar 8 00:46:05 CET 2006
422 </pre>
423
424 <p>
425 Edit <path>/etc/timezone</path> to define the time zone you used
426 previously.
427 </p>
428
429 <pre caption="Edit /etc/timezone">
430 # <i>nano -w /etc/timezone</i>
431 Europe/Brussels
432 </pre>
433
434 </body>
435 </section>
436 <section>
437 <title>Kernel Installation</title>
438 <body>
439
440 <p>
441 If you ran <c>emerge -e system</c>, the sources for the FreeBSD kernel were
442 installed to <path>/usr/src/sys</path>. If you skipped this step, you can get
443 them in the following way:
444 </p>
445
446 <pre caption="Getting the FreeBSD kernel sources">
447 # <i>emerge freebsd-sources</i>
448 </pre>
449
450 <p>
451 Configuring and compiling a custom kernel is quite different from compiling
452 Linux, so if you are not familiar with the process we encourage you to have a
453 look at <uri
454 link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html">
455 chapter 8</uri> of the FreeBSD handbook. For now, you can do an installation of
456 the GENERIC kernel, which works on most systems. To begin, enter the source
457 directory for the kernel:
458 </p>
459
460 <impo>
461 Please note that currently only the "Traditional" way of building the kernel is
462 supported on Gentoo/FreeBSD!
463 </impo>
464
465 <pre caption="Entering the kernel source directory">
466 # <i>cd /usr/src/sys/</i>
467 </pre>
468
469 <p>
470 Looking over the layout, you'll see various architectures and subdirectories
471 for various parts of the kernel. To begin the installation, we head into the
472 <path>i386/conf/</path> directory:
473 </p>
474
475 <pre caption="The kernel configuration directory">
476 # <i>cd i386/conf/</i>
477 # <i>ls</i>
478 .cvsignore GENERIC Makefile PAE
479 DEFAULTS GENERIC.hints NOTES SMP
480 </pre>
481
482 <p>
483 The main files to note are <path>GENERIC</path> and <path>GENERIC.hints</path>.
484 As it will be needed by the installation of the kernel, go ahead and copy
485 <path>GENERIC.hints</path> file to <path>/boot/device.hints</path>:
486 </p>
487
488 <pre caption="Copying over the GENERIC.hints file">
489 # <i>cp GENERIC.hints /boot/device.hints</i>
490 </pre>
491
492 <p>
493 This file is used by the kernel drivers for basic configuration information
494 such as IRQ settings. Now it's time to configure the kernel. FreeBSD uses the
495 <c>config</c> command to do this. <c>config</c> uses the given file (in this
496 instance GENERIC) to copy over the required build files to a
497 <path>compile</path> directory in the parent directory. <path>GENERIC</path> is
498 similiar to the <path>.config</path> file for the Linux kernel. Run
499 <c>config</c> to produce the build directory:
500 </p>
501
502 <pre caption="Configuring the kernel build">
503 # <i>config GENERIC</i>
504 Kernel build directory is ../compile/GENERIC
505 Don't forget to ''make cleandepend; make depend''
506 </pre>
507
508 <p>
509 <c>config</c> has created a GENERIC build directory for us in the parent
510 directory. <c>cd</c> into it, then run the following to do a complete build:
511 </p>
512
513 <pre caption="Building and installing the kernel">
514 # <i>cd ../compile/GENERIC</i>
515 # <i>make cleandepend &amp;&amp; make depend &amp;&amp; make &amp;&amp; make install</i>
516 </pre>
517
518 <p>
519 This will give us a complete kernel to work with. Now we'll need to setup the
520 bootloader for the kernel to boot. The next chapter will discuss two methods of
521 setting up the bootloader: <c>boot0</c> and <c>grub</c>.
522 </p>
523
524 </body>
525 </section>
526 <section>
527 <title>Setting up the bootloader (boot0)</title>
528 <body>
529
530 <impo>
531 <c>boot0</c> is the FreeBSD bootloader. Previously, it was the only supported
532 bootloader until <c>grub</c> was introduced into ports with UFS slice support.
533 To install and configure <c>boot0</c>, run the following. Remember to replace
534 <c>adXsY</c> with the actual number and slice of your disk.
535 </impo>
536
537 <pre caption="Installing and setting up boot0">
538 # <i>emerge boot0</i>
539 <comment>(Leave the chroot environment)</comment>
540 # <i>exit</i>
541 <comment>(Issued from outside the chroot)</comment>
542 # <i>fdisk -B -b /mnt/boot/boot0 /dev/adX</i>
543 # <i>chroot /mnt/ /bin/bash</i>
544 # <i>disklabel -B adXsY</i>
545 </pre>
546
547 <p>
548 If you need additional information on setting up <c>boot0</c>, please consult
549 <uri
550 link="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot.html">chapter
551 12</uri> of the FreeBSD handbook. Now it's time to do some basic system
552 configuration and settings.
553 </p>
554
555 <p>
556 The next section will look at using the alternative bootloader, <c>grub</c>.
557 </p>
558
559 </body>
560 </section>
561 <section>
562 <title>Setting up the bootloader (grub)</title>
563 <body>
564
565 <p>
566 As of grub 0.97-r1, UFS slices are readable to <c>grub</c>. This lets us use
567 <c>grub</c> as a bootloader, the prefered method for those coming from a Linux
568 background. To begin, emerge <c>grub</c> and setup the label as bootable.
569 Remember to replace <c>adXsY</c> with the actual number and slice of your disk.
570 </p>
571
572 <pre caption="Emerge grub">
573 # <i>emerge grub</i>
574 # <i>disklabel -B adXsY</i>
575 </pre>
576
577 <p>
578 Now run <c>grub</c> to bring up the command prompt, and set up the partition as
579 shown:
580 </p>
581
582 <pre caption="Setting up grub">
583 <comment>(This is done to prevent disk error 29)</comment>
584 # <i>sysctl kern.geom.debugflags=16</i>
585 # <i>grub</i>
586 <comment>(Example using ad0s1d)</comment>
587 grub&gt; <i>root (hd0,0,d)</i>
588 Filesystem type is ufs2, partition type 0xa5
589
590 grub&gt; <i>setup (hd0)</i>
591 Checking if "/boot/grub/stage1" exists... yes
592 Checking if "/boot/grub/stage2" exists... yes
593 Checking if "/boot/grub/ufs2_stage1_5" exists... yes
594 Running "embed /boot/grub/ufs2_stage1_5 (hd0)"... 14 sectors are embedded.
595 succeeded
596 Running "install /boot/grub/stage1 (hd0) (hd0)1+14 p (hd0,0,d)/boot/grub/stage
597 2 /boot/grub/menu.lst"... succeeded
598 Done.
599
600 grub&gt; quit
601 </pre>
602
603 <p>
604 To make the loader find the kernel on a specific slice (the default is 'a'),
605 add a <c>vfs.root.mountfrom</c> line to the <path>/boot/loader.conf</path>
606 file:
607 </p>
608
609 <pre caption="Tell the loader where to look for the kernel">
610 # <i>echo 'vfs.root.mountfrom="ufs:ad0s1d"' >> /boot/loader.conf</i>
611 </pre>
612
613 <p>
614 When you first boot, you may not receive a grub menu. If so, run this at the
615 prompt:
616 </p>
617
618 <pre caption="Booting the kernel with no menu">
619 grub&gt; <i>find /boot/grub/stage1</i>
620 <comment>(The output here is what you'll use in the next command)</comment>
621 (hd0,0,d)
622
623 grub&gt; <i>kernel (hd0,0,d)/boot/loader</i>
624 [FreeBSD-a.out, loadaddr=0x200000, text=0x1000, data=0x3a000, bss=0x0, entry=0x200000]
625
626 grub&gt; <i>boot</i>
627 </pre>
628
629 <note>
630 For more information on configuring grub, please refer to the <uri
631 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10#doc_chap2">Gentoo
632 Linux Handbook</uri>.
633 </note>
634
635 <warn>
636 Grub doesn't follow UFS symlinks so be sure to delete the
637 <path>/boot/grub/menu.lst</path> symlink and to use <path>menu.lst</path> to
638 setup Grub (<path>grub.conf</path> isn't used).
639 </warn>
640
641 </body>
642 </section>
643 <section>
644 <title>System configuration</title>
645 <body>
646
647 <p>
648 First, we are going to setup the filesystem mounting points in
649 <path>/etc/fstab</path>.
650 </p>
651
652 <pre caption="Editing the filesystem in /etc/fstab">
653 # <i>nano /etc/fstab</i>
654 <comment>(This is an example, replace X and Y with the correct numbers for your hard disk.)</comment>
655 #Device Mountpoint Fstype Options Dump Pass
656 /dev/adXsYb none swap sw 0 0
657 /dev/adXsYa / ufs rw 1 1
658 /dev/adXsYe /usr/home ufs rw 2 2
659 /dev/adXsYd /tmp ufs rw 2 2
660 /dev/acdX /cdrom cd9660 ro,noauto 0 0
661 </pre>
662
663 <p>
664 Now would also be a good time to set up your network connection before the final
665 reboot. You can find all the information necessary to configure your network in
666 the <uri link="/doc/en/handbook/handbook-x86.xml?part=4&amp;chap=1">Gentoo
667 Handbook</uri>. To have your network interface activated at boot time, you have
668 to add it to the default runlevel:
669 </p>
670
671 <pre caption="Adding your network adapter to the default runlevel">
672 # <i>rc-update add net.fxp0 default</i>
673 </pre>
674
675 <p>
676 Your system's hostname can be changed in <path>/etc/conf.d/hostname</path>.
677 </p>
678
679 <pre caption="Setting up the machine's hostname">
680 # <i>nano /etc/conf.d/hostname</i>
681 <comment>(Set the HOSTNAME variable to your hostname)</comment>
682 HOSTNAME="tux"
683 </pre>
684
685 <p>
686 You should also configure your domain name, which is done in the
687 <path>/etc/conf.d/domainname</path> file:
688 </p>
689
690 <pre caption="Setting the domainname">
691 # <i>nano /etc/conf.d/domainname</i>
692 <comment>(Set the dns_domain variable to your domain name, and lo to your local
693 network interface)</comment>
694 dns_domain_lo="homenetwork"
695 </pre>
696
697 <p>
698 If you have a NIS domain, you need to define it in the
699 <path>/etc/conf.d/domainname</path> file:
700 </p>
701
702 <pre caption="Setting the NIS domainname">
703 # <i>nano /etc/conf.d/domainname</i>
704 <comment>(Set the nis_domain variable to your NIS domain name, and lo to your local network interface)</comment>
705 nis_domain_lo="my-nisdomain"
706 </pre>
707
708 <note>
709 For more information on domainnames and networking, please refer to the <uri
710 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=8#doc_chap2">Gentoo
711 Linux Handbook</uri>, and please read the documentation in
712 <path>/usr/share/doc/openrc-*/net.example.bz2</path>.
713 </note>
714
715 <p>
716 In case you need to use another keyboard layout for your language, you have to
717 set the correct value in <path>/etc/conf.d/syscons</path>. The following example
718 uses the Spanish layout, so you'll have to adjust it to your need if you want to
719 use another one.
720 </p>
721
722 <pre caption="Changing your keyboard layout (Optional)">
723 # <i>nano /etc/conf.d/syscons</i>
724 KEYMAP="spanish.iso.acc"
725 <comment>(Possible layouts can be found in /usr/share/syscons/keymaps).</comment>
726 </pre>
727
728 <p>
729 Now would be a good time to set a password for the <c>root</c> user and to add
730 another user account for your day-to-day work.
731 </p>
732
733 <pre caption="Changing the root password and adding a new user">
734 # <i>passwd</i>
735 # <i>adduser</i>
736 Username: <i>fred</i>
737 Full Name: <i>Fred Smith</i>
738 <comment>(Accepting the default here, just hit Enter.)</comment>
739 Uid (Leave empty for default):
740 <comment>(OK to accept the default here as well; hit Enter.)</comment>
741 Login group [fred]:
742 <comment>(Enter your groups here, space separated. They must exist.)</comment>
743 Login group is fred. Invite fred into other groups? []: wheel portage
744 <comment>(OK to accept the default here, hit Enter)</comment>
745 Login class [default]:
746 <comment>(Somewhat of a personal preference. Make sure the shell exists in /etc/shells)</comment>
747 Shell (sh bash tcsh csh esh ksh zsh sash nologin) [sh] <i>bash</i>
748 <comment>(OK to accept the default here, hit Enter for all these)</comment>
749 User password-based authentication [yes]
750 Use an empty password (yes/no) [no]:
751 Use a random password? (yes/no) [no]:
752 Enter password: <i>password goes here</i>
753 Enter password again: <i>retype it</i>
754 <comment>(OK to accept the default here, hit Enter)</comment>
755 Lock out the account after creation? [no]:
756 Username : fred
757 Password : *****
758 Full Name : Fred Smith
759 <comment>(This will vary)</comment>
760 Uid : 1002
761 Class :
762 Groups : fred wheel portage
763 Home : /home/fred
764 Shell : /bin/bash
765 Locked : no
766 <comment>(Confirm the information is correct)</comment>
767 OK? (yes/no): <i>yes</i>
768 adduser: INFO: Sucessfully added (fred) to the user database
769 Add another user? (yes/no): <i>no</i>
770 Goodbye!
771 #
772 </pre>
773
774 <p>
775 Congratulations, you have just finished your Gentoo/FreeBSD installation which
776 you can start exploring after the final reboot. Have fun!
777 </p>
778
779 <pre caption="Rebooting the system">
780 # <i>exit</i>
781 # <i>reboot</i>
782 </pre>
783
784 </body>
785 </section>
786 </chapter>
787
788 <chapter>
789 <title>Developing for Gentoo/FreeBSD</title>
790 <section>
791 <title>How to help</title>
792 <body>
793
794 <p>
795 There are many things you could help with, depending on your skill level and
796 spare time:
797 </p>
798
799 <ul>
800 <li>
801 Working on current ebuilds: this means working closely with ebuild
802 maintainers in order to create patches or modify ebuilds in a way that can
803 be accepted into the main tree.
804 </li>
805 <li>
806 Security: if you are into security, we need you! Although security
807 advisories from the FreeBSD project are tracked and fixed, we can always
808 use help in this area.
809 </li>
810 <li>
811 Contacts: we need people who can get in touch with FreeBSD developers to
812 maintain contacts between us and the original project to exchange patches
813 and discuss various problems and their solutions. Note that this should
814 never involve any kind of spamming of mailing lists or IRC channels.
815 </li>
816 <li>
817 Testing: the more people are actively using Gentoo/FreeBSD, the more bugs
818 will be discovered, which helps us improving the quality of the port. If
819 you are good at describing bugs or problems, we definitely want to hear
820 from you.
821 </li>
822 <li>
823 Other areas where we need help include: system ebuilds, creation of
824 installation CDs, documentation, kernel hacking.
825 </li>
826 </ul>
827
828 </body>
829 </section>
830
831 <section>
832 <title>Known issues</title>
833 <body>
834
835 <p>
836 At the moment, there are still quite a lot of known issues. Here are the ones
837 really worth noting:
838 </p>
839
840 <ul>
841 <li>
842 Some init scripts depend on the clock service which we don't provide right
843 now. You can just remove it from the dependencies of the script and report
844 that on our <uri link="http://bugs.gentoo.org/">Bugzilla</uri>. Please
845 remember to use the "Gentoo/Alt" product for your submission.
846 </li>
847 </ul>
848
849 </body>
850 </section>
851 </chapter>
852
853 <chapter>
854 <title>Contact</title>
855 <section>
856 <body>
857
858 <p>
859 A list of Gentoo/FreeBSD developers can be found at the <uri
860 link="/proj/en/gentoo-alt/bsd/fbsd/">project page</uri>. Other ways to contact
861 Gentoo/FreeBSD developers include our IRC Channel <c>#gentoo-bsd</c> on
862 Freenode, as well as the <uri link="/main/en/lists.xml">gentoo-bsd mailing
863 list</uri>.
864 </p>
865
866 </body>
867 </section>
868 </chapter>
869 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20