/[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.25 - (show annotations) (download) (as text)
Sun Apr 8 21:55:42 2007 UTC (7 years, 5 months ago) by nightmorph
Branch: MAIN
Changes since 1.24: +6 -6 lines
File MIME type: application/xml
updated freebsd guide to use available non-rc stages, thanks to rbu for reporting

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

  ViewVC Help
Powered by ViewVC 1.1.20