/[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.39 - (show annotations) (download) (as text)
Tue Jul 10 08:46:28 2012 UTC (2 years ago) by nightmorph
Branch: MAIN
Changes since 1.38: +2 -2 lines
File MIME type: application/xml
add redirect to wiki

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

  ViewVC Help
Powered by ViewVC 1.1.20