Gentoo Quick Start

238pages on
this wiki

Before You Start Edit

  • You should already have a working coLinux install
  • You should already be familiar with the basic usage of the Configuration XML format file.
  • Read this entire guide before using it :)

Gentoo? Edit

Starting From A Fresh Image Edit

The following is useful when starting with a fresh Gentoo. It should help you get your system up-to-date and create a new user (which should normally be used when logging in instead of using the root user). The new user is added to the administrative wheel group so that you can use su from tha account to get root access when you need to perform administrative tasks.

Once you get a working and configured Gentoo, consider Adding More Space.

See AlsoEdit

Basic Configuration Edit

Setting password Edit

Start coLinux and login as root. The default password as of Jan 05 is "root". The first thing to do, is update the password for the root account.

# passwd
Note: You will be prompted to enter a new password for the root user.

Editor Edit

You will probably need to adjust a few configuration files. Mainly, you will find these located in /etc. For now, we will use the nano editor. Later on, we will install Vim.

See Also Edit

Networking Edit

If you aren't using dhcp you will need to first adjust your network settings:

# nano /etc/conf.d/net
# nano /etc/resolv.conf

While you are at it, you should configure the following as well:

# nano /etc/hostname
# nano /etc/domainname
# nano /etc/hosts
# nano /etc/make.conf

See AlsoEdit

Swap Edit

You'll also want to edit /etc/fstab and add a swap device (I suggest placing the swap at /dev/cobd7).

See AlsoEdit

Reboot coLinux Edit

Shutdown coLinux:

# poweroff

Then restart coLinux, login as root and ensure that your network setup looks sane:

# /sbin/ifconfig

If all is okay, you should be able to ping your windows box as well as common internet destinations:

# ping   <-- use IP of your windows box, CTRL-C to stop
# ping

Conversely, you should be able to ping the coLinux process from your Windows box. At a DOS prompt:

C:\>ping   <-- use IP of your ~coLinux process (as reported by /sbin/ifconfig)

If everything is okay, you can update Gentoo.

Updating Gentoo Edit

Note: As of 1/24/2007, the latest filesystem provided on the coLinux sourceforge site for Gentoo is Gentoo-2005.1-stage3-ext3. The update process will not work as written below because the 2005.1 image is out of date: the emerge --sync step removes the 2005.1 information that the emerge portage step refers to. Should you work around the issues and attempt to emerge up to 2006.1, you will find that the 2GB Gentoo filesystem is not large enough to complete the emerge system step. You may want to consider skipping the update steps and using the Gentoo-2005 system as is.

The following updates the system after setting the root password. Note that using *etc-update* may result in some unfamiliar questions :). If you are using a fresh install, you should be able to auto-merge all the updates. If not, you should already know how to proceed. To learn more about the emerge and portage tools type emerge --help.

# emerge --sync
# emerge portage
# emerge --metadata
# etc-update
# emerge system
# etc-update

Note: this process can take awhile.

Your system is now up-to-date. To keep your system up-to-date, you need only occasionally issue an emerge sync. Read Behave In A Responsible Way in the GentooTAT to get an idea of the ettiquete involved when synchronizing.

We will now get the *mirrorselect* program to automate the selection of a local Gentoo mirror. We will use mirrorselect so that it gets a list of the top 5 closest working mirrors from a big list of available servers.

# emerge mirrorselect
# mirrorselect -a -s5

See AlsoEdit

Adding A Regular User Edit

In the following, replace _<username>_ with your username of choice. We now add the new user (the hard way):

# adduser -g users -G wheel -d /home/<username> -s /bin/bash <username>
# mkdir /home/<username> 
# cp -a /etc/skel/. /home/<username>/.
# chown -R <username> /home/<username>
# passwd <username>
Note: You will be prompted to enter a password for the new user.

Type *ctrl-d* to logout from the root account and log back in with your newly created <username> account (you can also type *logout* if you prefer).

Once logged in with your user account, note that prompts for normal user accounts end with "$" (by default) while root account prompts end with "#" (again, by default). Keep a note of this as it helps remind you where you are at.

Installing Vim Edit

I prefer the vim editor (vi) so I emerge that before doing anything else.

Since this user account was added to the _wheel_ group, we can access a root shell by using the superuser (*su*) command which will prompt you for the root password:

$ su
# emerge vim

Now type *ctrl-d* to logout from the root shell that we were accessing and you will end up back in your user shell.

To get a vim tutorial:

$ vimtutor

See Also: Learning vi -- the "cheatsheet" technique

Starting sshd Automatically Edit

You may want to have sshd start automatically at boot. First, modify your /etc/ssh/sshd_config file appropriately (if you didn't install vim or don't want to use it, replace vi with nano instead):

$ su
# vi /etc/ssh/sshd_config

Note: I suggest you only allow Protocol 2, disable root logins and use PAM.

Then add sshd to your startup using the rc-update tool (type rc-update for help):

# rc-update add sshd default

You have to reboot coLinux for this to take effect. With sshd working, you can use PuTTY (See: Nice Tools) to login to your coLinux installation.

See AlsoEdit

Make A Backup Of Your gentoo-i686 Image Edit

After all that work you should now have an up-to-date, configured Gentoo image. You may find that you want to start from a fresh Gentoo at some later date. To save time in the future, it would a good idea to shutdown coLinux at this point and make a backup copy of your i686 file before doing anything else. This will give you a prepared template you can start with for future configurations. Even if the backup gets a little old, you merely need to follow the update instructions again without having to reconfigure everything else.

Good Luck and Have Fun!


update about 2004.3 Edit

if past November 15 you get a warning about "Your current profile is deprecated and not supported anymore"

emerge portage
rm /etc/make.profile
ln -s ../usr/portage/profiles/default-linux/x86/2004.3 /etc/make.profile

MassTranslated on 25 Dec 2004.
MassTranslated on Sun Apr 23 17:36:12 UTC 2006

Around Wikia's network

Random Wiki