GWikInstall Basic Hardware
From Gentoo Linux Wiki
| Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
|
Contents |
[edit] 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.
[edit] 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) |
[edit] Basic Hardware
This is just console-level configuration, I mention a few other X-related details in HOWTO Gnome Desktop for the End-User
[edit] Detection
HARDWARE 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
|
[edit] Power Management
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 TIP ACPI basic configuration
[edit] 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
[edit] 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 |
[edit] 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\"" |
[edit] Sound
| Code: Configure ALSA |
nano -w /etc/autoload.modules.d/alsa # uncomment stuff and add your card model
modules-update
/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.
[edit] 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) |
[edit] 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
} |
[edit] 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.
[edit] See Also
Gentoo Wiki: Postfix (local mail only)
kernel/netfilter config for iptables
Gentoo-Wiki: IPTables for newbies
Hardware:
HARDWARE Detecting your Hardware
HOWTO Install a digital camera
HOWTO Use hdparm to improve IDE device performance
Configuration:
Gentoo Linux Frequently Asked Questions
Use Framebuffer, Bootsplash & Grubsplash
HOWTO Auto mount filesystems (AUTOFS)
HOWTO let your Gentoo speak with speechd
Optimizations
Localization
HOWTO Make your system use unicode/utf-8

