Before You Start
- You should already have a working coLinux install
- You should already be familiar with the basic usage of the ConfigurationXMLFormat file.
- Read this entire guide before using it :)
Gentoo?
Starting From A Fresh Image
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 that 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 Also:
- GentooDeluxHowto
- Short(but good) Howto on the Gentoo Forums to get Gentoo running with coLinux
- Working With Gentoo
- Gentoo Linux FAQ
Basic Configuration
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.
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: Nano Basics Guide
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 Also:
You'll also want to edit /etc/fstab and add a swap device (I suggest placing the swap at /dev/cobd7).
See Also: Configuring your System
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 192.168.1.100 <-- use IP of your windows box, CTRL-C to stop # ping yahoo.com
Conversely, you should be able to ping the coLinux process from your Windows box. At a DOS prompt:
C:\>ping 192.168.1.101 <-- use IP of your ~[[coLinux]] process (as reported by /sbin/ifconfig)
If everything is okay, you can update Gentoo.
Updating Gentoo
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 sync # 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 Also:
Adding A Regular User
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
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
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 Also: Initscripts
Make A Backup Of Your gentoo-i686 Image
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
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