Posted on May 18th, 2011 1 comment
I thought that using a USB sound card with Linux would be easy, just plug and play, but I was wrong, it seems. Plugging in the Terratec Aureon Dual USB (ID: 0ccd:0077) that I bought rendered a promising output from dmesg and lsusb, and lsmod showed that even relevant modules were loaded. The problem was that mpd and other programs did not find any way to actually output sound to any device. They had the firm belief that my system was lacking any sound card. Maybe I would need some sound related packages?
aptitude install alsa-base alsaplayer alsaplayer-text alsa-utils
No luck… The mpd configuration file /etc/mpd.conf seemed mostly confusing when it came to output devices, and the wiki page it referred to did not help either. A search with Google on the USB ID was helpful though, as usual. Someone with the alias BigRon also had problems with Debian and this Terratec USB sound card. The results from his attempts, documented with verbose output, was similar to mine. User bandan’s reply was the beginning of the end of my trouble! I had to edit /etc/modprobe.d/alsa-base.conf to comment out a line preventing USB devices from becoming the first (default) device, substituting it for a line with the opposite effect.
## Keep snd-usb-audio from beeing loaded as first soundcard<br/> #options snd-usb-audio index=-2
# Fix from http://forum.doozan.com/read.php?2,4119,4166<br/>
- Allow snd-usb-audio to be loaded as first soundcard options snd-usb-audio index=0
Now I was at least able to get alsamixer to acknowledge the mere existence of a sound related device, but alas it chose an input only device (most likely my Logitech webcam with microphone) as the default device even though it called the Terratec one default by name. Luckily for me the just mentioned forum thread linked to a more substantial thread describing the problem in more depth. I added myself and the mpd user to the audio group, to make sure that there would not be any problems with permissions regarding the devices
addgroup jadler audio addgroup mpd audio
Posted on May 12th, 2011 No comments
I am not sure whether it is caused by the Ubuntu 10.10 amd64 running on my workstation or on some bug in the Emdebian package, but I do have a hard time to get Emdebian installed. I have tried Multistrap, Debootstrap, and Debian Installer, and I have done it on the Alix computer using PXE boot, on my workstation (followed by chroot etc), and on virtual machines using qemu/kvm or Virtualbox, but so far no luck.
All of this makes it less and less attempting to actually install any Emdebian based Debian, and so I gradually turned back to Voyage Linux. When I was browsing the Voyage site I learned about Debian Live, the system that “punkytse” uses to create the Voyage images, and also offers for download under tha name “Voyage SDK”. So now I am testing Debian Live and trying to learn more about it.
For those interested in PC Engines Alix the Alix forum may also be a good source of information.
(I should really find a better WordPress theme, I know…)
Posted on May 10th, 2011 No comments
After publishing I realized that I could have supplied more information, and more downloads, than I did in my previous post.
Here are links to patched versions of Debian netboot.tar.gz (stable/Squeeze, testing/Wheezy and daily build), all downloaded and patched today, 2011-05-10:
I have also made a diff file for the stable mod.
What my script does, basically, is this:
- Untar the tarball and cd to debian-installer/i386/boot-screens/ where all changes are made.
- In the file syslinux.cfg (which is actually a file with PXELINUX configurations) two lines are added:
- serial 0 38400—telling PXELINUX to use ttyS0 for I/O (i.e. as console).
- console 0—do not try to use any video console
- In the files adtxt.cfg, rqtxt.cfg and txt.cfg substitute any occurence of vga=788 for ttyS0,38400n8. This is done in order to tell the kernel that:
- There is no graphic/video console
- The console that should be used is the first serial port, and with the specified settings.
This is a simplification, since my script also includes a variable for the number of the serial port, in case your console is not on ttyS0. I have not included any such convenience regarding speed and other settings for the serial port chosen.
Posted on May 8th, 2011 No comments
I have found it to be quite nice to be able to boot the Alix board over the network using PXE. Using the Debian netboot.tar.gz tarball and TFTP I can boot the Debian Installer or a rescue system, and the former lets me install Debian Linux without physically touching the CF.
In order to make netboot use the serial port as console I have patched the Debian netboot tarball, and I made a script that does all the patching, just for you…
The script will modify the file syslinux.cfg in order to make PXELinux use the serial port, and the files adtxt.cfg, rqtxt.cfg and txt.cfg to make sure that the Linux kernel (actually the Debian installer in this case) also uses the serial port as console. (Look at the script to see the actual changes. You should of course have a look at it before running it, anyway.)
Making my ancient Netgear WGT634U running OpenWRT serve PXE images was really a no-brainer. In the Services/Dnsmasq page I entered the three choices shown below, with the patched netboot untarred on a USB stick mounted on /mnt/sda2.
References (other that links above):
- http://www.debian.org/releases/stable/i386/ch04s05.html.en—about setting up a TFTP server for netboot.
- http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html—as above, for dnsmasq
- http://www.debian-administration.org/articles/478—more on dnsmasq
- http://etherboot.org/wiki/dnsmasq—even more on dnsmasq and PXE
Some more patching lets me use preseeding too, but more on that another time.
Posted on May 3rd, 2011 3 comments
I have been wanting to try an Alix SBC from PC Engines for some time now, and 10 days ago I finally did order one.
Thorough as I am I checked lots of sites (mostly within the EU) for prices, shipping, availability and range of accessories. In the end I chose to place my order at Gooze.
I had no trouble at all with my order from Gooze, they were very helpful and kind. I got a mail asking why I had ordered antennas and pigtails but no wifi card. I explained that I was looking for a dual band card, and that I had not seen one in their web shop. Nine minutes later I got a reply saying that they had a Wistron DNMA-92 in stock, and that they would be able to add it to my order and still ship it the same day. Easter holidays delayed the shipping a bit, as expected, but early morning next business day the package arrived, and my new found friends at Gooze had even mounted the board in the case, the wifi card on the board, and pigtails and antennas where they should be.
I do not hesitate to recommend Gooze for anyone looking for an Alix system. They also have some useful tutorials on their site regarding Alix-iana, and even more on smartcards and security. (Their site inspired me to order a smartcard reader with Linux support, the Feitian R-310, and a blank smartcard, Feitian PKI, formerly known as Feitian FTCOS / PK-01C.
On a side note, I actually placed my order at 14:50 on Wednesday April 20. Gooze promise that orders placed before 15:00 will be shipped the same day, so when my order status had not changed the next day I wrote to them and politely asked if the order status update was slow or if something else had happened. I also made it clear that I was not at all in a hurry and had no problem waiting for my stuff. Within minutes Jean-Michel Pouré of Gooze wrote back to me explaining that the entire staff had been to London for a day on a business trip. He apologized and promised to add another smart card to my order at no extra cost. I had not expected anything like that, and I would have been quite happy just to know that my order had arrived and would be shipped some day. That is really a good way to make happy (and returning) customers.
Currently I am trying to find the “perfect” way to install Linux on this little gem, most likely Debian in some form. I have tried Voyage, a customized Debian for embedded platforms with explicit support for Alix boards (including the three front panel LED’s and the temperature sensors), and I think it might be good for a system as this one I would prefer to know what customizations are made and why. I would be more comfortable setting up the system myself from the ground up.
Gooze has a few nice howto’s on Alix stuff, and I also tested the Debian installation suggested. They suggested installing the netboot tarball to a CF partition, boot from this and using the Debian Installer to install the latest stable version (Squeeze). This went fine, but I ended up with a system that felt a bit too bloated, considering that it is embedded. Documentation and man-pages are fine, but I feel no desperate need to waste a lot of flash memoryon an embedded system for it. When I need documentation I can use my workstation or the web.
A concept that appeals to me more is the Emdebian project, proper Debian adapted for embedded systems. The idea is right, the documentation sucks (or I am not able to find it). The Emdebian flavor Grip seems to be about minimizing dependencies to an absolute minimum, and also stripping documentation from packages. They process the actual Debian packages, remove unnecessary parts and repack them. You would normally have both Emdebian and classic Debian repositories, so that packages that are not yet Emdebianized/Grip:ed will be pulled from the normal Debian repositories.
This sounds like the best of two worlds, the most common 10 % of the Debian packages are available from Emdebian, being smaller and having less dependencies, and anything I want from the remaining 90 % is still available for installation. I suspect that any vanilla packages that I install will be “upgraded” to Emdebian style if they are converted in the future.
But my current self imposed task is to work out a good (or “perfect”) way to install a basic Emdebian system to use as a start for my customizations. The Emdebian site recommends a tool called multistrap, being somewhat similar to but different from debootstrap. It will create a basic rootfs, but there is not a lot of information on how to proceed to a bootable CF image. I have found some tutorials using debootstrap, but I am not sure if they apply since the tools work in different ways. I will get back about this soon, I think.
Lastly, I tested OpenWRT too, that I have running on my current router/firewall etc (an ancient Netgear WGT634U). My first attempt at compiling an image for Alix did not work out (though OpenWRT does have explicit support for Alix), probably some misconfiguration on my side, but I tested with a plain x86 image that I downloaded, it worked just fine, and compared to all other Linuces I tested this one was definitely the fastest! It boots in maybe 20 – 40 % of the time the others need, and system shutdown is even faster relative to the competition. It does not have the backbone of the huge Debian community, but the sheer speed of it still makes it interesting as an alternative.