apt-get install kernel-package ncurses-dev initramfs-tools bzip2 wget
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.tar.bz2
tar xjf linux-2.6.33.tar.bz2
cd linux-2.6.33/
make menuconfig
make-kpkg clean
make -j 4
#make-kpkg --append-to-version=-custom --revision=1.0 kernel_image kernel_headers
make-kpkg --initrd --append-to-version=-custom --revision=1.0 kernel_image kernel_headers
cd ..
dpkg -i linux-image-2.6.33-custom_1.0_i386.deb
dpkg -i linux-headers-2.6.33-custom_1.0_i386.deb
#update-initramfs -k 2.6.33-custom -c
Usually, I set those 3 files to configure a Debian testing:
/etc/apt/sources.list
# stable
deb http://ftp.fr.debian.org/debian/ stable main non-free contrib
deb-src http://ftp.fr.debian.org/debian/ stable main non-free contrib
deb http://security.debian.org/ stable/updates main contrib non-free
deb-src http://security.debian.org/ stable/updates main non-free contrib
# testing
deb http://ftp.fr.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.fr.debian.org/debian/ testing main non-free contrib
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main non-free contrib
# unstable
deb http://ftp.fr.debian.org/debian/ unstable main non-free contrib
/etc/apt/preferences
Package: *
Pin: release a=testing
Pin-Priority: 990
Package: *
Pin: release a=unstable
Pin-Priority: 900
Package: *
Pin: release a=stable
Pin-Priority: 800
/etc/apt/apt.conf
APT::Default-Release "lenny";
APT::Cache-Limit "141943904";
Apt::Get::Purge;
APT::Clean-Installed;
APT::Get::Fix-Broken;
APT::Get::Fix-Missing;
APT::Get::Show-Upgraded "true";
APT::Force-LoopBreak=true;
APT::Get::AllowUnauthenticated 1;
New hard drives uses 4k-byte sector but devices cheat on linux and say that they're using 512-byte sector as usual. If partitions are not aligned to 8 blocks, there's a huge throughput degradation. Use the 'expert' menu [x] on fdisk to move beginning of data in a partition [b] and align it to 8 blocks.
Test program:
#define _LARGEFILE64_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#define N 4096
char buffer[N];
int main(int argc, char *argv[])
{
int fd, i, j;
char *file = "test.dat";
int size = 2048;
printf ("usage: %s <file> <#blocs>\n", argv[0]);
if (argc > 1) file = argv[1];
if (argc > 2) size = atoi (argv[2]);
fd = open(file, O_WRONLY | O_CREAT | O_TRUNC | O_SYNC);
printf ("open %s (fd=%d)\n", file, fd);
if (fd <= 0) return 1;
printf ("write %dx%d=%d data\n", size, N, size * N);
for (i = 0; i < size; i++) {
int rand = random ();
for (j = 0; j < N; j++, rand = (rand << 1) ^ (rand >> sizeof (int)))
buffer[j] ^= rand;
write(fd, buffer, N);
}
close(fd);
return 0;
}
aptitude install open-vm-source open-vm-tools open-vm-toolbox
aptitude install module-assistant
m-a prepare
m-a a-i open-vm -f
dpkg-reconfigure open-vm-tools
/etc/network/if-up.d pour relancer samba chaque fois que la connexion Wifi est rétablie.
#!/bin/sh
set -e
invoke-rc.d samba restart