Gentoo Wiki ArchivesGentoo Wiki

GWikInstall_Basic_Hardware


Image:Gentoo_tux.png

Base Install

  1. What is Gentoo?
  2. About
  3. Preparation
  4. Partitioning
  5. Configuring
  6. Stage Progression
  7. Kernel
  8. Bootloader
  9. Test
  10. Converting from or to a non-Gentoo distribution
  11. Troubleshooting
  12. Maintaining

Configuration

Base Extras

Server

Desktop

Other Articles

edit

Contents

Introduction

This tutorial is far too bloated and wordy, as you read through, feel free to make it more concise.


This is part 2 of a 'best practices' guide for installing the most current release of Gentoo. Both the Official Gentoo.org Handbook and HOWTO Install Gentoo Current leave you with a "complete" yet mostly useless system. This takes you from that point forward until you get to the point where you really might want to start compare/contrast, and making choices about the sets of software you would be installing.

I would strongly advise you to read through HOWTO Install Gentoo Current if you didn't get here from there - most particularly this section - as I have made several major changes to the (IMHO) rather vanilla x86 handbook that are assumed to have been already made in the making of this guide.


Config

In this tutorial, some variables to describe things that the reader should change to suit his/her situation. In trying to make this guide as universal and user-friendly as possible, the following variables are considered. At various stages in the installation, you may wish to source this file.

File: /root/install.conf
 #!/bin/bash
 #/mnt/gentoo/root/config.vars
 export IPADDR=`/sbin/ifconfig eth0 | grep "inet addr" | cut -f2 -d':' | cut -f1 -d' '` # The IP address of the target system
 export DISK="/dev/hda" # The hard disk to be partitioned
 export USER="vuhstech" # The name of the admin user account
 export MIRROR_0="http://mirror.usu.edu/mirrors/gentoo" # The snapshot mirror
 export MIRROR_1="http://mirrors.acm.cs.rpi.edu/gentoo" # The stage mirror
 export DATE=`date +%Y%m%d` # Today's date
 export TIMEZONE="EST5EDT"
 export INIT_UPDATE="rc-update" # Which init system to use (sysvinit/rc-update or initng/ng-update)

Basic Hardware

This is just console-level configuration, I mention a few other X-related details in GNOME for the End-User.

Detection

Detecting your Hardware

Note: Take a look at Udev.

Code: Install PNP Software
 emerge hotplug coldplug # kudzu
 ${INIT_UPDATE} add coldplug boot
 ${INIT_UPDATE} add hotplug default
 # ${INIT_UPDATE} add kudzu boot

Power Management

Power Management Guide

AMD PowerNow!

Everyone loves a soft-off PC, right? Unless you have one of those stupid keyboards with the power button above the home key....

Code: Adding ACPID as a boot service
 ${INIT_UPDATE} add acpid boot

For more than just the basic soft-off options, see ACPI/Configuration

Keyboard

And perhaps you prefer to always numlock your keyboard

Code: Numlock at boot
 ${INIT_UPDATE} add numlock boot

This article is still a Stub. You can help Gentoo-Wiki by expanding it.

STUFF ABOUT DEFINING LOGITECH/MICROSOFT EXTRA KEYS

Clearing screen when logging out

From Gentoo Linux Frequently Asked Questions, if you want the console cleared when you log out:

Code: Clearing screen when logging out
echo clear >> ~/.bash_logout 
echo clear >> /etc/skel/.bash_logout 


Mouse

You'll probably want to be able to use your loverly mouse.

Code: Adding Console Mouse as a boot service
 emerge gpm;  
 vim /etc/conf.d/gpm
 /etc/init.d/gpm start
 ${INIT_UPDATE} add gpm boot; 
File: /etc/conf/gpm
 MOUSE=imps2
 MOUSEDEV=/dev/input/mice
 APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\""

Sound

Gentoo Linux ALSA Guide

Code: Configure ALSA
 nano -w /etc/autoload.modules.d/alsa # uncomment stuff and add your card model
 update-modules
 /etc/init.d/alsa start
 ${INIT_UPDATE} add alsasound boot

If you skip setting the card driver in /etc/autoload.modules.d/alsa and you have more than one sound card (on-board and pci/usb), then all of the available drivers will be loaded.

Specialized kernel ebuilds

Gentoo Linux x86 Quick Install Guide

Use the following packages for pcmcia, nforce, network:

Code: Specialized hardware packages
 emerge pcmcia-cs (or nforce-net, nforce-audio, e100, e1000rp-pppoe)

Localization

See also: Gentoo Linux Localization Guide

Set locales - use locale -a to find suitable locales:

File: /etc/env.d/02locale
LANG="en_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_CTYPE="de_DE.UTF-8"
LC_MESSAGES="en_DE.UTF-8"

The keyboard layout used by the console is set in /etc/rc.conf by the KEYMAP variable. Read the comments in this file. Valid values can be found in /usr/share/keymaps/{arch}/. i386 has further subdivisions into layout (qwerty/, azerty/, etc.). Some languages have multiple options, so you may wish to experiment to decide which one fits your needs best.

File: /etc/rc.conf
KEYMAP="de"
KEYMAP="de-latin1"
KEYMAP="de-latin1-nodeadkeys"

#enable unicode
UNICODE="yes"

Enabling utf-8 for less:

File: /etc/profile
LESSCHARSET=utf-8

Enabling utf-8 for man:

File: /etc/man.conf
 #(This is the old line)
 # NROFF           /usr/bin/nroff -Tascii -c -mandoc
 # (Replace the one above with this)
 NROFF           /usr/bin/nroff -mandoc -c

You can use this init.d script to set all consoles into unicode mode on bootup:

File: /etc/init.d/unicode
#!/sbin/runscript
conf=/etc/env.d/02locale

# Using devfs?
if [ -e /dev/.devfsd ] || [ -e /dev/.udev -a -d /dev/vc ]; then
  device=/dev/vc/
else
  device=/dev/tty
fi

depend() {
        need localmount
        after keymaps
        before consolefont
}

checkconfig() {

  if [ -r ${conf} ]; then
          . ${conf}
          encoding=
          [ -n "${LC_ALL}" ]      && encoding=${LC_ALL#*.}   && return 0
          [ -n "${LC_MESSAGES}" ] && encoding=${LC_MESSAGES#*. } && return 0
          [ -n "${LANG}" ]        && encoding=${LANG#*.}   && return 0
  fi
  eend 1 "Locale is not configured, Please fix ${conf}"
  return 1
}

start() {
        ebegin "setting consoles to UTF-8"
        checkconfig
        if [ "${encoding}" = "UTF-8" -o "${encoding}" = "utf-8" ]; then
                dumpkeys | loadkeys --unicode
                for ((i=1; i <= "${RC_TTY_NUMBER}"; i++)); do
                        echo -ne "\033%G" > ${device}${i}
                done
                eend 0
        else
                eend 1 "UTF-8 is not required"
        fi
}

Finishing up

Just to make sure that your system is all nice and clean:

Code: One final tune-up
 dispatch-conf
 eupdatedb # This could take an hour
 esync s > new-ebuilds.log
 emerge --newuse --deep --update world
 dispatch-conf

NOTE: Be carefull not to let dispatch-conf update things like /etc/profile and /etc/skel/.bash_profile that we modified in PART 1 of this guide, do an interactive merge instead.

Congrats! Happy Gentoo-ing.


See Also


Hardware:


Configuration:


Optimizations


Localization

Retrieved from "http://www.gentoo-wiki.info/GWikInstall_Basic_Hardware"

Last modified: Thu, 02 Oct 2008 05:28:00 +1000 Hits: 14,709

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.