Users migrating from Linux to FreeBSD commonly consider the two operating systems "almost the same". In fact, FreeBSD really shares a lot of similarities with Linux distributions in general. Nevertheless, it has some key differences that are worth noting:
Besides, FreeBSD also has some technical differences which set it apart from Linux. Some of them are very important to know, even if you don't plan on joining the Gentoo/FreeBSD development effort:
After this short introduction, it's about time to finally install
Gentoo/FreeBSD. Unfortunately, we currently lack our own installation media, so
you have to choose between two alternative installation methods. The first
would be to use an existing FreeBSD installation to partition your hard drive
and use it as a base for installing Gentoo/FreeBSD. Alternatively, you can also
use the excellent
Before you can begin with the installation, you have to setup a hard disk for
use with Gentoo/FreeBSD. This can either be done via
# sysinstall diskPartitionEditor diskPartitionWrite diskLabelEditor diskLabelCommit
If you face difficulties
while partitioning or formatting your hard disks, have a look at the great
Once you're done setting up your disks, you have to create a mount point for your Gentoo/FreeBSD installation and mount all the necessary partitions.
# mkdir /mnt/gentoo(Replace X with the correct numbers for your hard disk.) # mount /dev/adXsXa /mnt/gentoo
If you're using the FreeSBIE LiveCD and you already had an UFS partition on
your hard disk, it has already been mounted read-only to
# mount -u -o rw /mnt/ufs.1
Now that you have mounted the target partition, it is time to fetch and unpack a stage3 tarball.
# cd /mnt/gentoo/(Any other Gentoo mirror which includes the experimental/ directory will also work.) # wget http://gentoo.osuosl.org/experimental/x86/freebsd/stages/gentoo-freebsd-6.0-stage-20060221.tar.bz2 # tar -jxvpf gentoo-freebsd-6.0-stage-20060221(You can delete the tarball with the following command if you want to.) # rm gentoo-freebsd-6.0-stage-20060221
Before chrooting into the newly-extracted stage, you first must obtain an
up-to-date copy of the Gentoo/FreeBSD overlay. The easiest way to achieve this
is to to get our latest snapshot which you then extract to
# cd /mnt/gentoo/usr/local/portage # wget http://gentoo.osuosl.org/experimental/snapshots/portage-alt-overlay-latest.tar.bz2 # tar -xjf portage-alt-overlay-latest.tar.bz2(You now can safely delete the snapshot with the following command.) # rm portage-alt-overlay-latest.tar.bz2
Alternatively, you can also use Subversion to check out the current version of
the overlay. If you are interested in this possibility, please refer to the
In order for your install to work, you need to mount the
# mount -t devfs none /mnt/gentoo/dev/ # cp /etc/resolv.conf /mnt/gentoo/etc # chroot /mnt/gentoo/ /bin/bash # source /etc/profile
After you got hold of the Gentoo/FreeBSD overlay, it's time to link
Now, you have to obtain a copy of the main Gentoo Portage tree, which depending on your connection might take quite a while.
# emerge --sync(It's also possible to retrieve the Portage tree in another way:) # cd / # wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2 # tar -xjf portage-latest.tar.bz2 -C /usr/ # emerge --metadata
# ln -sf /usr/local/portage/portage-alt-overlay/profiles/default-bsd/fbsd/6.0/x86/ /etc/make.profile(FreeBSD's standard editor is ee, which is used to edit /etc/make.conf) # ee /etc/make.conf(Please make sure you add at least the following entries:) CHOST="i686-gentoo-freebsd6.0" ACCEPT_KEYWORDS="~x86-fbsd" FEATURES="-sandbox collision-protect" PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay"
In order to boot correctly, you will need to create the
# mkdir /proc
If you want, you can now rebuild the system's core packages.
# emerge -e system
When you did
# emerge freebsd-sources
Configuring and compiling a custom kernel is really different from compiling
Linux, so if you are not familiar with the process we encourage you to have a
look at
Please note that currently only the "Traditional" way of building the kernel is
supported on Gentoo/FreeBSD! Also note that
Now is the time to do some basic system configuration and settings. First, we
are going to setup the filesystem mounting points in
# ee /etc/fstab(This is an example, replace X and Y with the correct numbers for your hard disk.) #Device Mountpoint Fstype Options Dump Pass /dev/adXsYb none swap sw 0 0 /dev/adXsYa / ufs rw 1 1 /dev/adXsYe /usr/home ufs rw 2 2 /dev/adXsYd /tmp ufs rw 2 2 /dev/acdX /cdrom cd9660 ro,noauto 0 0
Now would also be a good time to set up your network connection before the final reboot.
You can find all the information necessary to configure your network in the
To have your network interface activated at boot time, you have to add it to the default runlevel.
# rc-update add net.rl0 default
Your system's hostname can be changed in
# ee /etc/conf.d/hostname(Set the HOSTNAME variable to your hostname) HOSTNAME="tux"
You should also configure your domain name, which is done in the
# ee /etc/conf.d/domainname(Set the DNSDOMAIN variable to your domain name) DNSDOMAIN="homenetwork"
If you have a NIS domain, you need to define it in the
# ee /etc/conf.d/domainname(Set the NISDOMAIN variable to your NIS domain name) NISDOMAIN="my-nisdomain"
In case you need to use another keyboard layout for your language, you have to
set the correct value in
# ee /etc/conf.d/syscons KEYMAP="spanish.iso.acc"(Possible layouts can be found in /usr/share/syscons/keymaps).
# emerge boot0(Leave the chroot environment) # exit(Issued from outside the chroot) # fdisk -B -b /mnt/gentoo/boot/boot0 /dev/adX # chroot /mnt/gentoo /bin/bash # disklabel -B adXsY
If you need additional information on setting up
Now would be a good time to set a password for the
# passwd(If you need help in adding a user please consult the FreeBSD handbook). # adduser
Congratulations, you have just finished your Gentoo/FreeBSD installation which you can start exploring after the final reboot. Have fun!
# exit # reboot
There are many things you could help with, depending on your skill level and spare time:
At the moment, there are still quite a lot of known issues. Here are the ones really worth noting:
A list of Gentoo/FreeBSD developers can be found at the