Differences between revisions 30 and 31
Revision 30 as of 2009-02-17 08:30:07
Size: 25640
Editor: ?MarcoA
Comment:
Revision 31 as of 2009-02-17 08:36:47
Size: 25342
Editor: ?MarcoA
Comment:
Deletions are marked like this. Additions are marked like this.
Line 162: Line 162:

A script to poll the card reader for power events (AC unplugged, etc.) is included on the recovery DVD shipped with the machine within the "hdc1._.tar.bz2" archive as /usr/sbin/jmb38x_d3e.sh. This script runs once every 5 minutes and adjusts the power level depending on the system power state.

[:DebianWiki/EditorGuide#translation:Translation(s)]: [:DebianAcerOne:en] [:ru/DebianAcerOne:ru]

(!) ["/Discussion"]


Questa guida spiega come installare e configurare Debian GNU/Linux su Acer Aspire One

http://www.tommasovitale.it/images/AcerAspireOne.jpg

Il progetto ["DebianEeePC"] contiene una cospicua documentazione per giungere ad una corretta installazione di Debian su computer con processore Atom; questa pagina è dedicata esclusivamente all' Acer Aspire One. È possibile avviare il debian-installer da Lenny o una immagine recente senza la necessità di materiale del progetto DebianEeePC.

?TableOfContents(3)

Premessa

Questa pagina è stata scritta come aiuto all'installazione di Debian GNU/Linux sul Netbook Acer Aspire One. Essa contiene anche informazioni addizionali relative all'installazione dei driver necessari e alle ottimizzazioni del sistema.

Requisiti

Ci sono molti metodi possibili per installare Debian. Un modo per installare Debian sul Acer Aspire One consiste nell'usare una chiavetta USB. Questa potrebbe essere la scelta principale, dato che l'Acer Aspire One è sprovvisto di lettore CD-ROM. Occorre una chiavetta USB da almeno 256MB. Il metodo suggerito di seguito spiega come ottenere una chiavetta USB avviabile con il programma di installazione Debian al suo interno. Per altri metodi di installazione si faccia riferimento alla [http://d-i.alioth.debian.org/manual/en.i386/ Guida all'installazione].Qualora si usasse un altro metodo di installazione, ci si assicuri che l'installazione avvenga con un kernel 2.6.25 o superiore, che assicura il pieno supporto della nostra scheda di rete ethernet (se necessario durante l'installazione stessa).

Preparazione della chiavetta USB

Scarichiamo la versione più aggiornata dell'immagine di boot di Lenny (testing): [http://people.debian.org/~joeyh/d-i/images/daily/hd-media/ boot.img.gz drive image] e l'ultima versione dell'immagine ISO della versione[http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/ netinst]. È fondamentale la versione del kernel nell'immagine boot.img.gz e nell'ISO net-install sia la stessa! Se le due versioni non coincidono, l'installer non sarà in grado di riconoscere l'hardware e l'installazione fallirà.

Creazione di una chiavetta USB di boot

Come è riportato nella [http://d-i.alioth.debian.org/manual/en.i386/apas02.html#howto-getting-images-usb Guida all'installazione di Debian GNU/Linux]: "Il modo più semplice per preparare una chiavetta USB è scaricare hd-media/boot.img.gz e usare gunzip per estrarre l'immagine da 256 MB da quel file."

Questo metodo riduce temporaneamente le dimensioni della chiavetta USB a 256MB, ma è semplice porvi rimedio. Si può sempre decidere di ripartizionare la memoria una volta usata per installare Debian.

[N.d.T. È anche possibile partizionare la chiavetta prima della scrittura dell'immagine di boot suddetta, usando ad esempio il noto programma [http://gparted.sourceforge.net/ GParted] per creare una partizione da circa 256MB all'inizio della chiavetta stessa, in modo da rendere utilizzabile lo spazio eccedente].

Per mantenere la dimensione originaria della chiavetta (d'ora in avanti chiamata talvolta flash drive) mantenendo il programma di installazione in essa, riferirsi al paragrafo Creazione del flash drive e copia di software aggiuntivo più avanti.

Prima di copiare l'immagine di boot (boot.img) e l'immagine netinstall nella chiavetta USB, assicurarsi di avere una copia recente dei propri dati, sia di quelli contenuti nel flash drive che quelli contenuti nell'Aspire One. Per cominciare, troviamo il file di dispositivo del flash drive dalla riga di comando (premere Alt+F2 per aprire una shell sull'Acer One). Attenzione, usare un errato file di dispositivo equivale a cancellare i dati contenuti in quel dispositivo. Supponendo che il flash drive sia riconosciuto come /dev/sdz, eseguire il seguente comando come utente root:

# zcat /path/to/boot.img.gz > /dev/sdz

Fatto questo, montare il flash drive e copiare in esso l'immagine ISO net-install.

Nota: Ho provato ad eseguire queste operazioni su una Debian 4.0 (Etch), che si è rifiutata di montare il flash drive dopo averci copiato l'immagine di boot boot.img.gz con zcat. Comunque, nessun problema si è avuto montando la chiavetta su una Lenny. Il mio consiglio, qualora si incontri lo stesso problema, è quello di provare a copiare la ISO netins da una Lenny o da un altra distribuzione --?OddHenriksen

Nota 2: Con Debian Etch ho usato questo sistema: => http://manurevah.com/blah/en/linux/debian-usb-boot.php

Nota 3: Se la chiavetta USB non viene inserita prima di avviare la macchina, l'opzione di boot da dispositivo USB non comparirà nel menu di avvio attivabile premendo il tasto F12.

Creazione del flash drive e copia di software aggiuntivo

Volendo utilizzare per intero la chiavetta USB contenente il net-installer Debian, si può dapprima montare in loop l'imagine boot.img.gz, copiarci dentro i files aggiuntivi e quindi eseguire SYSLINUX (un bootloader) sulla chiavetta stessa. Se la chiavetta è già adeguatamente formattata per il boot, è possibile saltare quest'ultimo passo.

La chiavetta va formattata in modo da renderla avviabile (USB-ZIP compatibile). Per far questo occorre eseguire lo script mkdiskimage, incluso nel pacchetto syslinux. La tabella seguente elenca i comandi da usare per creare la partizione di boot della dimensione voluta, come descritto in [http://www.knoppix.net/forum/viewtopic.php?p=111677 questo forum].

Dimensione del drive

comando mkdiskimage da eseguire

drive < 1GB

# mkdiskimage -4 /dev/sdz 0 64 32

1GB < drive <= 2GB

# mkdiskimage -4 /dev/sdz 0 128 32

2GB < drive <= 8GB

# mkdiskimage -F -4 /dev/sdz 0 255 63

drive > 8GB

# mkdiskimage -F -4 /dev/sdz 1 255 63?BR# dd if=/dev/zero of=/dev/sdz bs=1 seek=446 count=64?BR# echo -e ',0\n,0\n,0\n,,C,*' | sfdisk /dev/sdz?BR# mkdosfs /dev/sdz4

Ora copieremo, dopo averlo decompresso, il contenuto dell'immagine boot.img.gz in una opportuna directory del drive USB formattato al passo precedente:

 # gunzip boot.img.gz; mkdir /mnt/loopback; mount -o loop boot.img /mnt/loopback;
 # mkdir /mnt/usb; mount /dev/sdz4 /mnt/usb; mkdir /mnt/usb/debian_installer;
 # cp -r /mnt/loopback/* /mnt/usb/debian_installer
 # cp debian-XXX-netinstall.iso /mnt/usb
 # umount /mnt/usb; umount /mnt/loopback

Infine installiamo SYSLINUX sulla partizione e nella sottodirectory che abbiamo creato, cioè quella dove abbiamo copiato i files contenuti nell'immagine boot.img:

 # syslinux -d debian_installer /dev/sdz4

Qualora avessimo rinominato/modificato/spostato la directory debian_installer, dovremo nuovamente eseguire "syslinux", altrimenti la chiavetta non si avvierà.

Nota: Ho provato ad eseguire la procedura suddetta da una Debian 4.0 (Etch). Il pacchetto syslinux in Etch è piuttosto vecchio e non supporta il parametro -d, per cui i comandi sopra indicati non funzioneranno. Quindi bisogna assicurarsi di avere una versione aggiornata di syslinux. --?OddHenriksen

Installazione

Riavviare l'Aspire One con la chiavetta USB inserita in una delle porteUSB. Non appena compare la schermata del BIOS, premere il tasto F12 e selezionare la chiavetta USB come dispositivo di boot dall'elenco. In questo modo verrà avviato il programma di installazione di Debian dalla chiavetta USB.

Quando compare il menu di boot potrebbe essere necessario aggiungere "noacpi" ai parametri del kernel per ottenere il corretto funzionamento della scheda di rete.

Fatto questo, l'installazione dovrebbe procedere normalmente; il software di installazione caricherà i componenti da installare prelevandoli dall'immagine ISO net-install e continuerà la procedura di installazione da rete. Si noti che è necessario avere una connessione con cavo di rete, dato che durante l'installazione la connessione WiFi non funzionerà.

Configurazione

Quasi tutto l'hardware sarà funzionante fin da subito una volta terminata l'installazione. Tuttavia la scheda wireless richiede qualche attenzione in più; essendo basata sul chipset AR5007, dovremo installare driver più aggiornati. La situazione relativa al supporto del chipset AR5007 può essere seguita su http://madwifi-project.org/ticket/1192. Per ottenere il driver aggiornato si può scaricare il pacchetto madwifi-source in Lenny o direttamente il sorgente dall'archivio svn di ?MadWiFi.

Una piccola annotazione relativa all'interazione tra WiFi e network-manager: si è constatato che network-manager non funziona correttamente con i driver aggiornati di ?MadWiFi (forse per incompatibilità con hal). Può rivelarsi quindi necessario configurare manualmente la WLAN (es: inserendo ESSID, WEP/WPA). Come alternativa, wicd è ottimo secondo me. Per installare wicd occorre prima di tutto rimuovere network-manager, e quindi aggiungere la riga seguente al file /etc/apt/sources.list:

deb http://apt.wicd.net lenny extras

successivamente, per ottenere la chiave di cifratura, aprire una console e digitare (da utente normale):

wget -q http://apt.wicd.net/wicd.gpg -O- | sudo apt-key add -

oppure, da utente root:

wget -q http://apt.wicd.net/wicd.gpg -O- | apt-key add -

infine eseguire i comandi aptitude update, aptitude install wicd. Per maggiori informazioni: http://wicd.sourceforge.net/download.php

Nota: Io ho dovuto creare il file /etc/modprobe.d/options.local contenente la riga seguente:

options acer_wmi wireless=1
  • per avere un corretto funzionamento della connessione WiFi (Lenny, Dicembre 2008) - Keith Edmunds

Nota2: Io non ho dovuto disinstallare network-manager prima di installare wicd: ho usato il comando "apt-get install wicd" che prontamente ci informerà che per installare wicd si procederà a disinstallare network-manager (Lenny, Gennaio 2008) - MarcoA

Installazione dei driver WiFi usando Module Assistant

Assicurarsi di aver attivato i repository non-free e contrib nel file /etc/apt/sources.list - dato che madwifi non è considerato software libero secondo le specifiche di Debian. Quindi, aprire una console e digitare come utente root:

# apt-get update
# apt-get install module-assistant
# m-a prepare
# m-a auto-install madwifi

Installazione dei driver WiFi dai sorgenti

Assicurarsi di aver installato il pacchetto build-essential e gli headers del proprio kernel, quindi seguire le istruzioni indicate in http://madwifi-project.org/wiki/UserDocs/FirstTimeHowTo, con riferimento alle informazioni contenute in http://madwifi-project.org/ticket/1192.

LED WiFi

Se si è compilato ?MadWifi dai sorgenti più recenti, si può abilitare il LED di segnalazione del WiFi aggiungendo:

dev.wifi0.ledpin=3
dev.wifi0.softled=1

alla fine del file /etc/sysctl.conf (oppure in /etc/sysctl.d/madwifi.conf). Il led verrà attivato al prossimo riavvio. Queste impostazioni possono essere anche applicate immediatamnte, eseguendo il comando sysctl -p (oppure sysctl -p /etc/sysctl.d/madwifi.conf).

Webcam

A partire dal 11092008, il kernel 2.6.26 incluso in Debian testing contiene il driver uvcvideo compilato come modulo, e funziona correttamente. In caso contrario seguire il resto del paragrafo.

Un'altra periferica che potrebbe non funzionare correttamente dopo l'installazione è la webcam. Per il suo funzionamento occorre installare il driver uvcvideo. Basta semplicemente scaricare la versione più recente di uvcvideo da svn://svn.berlios.de/linux-uvc/linux-uvc/trunk, e compilare il codice sorgente così ottenuto. (N.B. Il pacchetto dei sorgenti presente in Debian testing funziona correttamente).

Controllo della frequenza della CPU

Il controllo della frequenza del processore è supportato attraverso il modulo acpi-cpufreq. Caricando questo modulo è possibile scalare la frequenza tra 800 MHz e 1.6 GHz.

Questo modulo dovrebbe già risultare abilitato dopo l'installazione predefinita.

Risoluzione dello schermo

La modalità video più alta disponibile sul bios video è 800x600x32. Per avere un framebuffer ragionevole per i terminali virtuali si può passare il parametro "vga=8" al kernel.Questo permetterà di avere un framebuffer di 800x600x16.

In modalità grafica, la risoluzione ottimale è 1024x600 (rapporto widescreen standard). La configurazione predefinita di X11 darà caratteri troppo grandi per questa risoluzione. Per ovviare a questo basta inserire la riga seguente nella sezione "Monitor" del file "/etc/X11/xorg.conf":

DisplaySize  195 113

e la riga seguente nella sezione "Device":

Option     "NoDDC"

Questo fa in modo di impostare correttamente una risoluzione di 96 DPI.

Se si usa KDM come display manager (es. installando KDE invece di GNOME, N.d.T.) e si osserva che le impostazioni della risoluzione sopra riportate non hanno effetto, basta aprire il file /etc/kde3/kdm/kdmrc e sostituire la riga ServerArgsLocal=-nolisten tcp  con la riga ServerArgsLocal=-nolisten tcp -dpi 96 

Lettore di schede di memoria

Il lettore di schede è un dispositivo J-Micron. La porta di sinistra (denominata "storage expansion") è identificata dal sistema come PCI ID 197b:2382, mentre il lettore multiformato di destra è identificato con PCI ID 197b:2381, :2383 e :2384.

Il lettore di schede è inattivo sia all'avvio che dopo un reset. Non c'è modo di attivare il dispositivo senza inserire una scheda (nonostante affermazioni contrarie riferite da alcune parti). Il dispositivo compare nel sistema quando una scheda viene inserita in uno dei due slot, dopodiché entrambi i dispositivi vengono mostrati.

Molte guide suggeriscono di usare il comando "setpci -d 197b:2381 AE=47" per mostrare il dispositivo.Questo normalmente non funzionerà, perché se il dispositivo non compare sul sistema il comando non avrà effetto.

Uno script che interroga il lettore di schede dopo eventi legati all'alimentazione (disconnessione dalla rete elettrica ecc.) è contenuto nel DVD di ripristino venduto insieme al computer, all'interno dell'archivio compresso hdc1._.tar.bz2, e precisamente il file Iusr/sbin/jmb38x_d3e.sh. Lo script viene eseguito ogni 5 minuti e corregge il livello dell'alimentazione in funzione dello stato del sistema.

The current testing and unstable kernels have trouble with memstick modules causing a soft lockup. It is advised that the modules for this are blocked. Debian bug 500058 has been raised for this issue.

http://www.nabble.com/Debian-netbook-aspire-one-td19141623.html gives a solution to repair the situation. Modifying the path so that it does not cause configuration file conflicts with module-init-tools, create a file /etc/modprobe.d/aspire-blacklist-memstick with the following contents:

blacklist jmb38x_ms
blacklist memstick

There is no need to adjust the udev configuration.

The simplest way to activate both card slots is to create a file /etc/modprobe.d/aspire-fix-sd-slots with the following contents:

options pciehp pciehp_force=1 pciehp_slot_with_bus=1
install sdhci for i in 2381 2382 2383 2384; do /usr/bin/setpci -d 197b:$i AE=47; done; /sbin/modprobe --ignore-install sdhci

Lastly, add the following line to /etc/modules:

pciehp

The 'pciehp' module will allow the card slots to appear as hotplug devices. Once a card is inserted, the 'install' line in the modprobe configuration will set the controller up to behave appropriately, and then load the sdhci driver. hal should spot the cards being inserted, and either GNOME or KDE should automatically mount the cards when inserted.

Audio

Audio should work correctly in unstable. Just ensure the follow line is in place to make sure the model is autodetected and DMA position fix workaround is enabled:

options snd-hda-intel model=auto position_fix=1

In order to get audio working in Lenny, you must retrieve ALSA source package (alsa-source_1.0.17.dfsg-2) from unstable (sid) repository because 1.0.16 (timer.c) fails to compile on Lenny. After adding unstable repository to /etc/apt/sources.list you can continue to build and install ALSA. [no longer necessary - 1.0.17 is now in Lenny] Instructions below are borrowed from Ubuntu Install guide and are confirmed to work with kernel 2.6.26-1.

# apt-get install module-assistant
# m-a update
# m-a prepare
# m-a a-i alsa
# alsa force-unload
# depmod -ae
# modprobe snd-hda-intel

NOTE: You may need to run "m-a a-i alsa" twice in order to build the modules successfully.

After completion, add the required module to /etc/modules

 snd-hda-intel 

After reboot you should have functional sound. Remember to comment out unstable repository from apt's sources.list. See Ubuntu Install guide for further configurations with snd-hda-intel module.

Note: The internal microphone did not work for me and this appears to be a known issue according to the Ubuntu site about this model (see below). One proposed solution is to use alsa version 1.0.18a. -- KapilHariParanjape

The snd-hda-intel module included in kernels 2.6.25+ will work just fine without installing any alsa packages. However in kernels 2.6.26+ a new snd module was added " snd-pcsp". This module if loaded before snd-hda-intel will casue a conflict and bad sound quality. If you have this problem, blacklist snd-pcsp or if you do like annoying beeping sounds add

options snd-pcsp index=2

to /etc/modprobe.d/alsa-base to load the module correctly

Some people have reported that the sound stops working after suspending and then resuming if this happens to you, add the following to the end of /etc/modprobe.d/alsa-base  options snd-hda-intel model=acer 

Troubleshooting

Since these instructions involve using the latest available net-install ISO image and the latest USB installer image, you may encounter some difficulties.

One such difficulty the author experienced was that the USB stick image did not have the nls_utf8 kernel module available, preventing the installer from mounting the ISO image. The "fix" was to grab the nls_utf8 kernel module from a working Debian system with the same kernel version, put it on the USB stick, execute a shell from the installer, and insert the nls_utf8 module manually before continuing.

The Aspire One has a RealTek RTL8101E Fast Ethernet controller, which uses the r8169 driver in kernels after 2.6.23. Earlier kernels (i.e. 2.6.18) will detect the card and you will see an eth0 device, but it will not be usable. The author used the driver that shipped with Debian's 2.6.25-2-486 kernel image without any problems after passing "noacpi" to the kernel at boot time. (Note, I haven't needed "noacpi" on my Acer One at all, so it is probably not necessary). With the kernel version that will likely appear in Lenny (2.6.26-1), no special options needed to be passed - the network card got detected and worked just fine.

This is likely a bug in the Aspire One's hardware/firmware, but at the time of this writing it does not detect an SD card insertion in either of the card slots. However, rebooting the computer with the card inserted will cause it to be detected (as /dev/mmcblk0). (The hardware requires a script to poll it; see above.)

Kernel versions lower than 2.6.25 cause modprobe to stall on boot, and the boot process will seem to hang. Waiting and pressing Ctrl-C a few times will allow the machine to boot. Once it's running you should update the kernel.

Also note, that on some stages (e.g., hardware detection) the system may seem to be hanging: try detaching eth cable from ?AcerOne. Note that with 2.6.26 no lockups have been observed.

Tips and Tricks

Reducing Disk Access

The SSD on the Aspire is somewhat slow (the author recorded a peak 28.8 MB/s read time with O_DIRECT and 7.0 MB/s write time). Consequently, you may want take extra measures to minimize disk I/O.

If you are using ext3 as your filesystem, you may want to add "noatime" and "nodiratime" to the options section of /etc/fstab. This will turn off timestamps on your files, but it will noticeably decrease the number of I/O ops.

Another trick is to mount /var/cache, /var/lock, /var/log, /var/run, /var/mail, /var/spool, /var/lock, /var/tmp, and /tmp on one or more ramdisks. Here are the steps to do this:

  1. Add this line to your /etc/fstab:

none /tmp tmpfs defaults 0 0
  1. Make directory /var/volatile
  2. Mount /var/volatile as a tmpfs volume (the command is "mount -t tmpfs none /var/volatile")
  3. Move /var/cache/apt to /var/apt. This way, /var/apt will not take up RAM (because it can become large when installing software).
  4. Move the cache, lock, log, run, mail, spool, and lock directories to /var/volatile.
  5. Symlink those directories in /var/volatile to their counterparts in /var. Now any I/O ops to files in these directories will happen on the ramdisk mounted on /var/volatile transparently.
  6. Optional: Put this script in /etc/rcS.d/S36setup-volatile.sh:

error() {
  echo $1; exit 1
}
echo "Setting up /var/volatile..."
mount -t tmpfs none /var/volatile || error "Could not mount /var/volatile!!!"
for i in cache local lock log mail run spool; do mkdir -p /var/volatile/$i
done
ln -s /var/apt /var/volatile/cache/apt
exit 0
  1. Enjoy a faster system!

WARNING: Using this method prevented me from installing some software. dpkg would give me segmentation faults when trying to install some packages that interact with /var/*, notably cups. This method will also kill your memory if you use pbuilder in the default /var/cache/pbuilder location. I would recommend being careful about this: --Daniel Moerner (dmoerner)

As an alternative and less complicated change, you can move /var/run and /var/lock to a RAM filing system simply by editing /etc/default/rcS and changing the following two lines:

RAMRUN=no
RAMLOCK=no

to:

RAMRUN=yes
RAMLOCK=yes

Stop Firefox from Loading Pages in the Background

Firefox downloads webpages from links it thinks you may click. This may make the experience seem faster but really it just bogs down Firefox and your netbook. Type ' about:config ' in the address bar, then set ' network.prefetch-next ' to ' false '

Faster Graphics Rendering

Using the below option in the Device section improves compiz performance about x2.

       Driver "intel"
        Option "AccelMethod" "exa"
        Option "MigrationHeuristic" "greedy"

and this in your /etc/profile

export INTEL_BATCH=1

Quiet Fan

IMPORTANT: acerfand has been tested on BIOS up to version 3305

ALSO IMPORTANT: Be warned that use of acerfand is not advised. Read http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501137 for details, and look out for a more graceful solution in future!

Aspire One by default commonly doesn't manage Fan speed correctly, resulting in a very noisy AA0. Solution:

 chmod a+x acerfand
 sudo cp acer_ec.pl acerfand /usr/local/bin/
  • To run it straight away:

 sudo acerfand
  • To run it at boot:

 sudo gedit /etc/rc.local

Insert the following line above the exit 0 at the bottom:

 /usr/local/bin/acerfand

The fan is not completely disabled. When the default temperature is reached (60ºC), fan works again. According to Intel, the Atom chip could work until 99ºC.

Optional: Above instructions will work fine, but if you want to define another temperature:

  • Create an /etc/acerfand.conf file. The file is just a shell script that sets up to three values. eg:

INTERVAL=5
FANOFF=60
FANAUTO=70

Those are the default values, if the /etc/acerfand.conf file isn't found.

INTERVAL is the polling interval in seconds

FANOFF is the temperature (in Celsius Degrees) at or below which to turn the fan off, if it's currently on auto

FANAUTO is the temperature (in Celsius Degrees) at or above which to turn the fan to auto, if it's currently off

Other distributions

Where to buy

AOA110-1295 - http://www.newegg.com/Product/Product.aspx?Item=N82E16834115489