- mount root file system: `mount /dev/hda2 /mnt/gentoo`
- Mount the other partitions:
mkdir
/mnt/gentoo/boot; mount /dev/hda1 /mnt/gentoo/boot
mkdir /mnt/gentoo/usr; mount /dev/hda5 /mnt/gentoo/usr
mkdir /mnt/gentoo/home; mount /dev/hda7 /mnt/gentoo/home
mkdir /mnt/gentoo/opt; mount /dev/hda3 /mnt/gentoo/opt
- swapon /dev/hda6
- cd /mnt/gentoo
- tar
-xvjpf /mnt/cdrom/stages/stage1-<tab>
- mirrorselect
-a -s4 -o >> /mnt/gentoo/etc/make.conf
- mount
-t proc proc /mnt/gentoo/proc
- cp
/etc/resolv.conf /mnt/gentoo/etc/resolv.conf
- chroot
/mnt/gentoo /bin/bash
- env-update
- source
/etc/profile
- emerge
sync (Do not
update the portage package! The ncurses library will fail to
build. See http://www.mail-archive.com/gentoo-user@gentoo.org/msg16061.html)
- Edit the make.conf file with `nano -w
/etc/make.conf`.
USE="alsa apm arts avi
berklib bonobo canna cdr cjk crypt cups dvd dvr emacs enocde evo
foomaticdb fb gif gnome gpm gtk gtk2 gtkhtml imap imlib jpeg kde
kerberos krb4 kms leim libwww mad mbox mikmod mmx mozilla mpeg mule
ncurses als nocardbuds oggvorbis opengl oss pam ppd pdflib perl
plotutils png python qt quicktime readline ruby samba sdl spell sse
svgalib tcltk tiff truetype usb videos wmf wxwindows X Xaw3d xinerama
xml xml2 xmms sv zlib "
CFLAGS="-march=athlon-xp -O3
-pipe -fomit-frame-pointer"
- cjk: Builds everything with Chinese,
Japanese, Korean support.
- cd
/usr/portage
- scripts/bootstrap.sh
- emerge
-p system (lists packages)
- emerge system
- ln -sf
/usr/share/zoneinfo/CST6CDT /etc/localtime
- Edit /etc/fstab
(use `nano -w /etc/fstab`):
/dev/hda1
|
/boot
|
ext2
|
noauto,noatime
|
1
|
2
|
/dev/hda2
|
/
|
ext3
|
noatime
|
0
|
1
|
/dev/hda3
|
/opt
|
ext3
|
noatime
|
0
|
2
|
/dev/hda5
|
/usr
|
ext3
|
noatime
|
0
|
2
|
/dev/hda6
|
none
|
swap
|
sw |
0
|
1
|
/dev/hda7
|
/home
|
ext3
|
noatime
|
0
|
2
|
/dev/hda8
|
/opt2
|
ext3
|
noatime
|
0
|
2
|
/dev/hda9
|
/opt3
|
ext3
|
noatime
|
0
|
2
|
/dev/cdroms/cdrom0
|
/mnt/cdrom
|
iso9660
|
noauto,user,ro
|
0
|
0
|
none
|
/proc
|
proc
|
defaults
|
0
|
0
|
none
|
/dev/shm
|
tmpfs
|
defaults
|
0
|
0
|
- emerge -k
sys-kernel/gentoo-sources (there are other sources besides
gentoo-sources.)
- emerge -k genkernel
- genkernel (you are
supposed to be able to do -config,
but that did not work for me)
- emerge -k hotplug
- rc-update add hotplug default
- emerge -k nvidia-kernel
- emerge nforce-net
- emerge nforce-audio
- emerge
-k app-admin/syslog-ng
- emerge
-k sys-apps/vcron
- Set the root passwd: `passwd`
- Create a new user:
- useradd username -m -G users,wheel,audio -s
/bin/tcsh
- passwd username
- Set hostname: `echo hostname > /etc/hostname`
- Edit the /etc/modules.autoload.d/kernel-2.4
file and add the names of any modules that need to be loaded.
- Set up networking: `nano -w /etc/conf.d/net` and
then `rc-update add net.eth0
default`
- Edit system settings: `nano -w /etc/rc.conf`.
Make sure to edit the last line of the file, with the default gateway,
otherwise you don't get one! (If you forget, do `route add default gw 192.168.2.1 eth0`
to get it)
- Load up a boot loader:
- `emerge
-k lilo`,
- edit /etc/lilo.conf
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
lba32
default=linux
image=/boot/kernel-2.4.20-gentoo-r7
label=linux
root=/dev/hda2
initrd=/boot/initrd-2.4.20-gentoo-r7
append="root=/dev/hda2 init=/linuxrc"
- etc-update
- exit (To exit from chroot)
- Unmount everything, remove the CD, and `reboot`
- Make sure your clock is correct, otherwise packages may fail to
compile.
- Add the following packages: app-shells/tcsh,
app-editors/vim, apps-editors/emacs, x11-wm/sawfish, samba,
games-misc/fortune-mod, media-gfx/gimp, media-gfx/gimp-freetype,
media-gfx/imagemagick, app-arch/unzip, app-emulation/basiliskII, ssh,
net-www/mozilla, net-www/netscape-flash, ghostview, gnome, ftp ftpd,
gnuplot, acroread, vnc, kinput2, telnet-bsd, psutils, gkrellm
(executable is gkrellm2), dos2unix, ttf-bitstream-vera (media-fonts has
some interesting packages), urw-fonts (Type1 fonts)
- Install ALSA:
- The nforce2 apparently uses the Intel i850 sound chip so add "ALSA_CARDS="intel8x0" to /etc/make.conf. This will
only build the modules we need (which is good, because the -ac kernel
requires a change to serialmidi.c
[line 158: "if (atomic_read(&tty->count) > 1) {"].
Fortunately we don't need this file...).
- soundcore is already built as a module, so all we need to do is
`emerge alsa-driver alsa-utils
alsa-tools alsa-lib alsa-oss` (maybe also alsagui?)
- Edit /etc/modules.d/alsa. It should look like this:
alias
char-major-116 snd
alias char major-14 soundcore
# Alsa portion
alias snd-card-0 snd-intel8x0
# OSS portion
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
options snd cards_limit=1
- To startup ALSA on boot, do `rc-update add alsasound boot`.
- Now we need to set the settings. First start ALSA with `/etc/init.d/alsasound start`.
Then do `amixer set Master 100%
unmute; amixer set PCM 100% unmute`.
- See the Gentoo
ALSA guide for more details.
- It looks like the nForce2 needs a later kernel in order for
accelerated X to not hang the computer. The -ac branch works
pretty well, so `emerge ac-sources`,
then `make xconfig` and `make deps bzImage modules
modules_install`.
- Make sure that you:
- Enable experimental options (for devfs)
- Set your processor type (otherwise, why compile it yourself?)
- Enable devfs (Gentoo needs it)
- Enable udf (DVD reading)
- Enable the filesystem you are using (otherwise the kernel
won't boot)
- Compile soundcore as a module (required by ALSA)
- Build AGP GART as a module (just in case the NVidia drivers
act up)
- Every time you rebuild
a kernel you must do `emerge nforce-net nforce-audio
nvidia-kernel nvidia-glx alsa-driver`.
- Now that we have ALSA configured, we can emerge everything that
uses sound:
`emerge xmms alsa-xmms mplayer`.
This will take quite a while because they pull in a lot of libraries.
- xmms-goom and xmms-jess are useful
plugins. (JESS reacts nicely to the music, but I don't think it
can be resized, and spits out a bunch of debug output. Goom is
more visually interesting, but disconnected from changes in the
music. Can be resized)
- The default value for the ALSA plugin complains about needing
to reset the buffer size all the time, but if you reduce the buffer
time to 400 ms it appears to work fine.
- Install the Microsoft fonts: `emerge corefonts`. You
will need to add a line to two config files:
/etc/X11/XF86Config
|
FontPath
"/usr/share/fonts/corefonts"
|
/etc/fonts/local.conf
|
<dir>/usr/share/fonts/corefonts</dir>
|
- Add sub-pixel anti-aliasing (if you have an LCD screen).
Edit /etc/X11/XftConfig and add the following:
# Add
sub-pixel antialiasing (GDP)
match
antialias = true;
match edit
rgba = rgb;
- Make vim work a little nicer:
- In the if
&term=="xterm" section, change to 16 colors: set t_Co=16
- Get rid of the jumping to last cursor position:
" When editing a
file, always jump to the last cursor position
"
autocmd BufReadPost *
"
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
"
\ exe "normal g'\"" |
"
\ endif
- Add a few nicities:
set showcmd
set showmatch
- Printing
- emerge cupsd;
etc-update; rc-update add cupsd default
- /etc/init.d/cupsd start
- Go to http://localhost:631/,
select printers.
Enter root and root
password.
- Enter name, location, description, choose USB Printer #1,
choose Raw, choose Raw. (Do not choose HP, LaserJet because it
will not print to the printer in PostScript).
- Make sure that the device URI is usb:/dev/usb/lp0. If it
isn't, edit /etc/cups/printers.conf.
- Get samba running
- Create /etc/smb.conf
- cat /etc/passwd |
mksmbpasswd.sh > /etc/samba/smbpasswd
- Delete all non-regular users from smbpasswd (e.g. root, bin,
etc.).
- For each user, do smbpasswd
user.
- Add samba to boot services: `rc-update add samba boot`.
- Samba will automatically export CUPS printers."
- NTP
- emerge ntp
- Edit /etc/conf.d/ntp-client:
NTPCLIENT_OPTS="-b
ntppub.tamu.edu"
- rc-update add ntp-client
default
- Development libraries:
- Download boost and
install. (Untar, cd boost-x.y.z; cp -r boost /usr/include)
- Fix lousy tcsh setting
- system default autocorrects filenames
with case-insensitivity!). The file to change this in is /etc/profile.d/local.csh:
unset complete # default is enhance,
which ignores case, among other things
- Add .gz, .bz2 to the list of files for tar: in /etc/profile.d/tcsh-complete,
search for "complete tar",
then look for the following line and make the bold changes:
n/{-[Adrtux]*f,--file}/f:*.{tar,taz,tgz,gz,bz2}/ \
- Japanese input:
- Make sure you built everything with cjk in your make.conf USE variable.
- Although the cannaserver gets installed (presumably with
kinput2) it is not run, leading to the inability to convert to
Kanji. So do `rc-update add
canna default`.
- Now we need to run the input method editor (kinput2). In
.xinitrc add
kinput2
-kinput -canna -xim &
- Next we need to let the C library know which locale we are
using, so in .login (or .tcshrc or .bashrc) add
setenv
LANGUAGE
"C" # UI Language
setenv
LC_CTYPE "ja_JP.eucJP" # Character handling functions
setenv
LC_TIME
"C" # Display of time
setenv
LC_NUMERIC
"C" # Display of numbers
setenv
LC_MONETARY
"C" # Display of money
setenv
LC_MESSAGES
"C" # Same as LANGUAGE only less commonly
used
setenv
LC_COLLATE "ja_JP.eucJP" #
Affects glob bracket ranges and sort order
setenv
LC_PAPER
"C" # Default paper size
setenv
LANG "ja_JP.eucJP" # Default locale for unset variables
setenv
XMODIFIERS "@im=kinput2" #
For apps that don't use the resources
- Apps should use the X
resources, so for those that do, set them. In .Xdefaults add
*.inputMethod: kinput2
*.preeditType: OverTheSpot
Kinput2*useOverrideShellForMode: true
Kinput2*conversionStartKeys: Shift<Key>space
- wxWindows: wxWindows appears to have a wx/features.h.
Unfortunately -I includes files before the system headers, and the
system headers require a features.h. (If you don't you get syntax
errors in assert.h) So this needs to be renamed:
mv /usr/include/wx/features.h
/usr/include/wx/wxfeatures.h
vi /usr/include/wx/defs.h: Change
to #include "wx/wxfeatures.h"
And move the 4 lines at line 403 to after the definition of WXUNUSED
(just below it).
Note: Make sure you compile
with -I-! (wxWindows has a bunch of headers that collide
with system headers, so you need include all the wxWindows headers
(with `wxconfig --cxxflags`), and then do -I-.
- CD Writing:
- The NEC 1300A works without ide-scsi. Its specs are
|
CD
|
DVD
|
Read
|
40X
|
12X
|
Write
|
16X
|
4X
|
Rewrite
|
10X
|
2X
(DVD-RW)
2.4X (DVD+RW)
|
- xcdroast: Needs to be run by root first to setup. I
used the following settings:
CD Settings >> CD
Writer Speed
|
16X
|
CD Settings >> CD
Writer FIFO Size
|
2 MB
|
| CD Settings >> Use
paranoia mode for audio |
true
|
HD Settings
|
/opt3/cdr
|
Options >> Windows
Style List Selections
|
true
|
Users >> Access by
hosts
|
None
|
- Mplayer:
- The only deinterlacing filter that works is -vop pp=lb. -vop deint, and -vop lavcdeint don't work at
all (0.92-3).
- To extract audio from a DVD, use -ao pcm -waveheader -aofile filename.
- RealPlayer
- Games:
- Quake 3: Copy files off of CD, download the Linux
patch. Do '/cg_drawfps 1'
at the Quake console to get a FPS counter. Maps can be installed
by unzipping them, then placing them in the baseq3 directory. Mods
(like OSP) can be installed by unzipping them and putting the mod
directory in the quake3 directory.
- Go: emerge gnugo.
Add yourself to the games group (edit /etc/groups and add your username
to the end of games) if you are not already a member. glGo seems to be a nice
front-end, although it may no longer be being maintained. In
order to compile it, emerge sdl-image,
sdl-ttf, sdl-gfx, sdl-mixer, plib, openal, zziplib, python (version 2.3). For
version 0.0.6, comment out
src/sdl/SDL_rwops_zzip.c:10
//#define USE_IO_EXT
src/sdl/SDL_rwops_zzip.c:28
//#include <unistd.h>
USE_IO_EXT will
produce an unresolved symbol, and including unistd.h will cause write to be redefined.
When the final link fails, execute the command yourself but make sure all the wxWindows libraries are
prefixed with wx_gtk2.
(The configuration seems to have only gotten the first one
right.) If gnugo is
not available, glGo will
crash. It seems that you might need to click on the preferences
button (or maybe edit a board) before the gnugo optin will work.
- Nautilus:
- Nautilus 2.4 insists on drawing a desktop for you with no way
to turn it off. To do so, first run nautlius (this runs
gconfd-2). Then do:
gconftool-2 -s /desktop/gnome/background/draw_background -t bool false
gconftool-2 -s /apps/nautilus/preferences/background_set -t bool false
gconftool-2 -s /apps/nautilus/preferences/show_desktop -t bool false
- Grip:
- The original encoder command-line string was "-h -b %b %w
%m". However, variable bitrate "--new-vbr -V 3 %w %m" might be
preferable. Note that the bitrate setting is now unused.
- Apache:
- emerge apache
- rc-update add apache2 default
- Edit /etc/apache/conf/apache2.conf
and change DocumentRoot
to /opt/www (or somewhere
out of /var!)
- Gentoo decided to split up the httpd.conf file (?!), so edit commonapache2.conf and change /var/www/localhost/htdocs to /opt/www (look at the <Directory>
directives). Be sure to get the ScriptAlias and Alias directives!
- Home directories and server-side includes are already set
up. However, Gentoo makes user directories unreadable to anyone
except the owner, so minimally you will need to `chmod a+x /home/username` to get things to
work. Also note that html that uses server-side includes needs to
be named file.shtml.
- Changing IP address:
- Edit /etc/conf.d/net.
Set the iface_eth0 and gateway variables. (Don't
forget the gateway; it's on the next screenful.)
- The contents of my file is the follow (with extra Gentoo
comments):
iface_eth0="192.168.1.37 broadcast 192.168.1.255 netmask 255.255.255.0"
gateway="eth0/192.168.1.1"
System Maintenance
- To update to the latest gentoo build info, do `emerge sync`. (If you
can't emerge something that claims to be in the stable build, try
syncing)
- To update config files (say, after a portage update), do `etc-update`
- To update to an unstable app, do
`ACCEPT_KEYWORD "~x86"
emerge package; emerge unmerge package`
- To unmask a build, either comment it out in /usr/portage/profiles/package.mask
(the temporary solution) or add it to /etc/portage/package.unmask.
- To do an emerge manually, do:
ebuild myebuild fetch
ebuild myebuild unpack
(unpacked to
/var/tmp/portage/packagename/something)
ebuild myebuild compile
ebuild myebuild install
ebuild myebuild qmerge
smb.conf
[global]
workgroup = QUASAR
server string = %h server (Samba %v)
# Change this for the workgroup/NT-domain name your Samba server will part of
workgroup = QUASAR
# server string is the equivalent of the NT Description field
server string = %h server (Samba %v)
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes
# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap
# cups printing. See also the cupsaddsmb(8) manpage
; printing = cups
; printcap name = cups
; guest account = nobody
invalid users = root
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Put a capping on the size of the log files (in Kb).
max log size = 1000
# If you want Samba to log though syslog only then set the following
# parameter to 'yes'. Please note that logging through syslog in
# Samba is still experimental.
; syslog only = no
# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smb,nmb} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# security_level.txt for details.
# security = user
# You may wish to use password encryption. Please read ENCRYPTION.html,
# Win95.txt and WinNT.txt in the Samba documentation. Do not enable this
# option unless you have read those documents
encrypt passwords = true
smb passwd file = /etc/samba/smbpasswd
# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
# passdb backend = tdbsam unixsam
# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
# socket options = TCP_NODELAY
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# --- Browser Control Options ---
# Please _read_ BROWSING.txt and set the next four parameters according
# to your network setup. The defaults are specified below (commented
# out.) It's important that you read BROWSING.txt so you don't break
# browsing in your network!
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = yes
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 20
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = auto
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; preferred master = auto
# --- End of Browser Control Options ---
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = no
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast
# Name mangling options
; preserve case = yes
; short preserve case = yes
# This boolean parameter controlls whether Samba attempts to sync. the Unix
# password with the SMB password when the encrypted SMB password in the
# /etc/samba/smbpasswd file is changed.
; unix password sync = false
# For Unix password sync. to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for
# sending the correct chat script for the passwd program in Debian Potato).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
# obey pam restrictions = yes
# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; winbind uid = 10000-20000
; winbind gid = 10000-20000
; template shell = /bin/bash
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
#======================= Share Definitions =======================
[homes]
comment = Home Directories
browseable = no
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = no
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700
# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700
# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes
# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom
[backup]
browseable = no
path = /opt2/backup/oldComputer
printable = no
writable = yes
public = yes