Gentoo FreeBSD

Gentoo/FreeBSD is FreeBSD-based Gentoo system.

Introduction
Please see if you want details for Gentoo/FreeBSD.

Caution
Since this guide has only minimum information, the knowledge of both Gentoo/Linux and FreeBSD may be needed. Gentoo/Linux Handbook and FreeBSD Handbook are your friends.

Preparation
The installation media of FreeBSD 9.0 to which the LiveCD function was added are used for installation. Please get the more suitable one of i386 or amd64. Please do write to a CD or memory stick if necessary.

Boot the PC using the installation CD. Wait a moment while watching the boot process. Please choose Live CD, if a Welcome screen is displayed. Then login prompt, enter root.

Network setting
First, create a directory /tmp/bsdinstall_etc to rewrite the resolv.conf.

Identify your network devices. This example is em0.

Set the default gateway and IP address.

If you not use DHCP (IP address is an example)

If you use DHCP

Optional: want to install via ssh
So far we could not use ssh. If you want to install via ssh from this step.

Please connect with any ssh client. The username is root.

Setting the Partition
The installation target device of serial ATA and IDE are /dev/ada*. SCSI and USB drive are /dev/da*. Please identify the HDD using ls /dev/ada* or dmesg | grep ada. In this case, the device is ada0.

Next, set the partition. This example is simple only two partitions. If necessary, you can split /, /usr, /var, /tmp, and /home. Please set using gpart.

Please run gpart show in order to verify the partition could be set.

Results when you create a partition with option -a 4k.

Creating and mounting a file system
You can select the UFS and ZFS in FreeBSD. However, this guide is not intended ZFS. Please do not forget newfs -L option to label.

And mount it.

Downloading the Stage3 Tarball and Portage snapshot
Now, Gentoo/FreeBSD 9.0 stage3 is available.

The first settings and time zone settings
etc-update and time zone settings. Of course, you can modify /etc/make.conf.

Installing a kernel source
Unlike Gentoo/Linux, freebsd-sources package is the only sources.

Compiling and installing kernel
Now let's compile the kernel. Copy the GENERIC in conf, you can change it by changing the kernel configuration. For more information FreeBSD Handbook please see.

Installing the boot loader
Let's install a boot loader to boot the Gentoo/FreeBSD. Boot loader configuration is done after exiting the chroot.

System setting
Familiar setting. Please refer to Gentoo Linux Handbook if you need more information.

Setting the host name

Editing network setting

Adding net.em0 to the default runlevel

Setting the root password

You can also be configured to run at startup sshd.

Installing the required packages
If dhcpcd is required if you use DHCP.

Exit from chroot environment
Work done in the chroot environment. exit from chroot environment.

Writes boot loader and Cleaning up
Do you want to reboot now ? Just a minute. We forgot to setting the boot loader.

Unmount the partition.

Don't have a problem? Now we restart. Don't forget to remove the Installation CD of FreeBSD.

Major Upgrade howto
This guide will show you how to upgrade Gentoo/FreeBSD 9.0 from 8.x version.

Updating the @system
The update to eliminate the problems caused by outdated versions of installed packages.

Change profile
To emerge related to FreeBSD 9.0 is necessary to change the profile.

x86-fbsd users)

amd64-fbsd users)

Kernel update
First of all, you need to update your kernel. It is because the package of a userland may use the new function of a kernel.

Please be sure to update a kernel first !

Don't have a problem? Now we restart.

After rebooting your machine, please check if the kernel is new.

Backup of the library
Please backup your 8.x library. When a problem occurs, will help solve the problem.

Updating userland
The first emerge the core library.

Some changes to the file name of the library. Create a symbolic link to the previous file name. After all packages are recreated, you'll be able to remove the symbolic link.

Update the userland of FreeBSD.

Change CHOST, and emerge binutils gcc. (FYI, Changing the CHOST variable)

x86-fbsd users)

amd64-fbsd users)

remove 8.x stuff.

also check binutils

remove FreeBSD 8.x env data.

target file name is 05gcc-x86_64-gentoo-freebsd8.2 in this case.

Some packages need emerge first.

Recreate all packages.

Failure to compile the package if any, 'emerge --resume --skipfirst' is your friend. Also, please bug report the problem if you like.

Cleaning
Let's remove the backup files when you have finished all the steps.

can not boot a kernel panic always occurs
Details, see

workaround is to use gcc 4.3 to compile the kernel.

amd64 kernel + x86 stage environment, tar will not work successfully.
Details, see

Error messages: tar: getvfsbyname failed: No such file or directory tar: Error exit delayed from previous errors.

workaround fix

gcc fails to compile, Error message is recompile -fPIC
Details, see.

workaround fix

Emerge fails net-misc/openssh
Details, see

workaround fix for openssh

Emerge fails app-misc/screen
Details, see.

Please use app-misc/tmux instead of app-misc/screen.

cc: not found
Details, see

Links

 * Gentoo/FreeBSD Project page
 * A short guide to Gentoo/FreeBSD