/[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.26 - (show annotations) (download) (as text)
Thu May 10 22:00:51 2007 UTC (7 years, 5 months ago) by cam
Branch: MAIN
Changes since 1.25: +78 -29 lines
File MIME type: application/xml
- Replaced /mnt/gentoo by /mnt thanks to Freesbie
- Fixed the disklabel command that didn't work
- Set the time to avoid error messages in the kernel version
- How to use a non-'a' slice to boot
- Added a warning to not use symlink with Grub

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

  ViewVC Help
Powered by ViewVC 1.1.20