Questa guida spiega come installare e configurare Debian GNU/Linux su Acer Aspire One |
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 package. The following table shows commands to create the correctly sized partitions for booting from your USB flash drive, found at [http://www.knoppix.net/forum/viewtopic.php?p=111677 this forum post].
Size of drive |
mkdiskimage command |
1GB or less |
# 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 |
greater than 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 |
Next copy over the contents of the boot.img.gz into a directory on your newly formatted USB flash drive;
# 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
Install SYSLINUX on the partition and subdirectory that contain the contents of boot.img:
# syslinux -d debian_installer /dev/sdz4
If you rename/move/modify this debian_installer directory you will need to run "syslinux" again afterwards or it will not boot.
Note: I tried doing this from Debian 4.0 (Etch). The syslinux package in Etch is rather outdated and doesn't support the -d parameter, and consequently the above instructions didn't work. Therefore, make sure you run an up-to-date version of syslinux. --?OddHenriksen
Install
Reboot your Aspire One with the USB stick in one of its USB sockets. When you see the BIOS screen, hit F12 to select the USB stick as the boot device. This will cause the Aspire One to boot the Debian installer from the USB stick.
When presented with the boot menu, you may need to pass "noacpi" to the kernel to get the Ethernet card to work.
After this, installation should proceed as normal; the installer will load the net-install ISO image's installer components and will continue the net-install procedure. Note that you will need a wired connection, as WiFi will not work in the installer.
Setup
Almost everything should work out of the box once installation finishes. However, the wireless card needs extra attention; it is based on a AR5007 chipset, which requires an updated driver. The status of support for the AR5007 chipset is tracked at http://madwifi.org/ticket/1192. The updated driver can be obtained from the madwifi-source package in Lenny or directly from ?MadWiFi svn.
A little note about WiFi and network-manager: It has been observed that network-manager does not work properly with the updated ?MadWiFi driver (incompatible hal, perhaps). You may need to configure the WLAN (e.g. ESSID, WEP/WPA) manually. Alternatively, wicd is performing beautifully for me. First remove network-manager, then add the following to /etc/apt/sources.list
deb http://apt.wicd.net lenny extras
then get the key:
wget -q http://apt.wicd.net/wicd.gpg -O- | sudo apt-key add -
then aptitude update, aptitude install wicd. See here for more info: http://wicd.sourceforge.net/download.php
Note: I had to create /etc/modprobe.d/options.local with the following contents
options acer_wmi wireless=1
before WiFi would work for me (Lenny, December 2008) - Keith Edmunds
WiFi via Module Assistant
Make sure you have a non-free and a contrib stanza in /etc/apt/sources.list - this is because madwifi is not considered free software according to debian. Then as root:
# apt-get update # apt-get install module-assistant # m-a prepare # m-a auto-install madwifi
WiFi from Source
Make sure to have build-essential and the relevant kernel headers installed, and follow the instructions at http://madwifi.org/wiki/UserDocs/FirstTimeHowTo, with reference to the information in http://madwifi.org/ticket/1192.
WiFi LED
If you've compiled ?MadWifi from the latest sources, you can enable the WIFI led by adding
dev.wifi0.ledpin=3 dev.wifi0.softled=1
to the end of /etc/sysctl.conf (or /etc/sysctl.d/madwifi.conf). It will activate at next reboot. These settings can be applied immediately by executing sysctl -p (or sysctl -p /etc/sysctl.d/madwifi.conf).
Webcam
Another piece of hardware that may not work after installation is the webcam. For this, you will need the uvcvideo driver. Simply checkout the latest revision of uvcvideo from svn://svn.berlios.de/linux-uvc/linux-uvc/trunk, and build it from source. (Note, again, the source package included in testing works.).
As of 11092008, the 2.6.26 kernel in testing includes the uvcvideo as a module. And it works very well.
Frequency scaling
Frequency scaling is supported via the acpi-cpufreq module. Loading this module will allow you to scale between 800 MHz and 1.6 GHz.
This module should be enabled on the default install.
Screen resolution
The highest video mode available from the video bios is 800x600x32. To get a fairly reasonable framebuffer for your virtual terminals pass "vga=8" to the kernel. This will give you a framebuffer of 800x600x16.
When running under X, the native/optimum resolution is 1024x600 (standard widescreen ratio). The default X11 configuration will give you fonts that are too large for this resolution - You can add the following line to the "Monitor" section of your "/etc/X11/xorg.conf" file:
DisplaySize 195 113
And add the line:
Option "NoDDC"
to the "Device" section.
That sets the resolution to the correct 96 DPI.
If you're using KDM and find that the DPI settings do not take effect, open /etc/kde3/kdm/kdmrc
find the line that reads ServerArgsLocal=-nolisten tcp and change it to ServerArgsLocal=-nolisten tcp -dpi 96
Card reader
The card reader is a J-Micron device. The left hand port (marked as storage expansion) exists as PCI ID 197b:2382, and the multi-reader on the right occupies PCI IDs 197b:2381, :2383 and :2384.
The card reader is hidden on power up and cold reset. There is no way to unhide the device without inserting a card into it (despite any claims elsewhere). The device appears to the host system when a card is inserted into either of the slots, at which point both left hand and right hand slots appear.
Many guides suggest using "setpci -d 197b:2381 AE=47" to unhide the device. This will ordinarily not work, because if the device does not appear to the host system, then the command will fail.
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.
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:
- Add this line to your /etc/fstab:
none /tmp tmpfs defaults 0 0
- Make directory /var/volatile
- Mount /var/volatile as a tmpfs volume (the command is "mount -t tmpfs none /var/volatile")
- Move /var/cache/apt to /var/apt. This way, /var/apt will not take up RAM (because it can become large when installing software).
- Move the cache, lock, log, run, mail, spool, and lock directories to /var/volatile.
- 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.
- 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
- 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:
Goto http://home.strangenoises.org/~rachel/aspireone/acerfand/ and download all the scripts acerfand and acer_ec.pl files, make them executable:
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
[http://en.opensuse.org/OpenSUSE_on_the_Aspire_One openSUSE]
[http://wiki.archlinux.org/index.php/Acer_Aspire_One ?ArchLinux] (Good information here relevant to both Arch and debian.)
[https://help.ubuntu.com/community/AspireOne Ubuntu] (Some more tips and tweaks which also work in Debian)
Where to buy
AOA110-1295 - http://www.newegg.com/Product/Product.aspx?Item=N82E16834115489