Debian Sarge 3.1 r0a

From GanjaLinux

Jump to: navigation, search

This page contains a history of all major changes made to my personal Debian Sarge 3.1 r0a Linux machine.

Contents

System Hardware

Purchased Hardware
Category Model Make Price USD Driver
Storage Seagate 250GB EIDE HD 7200/8MB/ATA-100 $129.99
Storage Maxtor 160GB EIDE HD 7200/8MB/ATA-133 $89.99
Mainboard A7S8X Asus A7S8X-MX Socket A Motherboard
CPU XP3000 AMD Athlon XP3000+ Socket A CPU Barton Core 333FSB
RAM Ultra 512MB PC3200 DDR 400MHz CL3 $59.99
Ethernet Mach Speed 10/100/1000 Base-T Ethernet Adapter $19.99 http://www.syskonnect.com/syskonnect/support/driver/readme/linux/sk98lin.htm

Operating System

Installation

Modules

Hardware Configuration

XFree86

sensors

$ sensors-detect

This program will help you determine which I2C/SMBus modules you need to
load to use lm_sensors most effectively. You need to have i2c and
lm_sensors installed before running this program.
Also, you need to be `root', or at least have access to the /dev/i2c-*
files, for most things.
If you have patched your kernel and have some drivers built in, you can
safely answer NO if asked to load some modules. In this case, things may
seem a bit confusing, but they will still work.

It is generally safe and recommended to accept the default answers to all
questions, unless you know what you're doing.

 We can start with probing for (PCI) I2C or SMBus adapters.
 You do not need any special privileges for this.
 Do you want to probe now? (YES/no): 
Probing for PCI bus adapters...
Sorry, no PCI bus adapters found.

We will now try to load each adapter module in turn.
If you have undetectable or unsupported adapters, you can have them
scanned by manually loading the modules before running this script.

 To continue, we need module `i2c-dev' to be loaded.
 If it is built-in into your kernel, you can safely skip this.
 i2c-dev is not loaded. Do you want to load it now? (YES/no): 
 Module loaded succesfully.

 We are now going to do the adapter probings. Some adapters may hang halfway
 through; we can't really help that. Also, some chips will be double detected;
 we choose the one with the highest confidence value in that case.
 If you found that the adapter hung after probing a certain address, you can
 specify that address to remain unprobed. That often
 includes address 0x69 (clock chip).

Some chips are also accessible through the ISA bus. ISA probes are
typically a bit more dangerous, as we have to write to I/O ports to do
this. This is usually safe though.

Do you want to scan the ISA bus? (YES/no): 
Probing for `National Semiconductor LM78'
  Trying address 0x0290... Failed!
Probing for `National Semiconductor LM78-J'
  Trying address 0x0290... Failed!
Probing for `National Semiconductor LM79'
  Trying address 0x0290... Failed!
Probing for `Winbond W83781D'
  Trying address 0x0290... Failed!
Probing for `Winbond W83782D'
  Trying address 0x0290... Failed!
Probing for `Winbond W83627HF'
  Trying address 0x0290... Failed!
Probing for `Winbond W83627EHF'
  Trying address 0x0290... Failed!
Probing for `Winbond W83697HF'
  Trying address 0x0290... Success!
    (confidence 8, driver `w83781d')
Probing for `Silicon Integrated Systems SIS5595'
  Trying general detect... Failed!
Probing for `VIA Technologies VT82C686 Integrated Sensors'
  Trying general detect... Failed!
Probing for `VIA Technologies VT8231 Integrated Sensors'
  Trying general detect... Failed!
Probing for `ITE IT8712F'
  Trying address 0x0290... Failed!
Probing for `ITE IT8705F / SiS 950'
  Trying address 0x0290... Failed!
Probing for `IPMI BMC KCS'
  Trying address 0x0ca0... Failed!
Probing for `IPMI BMC SMIC'
  Trying address 0x0ca8... Failed!

Some Super I/O chips may also contain sensors. Super I/O probes are
typically a bit more dangerous, as we have to write to I/O ports to do
this. This is usually safe though.

Do you want to scan for Super I/O sensors? (YES/no): 
Probing for `ITE 8702F Super IO Sensors'
  Failed! (skipping family)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
  Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
  Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
  Failed! (0x60)
Probing for `Winbond W83627HF Super IO Sensors'
  Failed! (0x60)
Probing for `Winbond W83627THF Super IO Sensors'
  Failed! (0x60)
Probing for `Winbond W83637HF Super IO Sensors'
  Failed! (0x60)
Probing for `Winbond W83697HF Super IO Sensors'
  Success... found at address 0x0290
Probing for `Winbond W83697SF/UF Super IO PWM'
  Failed! (0x60)
Probing for `Winbond W83L517D Super IO'
  Failed! (0x60)
Probing for `Winbond W83627EHF Super IO Sensors'
  Failed! (0x6012)

Do you want to scan for secondary Super I/O sensors? (YES/no): 
Probing for `ITE 8702F Super IO Sensors'
  Failed! (skipping family)
Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'
  Failed! (skipping family)
Probing for `SMSC 47B27x Super IO Fan Sensors'
  Failed! (skipping family)
Probing for `VT1211 Super IO Sensors'
  Failed! (skipping family)
Probing for `Winbond W83627EHF Super IO Sensors'
  Failed! (skipping family)

 Now follows a summary of the probes I have just done.
 Just press ENTER to continue: 

Driver `w83781d' (may not be inserted):
  Misdetects:
  * ISA bus address 0x0290 (Busdriver `i2c-isa')
    Chip `Winbond W83697HF' (confidence: 8)

Driver `w83627hf' (should be inserted):
  Detects correctly:
  * ISA bus address 0x0290 (Busdriver `i2c-isa')
    Chip `Winbond W83697HF Super IO Sensors' (confidence: 9)


 I will now generate the commands needed to load the I2C modules.
 Sometimes, a chip is available both through the ISA bus and an I2C bus.
 ISA bus access is faster, but you need to load an additional driver module
 for it. If you have the choice, do you want to use the ISA bus or the
 I2C/SMBus (ISA/smbus)? 

To make the sensors modules behave correctly, add these lines to
/etc/modules:

#----cut here----
# I2C adapter drivers
i2c-isa
# I2C chip drivers
w83627hf
#----cut here----

Do you want to add these lines to /etc/modules automatically? (yes/NO)yes
  • install GKrellm lm_sensors plugin
    • required gtk-config
$ apt-get install libgtk1.2-dev
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  libglib1.2-dev libx11-dev libxext-dev libxi-dev libxv-dev x-dev xlibs-static-dev
Suggested packages:
  libglib1.2-doc libgtk1.2-doc xspecs
The following NEW packages will be installed:
  libglib1.2-dev libgtk1.2-dev libx11-dev libxext-dev libxi-dev libxv-dev x-dev xlibs-static-dev
0 upgraded, 8 newly installed, 0 to remove and 1 not upgraded.
Need to get 4423kB of archives.
After unpacking 13.7MB of additional disk space will be used.
Do you want to continue? [Y/n] 
$ apt-get install hddtemp
  • GKrellM plugin for hddtemp setup
$ apt-get install libgtk2.0-dev
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  libatk1.0-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libpango1.0-dev
  libxft-dev libxrender-dev render-dev
Suggested packages:
  libglib2.0-doc libgtk2.0-doc libpango1.0-doc
The following NEW packages will be installed:
  libatk1.0-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libgtk2.0-dev
  libpango1.0-dev libxft-dev libxrender-dev render-dev
0 upgraded, 10 newly installed, 0 to remove and 1 not upgraded.
Need to get 9421kB of archives.
After unpacking 45.2MB of additional disk space will be used.
Do you want to continue? [Y/n] 
$ make gkrellm2
gcc -Wall -fPIC -O2 -DGKRELLM2 `pkg-config --cflags gtk+-2.0` -I. -c gkrellm-hddtemp.c
gkrellm-hddtemp.c: In function `string_extents':
gkrellm-hddtemp.c:94: warning: passing arg 1 of `gdk_string_extents' from incompatible pointer type
gcc -shared -Wl -o gkrellm-hddtemp.so gkrellm-hddtemp.o
rm gkrellm-hddtemp.o
$ make install2
install -d /home/lucasrangit/.gkrellm2/plugins/
install gkrellm-hddtemp.so /home/lucasrangit/.gkrellm2/plugins/

Uninterrupted Power Supply

  • APC BE350R

software configuration

$ apt-get install nut nut-usb nut-cgi
  • create /etc/nut/ups.conf with
[be350r]
        driver = hidups
        port = /dev/usb/hiddev0                                                           
  • restart NUT daemon
$ /etc/init.d/nut restart
  • start the server and test
$ upsd
Network UPS Tools upsd 2.0.1
Connected to UPS [be350r]: hidups-hiddev0
Synchronizing...done
$ /bin/upsc be350r@localhost ups.status
OL
$ /bin/upsc be350r@localhost           
battery.charge: 100
battery.chemistry: PbAc
battery.runtime: 2182
battery.voltage: 13.4
driver.name: hidups
driver.parameter.port: /dev/usb/hiddev0
driver.version: 2.0.1
ups.load: 0
ups.mfr: APC
ups.model: Back-UPS ES 350
ups.serial: 3B0608X10876  
ups.status: OL

Networking

Services

Security

Applications

Tasksel

[*] Desktop environment
[*] Web server  
[ ] Print server
[ ] DNS server  
[*] File server 
[*] Mail server  
[*] SQL database  
[ ] manual package selection 

apt-get

  • mrtg - dpkg configured
  • cron-apt - /etc/cron-apt/config
  • netselect-apt
  • sysutils
  • tree
# bogomips
Calibrating delay loop.. ok - 2146.00 BogoMips

moblock

  • after installing 2.6.17 kernel and sarge backports
apt-get -t sarge-backports install lsb-base
apt-get install moblock-ipq

compiled applications

ddclient dynamic dns updater

  • installed version 3.6.2-3.1
# apt-get install ddclient
  • downloaded and installed latest binary over previous file
# wget http://superb-east.dl.sourceforge.net/sourceforge/ddclient/ddclient-3.7.0.tar.bz2
# tar -jvxf ddclient-3.7.0.tar.bz2
# cd ddclient-3.7.0/
# mv /usr/sbin/ddclient /usr/sbin/ddclient-3.6.2
# mv ddclient /usr/sbin/
# mkdir /etc/ddclient
# mv /etc/ddclient.conf /etc/ddclient/
# vim /etc/ddclient/ddclient.conf
# /etc/init.d/ddclient restart

cpulimit

  • unstable debian package. compiled source.
# wget http://marlon80.interfree.it/cpulimit/cpulimit-1.1.tar.gz
# tar zxf cpulimit-1.1.tar.gz 
$ make

backports

  • add the following to /etc/apt/sources.list
deb http://www.backports.org/debian/ sarge-backports 
  • add the following to /etc/apt/preferences
    • deactivates all packages from backports.org
Package: *
Pin: release a=sarge-backports
Pin-Priority: 200
  • or use
apt-get -t sarge-backports install <name>

Maintenance

kernel customization

Based primarily off the following:

  1. Creating custom kernels with Debian's kernel-package system
  2. Sarge + Linux 2.6.14 + yaird HOWTO
  3. Installing a Linux-2.6.14+initrd on Sarge (nodevfs anymore)

and partly off:

  1. Debian kernel recompiling

preparations

  • did not run mkboot, no floppy drive present.
  • apt-get install kernel-package
  • apt-get install cdbs quilt patchutils dh-buildinfoxmlto libhtml-template-perl udev autotools-dev tetex-bin pgp
The following extra packages will be installed:
  diffstat docbook-xsl ed gawk libkpathsea3 libpaper-utils libwww0 libxml2-utils pgpgpg tetex-base
  xsltproc
Suggested packages:
  libipc-sharedcache-perl ccache tetex-extra lpr gv postscript-viewer chktex lacheck rubber
  passivetex
Recommended packages:
  lynx www-browser httpd apache tetex-doc dialog texi2html perl-tk
The following NEW packages will be installed:
  autotools-dev cdbs dh-buildinfo diffstat docbook-xsl ed gawk libhtml-template-perl libkpathsea3
  libpaper-utils libwww0 libxml2-utils patchutils pgpgpg quilt tetex-base tetex-bin xmlto xsltproc
0 upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.5MB of archives.
After unpacking 80.6MB of additional disk space will be used.
Do you want to continue? [Y/n] y
  • add sid package sources to /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ sid main non-free
deb-src http://ftp.de.debian.org/debian/ sid main non-free
  • added the following line to /etc/apt/apt.conf (newfile)
APT::Default-Release "3.1*";
  • installed yaird (ignored secret key missing warnings)
# apt-get source yaird
# cd yaird-0.0.12/
# dpkg-buildpackage
# cd ..
# apt-get install libparse-recdescent-perl
# dpkg -i yaird_0.0.12-14_i386.deb
  • installed texi2html (ignored secret key missing warnings)
# apt-get source texi2html
# cd texi2html_1.76
# dpkg-buildpackage
# cd ..
# dpkg -i texi2html_1.76-4_all.deb 
  • installed kernel-package (ignored secret key missing warnings)
# apt-get source kernel-package
# cd kernel-package-10.049/
# dpkg-buildpackage
# cd ..
kernel-package depends on make (>= 3.80-10); however:
  Version of make on system is 3.80-9
# dpkg --force-all -i kernel-package_10.049_all.deb  
  • attempted to fix apt-get dependency errors
# apt-get -f upgrade
The following packages will be REMOVED:                                                              
  kernel-package                                                                                     
The following packages have been kept back:                                                          
  yaird                                                                                              
The following packages will be upgraded:                                                             
  texi2html
# apt-get install kernel-package
# apt-get install libipc-sharedcache-perl ccache tetex-extra lpr chktex lacheck rubber passivetex lynx tetex-doc dialog perl-tk libipc-sharelite-perl xmltex
  • installed latest kernel source tree
# cd /usr/src/
# rm linux
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.tar.bz2
# tar -jvxf linux-2.6.17.tar.bz2
# ln -s linux-2.6.17 linux
# cd linux

configuring the kernel

  • configured 2.6.8.1 kernel config accepting all defaults
# cp ~/config-2.6.8.1 .config
  • procceded with kernel config
make menuconfig
  • .config file produced
  • compiled kernel
# make-kpkg clean
# make-kpkg --initrd --append-to-version=.20060620 --revision=1030 kernel-image
Warning: You are using the initrd option, that may not
work, depending on your kernel version and architecture,
unless you have applied the initrd cramfs patch to
the kernel, or modified mkinitrd not to use cramfs by
default. The  cramfs initrd patch, is included in the 
Debian supplied kernel sources. New kernels on most
architectures do work fine.
By default, I assume you know what you are doing, and I
apologize for being so annoying. Should I abort[Ny]?
  • compiling of kernel crashes the machine
  • attempting to restart compilation
  • same result, after a few minutes, machines turns off
    • this time it does not turn on without unplugging the power and plugging it back in
  • checking for potential disk errors
$ shutdown -F -r now
    • no unrecoverable errors found
  • checking for bad memory
# apt-get install memtest86+
  • system instability was found to be due to a failing power supply fan. Stable temperature of power supply is 102 F.
  • attempt to keep CPU temperature down
$ ./cpulimit -e make -l 20 -v &
$ ./cpulimit -e cc1 -l 25 -v &
$ ./cpulimit -e sh -l 10 -v &
  • SUCCESS!
  • verify /etc/kernel-img.conf contains:
postinst_hook = /sbin/update-grub
postrm_hook   = /sbin/update-grub

installing the kernel-image package

$ cd ..
$ ls
$ dpkg -i kernel-image-2.6.17.20060620_1029_i386.deb
Selecting previously deselected package kernel-image-2.6.17.20060620.
(Reading database ... 73387 files and directories currently installed.)
Unpacking kernel-image-2.6.17.20060620 (from kernel-image-2.6.17.20060620_1029_i386.deb) ...
Setting up kernel-image-2.6.17.20060620 (1029) ...
Searching for GRUB installation directory ... found: /boot/grub .
Testing for an existing GRUB menu.list file... found: /boot/grub/menu.lst .
Searching for splash image... none found, skipping...
Found kernel: /boot/vmlinuz-2.6.17.20060620
Found kernel: /boot/vmlinuz-2.6.8-2-386
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
  • reboot
  • did not load RAM disk
    • removed CRAMFS from kernel config
  • repeated kernel compilation
$ dpkg -i kernel-image-2.6.17.20060620_1132_i386.deb
Selecting previously deselected package kernel-image-2.6.17.20060620.
(Reading database ... 73387 files and directories currently installed.)
Unpacking kernel-image-2.6.17.20060620 (from kernel-image-2.6.17.20060620_1132_i386.deb) ...
Setting up kernel-image-2.6.17.20060620 (1132) ...
Not touching initrd symlinks since we are being reinstalled (1029)
Not updating image symbolic links since we are being updated (1029)
Searching for GRUB installation directory ... found: /boot/grub .
Testing for an existing GRUB menu.list file... found: /boot/grub/menu.lst .
Searching for splash image... none found, skipping...
Found kernel: /boot/vmlinuz-2.6.17.20060620
Found kernel: /boot/vmlinuz-2.6.8-2-386
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
  • reboot to test kernel
  • recreating initrd and vmlinuz simlinks
    • remove symlinks, no effect
  • added CRAMFS back to kernel config
    • repeat kernel compilation
$ ./cpulimit -e make -l 20 -v & \
./cpulimit -e cc1 -l 25 -v & \
./cpulimit -e sh -l 10 -v &
$ make-kpkg --initrd --append-to-version=.20060620 --revision=1228 kernel-image
  • install kernel
$ dpkg -r kernel-image-2.6.17.20060620
$ dpkg -i kernel-image-2.6.17.20060620_1228_i386.deb 
Selecting previously deselected package kernel-image-2.6.17.20060620.
(Reading database ... 73387 files and directories currently installed.)
Unpacking kernel-image-2.6.17.20060620 (from kernel-image-2.6.17.20060620_1228_i386.deb) ...
Setting up kernel-image-2.6.17.20060620 (1228) ...
Not touching initrd symlinks since we are being reinstalled (1132)
Not updating image symbolic links since we are being updated (1132)
Searching for GRUB installation directory ... found: /boot/grub .
Testing for an existing GRUB menu.list file... found: /boot/grub/menu.lst .
Searching for splash image... none found, skipping...
Found kernel: /boot/vmlinuz-2.6.17.20060620
Found kernel: /boot/vmlinuz-2.6.8-2-386
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
  • same error after loading CRAMFS
request_module: runaway loop modprobe: binfmt-464c
  • re-enabled Executable file formats and recompiled
$ make menuconfig
$ make-kpkg clean
$ ./cpulimit -e make -l 20 -v & \
./cpulimit -e cc1 -l 25 -v & \
./cpulimit -e sh -l 10 -v &
$ make-kpkg --initrd --append-to-version=.20060620 --revision=1316 kernel-image
  • install kernel
$ dpkg -r kernel-image-2.6.17.20060620
$ dpkg -i kernel-image-2.6.17.20060620_1316_i386.deb 
  • SUCCESS!

post install

  • hold kernel
$ echo "kernel-image-2.6.17.20060620 hold" | dpkg --set-selections
$ dpkg --get-selections | grep kernel-image
kernel-image-2.6.17.20060620                    hold
kernel-image-2.6.8-2-386                        install
  • remove symlinks
$ cd /usr/src/
$ rm linux

backup server

rsync daemon

  • enabled rsync by editing /etc/defaults/rsync
  • created /etc/rsyncd.conf with the following