Pas de mémoire mais un bloc-notes pour ne pas rechercher deux fois la même chose, en espérant pouvoir servir à d'autres...
13 avril 2006
05 avril 2006
Installation de Nessus sur Ubuntu PPC 5.10
répondre aux questions pour créer certificats du serveur
ensuite nessus-adduser et répondre aux questions pour créer un utilisateur
ensuite http://www.nessus.org/register/
et on reçoit par mail un code pour pouvoir mettre à jour les plugins:
rentrer la commande suivante:
/usr/bin/nessus-fetch --register 9DA0-8F51-F3FF-XXXX-XXXX
lancer le serveur :
sudo nessusd -D
mettre à jour les plugins:
sudo nessus-update-plugins -v
(long à démarrer)
lancer un client:
nessus
et le vrai boulot peut commencer...
Configuration NVIDIA sous Red Hat ES 4
puis arrêter le serveur X: init 3
lancer le script récupéré chez NVIDIA
quand c'est fait
system-config-display
S'il ne prend pas la résolution souhaitée on peut avoir besoin de la commande:
xrandr -s 0 (ou un autre nombre relatif à une autre résolution)
man xrandr si nécessaire
Vieux dicton: si l'interface graphique fait aisément et joliment ce qu'elle veut, la ligne de commande exécutera ta commande et rien d'autre.
11 mars 2006
SSH avec authentification par clef privée/publique
Prérequis la connexion ssh avec mot de passe fonctionne.
Sur le client (PBJH) il faut entrer les commandes suivantes:
PBJH:~ hanoteau$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/Users/hanoteau/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/hanoteau/.ssh/id_dsa.
Your public key has been saved in /Users/hanoteau/.ssh/id_dsa.pub.
The key fingerprint is:
XX:XX:XX................................. hanoteau@PBJH.local
PBJH:~ hanoteau$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/hanoteau/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/hanoteau/.ssh/id_rsa.
Your public key has been saved in /Users/hanoteau/.ssh/id_rsa.pub.
The key fingerprint is:
XX:XX:XX:................................. hanoteau@PBJH.local
PBJH:~ hanoteau$ cd .ssh
PBJH:~/.ssh hanoteau$ ls
id_dsa id_dsa.pub id_rsa id_rsa.pub known_hosts
PBJH:~/.ssh hanoteau$ scp *.pub 10.0.0.7:/home/hanoteau
Password:
id_dsa.pub 100% 609 459.6KB/s 00:00
id_rsa.pub 100% 229 213.5KB/s 00:00
PBJH:~/.ssh hanoteau$
Ensuite sur le serveur (ip 10.0.0.7):
hanoteau@debianvdr:~$ cd /home/hanoteau
hanoteau@debianvdr:~$ mkdir .ssh
hanoteau@debianvdr:~$ cp *.pub .ssh/
hanoteau@debianvdr:~$ cd .ssh
hanoteau@debianvdr:~/.ssh$ ls
id_dsa.pub id_rsa.pub
hanoteau@debianvdr:~/.ssh$ cat id_dsa.pub >> authorized_keys
hanoteau@debianvdr:~/.ssh$ cat id_rsa.pub >> authorized_keys
Désormais on se connecte sans mot de passe depuis le compte hanoteau de PBJH sur le compte hanoteau de debianvdr avec ssh:
PBJH:~ hanoteau$ ssh 10.0.0.7
Linux debianvdr 2.6.15-1-686 #2 Thu Feb 23 05:41:01 CET 2006 i686 GNU/Linux
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Sat Mar 11 17:11:00 2006 from pbjh.lan
hanoteau@debianvdr:~$
07 mars 2006
Installation ntop à partir du cvs sur ubuntu 5.10
user# mkdir cvsntop
user# cd cvsntop
us# export CVSROOT=:pserver:anonymous@cvs.ntop.org:/export/home/ntop
user# cvs login
Logging in to :pserver:anonymous@cvs.ntop.org:2401/export/home/ntop
CVS password:
user# cvs checkout ntop
cvs checkout: Updating ntop
U ntop/AS-list.txt.gz
U ntop/AUTHORS
....
Quelques dizaines de minutes plus tard on peut commencer le vrai travail d'installation:
If you want to program with C/C++ please do the following:
sudo apt-get install build-essential
nous voilà avec un compilateur gcc avec support c++
(apt-get install gcc cpp marche moins bien)
ensuite apt-get install libpcap-dev libgdbm-dev libgd-dev libglib2.0-dev libgdome2-dev libssl-dev libxml-dev libsp-gxmlcpp-dev libgdome2-xslt-dev libwww-dev libgtk1.2-dev libsctp-dev libxml++2.6-dev
./configure --enable-i18n
make
make install
NOTE: ntop can show traffic by AS (Autonomous System) Number
Because this feature consumes a number of MB of memory,
the datafile is not installed by default.
Which, if there is no file - from this or a previous
install - effectively disables the ASN feature.
To install the AS data, type:
# make install-data-as
************************************************************
************************************************************
WARNING: This install created several directories for the ntop
files and databases:
/usr/local/share/ntop
/usr/local/var/ntop
/usr/local/lib/ntop
/usr/local/bin/ntop
This directory MUST be owned by the user
which you are going to use to run ntop.
The command you must issue is something like:
chown -R ntop.ntop /usr/local/share/ntop
chown -R ntop.ntop /usr/local/var/ntop
chown -R ntop.ntop /usr/local/lib/ntop
chown -R ntop.ntop /usr/local/bin/ntop
man chown to check the syntax for YOUR system
la première fois démarrer ntop via
/usr/local/bin/ntop -u ntop
même si on a pas d'invite taper un mot de passe administrateur pour ntop
le retaper quand demandé
pour les fois suivantes démarrer ntop via:
/usr/local/bin/ntop -u ntop -d
firefox
http://localhost:3000/
06 mars 2006
Installation client ocsinventory sur une ubuntu 5.10
tar zxvf XXX.tar.gz
sudo apt-get install libxml-simple-perl libwww-perl libnet-ip-perl
cd le répertoire adéquat
./ocsinventory-installer.pl
répondre aux questions
03 mars 2006
Intégration OCS dans GLPI sur une sarge
sur le site de glpi récupérer glpi-ocs dans la rubrique ressources/plugins
tar zxvf glpi-ocs-v1.0-RC4.tar.gz -C /var/www/apache2-default/glpi/plugins/
ceci devrait être automatique dans les prochaines versions de glpi (1.0 stable par exemple)
Installation ocsinventory-ng sur debian sarge 3.1
Installation du serveur web d'administration de OCSinventory-ng
Télécharger le tar.gz d'ocsinventory-ng
tar -xvzf ~/OCSNG_LINUX_SERVER_1.0-RC2-FINAL.tar.gz
sudo mkdir /var/www/ocsreports
cd ~/OCSNG_LINUX_SERVER_1.0-RC2/ocsreports
su
cp -R * /var/www/ocsreports/
cd /var/www/
chown -R root:root ocsreports/
chmod gou+rx ocsreports ocsreports/css ocsreports/files ocsreports/image/ ocsreports/languages
chown root:www-data ocsreports
chmod gu+w ocsreports
Installation du serveur de communication de ocsinventoryng
su
apt-get install libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl
chown -R root:root ~/OCSNG_LINUX_SERVER_1.0-RC2/ocsinventory-NG
chmod gou+rx OCSNG_LINUX_SERVER_1.0-RC2/ocsinventory-NG
mv OCSNG_LINUX_SERVER_1.0-RC2/ocsinventory-NG /usr/local
apt-get install libapache-mod-perl libapache-mod-php4
version installée de mod_perl par sarge au 1 mars 2006 est 1.999.21-1
si la version est égale ou supérieure à 1.999.22 alors il y a une manip supplémentaire voir manuel...
cd /usr/local/ocsinventory-NG/
vi Ocsinventory_startup.pl
corriger la ligne approchante comme suit:
use lib "/usr/local/ocsinventory-NG";# <= Change this if Ocsinventory.pm is in an other place
vi /usr/local/ocsinventory-NG/apache_config
Corriger la ligne approchante comme ceci:
PerlRequire /usr/local/ocsinventory-NG/Ocsinventory_startup.pl
vi /etc/apache/httpd.conf
ajouter ceci dans le fichier httpd.conf:
#Include fichier de config pour ocsinventory-ng
Include /etc/apache/ocsinventory-ng.conf
cp /usr/local/ocsinventory-NG/apache_config /etc/apache/ocsinventory-ng.conf
mkdir /var/log/ocsinventory-NG
chown -R www-data:www-data /var/log/ocsinventory-NG
/etc/init.d/apache restart
Application du patch
mkdir patchocs
cp OCSNG_PATCH_SERVER_RC2-1.tar.gz patchocs/
cd patchocs
tar -zxvf OCSNG_PATCH_SERVER_RC2-1.tar.gz OCSNG_PATCH_SERVER_RC2-1/
OCSNG_PATCH_SERVER_RC2-1/ocsinventory-NG/ OCSNG_PATCH_SERVER_RC2-1/ocsinventory-NG/Ocsinventory.pm OCSNG_PATCH_SERVER_RC2-1/Ocsinventory.pm_4_mp_since_1.999_22/ OCSNG_PATCH_SERVER_RC2-1/Ocsinventory.pm_4_mp_since_1.999_22/Ocsinventory.pm OCSNG_PATCH_SERVER_RC2-1/ocsreports/ OCSNG_PATCH_SERVER_RC2-1/ocsreports/preferences.php OCSNG_PATCH_SERVER_RC2-1/README cd OCSNG_PATCH_SERVER_RC2-1/ocsinventory-NG
cp Ocsinventory.pm /usr/local/ocsinventory-NG/
cd OCSNG_PATCH_SERVER_RC2-1/ocsreports
cp preferences.php /var/www/ocsreports/
Configuration finale:
firefox
http://localhost/ocsreports
on demande mysql hostname: localhost mysql login: root mysql password: ****** (simple)
entrer une phrase à afficher au lancement d'un agent
si tout ok
http://localhost/ocsreports login/password = admin/admin
pour activer le changement:
/etc/init.d/apache reload
02 mars 2006
Installer glpi sur une Sarge
GLPI - Gestionnaire libre de parc informatique
Librement adapté du texte de Aurel du mardi 23 août 2005 lui-même inspiré de la documention réalisée par JMD)-
Je pars du postulat que vous avez une Debian fonctionnelle sur votre machine. La version de la Debian concernée est la Sarge dite stable.
Installation Apache, PHP et MySQL
Premièrement, installons le serveur WEB Apache (www.apache.org). Comme GLPI est programmé en PHP il est nécessaire d'installer le module permettant à apache d'interpréter du PHP.
En « root » taper (nous considérerons que toutes les lignes de commandes seront saisies en root) :
Debian:~# apt-get install apache2 php4 libapache2-mod-php4
Une série de questions vous seront posées auxquelles vous devrez répondre par l'affirmative (« O ») si vous voulez poursuivre l'installation.
Glpi fonctionne également avec une base de données MySQL (www.mysql.com), c'est pourquoi nous avons besoin d'installer « mysql-server » et les librairies PHP qui vont avec.
Debian:~# apt-get install mysql-server php4-mysql
Avant toute chose, démarrer vos deux serveurs Apache et MySQL :
Debian:~# /etc/init.d/apache2 restart Debian:~# /etc/init.d/mysql restart
Nous avons désormais les logiciels nécessaires pour faire fonctionner GLPI mais il reste encore quelques étapes avant de pouvoir l'utiliser.
Nous devons affecter un mot de passe à l'utilisateur root du serveur MySQL (pour des raisons évidentes de sécurité).
Debian:~# mysqladmin -u root password 'password'
Remplacer le deuxième 'password' par un mot de passe de votre choix. Attention vous allez créer un mot de passe pour le compte « root » (Administrateur) de la base de donnés MySQL. Maintenant nous allons créer la base de données « glpidb » qui sera utilisée par GLPI.
Debian:~# mysql -u root -p
enter password : *******
mysql> create database glpidb;
Nous allons également créer l'utilisateur « glpiuser » (avec son mot de passe) et lui donner les privilèges nécessaires pour qu'il puisse tout faire dans cette base :
mysql> grant all privileges on glpidb.* to glpiuser@localhost identified by
'mot_de_passe_du_glpiuser';
Si vous voulez rendre GLPI accessible dans votre entreprise aux usagers, il faudra en lieu et place de localhost mettre soit une adresse IP soit un nom connu par votre domaine ex : glpi.monentreprise.com.
Si vous souhaitez vous simplifier la vie dans l'administration de vos bases de données, vous pouvez installer phpmyadmin. Il s'agit d'un outil développé en PHP qui s'utilise à l'aide d'un navigateur. Un apt-get phpmyadmin fera encore des miracles (je ne détaille pas ici son installation car ce n'est pas l'objectif principal de cette documentation).
Téléchargement et installation de GLPI
Il faut désormais récupérer la dernière version de GLPI sur le site http://glpi.indepnet.org rubrique "télécharger".
Vous devez ensuite décompresser l'archive dans le répertoire /var/www/apache2-default qu'Apache a crée pour vous (vous pouvez supprimer cette redirection pointant automatiquement dans le répertoire apache2-default en supprimant quelques lignes dans le fichier « apache2.conf » :
Debian:~# tar -xvzf glpi-X.X.X.tar.gz -C /var/www/apache2-default
Si vous allez faire un tour dans le répertoire /var/www/apache2-default vous pourrez observer que
GLPI a créé un répertoire GLPI.
Maintenant, il est nécessaire d'accorder des permissions à certains répertoires pour GLPI puisse
travailler en toute tranquillité :
Debian:~# cd /var/www/apache2-default Debian:~# chown -R www-data glpi
En tapant cette commande Apache (www-data) devient propriétaire des fichiers, répertoires et sous-répertoires.
Configuration de GLPI
Désormais tout se déroule en ligne. Il vous suffit d'aller « visiter » votre dossier
« http://votre_serveur/glpi » par le Web.
Lors de la première connexion à cette adresse, une procédure d'installation pas-à-pas démarre.
L'interface est intuitive, il suffit d'entrer les informations demandées. Une fois que c'est terminé, le
système vous demande l'identification que vous avez indiquée et vous pouvez commencer à utiliser
GLPI.
En cas de grosse erreur (du genre : vous avez oublié votre propre accès à GLPI...), pour « relancer »
cette procédure d'installation, il suffit d'effacer le fichier suivant :
glpi/config/config_db.php
La connexion suivante dans le dossier « http://votre_serveur/glpi » relancera alors la procédure de configuration (en réalité, c'est l'absence de fichier « config_db.php » qui provoque le lancement de cette procédure).
Attention, si vous avez ce message à l'installation « Vous devez compiler votre PHP avec l'extension MySQL », cela voudra dire que vous devrez faire une modification dans le fichier « /etc/php4/apache2/php.ini ».
En dessous de la rubrique « ;Dynamic Extensions ; », décommenter la ligne ci-dessous en enlevant le « ; » en début de ligne.
extension=mysql.so
Maintenant n'oubliez pas de redémarrer votre serveur Apache2 pour qu'il prenne en compte votre modification.
22 février 2006
Samba et fstab (montage automatique au démarrage
//stonegiga/partage /home/hanoteau/mnt/stonegiga/partage smbfs rw,user,uid=1000,gid=1000,credentials=/etc/samba/pub.cred 0 0
user = n'importe quel utilisateur peut monter et démonter le partage
uid,gid = à qui appartient le partage (par défaut root.root avec les droits 755 donc un utilisateur ne peut écrire par défaut dans le partage)
credentials = on met pas l'utilisateur et le mot de passe en clair dans fstab mais dans un fichier /etc/samba/pub.cred (protégé en lecture lui)
le fichier pub.cred contient:
username=utilisateurdupartage
password=motdepasseassocie
non utilisé ici mais utile:
umask = défini le masque des permissions des fichiers dans le partage
iocharset : si les accents des fichiers des systèmes de fichiers montés (partage samba, CD-ROM) ne s’affichent pas correctement, éditez le fichier
/etc/fstab et rajoutez iocharset=iso8859-1 iocharset=iso8859-15 (avec symbole euro) dans la colonne options des systèmes de fichiers concernés :
21 février 2006
Anti-virus
1) je récupère mes données avec un CD Knoppix (on démarre sur le CD et on a accès à ses disques).
2) je fais tourner un anti-virus depuis Knoppix (clamav) ou un autre CD avec une distribution live de Linux genre bitdefender live CD (les étapes 1 &2 peuvent être inversées et/ou combinées).
3) j'installe un OS qui n'est pas touché par les virus à l'heure actuelle (Linux, FreeBSD, etc...) afin d'éviter ces manoeuvres fastidieuses à l'avenir. Pour vous aider à choisir la bonne distribution un test en anglais en ligne ou me contacter.
Si vous souhaitez absolument jouir des prochains virus vous devez utiliser un OS bien connu des instances européennes en matière d'abus de position dominante. Pour limiter l'apparition spontanée de trop nombreux virus l'installation d'un anti-virus est nécessaire mais rassurez-vous il en passera quand même l'un ou l'autre avec le temps.
Une solution basée sur des logiciels open-source existe:
ClamWin AntiVirus, Winpooch et Winsock Firewall ou WIPFW
Selon ce que j'ai lu les anti-virus suivants sont relativement efficaces:
Avsat (Linux, MacOSX, µ$) gratuit pour utilisation personnelle www.avast.com
AVG (Linux, µ$) gratuit (en anglais) pour usage personnel ou non lucratif free.grisoft.com
Aussi disponible en version d'évaluation seulement: F-secure Antivirus, Kaspersky Antivirus version 5, NOD 32.
09 février 2006
Kismac GPS
Les coordonnées de Mons (longitude, latitude) sont les suivantes:
50°27' 50.45 3°56' 3.93 15m44s 7000 MONSToutes les coordonnées des différentes localités belges sur:
http://www.astro.ulg.ac.be/~sal/post7.htm
01 février 2006
Envoi d'un courriel en ligne de commande (bash)
blablabla
[ ctrl-d ]
Cc: [entrée ]
31 janvier 2006
ocsinventory client installation sous ubuntu 5.10
OCS-NG_LINUX_AGENT_1.0-RC1.tar.gz
sur http://ocsinventory.sourceforge.net
décompresser dans un répertoire de votre choix
Installation des librairies requises:
sudo apt-get ou synaptic pour:
libxml-simple-perl
libcompress-zlib-perl
libcrypt-ssleay-perl # facultatif?
libnet-ip-perl
libwww-perl
lancer le script perl depuis ce répertoire:
sudo ./ocsinventory-installer.pl
ensuite, pour mettre à jour (à l'installation on peut choisir auto update):
sudo ./ocsinventory-client.pl
18 janvier 2006
Samba en mode graphique
installer linneigborhood & mc
Pour plus de facilité dans un terminal taper:
cd /usr/bin
sudo chmod +s smbmnt
chmod +s smbumount
lancer l'application via:
user@machine:~$ LinNeighborhood
et puis c'est du graphique soit avec mc soit via votre navigateur de fichiers (nautilus)
les partages sont montés dans votre répertoire home
Par exemple le partage networking sur la machine stonegiga si vous êtes l'utilisateur pasdebrevetlogiciel se trouvera dans:
/home/pasdebrevetlogiciel/mnt/stonegiga/networking
Ne pas oublier de démonter le partage!!!
11 janvier 2006
Samba en ligne de commande
Coté client:
apt-get install smbclient
smbclient //nom_netbios/nom_partage -U user_name
le mot de passe est demandé
On utilise des commandes à la ftp sur le partage distant
dir ou ls : pour lister le contenu du repertoire
cd: pour changer de répertoire sur le partage distant
lcd: pour changer de répertoire local
get: permet de récuperer un fichier du répertoire distant
put: permet de poser un fichier sur le répertoire distant
del: permet d’effacer un fichier sur le partage distant
md ou mkdir: permet de créer un répertoire sur le partage distant
rd ou rmdir: permet d’effacer un répertoire sur le partage distant
exemple :
user@linuxbox:~/legal$ smbclient //stonegiga/networking -U networking
Password:
Domain=[STONEGIGA] OS=[Unix] Server=[Samba 3.0.2a]
smb: \> cd janus
smb: \janus\> cd fromJH
smb: \> put gpl.txt
librement condensé à partir de http://doc.ubuntu-fr.org/applications/samba/outils
On peut aussi monter le partage et puis y accéder via nautilus ou autre application équivalente:
smbmount //stonegiga/partage /root/partage -o username=usersamba%passwdsamba
09 janvier 2006
Client vpn sous ubuntu 5.10
installation: apt-get install vpnc
configuration dans /etc/vpnc/example.conf
que l'on recopiera dans /etc/vpnc/vpnc.conf
on ouvre la connexion via sudo /usr/sbin/vpnc /etc/vpnc/vpnc.conf
on demandera alors un mot de passe
exemple de configuration si on veut se connecter à un routeur Cisco:
IPSec gateway 1.1.1.1
IPSec ID groupeclient
IPSec secret presharedkey
Xauth username jerome
pour info le fichier d'exemple fourni est assez explicite:
IPSec gateway 192.0.2.32
IPSec ID myGroup
IPSec secret myGroupPWD
Xauth username myUserName
# OPTIONAL
# ========
#
#
# Varios options not undestood by vpnc itself but by some other scripts
#
# Target networks 123.234.210.0/24 10.1.0.0/16
# If Target networks is defined here, the default route is not replaced!
# Don't update resolv.conf though resolvconf is installed
# DNSUpdate no
05 janvier 2006
Win2K in qemu under Ubuntu x86 5.10
(based on various documents coming mainly from www.ubuntuforums.org especially a post from Fredrik Lunde from Norway many thanks to him)
You need a Windows Install CD and the appropriate license from a Redmond company to do so.
In this little howto we will guide you through how to set up the free emulator that I have tested with win2000 professional.
Before we start:
Guest = Your Operating System installed in the emulator
Host = In this case, Ubuntu 5.10
Do this at your own risk, there are know problems with different graphic cards, refresh rate and color settings.
If you notice any flickering on the screen when you change the screen resolution on the guest OS, try to shutdown first the guest, then completely reboot the host. if still it is flickering, there are probably something wrong with your graphic drivers or settings in the Xorg file.
I did this with an Ubuntu upgraded to 5.10 with 2.6.12-10 i386 kernel and 1024 MB memory.
Please note that you preferably have some gigabites available while setting this up. I recommend taking some backups of both the guest and the host while configuring this.
Qemu (GPL) with KQemu (Free as beer but not GPL!)
Virtual Machine for every thing you dream of GNU/Linux or BSD based OS's or need Win2000 or WinXP.
Note: This is what we will go through here. I tried this with Win2000, CentOS4 and will continue to try different OS's here. It is not as fast as VMware with Win2000, but it's a very good free alternative and not so slow.
OK.. Let's start...
Step 1. RUNNING QEMU WITH WIN98
If you are just installing Win98, with the current version (qemu-0.8.0) KQemu will not work anyway, so you don't need to install it.
Win98 only, Just do:
$ apt-get install qemu
...and jump to step 2
If you deside to install Qemu with the KQemu accelerator you just need to start win98 with the extra command -no-kqemu , we will get back to this later anyway.
Step 1. RUNNING QEMU WITH KQEMU ACCELERATOR
Some of this information I ripped from: Nano Florestan at http://oui.com.br/n/content.php?article.21 a lot of the credits should go to him.
First we need to remove any previously installed Qemu and compile it with Kqemu
$ sudo apt-get remove qemu
Go to: http://fabrice.bellard.free.fr/qemu/download.html
...and download these 2 files:
1) QEMU source code (Not the binary for i386)
2) QEMU Accelerator Module
0.8.0 is the current version (5rd January 2006).
$ tar zxvf qemu-0.8.0.tar.gz
The Kqemu shall be unpacked into a subdirectory of the new qemu-0.8.0 directory
$ cd qemu-0.8.0
$ tar zxvf /location of downloaded files/kqemu-0.7.2.tar.gz
NOTE: Some people have reported permission errors during installation, the following command will correct the problem.
$ sudo chmod -R 775 /path/to/qemu-0.8.0
You now need to make sure you have some extra packets. First make sure you have the kernel headers installed by:
$ uname -r
..this will output the kernel version
Open Synaptic package manager and search for packages called "linux-headers". Several packages start with this name. Install the one that corresponds to your processor and your kernel version.
Still in Synaptic, choose the package you have just installed, click Properties and go to the "Installed Files" tab. Write down the directory where the files were copied (looks like /usr/src/linux-headers-2.6versionnumber/)
$ vi configure (or another editor e.g. gedit if you prefer GUI)
change the: kernel_path="/usr/src/linux-headers-2.6.12-10" (adapt it)
$ sudo apt-get install libsdl1.2-dev
$ sudo apt-get install zlib1g-dev
Then check that everything is correct with:
$ ./configure
If everything is correct and you recieve no errors, proceed with:
$ make
Correct output to make will go on and on and output a lot of text...
If you did'nt get any errors you are now ready to install. If you get any errors or this does'nt work at all, make sure you have a gcc compiler in your system.
By default Ubuntu is not installed with gcc so there is a high probability that you need to install it through apt or synaptic. Choose the 3.4 version of gcc not the 4.0 or superior there are some problems with qemu and 4.0 version of gcc. Also do a link between gcc and gcc-3.4 like this ln -s /usr/bin/gcc-3.4 /usr/bin/gcc
Now we are ready to install:
Note: Please check AgenT's suggestion of doing checkinstall instead of make install: http://www.ubuntuforums.org/showthre...873#post200873
$ sudo make install
If everything went ok, you can now start the qemu with the command
$ sudo modprobe kqemu
Then we need to make this start when the computer boots
$ sudo vi /etc/init.d/bootmisc.sh (or another editor...)
Add these lines to the end just before "exit;"
# Start Qemu with KQemu accelerator
/sbin/modprobe kqemu
mknod /dev/kqemu c 250 0 # Create the KQEMU device
chmod 666 /dev/kqemu # Make it accessible to all users
Step 2. MAKING A VIRITUAL DISK WITH QEMU
First create a directory for the guest OS's. This should be done as the user you will use while running the guest OS
$ cd /home/your username
$ mkdir Qemu
$ cd Qemu
Then we will create the virtual hard drive, in my case for Win2k I used 8 gigabyte for Win2000. We set the size with the (amount)M
$ qemu-img create hd.img 8000M
But there is a known bug with Win2K (only one? ;o) ) so create it rather with:
$ dd if=/dev/zero of=hd.img bs=4096 count=2000000Otherwise you can have a not space enough place on c: error after a 2 hours installation process (High frustration level guaranted believe me especially at the third attempt in a row).
Step 3. INSTALLING THE GUEST OS
So... we now have the disk and need to install something on it..
first lets have a look at the options for booting with Qemu
-boot gives the parameter of which device to boot from.
a = floppy
d = cdrom
c = hard drive
-fda /dev/fda
will tell qemu where to find the floppy drive
-fda /path/to/your/bootdisk.img
will tell qemu to boot from a bootdisk image. You can download images from www.bootdisk.com
PS: you can download an .exe bootdisk extractor and open it with Archive Manager and extract the bootdisk image
-cdrom /dev/cdrom
will tell qemu where to find the cdrom drive.
-cdrom /path/to/your/install_cd.iso
will tell qemu to use an iso instead of your cdrom drive.
-hda /path/to/your/new/viritual/hd.img
Will tell qemu which viritual harddrive to use. you can also use secondary drive with -hdb /path/to/your/new/viritual/secondary/hd.img
So here we go... If we have a bootable install cd and just want to use the cdrom drive, this is how it goes:
$ qemu -win2k-hack boot d -cdrom /dev/cdrom -hda hd.img
If you need to start with different parameters, just modify and add to the end. If you install Win98, dont forget to add -no-kqemu at the end.
Alternatively you can first copy the cdrom on the hard disk (quicker?)
$ dd if=/dev/cdrom of=win2000.iso(When the installation ask you to reboot, change the -boot d flag to -boot c for the virtual hard drive) seems not to be necessary.
Proceed to installation via:
$ qemu -win2k-hack -boot d -cdrom win2000.iso -hda hd.img
Step 4. STARTING THE GUEST OS
Well.. we're sort of already there, again it's mostly just to change the -boot flag
$ qemu -boot c -cdrom /dev/cdrom -hda hd.img -m 256 -k fr-be &
Description of other flags used in this startup:
-k fr-be
Keyboard layout.. works with some languages (not needed but can't be bad to specify it see qemu man for further explanations)
-m 256
Amount of memory provided the guest OS
Note: I will not go into details about networking here.. at least not yet. Internet should probably work from the guest without any modifications. To set up shared folders between the guest and the host, a tip is. Install samba, then share the folders with SMB and add the flag -smb /shared/folder to your startup command.
Step 5. PERFORMANCE TWEAKING THE GUEST OS
Before you start tweaking the guest OS.. just copy the hd.img
$ cp hd.img hd.img.backup
Now find a good performance tweek site on the net for removing all unwanted processes for your OS
Win2000: http://www.techspot.com/tweaks/win2k...es/print.shtml
EDIT: Additional information from sebdah
For you guys who wants to tweak WinXP: Check TweakXP.com, it should be everything you need!
Step 6. CREATING A LAUNCER
Now finally you may want a launcher for your new OS..
Rightclick on the panel where you want to create the launcher and choose:
(The panel is the bar at the top of your screen)
Add to Panel > Custom Application Launcher >
Name: win2000 (or something else devil2k?)
Command: qemu -boot c -cdrom /dev/cdrom -hda /path/to/your/hd.img -m 256 -k fr-be &
Choose an icon for you new OS
Note: modify the command starter after your needs.
About networking
By using the option `-net user' (default configuration if no `-net' option is specified), QEMU uses a completely user mode network stack (you don't need root priviledge to use the virtual network). The virtual network configuration is the following:
QEMU VLAN <------> Firewall/DHCP server <-----> Internet
| (10.0.2.2)
|
----> DNS server (10.0.2.3)
|
----> SMB server (10.0.2.4)
The QEMU VM behaves as if it was behind a firewall which blocks all incoming connections. You can use a DHCP client to automatically configure the network in the QEMU VM. The DHCP server assign addresses to the hosts starting from 10.0.2.15.
In order to check that the user mode network is working, you can ping the address 10.0.2.2 and verify that you got an address in the range 10.0.2.x from the QEMU virtual DHCP server.
Note that ping is not supported reliably to the internet as it would require root priviledges. It means you can only ping the local router (10.0.2.2).
When using the built-in TFTP server, the router is also the TFTP server.
When using the `-redir' option, TCP or UDP connections can be redirected from the host to the guest. It allows for example to redirect X11, telnet or SSH connections.
CHANGING CD'S IN THE GUEST
Some people have reported problems changing CD's while running the guest OS.
rcerreto has posted a solution here:
http://ubuntuforums.org/showpost.php...&postcount=256
LINKS TO USEFULL INFORMATION
http://fabrice.bellard.free.fr/qemu/index.html
http://fabrice.bellard.free.fr/qemu/qemu-doc.html
http://www.debian-administration.org/?article=40
http://oui.com.br/n/content.php?article.21
http://www.carlsonhome.net/computer_help_log.php
Free Operating System Zoo
http://free.oszoo.org/
Have fun... and report me with any error confusion or other problem (copyright or other)
16 décembre 2005
Adaptateur Wifi D-Link USB DWL-122 ss linux PPC
I installed linux-wlan-ng from universe repository, modified /etc/wlan/wlan.conf and copied /etc/wlan/wlancfg-DEFAULT to /etc/wlan/wlancfg-"your_ssid_here" and edited that accordingly.
I then created the following script to run whenever I need it (DHCP-no WEP configuration):
#!/bin/sh
sudo modprobe prism2_usb
sudo rmmod prism2_usb
sudo modprobe prism2_usb prism2_doreset=1
sudo wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
sudo wlanctl-ng wlan0 lnxreq_autojoin ssid="your_ssid_here" authtype=opensystem
sudo dhclient wlan0
Somepeople report that they had to execute the "sudo wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable" line twice to get the interface up.
For an static IP config with WEP (hexadecimal key), here is the script:
#! /bin/shSo you can easily mix the two scripts for e.g. DHCP-WEP configuration support.
#
# Wireless USB setup
#
# Step 1 - enable wireless USB for wlan0
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
# Step 2 - set SSID for your network
wlanctl-ng wlan0 lnxreq_autojoin ssid=stayoutofmynet authtype=opensystem
# Step 3 - set WEP attributes
wlanctl-ng wlan0 lnxreq_hostwep encrypt=true decrypt=true
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11PrivacyInvoked=true
# Step 4 - set WEP key
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKeyID=0
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKey0=12:34:56:78:9A
# Step 5 - set IP configuration
ifconfig wlan0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
route add default gw 192.168.1.11
Enjoy wireless on PPC Linux!
Clavier PowerBook & Ubuntu PPC Breezy 5.10
vi be pour un clavier belge par exemple