/[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.36 - (show annotations) (download) (as text)
Tue May 31 18:04:41 2011 UTC (3 years, 6 months ago) by nightmorph
Branch: MAIN
Changes since 1.35: +7 -4 lines
File MIME type: application/xml
add g/fbsd logo, though not sure what it's for exactly, and mark guide as obsolete, since it's at least 2 major versions behind the current g/fbsd platform, bug 365785

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

  ViewVC Help
Powered by ViewVC 1.1.20