Gentoo Logo

Installing Gentoo/NetBSD


1.  Introduction to NetBSD

What is NetBSD?

NetBSD is a free, secure, and highly portable Unix-like Open Source operating system available for many platforms, from 64-bit Opteron machines and desktop systems to handheld and embedded devices.

Back in 1993 when development of 386BSD stopped, two projects were born: FreeBSD which focuses mainly on the x86 platform, and NetBSD, commonly known to run on a huge number of architetures.

2.  Installing Gentoo/NetBSD

Installation instructions

You can use a qemu disk image or vmware image if you're installing Gentoo/NetBSD in virtual machine.If so, just download: gentoo-netbsd-image or gentoo-netbsd-vmware and make few more steps:

Code Listing 2.1: Gentoo/NetBSD disk image final configuration

# emerge sync
# echo "x86-nbsd" >> /usr/portage/profiles/arch.list
# emerge metadata

Unfortunately the Gentoo/NetBSD project currently has no official installation media, so you have to download an ISO image of a NetBSD LiveCD which can be found here.

Burn this image to a CD and use it boot your computer. Please log in as user 'root', using 'NetBSD' as a password. Once logged in, you have to create and format partitions for your Gentoo/NetBSD installation. If you're unsure on how to do this, please consult the section "Adding a new hard disk" of the NetBSD manual.

Code Listing 2.2: Partitioning your disk

# fdisk -u wdX
Creating a partition.
# fdisk -a wdX
Mark a partition as active.
#  disklabel -i wdX
Substitute X to reflect your setup.
#  newfs /dev/wdXY
Substitute X and Y to reflect the correct disk/slice.

When you are done with setting up your disk, create a mount point where you mount the previously created partitions.

Code Listing 2.3: Creating a mount point and mounting partitions

# mkdir /var/gentoo
# mount /dev/wdXY /var/gentoo
(Replace X and Y with the correct numbers for your hard disk.)

Now that you have mounted the target partition, it is time to fetch and unpack a stage3 tarball and syncing your portage tree.

Code Listing 2.4: Installing the stage3 tarball and syncing the portage tree

# cd /var/gentoo 
# ftp
# tar -xjpf gentoo-netbsd-stage3-051106.tar.bz2
# chroot /var/gentoo /bin/bash
# env-update
# emerge sync
# echo "x86-nbsd" >> /usr/portage/profiles/arch.list
# emerge metadata

Congrats, you now should be able to update your Gentoo/NetBSD installation using Portage! But in order to be able to boot your new system later on, you will have to install a boot manager or add Gentoo/NetBSD to your current boot loader's configuration. Additionally you will have to populate your /dev dirctory with the necessary device nodes. Finally you'll have to edit your /etc/fstab to reflect your partition layout.

Code Listing 2.5: Final configuration

# cd /dev
# ./MAKEDEV all
# fdisk -B /dev/wdX
Once again, substitute X to reflect your setup.
# installboot -v /dev/rwdXY /usr/mdec/bootxx_ffsv1
Where wdXY is your root partition.
# vi /etc/fstab
You now have to edit /etc/rc.conf, to set the option rc_configured to YES
# vi /etc/rc.conf

We hope you will enjoy your new Gentoo/NetBSD system and will have fun using it!

3.  Contact

Gentoo/NetBSD currently is official Gentoo project, and all your suggestions, questions etc. should go to BSD Mailing List


Page updated March 25, 2006

Summary: Installation instructions for Gentoo/NetBSD.

Damian Florczyk

Michael Kohl

Donate to support our development efforts.

Copyright 2001-2015 Gentoo Foundation, Inc. Questions, Comments? Contact us.