Contents

tobymobile Pentium-M Conroe

Encryption

Gentoo related

important gentoo files

/etc/make.conf

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
# This should not be changed unless you know exactly what you are doing.  You
# should probably be using a different stage, instead.
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j2"

CCACHE_DIR="/var/tmp/ccache/"
CCACHE_SIZE="2G"

FEATURES="ccache parallel-fetch"


PORTAGE_NICENESS="15"
INPUT_DEVICES="keyboard mouse synaptics evdev"
VIDEO_CARDS="fglrx"
ALSA_CARDS="intel8x0"


USE="X509 aac amarok amazon apm bash-completion bittorrent bluetooth bzip2
     ccache cdaudio cdb cdda cddb cdio cdparanoia cdrom cgi client-only css
     curl curlwrappers d dhcp directfb disk-partition divx dv dvdnav eap-tls
     escreen exif fame fat fbcon fbsplash ffmpeg flac ftp fuse gadu gmail
     gmedia gphoto2 grub gzip history hwmixer icq id3 id3tag ieee1394
     imagemagick injection ipod iproute2 ipsec irc jabber java java6
     javascript jfs jikes jingle jpeg2k juju kdehiddenvisibility kdepim kexi
     latex lm_sensors logitech-mouse logrotate matroska mcal mime mmap mmx
     mmxext mouse mp4 mp4live mpeg2 mplayer nas nat nsplugin ntfs nvidia
     offensive openal oscar otr rar rdesktop realmedia samba screen sound
     speex sse sse2 subversion syslog tcl threads tk transcode type1 unzip usb
     v4l v4l2 vcd vnc wifi wma wmf wmp x264 xfs xine xinerama xvid zeroconf
     zip zsh-completion -bitmap-fonts -fortran -gnome -gtk -isdnlog -kerberos
     -qt3 -type1-fonts" 

#GENTOO_MIRRORS=" http://gentoo.mirrors.pair.com/
GENTOO_MIRRORS=" ftp://ftp.las.ic.unicamp.br/pub/gentoo/  http://www.las.ic.unicamp.br/pub/gentoo/ "

SYNC="rsync://rsync.samerica.gentoo.org/gentoo-portage"

~/.screenrc

hardstatus alwayslastline "%{=b WR} %H %{= wk} %=[%l]%=%{-} %LD, %LM %d, %Y - %c:%s "
caption always "%?%F%{= BY} %:%{= wK} %?%-Lw %{!r} %n%f %t %{-} %+Lw%=%? [%h]%?"
bind = resize =
bind + resize +3
bind - resize -3
#bind _ resize max

/etc/fstab

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda6               /boot           ext2            noauto,noatime  1 2
/dev/vg/root            /               xfs             noatime         0 1
/dev/vg/portage         /usr/portage    jfs             noatime         0 1
/dev/vg/swap            none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
#/dev/fd0               /mnt/floppy     auto            noauto          0 0

/dev/ipod               /mnt/ipod       auto            noatime,rw,noauto,noexec        0 0


# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

/etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME="tobystation"

/etc/conf.d/clock

CLOCK="local"
CLOCK_OPTS=""
CLOCK_SYSTOHC="yes"
SRM="no"
ARC="no"
TIMEZONE="Brazil/East"

/etc/conf.d/net

config_eth0=( "dhcp" )
dhcpcd_eth0="-t 10 "

modules_wlan0=( "wpa_supplicant" )
wpa_supplicant_wlan0="-Dwext"
associate_timeout_wlan0=30

/etc/syslog-ng/syslog-ng.conf

# /etc/syslog-ng/syslog-ng.conf
# From the Gentoo Linux Security Guide
# http://www.gentoo.org/doc/en/gentoo-security.xml
# Creative Commons - Attribution / Share Alike License
# http://creativecommons.org/licenses/by-sa/2.0

options { long_hostnames(off); sync(0); };

#source where to read log
source src { unix-stream("/dev/log"); internal(); };
source kernsrc { file("/proc/kmsg"); };

#define destinations
destination authlog { file("/var/log/auth.log"); };
destination syslog { file("/var/log/syslog"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
# Should be maillog (Without dot) as it was the default on logwatch
destination mail { file("/var/log/maillog"); };

destination mailinfo { file("/var/log/mail.info"); };
destination mailwarn { file("/var/log/mail.warn"); };
destination mailerr { file("/var/log/mail.err"); };

destination newscrit { file("/var/log/news/news.crit"); };
destination newserr { file("/var/log/news/news.err"); };
destination newsnotice { file("/var/log/news/news.notice"); };

destination debug { file("/var/log/debug"); };
destination messages { file("/var/log/messages"); };
destination console { usertty("root"); };
destination console_all { file("/dev/tty12"); };
destination xconsole { pipe("/dev/xconsole"); };

#create filters
filter f_auth { facility(auth); };
filter f_authpriv { facility(auth, authpriv); };
filter f_syslog { not facility(authpriv, mail); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_mail { facility(mail); };
filter f_user { facility(user); };
filter f_debug { not facility(auth, authpriv, news, mail); };
filter f_messages { level(info..warn)
        and not facility(auth, authpriv, mail, news); };
filter f_emergency { level(emerg); }; 

filter f_info { level(info); };
filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_crit { level(crit); };
filter f_err { level(err); };
filter f_failed { match("failed"); };
filter f_denied { match("denied"); };

#connect filter and destination
log { source(src); filter(f_authpriv); destination(authlog); };
log { source(src); filter(f_syslog); destination(syslog); };
log { source(src); filter(f_cron); destination(cron); };
log { source(src); filter(f_daemon); destination(daemon); };
log { source(kernsrc); filter(f_kern); destination(kern); };
log { source(src); filter(f_lpr); destination(lpr); };
log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_user); destination(user); };
log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };

log { source(src); filter(f_debug); destination(debug); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_emergency); destination(console); };

#default log
log { source(src); destination(console_all); };

#sshd configuration
destination ssh { file("/var/log/ssh.log"); };
filter f_ssh { program("sshd"); };
log { source(src); filter(f_ssh); destination(ssh); };

/etc/X11/xorg.conf.backup

Section "ServerLayout"
 
 #	InputDevice    "Mouse0" "CorePointer"
 	Identifier     "X.org Configured"
 	Screen      0  "aticonfig-Screen[0]" 0 0
 	InputDevice    "TouchPad" "CorePointer"
 	InputDevice    "Mouse0"
 	InputDevice    "Keyboard0" "CoreKeyboard"
 EndSection
 
 Section "Files"
 	RgbPath      "/usr/share/X11/rgb"
 	ModulePath   "/usr/lib/xorg/modules"
 	FontPath     "/usr/share/fonts/misc/"
 	FontPath     "/usr/share/fonts/TTF/"
 	FontPath     "/usr/share/fonts/OTF"
 	FontPath     "/usr/share/fonts/Type1/"
 	FontPath     "/usr/share/fonts/100dpi/"
 	FontPath     "/usr/share/fonts/75dpi/"
 EndSection
 
 Section "Module"
 	Load  "extmod"
 	Load  "record"
 	Load  "dbe"
 	Load  "GLcore"
 	Load  "xtrap"
 	Load  "dri"
 	Load  "glx"
 	Load  "freetype"
 	Load  "type1"
 EndSection
 
 Section "InputDevice"
 	Identifier  "Keyboard0"
 	Driver      "kbd"
 EndSection
 
 Section "InputDevice"
 	Identifier  "TouchPad"
 	Driver      "synaptics"
 	Option	    "SendCoreEvents"
 	Option	    "Protocol" "auto"
 	Option	    "SHMConfig" "on"
 	Option	    "LeftEdge" "1900"
 	Option	    "RightEdge" "5400"
 	Option	    "TopEdge" "1400"
 	Option	    "BottomEdge" "4500"
 	Option	    "FingerLow" "25"
 	Option	    "FingerHigh" "30"
 	Option	    "MaxTapTime" "180"
 	Option	    "MaxTapMove" "220"
 	Option	    "VertScrollDelta" "100"
 	Option	    "MinSpeed" "0.02"
 	Option	    "MaxSpeed" "0.18"
 	Option	    "AccelFactor" "0.0010"
 EndSection
 
 Section "InputDevice"
 	Identifier  "Mouse0"
 	Driver      "mouse"
 	Option	    "Protocol" "auto"
 	Option	    "Device" "/dev/input/mice"
 	Option	    "ZAxisMapping" "4 5 6 7"
 EndSection
 
 Section "Monitor"
 	Identifier   "Monitor0"
 	VendorName   "Monitor Vendor"
 	ModelName    "Monitor Model"
 EndSection
 
 Section "Monitor"
 	Identifier   "aticonfig-Monitor[0]"
 	Option	    "VendorName" "ATI Proprietary Driver"
 	Option	    "ModelName" "Generic Autodetecting Monitor"
 	Option	    "DPMS" "true"
 EndSection
 
 Section "Device"
 
         ### Available Driver options are:-
         ### Values: : integer, <f>: float, <bool>: "True"/"False",
         ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
         ### [arg]: arg optional
         #Option     "NoAccel"            	# [<bool>]
         #Option     "NoDRI"              	# [<bool>]
         #Option     "SWcursor"           	# [<bool>]
         #Option     "Dac6Bit"            	# [<bool>]
         #Option     "BusType"            	# [<str>]
         #Option     "DRM_nbufs"          	# <i>
         #Option     "DRM_bufsize"        	# <i>
         #Option     "Capabilities"       	# <i>
         #Option     "CapabilitiesEx"     	# <i>
         #Option     "ClientDriverName"   	# [<str>]
         #Option     "KernelModuleParm"   	# [<str>]
         #Option     "AGPMask"            	# <i>
         #Option     "AGPv3Mask"          	# <i>
         #Option     "BufferTiling"       	# [<bool>]
         #Option     "Profile"            	# <str>
         #Option     "RingSize"           	# <i>
         #Option     "EnableDepthMoves"   	# [<bool>]
         #Option     "GammaCorrectionI"   	# <i>
         #Option     "GammaCorrectionII"  	# <i>
         #Option     "OpenGLOverlay"      	# [<bool>]
         #Option     "DefaultVisualTrueColor" 	# [<bool>]
         #Option     "VideoOverlay"       	# [<bool>]
         #Option     "DesktopSetup"       	# [<str>]
         #Option     "MonitorLayout"      	# [<str>]
         #Option     "ForceMonitors"      	# [<str>]
         #Option     "EnableMonitor"      	# <str>
         #Option     "OverlayOnCRTC2"     	# [<bool>]
         #Option     "Mode2"              	# [<str>]
         #Option     "PairModes"          	# [<str>]
         #Option     "HSync2"             	# [<str>]
         #Option     "VRefresh2"          	# [<str>]
         #Option     "ScreenOverlap"      	# <i>
         #Option     "MemClock"           	# <i>
         #Option     "ASICClock"          	# <i>
         #Option     "UseInternalAGPGART" 	# [<bool>]
         #Option     "FastSwap"           	# [<bool>]
         #Option     "Stereo"             	# [<bool>]
         #Option     "StereoSyncEnable"   	# <i>
         #Option     "DisableOvScaler"    	# [<bool>]
         #Option     "UseFastTLS"         	# <i>
         #Option     "BlockSignalsOnLock" 	# [<bool>]
         #Option     "ForceGenericCPU"    	# [<bool>]
         #Option     "CenterMode"         	# [<bool>]
         #Option     "OffScreenPixmaps"   	# [<bool>]
         #Option     "EnableOpaqueOverlayVisual" 	# [<bool>]
         #Option     "TMDSCoherentMode"   	# [<bool>]
         #Option     "EnablePrivateBackZ" 	# [<bool>]
         #Option     "TVFormat"           	# [<str>]
         #Option     "TVStandard"         	# [<str>]
         #Option     "TVOverscan"         	# [<bool>]
         #Option     "TVHSizeAdj"         	# <i>
         #Option     "TVVSizeAdj"         	# <i>
         #Option     "TVHPosAdj"          	# <i>
         #Option     "TVVPosAdj"          	# <i>
         #Option     "TVHStartAdj"        	# <i>
         #Option     "TVColorAdj"         	# <i>
         #Option     "PseudoColorVisuals" 	# [<bool>]
         #Option     "PreferredVRefresh"  	# <i>
         #Option     "FastStart"          	# [<bool>]
         #Option     "ProfileDriver"      	# [<bool>]
         #Option     "PPPTforGART"        	# [<bool>]
         #Option     "TexturedVideo"      	# [<bool>]
         #Option     "TexturedVideoSync"  	# [<bool>]
         #Option     "Textured2D"         	# [<bool>]
         #Option     "TexturedXrender"    	# [<bool>]
         #Option     "MaxGARTSize"        	# <i>
         #Option     "LogoPosX"           	# <i>
         #Option     "LogoPosY"           	# <i>
         #Option     "LogoColFG"          	# <i>
         #Option     "LogoColBG"          	# <i>
         #Option     "SwapScreens"        	# [<bool>]
         #Option     "FBC"                	# [<bool>]
         #Option     "FrontBufferMode"    	# <i>
         #Option     "BackBufferMode"     	# <i>
         #Option     "DepthBufferMode"    	# <i>
         #Option     "OverlayBufferMode"  	# <i>
         #Option     "VideoOverlayBufferMode" 	# <i>
         #Option     "EnableIrqMgr"       	# [<bool>]
         #Option     "EnableMulticard"    	# [<bool>]
         #Option     "EnablePPLIB"        	# [<bool>]
         #Option     "DefaultOnDC"        	# [<bool>]
 	#Driver      "fglrx"
 	Identifier  "Card0"
 	Driver      "radeon"
 	VendorName  "ATI Technologies Inc"
 	BoardName   "RV350 [Mobility Radeon 9600 M10]"
 	Option	    "DPMS" "true"             	# [<bool>]
 	BusID       "PCI:1:0:0"
 EndSection
 
 Section "Device"
 	Identifier  "aticonfig-Device[0]"
 	Driver      "fglrx"
 EndSection
 
 Section "Screen"
 	Identifier "Screen0"
 	Device     "Card0"
 	Monitor    "Monitor0"
 	SubSection "Display"
 		Viewport   0 0
 		Depth     1
 	EndSubSection
 	SubSection "Display"
 		Viewport   0 0
 		Depth     4
 	EndSubSection
 	SubSection "Display"
 		Viewport   0 0
 		Depth     8
 	EndSubSection
 	SubSection "Display"
 		Viewport   0 0
 		Depth     15
 	EndSubSection
 	SubSection "Display"
 		Viewport   0 0
 		Depth     16
 	EndSubSection
 	SubSection "Display"
 		Viewport   0 0
 		Depth     24
 	EndSubSection
 EndSection
 
 Section "Screen"
 	Identifier "aticonfig-Screen[0]"
 	Device     "aticonfig-Device[0]"
 	Monitor    "aticonfig-Monitor[0]"
 	DefaultDepth     24
 	SubSection "Display"
 		Viewport   0 0
 		Depth     24
 	EndSubSection
 EndSection

/etc/X11/xorg.conf

Section "ServerLayout"

#	InputDevice    "Mouse0" "CorePointer"
	Identifier     "X.org Configured"
	Screen      0  "aticonfig-Screen[0]" 0 0
	InputDevice    "TouchPad" "CorePointer"
	InputDevice    "Mouse0"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	RgbPath      "/usr/share/X11/rgb"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc/"
	FontPath     "/usr/share/fonts/TTF/"
	FontPath     "/usr/share/fonts/OTF"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/100dpi/"
	FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "GLcore"
	Load  "xtrap"
	Load  "dri"
	Load  "drm"
	Load  "glx"
	Load  "freetype"
	Load  "type1"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "TouchPad"
	Driver      "synaptics"
	Option	    "SendCoreEvents"
	Option	    "Protocol" "auto"
	Option	    "SHMConfig" "on"
	Option	    "LeftEdge" "1900"
	Option	    "RightEdge" "5400"
	Option	    "TopEdge" "1400"
	Option	    "BottomEdge" "4500"
	Option	    "FingerLow" "25"
	Option	    "FingerHigh" "30"
	Option	    "MaxTapTime" "180"
	Option	    "MaxTapMove" "220"
	Option	    "VertScrollDelta" "100"
	Option	    "MinSpeed" "0.02"
	Option	    "MaxSpeed" "0.18"
	Option	    "AccelFactor" "0.0010"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "aticonfig-Monitor[0]"
	Option	    "VendorName" "ATI Proprietary Driver"
	Option	    "ModelName" "Generic Autodetecting Monitor"
	Option	    "DPMS" "true"
EndSection

Section "Device"

        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"            	# [<bool>]
        #Option     "NoDRI"              	# [<bool>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "Dac6Bit"            	# [<bool>]
        #Option     "BusType"            	# [<str>]
        #Option     "DRM_nbufs"          	# <i>
        #Option     "DRM_bufsize"        	# <i>
        #Option     "Capabilities"       	# <i>
        #Option     "CapabilitiesEx"     	# <i>
        #Option     "ClientDriverName"   	# [<str>]
        #Option     "KernelModuleParm"   	# [<str>]
        #Option     "AGPMask"            	# <i>
        #Option     "AGPv3Mask"          	# <i>
        #Option     "BufferTiling"       	# [<bool>]
        #Option     "Profile"            	# <str>
        #Option     "RingSize"           	# <i>
        #Option     "EnableDepthMoves"   	# [<bool>]
        #Option     "GammaCorrectionI"   	# <i>
        #Option     "GammaCorrectionII"  	# <i>
        #Option     "OpenGLOverlay"      	# [<bool>]
        #Option     "DefaultVisualTrueColor" 	# [<bool>]
        #Option     "VideoOverlay"       	# [<bool>]
        #Option     "DesktopSetup"       	# [<str>]
        #Option     "MonitorLayout"      	# [<str>]
        #Option     "ForceMonitors"      	# [<str>]
        #Option     "EnableMonitor"      	# <str>
        #Option     "OverlayOnCRTC2"     	# [<bool>]
        #Option     "Mode2"              	# [<str>]
        #Option     "PairModes"          	# [<str>]
        #Option     "HSync2"             	# [<str>]
        #Option     "VRefresh2"          	# [<str>]
        #Option     "ScreenOverlap"      	# <i>
        #Option     "MemClock"           	# <i>
        #Option     "ASICClock"          	# <i>
        #Option     "UseInternalAGPGART" 	# [<bool>]
        #Option     "FastSwap"           	# [<bool>]
        #Option     "Stereo"             	# [<bool>]
        #Option     "StereoSyncEnable"   	# <i>
        #Option     "DisableOvScaler"    	# [<bool>]
        #Option     "UseFastTLS"         	# <i>
        #Option     "BlockSignalsOnLock" 	# [<bool>]
        #Option     "ForceGenericCPU"    	# [<bool>]
        #Option     "CenterMode"         	# [<bool>]
        #Option     "OffScreenPixmaps"   	# [<bool>]
        #Option     "EnableOpaqueOverlayVisual" 	# [<bool>]
        #Option     "TMDSCoherentMode"   	# [<bool>]
        #Option     "EnablePrivateBackZ" 	# [<bool>]
        #Option     "TVFormat"           	# [<str>]
        #Option     "TVStandard"         	# [<str>]
        #Option     "TVOverscan"         	# [<bool>]
        #Option     "TVHSizeAdj"         	# <i>
        #Option     "TVVSizeAdj"         	# <i>
        #Option     "TVHPosAdj"          	# <i>
        #Option     "TVVPosAdj"          	# <i>
        #Option     "TVHStartAdj"        	# <i>
        #Option     "TVColorAdj"         	# <i>
        #Option     "PseudoColorVisuals" 	# [<bool>]
        #Option     "PreferredVRefresh"  	# <i>
        #Option     "FastStart"          	# [<bool>]
        #Option     "ProfileDriver"      	# [<bool>]
        #Option     "PPPTforGART"        	# [<bool>]
        #Option     "TexturedVideo"      	# [<bool>]
        #Option     "TexturedVideoSync"  	# [<bool>]
        #Option     "Textured2D"         	# [<bool>]
        #Option     "TexturedXrender"    	# [<bool>]
        #Option     "MaxGARTSize"        	# <i>
        
	
	#Option     "LogoPosX"           	# <i>
        #Option     "LogoPosY"           	# <i>
        #Option     "LogoColFG"          	# <i>
        #Option     "LogoColBG"          	# <i>
        #Option     "SwapScreens"        	# [<bool>]
        #Option     "FBC"                	# [<bool>]
        #Option     "FrontBufferMode"    	# <i>
        #Option     "BackBufferMode"     	# <i>
        #Option     "DepthBufferMode"    	# <i>
        #Option     "OverlayBufferMode"  	# <i>
        #Option     "VideoOverlayBufferMode" 	# <i>
        #Option     "EnableIrqMgr"       	# [<bool>]
        #Option     "EnableMulticard"    	# [<bool>]
        #Option     "EnablePPLIB"        	# [<bool>]
        #Option     "DefaultOnDC"        	# [<bool>]
	#Driver      "fglrx"
	Identifier  "Card0"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "RV350 [Mobility Radeon 9600 M10]"
	Option	    "DPMS" "true"             	# [<bool>]
	Option	    "DRI" "true"
	BusID       "PCI:1:0:0"
EndSection

Section "Device"
	Identifier  "aticonfig-Device[0]"
	Driver      "fglrx"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "aticonfig-Screen[0]"
	Device     "aticonfig-Device[0]"
	Monitor    "aticonfig-Monitor[0]"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "dri" 
	Mode 0666 
EndSection

/etc/rc.conf

UNICODE="yes"
EDITOR="/bin/vim"

/etc/group

root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm
adm::4:root,adm,daemon
tty::5:
disk::6:root,adm,haldaemon
lp::7:lp
mem::8:
kmem::9:
wheel::10:root,tbeck
floppy::11:root,haldaemon
mail::12:mail
news::13:news
uucp::14:uucp
man::15:man
console::17:
audio::18:tbeck
cdrom::19:haldaemon,tbeck
dialout::20:root
tape::26:root
video::27:root,tbeck
cdrw::80:haldaemon,tbeck
usb::85:haldaemon,tbeck
users::100:games,tbeck
nofiles:x:200:
smmsp:x:209:smmsp
portage::250:portage,tbeck
utmp:x:406:
nogroup::65533:
nobody::65534:
ldap:x:439:
sshd:x:22:
cron:x:16:
messagebus:x:440:
ftp:x:21:
locate:x:245:
crontab:x:441:
ntp:x:123:ntp
lpadmin:x:106:
nx:x:102:tbeck
wireshark:x:442:tbeck
haldaemon:x:443:haldaemon
plugdev:x:444:haldaemon,tbeck
tbeck:x:1000:

/etc/bluetooth/hcid.conf

#
# HCI daemon configuration file.
#

# HCId options
options {
        # Automatically initialize new devices
        autoinit yes; 

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        #security user;
        security auto;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # PIN helper
        pin_helper /etc/bluetooth/pin-helper;

        # D-Bus PIN helper
        #dbus_pin_helper;
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        name "BlueZ at %h (%d)"; 

        # Local device class
        class 0x3e0100;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;

        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park; 

        # Authentication and Encryption (Security Mode 3)
        #auth enable;
        #encrypt enable;
}


/etc/vsftpd/vsftpd.conf

right now without fglrx driver!! (testing versions: 8.455.2-r1, 8.452, 8.455.2,


Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice     "TouchPad" "CorePointer"
#	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Mouse0"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	RgbPath      "/usr/share/X11/rgb"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc/"
	FontPath     "/usr/share/fonts/TTF/"
	FontPath     "/usr/share/fonts/OTF"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/100dpi/"
	FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "GLcore"
	Load  "xtrap"
	Load  "dri"
	Load  "glx"
	Load  "freetype"
	Load  "type1"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Driver      "synaptics"
	Identifier  "TouchPad"
	Option      "SendCoreEvents"
	Option      "Protocol" "auto"
	Option      "SHMConfig" "on"
	Option "LeftEdge" "1900"
	Option "RightEdge" "5400"
	Option "TopEdge" "1400"
	Option "BottomEdge" "4500"
	Option "FingerLow" "25"
	Option "FingerHigh" "30"
	Option "MaxTapTime" "180"
	Option "MaxTapMove" "220"
	Option "VertScrollDelta" "100"
	Option "MinSpeed" "0.02"
	Option "MaxSpeed" "0.18"
	Option "AccelFactor" "0.0010"


EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
        Option     "DPMS"  "true"             	# [<bool>]
	Identifier  "Card0"
#	Driver      "fglrx"
	Driver	    "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "RV350 [Mobility Radeon 9600 M10]"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

gentoo install

Install DVD

Gentoo 2007.0
start LiveDVD with:
gentoo
Partition HDD
  • cfdisk
hda1 ntfs 18GB WinXP
hda5 ntfs  2600MB WinXP Daten
hda6 ext2 100MB /boot/
hda7 Rest Tzp 83/Linux
  • fill with random
dd if=/dev/urandom of=/dev/hda7
#(go and take a nap, because this takes a long time to finish)
# if you used /dev/random come back in 100 years
  • cryptsetup (for encrypted hdd)
cryptsetup luksFormat /dev/hda7 --cipher aes-cbc-essiv:sha256 --key-size 256 --verify-passphrase
cryptsetup luksOpen /dev/hda7 luks
  • create partitions in encrypted part:
pvcreate /dev/mapper/luks
vgcreate vg /dev/mapper/luks
vgscan
vgchange -ay
#2Gb swap:
lvcreate -L2G -nswap vg
#3Gb /usr/portage:
lvcreate -L3G -nportage vg
lvcreate -L5G -nwine vg
#14Gb /:
lvcreate -L14G -nroot vg
make the filesystems
mkfs.ext2 /dev/hda6
mkswap  /dev/vg/swap
mkfs.jfs /dev/vg/portage
mkfs.xfs /dev/vg/root
  • mount /dev/vg/root to /mnt/gentoo, mkdir /mnt/gentoo/boot, mount hda6 there
mount /dev/vg/root /mnt/gentoo; mkdir /mnt/gentoo/boot; mount /dev/hda6 /mnt/gentoo/boot; mkdir -p /mnt/gentoo/usr/portage; mount /dev/vg/portage /mnt/gentoo/usr/portage
get stage & portage into /mnt/gentoo/
  • stage
releases/x86/2007/stages/stage3 - i686-..
  • portage
snapshots/portage-latest...
links http://www.gentoo.org/main/en/mirrors.xml
hit d to download the link...
extract stage and portage
  • both in /mnt/gentoo/
tar xjpf stage3-*.tar.bz2
tar xjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
edit /mnt/gentoo/etc/make.conf

go to files


copy resolv.conf
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf


chroot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
update portage cache
emerge --sync
emerge portage
ln -snf /usr/portage/profiles/default-linux/x86/2007.0/desktop/ /etc/make.profile
choose mirrors

emerge mirrorselect

mirrorselect -s3 -b10 -o -D >> /etc/make.conf
mirrorselect -s3 -b10 -r -o -D >> /etc/make.conf
generate locale:

in /etc/locale.gen

en_US ISO-8859-1
en_US.UTF-8 UTF-8
de_DE@euro ISO-8859-15
de_DE@euro UTF-8

then run

locale-gen
timezone
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
recompile gcc
emerge -avt gcc gcc-config
emerge -avt gcc
now recompile world
emerge -eavt world
etc-update
get some basic packages
emerge -avt logrotate syslog-ng vixie-cron iproute2 eselect gentoolkit ccache gcc gcc-config gcc gcc-config genlop  eix eselect vim screen tuxonice-sources ufed
  • make.profile -> desktop
eselect profile list
eselect profile set ...
  • setup use flags with ufed (see also make.conf)


now emerge rest of packages

register into default runlevel
rc-update add syslog-ng default
rc-update add vixie-cron default
rc-update...



Prepare initramfs
  • create /root/initramfs/
mkdir -w /root/initramfs
  • create files list, init.sh, lvm.conf
init
#!/bin/ash
ROOT_DEV=/dev/hda7
ROOT_MAP=luks
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"

mount -t proc proc /proc
mount -t sysfs sysfs /sys
#sysctl -w kernel.panic=10
CMDLINE=`cat /proc/cmdline`

#prepare & clean screen
sleep 1

clear

count=0
pass=failpass
sesam=1
while [ ${sesam} -ne 0 ] ; do
        if [ "$count" = "3" ] ; then
                #Nach drei Fehlversuchen stoppen:
                echo System halted
                exit 0
        fi
        count=$(( $count +1 ))
        echo
        echo " --- Enter passphrase for root partition ---"
        read -s pass
        echo ""

        # Mounte Partition
        echo "${pass}" | cryptsetup luksOpen ${ROOT_DEV} ${ROOT_MAP}
        sesam=$?
done

# ok, Oeffnen hat geklappt
echo "Mounting root"
echo

vgscan
vgchange -ay

echo 1 > /sys/power/tuxonice/do_resume

mount -t xfs -o noatime /dev/vg/root /mnt/new
if [ $? -ne 0 ] ; then
        # Fehler beim Mounten
        echo "Mounting root failed, halting system"
        cryptsetup luksClose ${ROOT_MAP}
        exit 0
fi
# -- Luks Teil zuende
echo "Booting system now.."

sync
sync

umount /proc
umount /sys
echo "Exec /sbin/init ${CMDLINE}"
exec switch_root /mnt/new /sbin/init ${CMDLINE}
list
#initramfs makefile


# /dev directory
dir /dev        755 0 0
dir /dev/mapper 700 0 0
nod /dev/console 644 0 0 c 5 1
nod /dev/loop0   644 0 0 b 7 0
nod /dev/hda     660 0 6 b 3 0
nod /dev/hda6    660 0 6 b 3 6
nod /dev/hda7    660 0 6 b 3 7
nod /dev/null    644 0 0 c 1 3
slink /dev/tty /dev/console 777 0 0

# Empty dirs
dir /proc    755 0 0
dir /sys     755 0 0
dir /mnt     755 0 0
dir /mnt/new 755 0 0

# Init
file /init /root/initramfs/init 755 0 0

# /bin directory
dir /bin 755 0 0
file /bin/busybox /bin/busybox.static 755 0 0
slink /bin/ash /bin/busybox         777 0 0
slink /bin/echo /bin/busybox        777 0 0
slink /bin/umount /bin/busybox      777 0 0
slink /bin/mount /bin/busybox       777 0 0
slink /bin/sysctl /bin/busybox      777 0 0
slink /bin/cat /bin/busybox         777 0 0
slink /bin/sleep /bin/busybox       777 0 0
slink /bin/sync /bin/busybox        777 0 0
slink /bin/sh /bin/busybox          777 0 0
slink /bin/switch_root /bin/busybox 777 0 0
slink /bin/ls /bin/busybox          777 0 0

# /sbin directory
dir /sbin 755 0 0
file /sbin/cryptsetup /sbin/cryptsetup 755 0 0
file /sbin/lvm /sbin/lvm       755 0 0
slink /sbin/vgscan /sbin/lvm   777 0 0
slink /sbin/vgchange /sbin/lvm 777 0 0

# /etc directory
dir /etc 755 0 0
dir /etc/lvm 755 0 0
file /etc/lvm/lvm.conf /root/initramfs/lvm.conf 644 0 0

# /usr/bin directory
dir /usr 755 0 0
dir /usr/bin 755 0 0
slink /usr/bin/clear /bin/busybox 777 0 0
lvm.conf
filter=["a|^/dev/mapper/luks|", "r/.*/"]
now configure the kernel
http://de.gentoo-wiki.com/Kernel_manuell_kompilieren

cd /usr/src/linux
make menuconfig

kernel configuration

.config

tuxonice 2.6.23-tuxonice-r6


tuxonice 2.6.24-tuxonice-r2

Compile the kernel and install

  • compile
make && make modules_install
  • install (don't forget to mount /boot )
make install

updating the kernel

  • select kernel
eselect kernel list
eselect kernel set 2
  • get old config from running system
zcat /proc/config.gz > /usr/src/linux/.config
  • compile
cd /usr/src/linux
make oldconfig
make menuconfig
  • now select kernel options
  • when done, compile
make && make modules_install

Grub

  • edit /boot/grub/grub.conf
#
# Config file
#

timeout 2
default 0

splashimage=(hd0,5)/boot/grub/splash.xpm.gz

title Gentoo
root(hd0,5)
kernel /boot/vmlinuz root=/dev/vg/root initrd_suspend_mode=suspend2 resume=swap:/dev/vg/swap


title Gentoo old
root(hd0,5)
kernel /boot/vmlinuz.old root=/dev/vg/root initrd_suspend_mode=suspend2 resume=swap:/dev/vg/swap


title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1


chroot into the correct environment..
  • install grub into MBR of the HDD
# grub
grub> root (hd0,5) (the /boot partition)
grub> setup (hd0)
grub> quit

fstab

define filesystems

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda6               /boot           ext2            noauto,noatime  1 2
/dev/vg/root            /               xfs             noatime         0 1
/dev/vg/portage         /usr/portage    jfs             noatime         0 1
/dev/vg/swap            none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
#/dev/fd0               /mnt/floppy     auto            noauto          0 0

/dev/ipod               /mnt/ipod       auto            noatime,rw,noauto,noexec        0 0


# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0


rc scripts

  • add scripts with:
eselect rc add *script default/boot


boot
acpid
alsasound 
bootmisc 
checkfs 
checkroot 
clock 
consolefont 
dbus 
hibernate-cleanup 
hostname 
keymaps 
localmount 
modules 
net.lo 
rmnologin 
syslog-ng 
urandom


default
cpufreqd 
cupsd 
hald 
lm_sensors 
local 
netmount 
ntpd 
vixie-cron 
xdm

password

define root password

passwd


follow http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8

System Configuration

HAL daemon

mounting rules
ipod

To the /etc/udev/rules.d/90-hal.rules add

BUS=="usb", SYSFS{manufacturer}=="Apple",  SYSFS{product}=="iPod", KERNEL=="sd?2", NAME="%k", SYMLINK="ipod"

create /mnt/ipod and symbolic link in /media/

mkdir /mnt/ipod
ln -s /media/ipod /mnt/ipod

and add to /etc/fstab

/dev/ipod               /mnt/ipod       vfat            noauto,rw,user  0 0
Mount NTFS-formatted media as user

If you want to be able to mount and use NTFS-formatted media with user privileges (i.e. not as root), you might need to add a hal-policy:

cd /usr/share/hal/fdi/policy/
mkdir 95userpolicy
cd 95userpolicy
nano removablentfs.fdi

Add the following content to this file:

/etc/hal/fdi/policy/95userpolicy/removablentfs.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> 

<deviceinfo version="0.2">

<device>
<match key="volume.fstype" string="ntfs">
<append key="volume.mount.valid_options" type="strlist">uid=</append>
</match>
</device>
</deviceinfo></nowiki></code>}}

Restart hald:

/etc/init.d/hald restart

This tip is basically from: http://fedorawiki.de/index.php/NTFS_Partitionen_von_Wechseldatenträgern_mit_HAL_als_User_mounten


Sound

  • as root run
alsaconf
  • as user
alsamixer
  • if no Master channel is found, add this line to /etc/modules.d/alsa
options snd-hda-intel model=auto
  • run update-modules and restart module
update-modules
/etc/init.d/alsasound restart

Customize KDE

Remove Window Borders when Maximized
  • Control Center
go to Desktop -> Window Behaviour -> Moving
disable Allow Moving of maximized windows
Single/Double Click
  • Control Center
Peripherals -> Mouse
Konqueror and Adblock
  1. Download the latest set from the official repository. ( http://www.pierceive.com/filtersetg/ ) (Direct Link: 2007-02-02a Filter Set)
  2. Start Konqueror and open the configurations dialog via Settings->Configure Konqueror
  3. Select the AdBlock Filters tab
  4. Make sure Enable filters and Hide filtered images is checked
  5. Click the Import button located in the lower right of the window
  6. Enter the location of the downloaded filter set
  7. Visit a webpage with a lot of ads!

FTP server

  • package
emerge -avt vsftpd
  • configure ftp's home directory
chown root /home/ftp; chmod -w /home/ftp; mkdir /home/ftp/upload; chown ftp /home/ftp/upload; chmod +rw /home/ftp/upload
  • configure vsftpd (see file above)
vi /etc/vsftpd/vsftpd.conf
  • start the service
/etc/init.d/vsftpd start

DWL 520+ Wireless

make sure, kernel is configured correctly:
Device Drivers -> Generic Driver Options -> (M) Userspace Firmware loading support
emerge -avt acx
modprobe acx
iwconfig

Kismet

source=ipw2200,wlan0,ipw2200

Bluetooth

http://www.gentoo.org/doc/en/bluetooth-guide.xml
  • configure kernel as above
  • check if device is connected
cat /proc/bus/usb/devices | grep -e^[TPD] | grep -e Cls=e0 -B1 -A1
T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a5c ProdID=2021 Rev= 1.12

or

lsusb
Bus 003 Device 002: ID 0a5c:2021 Broadcom Corp.
Bus 003 Device 001: ID 0000:0000


emerge packages
  • do
emerge -avt net-wireless/bluez-libs net-wireless/bluez-utils
  • start the service
/etc/init.d/bluetooth start
hciconfig
  • configure (more help in man hcid.conf)
vi /etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#

# HCId options
options {
        # Automatically initialize new devices
        autoinit yes; 

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        #security user;
        security auto;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # PIN helper
        pin_helper /usr/lib/kdebluetooth/kbluepin;

        # D-Bus PIN helper
        #dbus_pin_helper;
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        name "BlueZ at %h (%d)"; 

        # Local device class
        class 0x3e0100;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;

        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park; 

        # Authentication and Encryption (Security Mode 3)
        #auth enable;
        #encrypt enable;
}
  • edit the pin
vi /etc/bluetooth/pin

this number should be kept secret. it is used to connect the remote devices.

  • now restart the service and add it to the default runlevel
/etc/init.d/bluetooth restart
rc-update add bluetooth default
Detecting and Connecting to Remote Devices
  • on tobystation do
hcitool dev
Devices:
        hci0    00:1A:7D:00:2E:C1
hcitool scan
Scanning ...
        00:18:C5:F9:72:2B       Tobyhandy
hcitool inq
Inquiring ...
        00:18:C5:F9:72:2B       clock offset: 0x2d29    class: 0x520204
hcitool cc 00:18:C5:F9:72:2B
  • you can ping the device now:
l2ping 00:18:C5:F9:72:2B
  • also pair the devices on tobyhandy in bluetooth settings, entering the PIN
Setting up Radio Frequency Communication (RFCOMM)
  • edit
vi /etc/bluetooth/rfcomm.conf
#
# RFCOMM configuration file.
#

rfcomm0 {
        # Automatically bind the device at startup
        bind yes; 

        # Bluetooth address of the device
        device 00:18:C5:F9:72:2B;

        # RFCOMM channel for the connection
        channel 1;

        # Description of the connection
        comment "Tobyhandy";
}


  • kbluetooth
emerge -avt kdebluetooth

  • configure paired devices
location of link_keys is /var/lib/bluetooth/[MAC]/link_keys

SD/MMC Card reader

  • driver in kernel
app-misc/sdricoh_cs


emerging the packages

  • cups cyclic dependecies
emerge ---oneshot --nodeps cups


unmasking whole categories
  • make sure that /etc/portage/package.keywords is a directory. adjust the number 52 to the number of columns "ls -l /usr/portage/kde-base/ | grep ^d" has in front of the file name(48 for me. there is a nicer way, but i couldn't find it). exchange the 3 times kde-base category with what you want... and don't forget the " at the echo command
for x in `ls -l /usr/portage/kde-base/ | grep ^d | cut -c 48-` ; do echo "kde-base/$x ~x86" >> /etc/portage/package.keywords/kde-base ; done
sound
  • Alsa
emerge alsa-utils
rc-update add alsasound default
alsaconf
flash
USE flag: nsplugin
  • Flash 9 emergen
emerge netscape-flash nsplugins
  • Konqueror plugins finden:
Konqueror -> Settings -> Configure Konq -> Plugins -> Scan for new Plugins
ntp

echo "net-misc/ntp caps" >> /etc/portage/package.use

emerge -avt ntp

  • configuration
/etc/conf.d/ntp-client

NTPCLIENT_CMD="ntpd"
NTPCLIENT_OPTS=" "
NTPCLIENT_TIMEOUT=10
/etc/init.d/ntp-client

depend() {
        after net.eth0
 }
/etc/ntp.conf

server ntp1.theremailer.net
server 0.de.pool.ntp.org
server 1.de.pool.ntp.org
server 2.de.pool.ntp.org
driftfile       /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log
restrict default nomodify
restrict 127.0.0.1
change owner of /var/lib/ntp/ntp.drift to ntp
you might have to add ntp to /etc/group, too.
skype
  • Skype unmask
alsamixer
choose Mic as Capture device. have to rechoose after every boot !?
packages
  • save cflags
http://gentoo-wiki.com/Safe_Cflags
  • packages
emerge -avt screen vim eix genlop gentoolkit ...
  • kde packages
emerge -avt kdebase-startkde kicker konqueror kopete kmail amarok krfb

gentoo updaten

packages

emerge -uDNavt world

kernel

  • go to new kernel location
cd/usr/src/linux-2.6.18-..
cp ../linux/.config ./
make menuconfig
make && make modules_install

mount /boot/
make install 
  • update grub and symlinks in /boot/
  • reemerge nvidia-drivers

overlays

layman -s ALL

Wake on LAN

Client (Sleeper)

emerge -avt ethtool 
ethtool eth0
  • run on every shutdown:
echo "ethtool -s eth0 wol g" >> /etc/conf.d/local.stop\
  • /etc/conf.d/rc
RC_DOWN_INTERFACE="no"
  • BIOS:
Power -> Suspend Mode:   AUTO(S3 or S1.   S3 is suspend to ram, S1 is leaving the CPU running.. one guy said S1 worked.)
  -> APM ->  PCI & PCIE Enabled
  • tobystation
00:18:f3:43:dd:c8

Server (Waker)

Gentoo
emerge -avt wakeonlan
Sisky
ipkg install ether-wake
ether-wake 00:18:f3:43:dd:c8

SSH tunnel

  • Linux
ssh -L localport:tunnel-end-IP:remoteport ssh-server

then ssh to that local port

ssh -P localport localhost

e.g.:

ssh -L 9999:10.0.0.222:22 sisky

then in new shell:

ssh -P 9999 localhost
  • Windows
putty config 
SSH entry
  -  tunnels
       Source port == local port
       Destination == destIP:port

Mounting ISO and other images

mount -t iso9660 -o loop,user image.iso /wheretomount

archiving

tar -cvjf target source

merge multiple pdfs into one

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf

masquerading

# einschalten:
iptables -t nat -A POSTROUTING -o vpn -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
# ausschalten:
echo 0 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -D POSTROUTING -o vpn -j MASQUERADE

emerge --resume --skipfirst script

Bei einem emerge world so lange resumen und skippen wenn es nicht emergt werden kann, bis es durchgelaufen ist.

#!/bin/bash

emerge -uDN world

while [ 1 -eq 1 ]; do
        emerge --resume --skipfirst
        if [ $? -eq 0 ]; then
                break;
        fi
done

Alternative:

#!/bin/bash 

emerge -uNDv world \ 
        ||      until emerge --resume --skipfirst; do 
                        emerge --resume --skipfirst 
                done 
emerge -puNDv world



DV-Files --> xvid avi

dvgrab --format raw --size 0 file_name
transcode -i file_name001.dv --dv_yuy2  -o new.avi -y xvid

koennte das gehen?:

dvgrab --format raw --size 0 - | transcode -i - --dv_yuy2 -o new.avi -y xvid

SVN

  • Anleitung:
http://gentoo-wiki.com/HOWTO_Apache2_with_subversion_SVN_and_DAV
  • neuen User auf dem Server anlegen:
htpasswd2 /var/svn/conf/svnusers "USERNAME"

Sisky

  • WAN interface
vlan1

files

/etc/firewall.user

#!/bin/sh
. /etc/functions.sh
IPT="$(which iptables)"
if [ "x$IPT" = x ]; then exit 1; fi

$IPT -P INPUT   ACCEPT
$IPT -P OUTPUT  ACCEPT
$IPT -P FORWARD ACCEPT



WAN=$(nvram get wan_ifname)
LAN=$(nvram get lan_ifname)

$IPT -F input_rule
$IPT -F output_rule
$IPT -F forwarding_rule
$IPT -t nat -F prerouting_rule
$IPT -t nat -F postrouting_rule




# if first argument is "open" stop here
if [ "x$1" = xopen ]; then exit 0; fi

$IPT -P INPUT   DROP
$IPT -P OUTPUT  DROP
$IPT -P FORWARD DROP


# reopen Loopback device and prevent outside world from using it
$IPT -A INPUT   -i lo -j ACCEPT
$IPT -A OUTPUT  -o lo -j ACCEPT
$IPT -A FORWARD -d 127.0.0.0/8 -j DROP
$IPT -A FORWARD -s 127.0.0.0/8 -j DROP





#$IPT -N handle_icmp
#$IPT -A handle_icmp -p icmp --icmp-type ! redirect -j ACCEPT
#$IPT -A handle_icmp -j RETURN
#$IPT -A handle_icmp -j DROP


#######################################################################
#
#  QQ: HANDLE_ICMP:
#
$IPT -A INPUT   -p icmp -j handle_icmp
$IPT -A OUTPUT  -p icmp -j handle_icmp
$IPT -A FORWARD -p icmp -j handle_icmp


$IPT -I INPUT   -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -I OUTPUT  -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -I FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT





### BIG FAT DISCLAIMER
## The "-i $WAN" is used to match packets that come in via the $WAN interface.
## it WILL NOT MATCH packets sent from the $WAN ip address -- you won't be able
## to see the effects from within the LAN.

### Open port to WAN
## -- This allows port 22 to be answered by (dropbear on) the router
$IPT -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j ACCEPT
$IPT        -A input_rule      -i $WAN -p tcp --dport 22 -j ACCEPT

### Port forwarding
## -- This forwards port 8080 on the WAN to port 80 on 192.168.1.2
# $IPT -t nat -A prerouting_rule -i $WAN -p tcp --dport 8080 -j DNAT --to 192.168.1.2:80
# $IPT        -A forwarding_rule -i $WAN -p tcp --dport 80 -d 192.168.1.2 -j ACCEPT

### DMZ
## -- Connections to ports not handled above will be forwarded to 192.168.1.2
# iptables -t nat -A prerouting_rule -i $WAN -j DNAT --to 192.168.1.2
# iptables        -A forwarding_rule -i $WAN -d 192.168.1.2 -j ACCEPT



$IPT -A INPUT   -j discard
$IPT -A OUTPUT  -j discard
$IPT -A FORWARD -j discard


Packages

ipkg update

ether-wake

ipkg install ether-wake

DynDNS

/etc/ez-ipupdate.conf

service-type=dyndns
user=baron162:poop123
host=tbeck.dyndns.org
#interface=ppp0
quiet

# Do not change the lines below
cache-file=/tmp/ez-ipupdate.cache
pid-file=/var/run/ez-ipupdate.pid

QoS

need WhiteRussion RC6 for this

http://forum.openwrt.org/viewtopic.php?pid=38952
http://wiki.openwrt.org/MiniHowtos/QoSHowto

install the QoS Scripts

ipkg install qos-scripts

/etc/config/qos

option upload       512
option download     4096

IPv6

  • link
http://wiki.openwrt.org/IPv6_howto

KVM Install

download KVM from kvm.sf.net or

svn checkout svn://kvm.qumranet.com/kvm/trunk directory

compile

need gcc3.x

emerge -avt =gcc-3.4.6*
  • switch to that
gcc-config x86_64-pc-linux-gnu-3.4.6
source /etc/profile
  • now compile
tar xzf kvm-release.tar.gz
cd kvm-release
./configure --prefix=/usr/local/kvm --with-patched-kernel
make
sudo make install
sudo /sbin/modprobe kvm-intel
# or: sudo /sbin/modprobe kvm-amd
  • switch back to gcc4
gcc-config i686-pc-linux-gnu-4.1.1
env-update && source /etc/profile

Create a disk image

/usr/local/kvm/bin/qemu-img create -f qcow vdisk.img 10G

Install an operating system

sudo /usr/local/kvm/bin/qemu-system-x86_64 -hda vdisk.img  -cdrom /path/to/boot-media.iso  -boot d  -m 384

(use qemu instead of qemu-system-x86_64 for i386)
If you're installing Windows, add the -no-acpi flag.

After installation is complete, run it with

sudo /usr/local/kvm/bin/qemu-system-x86_64 -hda vdisk.img -boot c -m 384

(use qemu instead of qemu-system-x86_64 for i386)


XEN Install

first try the livecd from Xen
and new Knoppix DVD

http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo

http://www.cl.cam.ac.uk/research/srg/netos/xen/index.html

http://www.nvnews.net/vbulletin/showthread.php?t=77597

Overlay

  • install layman
echo "app-portage/layman ~x86" >> /etc/portage/package.keywords/app-portage
emerge layman

create the file aross.xml (name it what you like)

/usr/portage/local/layman/aross.xml

paste this into aross.xml

   <overlay name="aross" src="http://overlays.gentoo.org/svn/dev/aross" type="svn">
   </overlay>

you might not need the closing tag </overlay>, but it works with it.

since layman -o file:///usr/portage/local/layman/aross.xml didn't work for me, i added it manually:

in /etc/layman/layman.cfg add to the variable "overlays" the line

   file:///usr/portage/local/layman/aross.xml

as in the comments to that variable explained. now save and list the overlays

   layman -L

add the overlay

   layman -a aross

now add to the end of your /etc/make.conf the line:

   source /usr/portage/local/layman/make.conf

install

ebuilds

  • download the correct ebuilds and add them to the local overlay
http://bugs.gentoo.org/attachment.cgi?id=108430

/etc/make.conf

http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo edit the CFLAGS:

add  -mno-tls-direct-seg-refs   
CFLAGS="-O2 -march=prescott -msse3 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs"

  • file
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -march=prescott -msse3 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j7"

CCACHE_DIR="/var/tmp/ccache/"
CCACHE_SIZE="2G"

FEATURES="ccache parallel-fetch"


GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo \
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ "



USE="X X509 aac acpi alsa amarok apm arts bash-completion bootsplash ccache
     cddacddb cdparanoia cdr cdrom client-only dbus dhcp directfb divx dv dvd
     dvdread exif fbcon ffmpeg firefox flac fuse gif gmail gmedia gphoto2
     gstreamer hal hwmixer icq ieee1394 imagemagick iproute2 jacj java
     javascript jingle jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility
     latex lm_sensors logitech-mouse logrotate mad mmx mouse mp3 mplayer nas
     nsplugin ntfs nvidia offensive ogg openal opengl oss pdf png qt3
     quicktime rar rdesktop samba screen sdl sound spell sse sse-filters sse2
     syslog tcl threads thunderbird tiff tk transcode truetype unzip usb vom
     vorbis win32codecs wireshark wma wmp xcomposite xfs xine xinerama xv xvid  subversion"

INPUT_DEVICES="keyboard mouse penmount"
#VIDEO_CARDS="nvidia vesa nv fbdev" jake: hab das auskommentiert... und nur nv  und nvidia reinwie bei mir... tut so perfekt.
VIDEO_CARDS="nvidia nv"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

PORTDIR_OVERLAY="/usr/local/portage"
source /usr/portage/local/layman/make.conf
  • now reemerge everything
emerge -ep system|genlop -p; emerge -ep world| genlop -p
emerge -e system; emerge -e world

Kernel Configuration

apply reiser4 and power patch
  • get the patch from above location
cd /usr/src/linux-2.6.28-xen/
patch -p1 < /usr/src/patches/reiser4....patch
patch -p1 < /usr/src/patches/linux-phc-0.2.7/kernel-patch/...vanilla-2.6.18.patch
.config
  • now follow the above kernel configuration guide, but with the following differences:
Processor Type and Features
(X) Symmetric multi-processing support
    Subarchitecture Type --> (Xen-compatible)
BUS Options ()
  • domain 0
(X) PCI Support 
    ->  PCI Access Mode (Direct)
(X) Xen PCI Frontend debugging
  • domain U
(X) PCI Support 
    ->  PCI Access Mode (Xen-Frontend)
(X) Xen PCI Frontend debugging
Xen
  • domain 0
(X) Privileged Guest (domain 0)
(X) Backend Driver Support
 (X) Block-device Backend Driver
 (X) Network Device Backend Driver
  (X)Network Device loopback Driver
 (X) PCI-device backend Driver
     -> PCI backend mode (Virtual-PCI)
( ) Block-device Frontend Driver
( ) Network Device Frontend Driver
(X) Scrub memory..
( ) Disable Serialport Driver
(X) Export Xen attributes in sysfs
  • domain U
( ) Privileged Guest (domain 0)
( ) Backend Driver Support
(X) Block-device Frontend Driver
(X) Network Device Frontend Driver
(X) Scrub memory..
( ) Disable Serialport Driver
(X) Export Xen attributes in sysfs
Compile & Install Kernel
make && make modules_install
mount /boot/
cp vmlinuz /boot/vmlinuz-2.6.18-xen0
cp .config /boot/config-2.6.18-xen0
ln -s /boot/config-2.6.18-xen0 /boot/config.xen
cp System.map /boot/System.map-2.6.18-xen0
ln -s /boot/System.map-2.6.18-xen0 /boot/System.map.xen
  • reemerge nvidia-drivers
emerge -eavO nvidia-drivers
Update Bootloader Grub
vi /boot/grub/grub.conf 
  • add this entry:
title  Xen 3.0.3 
root   (hd0,0)
kernel /boot/xen.gz
module /boot/vmlinuz-2.6.18-xen0 root=/dev/sda5
  • this entry allocates 98MB memory for the domain 0, without it, dom0 gets all memory initially but space is taken away, when domUs are created (default)
 kernel /boot/xen.gz dom0_mem=98M

System Configuration

  • start xend
/etc/init.d/xend start

nvidia

http://en.opensuse.org/Use_Nvidia_driver_with_Xen

coding

  • code snippets pasten:
http://rafb.net/paste/

scripting

Windows XP

Hardware

Gaphics Card

  • XFX 7900 GT
needs new bios --> the UDF version
http://www.bjorn3d.com/pafile/index.php?act=category&id=5
Powered by MediaWiki