mardi 16 décembre 2008

bash 'type' function

$ type echo
echo is a shell builtin

$ type toto
bash: type: toto: not found

$ type which
which is /usr/bin/which



NAME
type - write a description of command type

SYNOPSIS
type name...

DESCRIPTION
The type utility shall indicate how each argument would be interpreted
if used as a command name.

jeudi 11 décembre 2008

distribution-specific information

Example :

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.1
Release: 8.04
Codename: hardy




lsb_release(1) lsb_release(1)

NAME
lsb_release - print distribution-specific information

SYNOPSIS
lsb_release [options]

DESCRIPTION
The lsb_release command provides certain LSB (Linux Standard Base) and
distribution-specific information.

If no options are given, the -v option is assumed.

mardi 2 décembre 2008

eee bug: Randomly changing mac-address [SOLVED ?]

Bon, en fait je me retrouve avec un p*** de problème pas bien documenté :
à chaque suspend, ma carte réseau se retrouve avec une nouvelle mac-address.

En soit c'est bien pour quand je suis dans un point d'accès anodin, mais au labo où l'IP est alloué en fonction de la mac-addr enregistrée, cela me pose justement pb.

Bon, reprenons.

Diagnostique :
dans le fichier /etc/udev/rules.fr/70-persistent-net.rules à chaque suspend ou hibernate je me retrouve avec une nouvelle entrée de la forme


# Converted from /etc/iftab on upgrade
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="xx:xx:xx:xx:xx:xx", ATTRS{type}=="1", KERNEL=="eth*", NAME="eth1"


mais ce fichier semble généré par "75-persistent-net-generator.rules".

Il y a des chances que ce soit le driver qui se plante et n'aille pas chercher au bon endroit en mémoire l'adresse MAC, donnant ainsi l'impression de la générer à chaque fois.


TO DO


SOLUTION ??? :: http://ge.ubuntuforums.com/showthread.php?s=4d9cb6139d81046390c9da0ac5f7e48f&t=770173&page=6

Autre solution ?????
http://forum.ubuntu-fr.org/viewtopic.php?id=168719
sudo modprobe -r forcedeth
sudo modprobe forcedeth
sudo /etc/init.d/networking restart
et donner les dernières lignes d'un dmesg après cette manip?






solution



Solution trouvée : remplacer le module atl1e par la version trouvée ici :

ATL1E Linux Driver for Ethernet controller: Attansic Technology Corp. Unknown device 1026 (rev b0)
CAUTION: Do NOT confuse this with the ATL1 Driver (without the "E" at the end)









Copy from : http://jan.ucc.nau.edu/wal2/atheros_attansic.html
in order not to loose it.
########################################################################################

ATL1E Linux Driver for Ethernet controller: Attansic Technology Corp. Unknown device 1026 (rev b0)

CAUTION: Do NOT confuse this with the ATL1 Driver (without the "E" at the end)


Symptoms: On an Asus Eee PC 1000H running Ubuntu 8.04 (Hardy Heron) with the 2.6.24-19-generic kernel


lspci yields:

03:00.0 Ethernet controller: Attansic Technology Corp. Unknown device 1026 (rev b0)

and the wired ethernet is nonfunctional.


In addition to what I've written below, you should also read:


http://ubuntuforums.org/showthread.php?t=770173&page=2



http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492029
 
(In Debian, the module will be included in the 2.6.26 kernel.)


In my case, since I had rebooted the machine many times before building the module (see below for building),
udev had added a bunch of lines for "newly discovered"
ethernet cards with all different MAC addresses,
so I had to edit /etc/udev/rules.d/70-persistent-net.rules and delete ALL lines for ethernet devices
named eth0, eth1, eth2, etc.

(See

http://ubuntuforums.org/showthread.php?p=3869356

but do NOT change
75-persistent-net-generator.rules as that post says).


The following worked for me to build the module on an Asus Eee PC 1000H running Ubuntu 8.04 (Hardy Heron).


Jie Yang at Atheros mailed me the Version 1.0.1.0 driver source,
and I saved it as filename
l1e-linux-v1.0.1.0.tar.gz .

md5sum for the tarball above: d83196e507f9b2bea47514ba97fffd6f
sha1sum for the tarball above: 1f6a1ee6280add6e4c8d2f110ecd176c6f0e9134

Do all of the following as root:

Install the build-essential package: apt-get install build-essential

Make a new directory somewhere named l1e-linux-v1.0.1.0

cd into that new empty directory and tar -zxvf /some/dir/l1e-linux-v1.0.1.0.tar.gz

cd to the "src" directory in the module source tree

KBUILD_NOPEDANTIC=1 make
The above should succeed with no errors or warnings.

KBUILD_NOPEDANTIC=1 make install
Expect a warning like "cannot write to /var/cache/man/cat7/atl1e.7.gz in catman mode".

Edit /etc/modules and add on a line by itself,
atl1e
as the first non-comment line, then reboot.

After rebooting, verify the driver loaded as follows:

$ dmesg|grep Atheros

Atheros(R) AR8121/AR8113/AR8114 PCI-E Ethernet Network Driver - version 1.0.1.0
Copyright (c) 2007 Atheros Corporation.

$ sudo modprobe -l atl1e
/lib/modules/your-kernel-version/kernel/drivers/net/atl1e/atl1e.ko

This driver, atl1e, should NOT
be confused with the atl1 driver (which has a lot of info at http://atl1.sourceforge.net/
but which is not pertinent here).

Until the atl1e kernel driver module is included in the Linux kernel, the above build process
will have to be repeated every time you start running a new kernel.











Some links



Reduire l'utilisation du ventillo :
http://hartvig.de/2008/howto-reduce-fan-noise-level-on-the-eee-pc-900-1000-1000h-part-ii/

Laisser le dd se reposer :
http://doc.ubuntu-fr.org/laptop_mode

Contrôler quelles itf réseau sont ouvertes, lesquelles ne le sont pas :
http://greg.geekmind.org/eee-control/

Plus général :
http://doc.ubuntu-fr.org/asus_eee_pc_1000h

encore plus général :

http://www.netvibes.com/ramvi#Ubuntu_Eee