Contents

tobymobile Pentium-M Conroe

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=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/ "

PORTAGE_NICENESS="15"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo "


USE="X X509 aac acpi alsa amarok apm arts bash-completion bittorrent
     bootsplash ccache cddacddb cdparanoia cdr cdrom client-only dbus dhcp
     directfb divx dv dvd dvdread encode 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 qt3support qt4 quicktime rar rdesktop realmedia samba
     screen sdl sound spell sse sse-filters sse2 subversion syslog tcl threads
     thunderbird tiff tk transcode truetype unzip usb vom vorbis win32codecs
     wireshark wma wmp xcomposite xfs xine xinerama xv xvid -gtk -gtk2"

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



~/.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

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/sda5               /               reiser4         noatime         0 1
#/dev/SWAP              none            swap            sw              0 0
/dev/sr0                /mnt/cdrom      iso9660         noauto,ro       0 0
#/dev/fd0               /mnt/floppy     auto            noauto          0 0

# NOTE: The next line is critical for boot!
proc                    /proc           proc            defaults        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"

/etc/conf.d/net

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

/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.new

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        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/CID/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

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

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
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"
        ### Available Driver options are:-
        ### Values:  i: integer, f: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "HWcursor"                  # [<bool>]
        #Option     "NoAccel"                   # [<bool>]
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "UseFBDev"                  # [<bool>]
        #Option     "Rotate"                    # [<str>]
        #Option     "VideoKey"                  # i
        #Option     "FlatPanel"                 # [<bool>]
        #Option     "FPDither"                  # [<bool>]
        #Option     "CrtcNumber"                # i
        #Option     "FPScale"                   # [<bool>]
        #Option     "FPTweak"                   # i
        Identifier  "Card0"
        Driver      "nvidia"
        VendorName  "nVidia Corporation"
        BoardName   "Unknown Board"
        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

/etc/X11/xorg.conf

Section "ServerLayout"
        Identifier     "X.org Configured" 
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        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/CID/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

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

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
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"
        ### Available Driver options are:-
        ### Values: i: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "HWcursor"                  # [<bool>]
        #Option     "NoAccel"                   # [<bool>]
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "UseFBDev"                  # [<bool>]
        #Option     "Rotate"                    # [<str>]
        #Option     "VideoKey"                  # i
        #Option     "FlatPanel"                 # [<bool>]
        #Option     "FPDither"                  # [<bool>]
        #Option     "CrtcNumber"                # i
        #Option     "FPScale"                   # [<bool>]
        #Option     "FPTweak"                   # i
        Identifier  "Card0"
        Driver      "nvidia"
        VendorName  "nVidia Corporation"
        BoardName   "Unknown Board"
        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

/etc/rc.conf

UNICODE="yes"
EDITOR="/bin/nano"
DISPLAYMANAGER="kdm"

/etc/group

root::0:root
bin::1:bin,daemon,tbeck
daemon::2:bin,daemon
sys::3:bin,adm
adm::4:adm,daemon
tty::5:root,tbeck
disk::6:adm,haldaemon,tbeck
lp::7:lp
mem::8:
kmem::9:
wheel::10:tbeck
floppy::11:haldaemon
mail::12:mail
news::13:news
uucp::14:uucp
man::15:man
console::17:tbeck
audio::18:tbeck
cdrom::19:haldaemon,tbeck
dialout::20:
tape::26:
video::27: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:tbeck
cron:x:16:
locate:x:245:tbeck
tbeck:x:1000:tbeck
lpadmin:x:106:
messagebus:x:1001:
haldaemon:x:1002:haldaemon,tbeck
plugdev:x:1003:haldaemon,tbeck
games:x:35:tbeck
eclipse:x:1004:
burning:x:1005:tbeck,root

/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

# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Listen on IPv4. xinet users must set NO or comment out
# otherwise it must be set YES
listen=YES
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
#local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to tobymobile FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES

gentoo install

Install CD

Gentoo 2007.0
start LiveCD with:
gentoo-irqpoll
Partition HDD
  • cfdisk
hda1 ntfs 18GB WinXP
hda5 ntfs  2600MB WinXP Daten
hda6 ext2 100MB /boot/
hda7 swap 2GB 
hda8 JFS 3GB /usr/portage/
hda9 xfs 14GB /
make the filesystems
mkfs.ext2 /dev/hda6
mkfs.jfs /dev/hda8
mkfs.xfs /dev/hda9
  • mount hda9 to /mnt/gentoo, mkdir /mnt/gentoo/boot, mount hda6 there
mount /dev/hda9 /mnt/gentoo; mkdir /mnt/gentoo/boot; mount /dev/hda6 /mnt/gentoo/boot; mkdir -p /mnt/gentoo/usr/portage; mount /dev/hda8 /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
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 ccache logrotate syslog-ng vixie-cron iproute2 eix screen eselect genlop gentoolkit ufed vim gentoo-sources
  • make.profile -> desktop
eselect profile list
eselect profile set ...
  • setup use flags with ufed (see also make.conf)
hvm

now emerge rest of packages

  • cmake
turn off ccache Feature in make.conf to be able to compile this package
register into default runlevel
rc-update add syslog-ng default
rc-update add vixie-cron default
rc-update...



download the CPU frequency patch
http://belnet.dl.sourceforge.net/sourceforge/linux-phc/Linux-PHC-0.2.7.tar.gz
  • patch the kernel
cd /usr/src/linux
patch -p1 < /usr/src/patches/linux-phc../kernel-patches/.....vanilla-2.6.18...
now configure the kernel
http://de.gentoo-wiki.com/Kernel_manuell_kompilieren

cd /usr/src/linux
make menuconfig

kernel configuration

Code Maturity
(X) Prompt...
General Setup
( ) Local..
( ) Automaticall..
(X) Support.. paging.. .swap..
(X) System V IPC
(X) POSIX Message Queues
( ) BSD 
...
(X) Kernel .config support
-> (x) enable access..
( ) Optimize for size
Loadable Module Support
(X) Enable load...
 (X) Module unloading
  (X) Forced Module Unloading
( ) Module Versio..
( ) Source checksum..
(X) Automatic Kernel loading
Block Layer
( ) Support for Large..
( ) Support for tracing..
( ) Support for large single..
IO Schedulers
-> (X) Anticipatory
-> (X) Deadline..
-> (X) CFG IO..
->   Default Scheduler ->  (CFQ)
Processor Type and Features
(X) Symmetric multi-processing support
    Subarchitecture Type --> (PC-compatible)
    Processor Family     --> (Core2)
( ) Generic x86 support
(X) HPET timer..
(2) Max. number of CPUs
( ) SMT Hyperthreading..
(X) Multi-core scheduler...
    Preemption-Model    ---> (Preemptible --> Low-Latency Desktop)
(X) Preempt The Big Kernel Lock
(X) Machine check exc..
( ) check for nonfatal..
( ) check for P4 thermal..
( ) Toshiba ..
( ) Dell..
( ) Enable board fixups..
( ) /dev/cpu/microcode
( ) /dev/cpu/*/msr
(X) /dev/cpu/*/cpuid
    Firmware Drivers    --> (None set)
    High Memory Support --> (4GB)
    Memory Model        --> (Flat Memory)
( ) 64bit memory and IO resources
( ) Allocate 3rd-level...
( ) Math emulation
(X) MTRR
( ) Boot from EFI..
(X) Enable Kernel IRQ balancing
(X) Use register arguments
( ) Enable seccomp..
    Timer Frequency     -->  (1000Hz)
( ) kexec Sys-call
( ) kernel crash dumps
( ) Support hot-pluggable cpus
(X) COMPAT VDSO support
Power Management Options
( ) Legacy Power Management API
( ) Power Management Debug..
ACPI Support
-> (X) ACPI Support
-> ( ) ....
-> (X) Fan 
-> (X) Processor
->  (X) Thermal Zone
APM -> (not set)
CPU Frequency Scaling
-> (X) CPU Frequency Scaling
->  (X) Enable CPUFreq debugging..
->  (X) CPU Freq. translation statistics
->   ( ) ..details
-> (X) Default CPUFreq Governor    -->   (Performance)
-> (X) ondemand
-> (X) userspace
-> (X) conservative
-> (X) Intel Enhanced SpeedStep
->  (X) ...all subentries activated
BUS Options
(X) PCI Support
    PCI Access mode     --> (any)
(X) PCI Express support
(X) Message signaled interrupts
Executable File Formats
(X) kernel support for ELF binaries
(M) a.out
(M) MISC
Networking
Networking Options
-> ( ) Network packet debugging
-> (X) Packet socket
->  (X) Packet Socket : mmapped IO
-> (X) UNIX domain..
-> ( ) IPSEC user conf..
-> (X) PF_KEY sockets
-> (X) TCP/IP networking
->  (X) IP:Multicasting
->  (X) IP:tunneling
->  (M) AH Transformation
->  (M) ESP transform.
->  (X) IPsec transport mode
->  (X) IPsec tunnel mode
->  (X) INET socket monitoring..
->  (X) TCP: Adv. congestion control
->        Adv. Cong. Control    -->
-> ->  (all standard)
->        IP Virtual server   -> (not set)
->  (X) The IPv6 Protocol
->   (X) AH transform
->   (X) ESP transform
->   (X) IPsec transport
->   (X) IPsec tunnel
->   (X) Network packet filtering
-> -> (all that you need...)
(X) Generic IEEE 802.11 netw. stack 
 ( ) enable..
 (X) ..WEP..
 (X) ..CCMP..
 (X) ..TKIP..


(X) Bluetooth subsystem support -->
Bluetooth subsystem support
(M)   L2CAP protocol support
(M)   SCO links support
(M)   RFCOMM protocol support
[*]     RFCOMM TTY support
(M)   BNEP protocol support
[*]     Multicast filter support
[*]     Protocol filter support
(M)   HIDP protocol support

Bluetooth device drivers  --->
(M) HCI USB driver
[*]   SCO (voice) support
(M) HCI UART driver
[*]   UART (H4) protocol support
[*]   BCSP protocol support
[*]   Transmit CRC with every BCSP packet
(M) HCI BCM203x USB driver
(M) HCI BPA10x USB driver
(M) HCI BlueFRITZ! USB driver
Device Drivers
Generic Driver
-> (X) Select only..
-> (X) Prevent Firmware..
-> (M) Userspace Firmware loading support (for DWL 520+ module: acx)
(M) Parallel Port Support
Plug & Play support
-> (X) P&P support
->  (X) PnP ACPI support
Block Devices
-> (X) Loopback device support
->  (M) Cryptoloop.. 
-> (M) Promise SATA..
-> (X) RAM disk support
->  (1) default num of RAM disks
->   (4096) default RAM disk size
->   (1024) default blocksize
-> (X) Initial RAM filesystem and disk
ATA/ATAPI/..
-> (X) ATA/ATAPI/..
->  (X) Enhanced IDE
->  (X) Include IDE/ATA-2
->  ( ) Use multi-mode by default
->  (X) include ide/atapi cdrom
->  (X) PCI IDE chipset support
->   (X) Sharing PCI IDE DMA interrupts
->   (X) Generic PCI bus-master support
->    (X) Use PCI DMA by def when available
->    (X) VIA 82CXXX
SCSI Support
-> (X) legacy /proc/scsi/
-> (X) SCSI disk support
-> (X) SCSI cdrom support
->     SCSI low-level drivers       ->
-> -> (X) Serial-ATA support
-> ->  (X) AHCI Serial-ATA
-> ->  (X) Intel PIIX/ICH
-> (X) VITESSE VSC-7174..Intel 31244
( ) Multi-Device ...
(0) Fusion..
(M) IEEE1394
-> (M) OHCI 1394 support
-> (M) OHCI Video support
-> (M) SBP-2 support (harddisks)
-> (M) Ethernet over IEEE1394
-> (M) OHCI-DV IO
-> (M) RAW IEEE1394
(X) I2O support
(X) Network Device Support
-> (X) Universal Tun/Tap support
->     Ethernet 1000                ->
-> -> (X) RealTek 8169 gigabit...
->   Wireless Lan non hamradio      ->
-> -> (X) Wireless Extension API over RTNetlink
-> -> (set here which driver..)
(X) Network console logging..
(X) Netpoll..
(X) Netpoll..
Input Devices
-> (X) Provide legacy..
-> (1280) x (1024)
-> (X) Event interface
-> Mouse    -> PS2
Character Devices
-> (M) Serial Drivers
-> (X) Enhanced Real Time Clock support
I2C Support
-> (X) I2C device interface
-> (X) I2C Algorithms...
->     I2C Hardware Bus support     ->
-> -> (X) Intel 82801 (ICH)
Graphics Support
-> (X) Enable firmware EDID
-> (X) support for framebuffer devices
->  (X) Enable video mode handling helpers
-> ( ) VESA VGA Graphics support 
->  (1280x1024@60) VESA default mode
->    Console Driver support        ->
-> -> (X) Video mode selection
-> -> (X) Framebuffer console support
->    Logo configuration      (all standard)
-> (X) support for framebuffer splash
Sound
-> (M) ALSA                        ->
-> -> (M) Sequencer
-> -> (M) OSS mixer API
-> -> (M) OSS PCM
-> ->  (X) OSS PCM..
-> -> (X) OSS sequencer API
-> -> (M) RTC timer support
-> ->  (X) user rtc as default
-> -> (X) Verbose proofs contents
-> ->     PCI Devices             ->
-> -> -> (X) Intel HD Audio
USB support
-> (X) USB device filesystem
-> (X) EHCI HCD (USB 2.0)
->  (X) Full speed transactions
->  (X) Root Hub Transaction translators
->  (X) Improved transaction..
-> (X) UHCI HCD
-> (X) USB Printer
-> (X) USB Mass storage
->  (X) The shared table of all common...
-> (M) USB Human interface device
->  (X) HID Input layer
File Systems
(X) Sexond extended
 (X) Ext2 extenden attr..
(X) Ext3 journalling..
 (X) Ext3 extended attributes
(X) Reiser4
 (X) enable reiser4 debug mode
(X) Reiserfs
(X) JFS
(X) XFS
 (X) XFS Quota
 (X) Security label
 (X) POSIX
 (X) Realtime subvolume
CDROM Filesystems
-> (X) ISO9660
->  (X) Microsoft
->  (X) Transparent decompression
-> (M) UDF file system
DOS/FAT
-> (M) MSDOS fs
-> (M) vfat
->  (850) default codepage
->  (iso8859-1)default charset for fat
-> (X) NTFS
Pseudofilesystems
-> (X) /proc/kcore
-> (X) Virtual memory..
Network Filesystems
-> (M) NFS
->  (X) NFSv3
->  (X) NFSv4
-> (M) NFS Server
->  (X) NFS over TCP
-> (M) SMB
-> (X) CIFS
-> (M) Coda
Native Language
-> (iso8859-15) Default NLS
-> (X) 850
-> (X) NLS ISO 8859-1
-> (X) NLS ISO 8859-15
-> (X) NLS UTF-8
Security Options
(X) Enable Security... 
-> (M) Default Linux Capabilities
Cryptographic Options
(X) Deflate compression algorithm 


rest is standard



Compile the kernel and install

  • compile
make && make modules_install
  • install
cp arch/i386/boot/bzImage /boot/vmlinuz-<whateverversion the symbolic link points to>
cp System.map /boot/System.map-<version again>
cp .config /boot/config-<version again>
  • alternative easy install, but overwrites the vmlinuz.old symlink with the current vmlinuz symlink and so on
make install

updating the kernel

  • select kernel
eselect kernel list
eselect kernel set 2
  • get old config
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

default 0
timeout 2
splashimage=(hd0,5)/boot/grub/splash.xpm.gz


title Gentoo
root(hd0,5)
kernel /boot/vmlinuz root=/dev/hda9
title Gentoo old 
root(hd0,5)
kernel /boot/vmlinuz.old root=/dev/hda9


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)
grub> setup (hd0)
grub> quit

fstab

define filesystems

define /etc/conf.d/hostname


fstab

define /etc/conf.d/net

rc-update add net.eth0 default

password

define root password

passwd


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

System Configuration

MS Windows(tm) window decorations

no borders:
  • ~/.kde3.5/share/config/kwinrc
[Windows]
ActiveMouseScreen=false
AltTabStyle=KDE
AnimateMinimize=true
AnimateMinimizeSpeed=5
AnimateShade=true
AutoRaise=off
AutoRaiseInterval=750
BorderSnapZone=10
ClickRaise=on
DelayFocus=off
DelayFocusInterval=750
ElectricBorderDelay=150
ElectricBorders=0
FocusPolicy=ClickToFocus
FocusStealingPreventionLevel=2
GeometryTip=false
HideUtilityWindowsForInactive=true
MaximizeButtonLeftClickCommand=Maximize
MaximizeButtonMiddleClickCommand=Maximize (vertical only)
MaximizeButtonRightClickCommand=Maximize (horizontal only)
MoveMode=Opaque
MoveResizeMaximizedWindows=false
Placement=Smart
ResizeMode=Transparent
RollOverDesktops=true
SeparateScreenFocus=false
ShadeHover=on
ShadeHoverInterval=250
SnapOnlyWhenOverlapping=false
TitlebarDoubleClickCommand=Maximize
WindowSnapZone=10

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", GROUP="hal"

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

mnkdir /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


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

emerging the packages

  • cups cyclic dependecies
emerge ---oneshot --nodeps cups
  • java installieren:


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

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