# PC Engines ALIX.2D2 - any one used one?



## saxon3049 (Sep 6, 2009)

Has any one used the PC Engines ALIX.2D2 at all? I am thinking of getting one for a cheep single board computer to play with and I am looking for some information on the performance, reliability and general comments.


----------



## mix_room (Sep 7, 2009)

While I have not used the .2D2, I have used the old WRAP boards, aswell as the Alix.2C3 and both the .3*2 and .3*3. 
Works great as a wireless AP. 

I am currently having a bit of a hard time with one of my .2D3 boards as it will not recognize my IDE HDD. But it works fine with a CF card.


----------



## honk (Sep 9, 2009)

I'm absolutely happy with my Alix 2D3. I'm running FreeBSD 7.2-RELEASE and use it with an Mini-PCI wireless card as access-point (hostapd) and firewall (pf). I use a 4GB CF-card which is completely encrypted with GELI (initial boot via PXE). Unfortunately they have a very simple BIOS (tinyBIOS), so boot from USB is not possible. I'm going to buy another ALIX board as external web/dns/mail-server these days. No noise, very low power consumption, no heat problems... Since I know these boxes I don't understand the guys playing with the poor NSLU's or WRT54*'s.

cheers,
honk


----------



## overmind (Sep 14, 2009)

Do you guys have any minimal kernel configs for alix board? I had such config on FreeBSD 6.x, removing everything you do not need, keeping only network driver vr. I am interested in such config since it makes kernel smaller and will boot faster.

Check the following links, it might be interesting for you:

http://www.freebsdonline.com/content/view/591/506/   FreeBSD Minimal Kernel Config File for PCENGINES ALIX BOARDS

http://www.freebsdonline.com/content/view/589/506/   Install FreeBSD on an PCENGINES ALIX Boards

http://www.pcengines.ch/pdf/alix2.pdf    Here is a PDF doc for Alix board

I have 3 alix boards working nicely for almost a year now. From time to time my ISP connection is broken, I call technical support and they ask me to reboot the router and sometimes they say is my problem, well, for over a year now, it never was alix's or FreeBSD's fault, it always was my ISP's fault. So those small boards are reliable. If 500 Mhz cpu is enough, this is a way to go. And don't forget it has some hardware encryption support for 128 bits i think, this should help if you are using VPN software.

Alix are designed in Swiss and manufactured in Taiwan which I think is better than China. If you look at board it seems a good quality printed circuit, well that's my opinion. There's also Soekris, but those are more expensive.

Also I've found interesting some hardware from: http://www.lex.com.tw/ . They have also Via and Atom motherboards, boards are smaller and you can add a SATA 2.5 inch hard drive. I did not tested FreeBSD yet on them but after I do, I'll tell you, in a separate post, on Hardware thread.

Best Regards.


----------



## aragon (Sep 14, 2009)

Have you looked at NanoBSD?


----------



## mix_room (Sep 14, 2009)

overmind said:
			
		

> There's also Soekris, still from Swiss but those are more expensive.


Soekris is an american company.


----------



## saxon3049 (Sep 14, 2009)

Soekris tend to be a little over priced I have looked at them in the past but there is something that put's me off them.


----------



## overmind (Sep 15, 2009)

Yes, Soekris are overprices. Also I purchased from them a minipci and a pci encryption hardware (their vpn boards) and had trouble to make it work under bsd, I wrote to their support but nobody replied back to me. Well, I was evaluating their products for a big project but no reply. I would expect even a reply like: "hello, here is a link how to configure and how our hardware works on Linux. We do not support FreeBSD, or here is a link for FreeBSD but we do not support it."

mix_room@ you are right, I've updated my post.

If you use Alix with Compact Flash don't forget to 
mount your partition(s) with "noatime", from /etc/fstab, so your CF will last longer. (access time will not be written to CF if you do a 'cat filename', or a ls on a dir.)


----------



## mix_room (Sep 16, 2009)

overmind said:
			
		

> If you use Alix with Compact Flash don't forget to mount your partition(s) with "noatime", from /etc/fstab, so your CF will last longer. (access time will not be written to CF if you do a 'cat filename', or a ls on a dir.)



Another tip is to use a pre-configured script, such as tinybsd (others are also available, but I have only tried tinybsd), to create a image which you can copy to your CF-card. This has been the method of choice for me. Mounting the image on a 'proper' computer allows you to make any last minute changes which may be necessary before flashing the flashcard.


----------



## saxon3049 (Sep 20, 2009)

Do you think that nanobsd would be a more suitable install than tinybsd? or would tiny be the way to go, I have only played round with linux in the embedded environment before.

If any one has any suggestions of alternative boards I am all ears, soekris are to pricey and alx boards are a little to hard to source in the UK on a regular basis any way.


----------



## aragon (Sep 20, 2009)

saxon3049 said:
			
		

> Do you think that nanobsd would be a more suitable install than tinybsd? or would tiny be the way to go


They both look like different ways of accomplishing the same thing.


----------



## overmind (Sep 21, 2009)

Because of high capacity compact flashes you can install a full FreeBSD. Then recompile kernel on a regular PC and replace it.

This can be done easely by removing CF and placing it on an external compact flash reader. Then boot your FreeBSD install cd and you will see the CF as a hard drive (da0 usualy) and you can directly install it on CF.

After instalation mount the CF root partition and change your /etc/fstab because Alix will see CF as 'ad' not 'da'.

On a 1GB CF you can install even FreeBSD 8.0 easely.


----------



## saxon3049 (Sep 22, 2009)

Well I want to keep the install as small and as light as possible but if i can get a full install on a CF card I am willing to give it a shot.


----------



## overmind (Sep 22, 2009)

I have 3 Alix and I use them, two of them are with Compact Flash, one of them is with an IDE 2.5 hard drive.

I have on all Alix boards a FreeBSD minimal installed from ISO.

I also have a FreeBSD machine where I compile from ports and I create packages for my Alix boards.

I used picobsd and nanobsd in the past. Were useful for a 16MB CF, or 32 MB CF. Is not the case anymore.

If you really want you can build your own OS based on FreeBSD, then you could take boot sector, boot loader, a minimal kernel, minimal file sistem structure, binaries and libraries and config files and make it the way you like. If you want to do that, you can study build scripts they use in projects like http://www.pfsense.org/  or http://m0n0.ch/wall/

If you want to build a router OS that really will work forever on your CF, make it to boot from a read only medium and mount everything in memory (using memory device aka md). After boot process you can run a script that reads configuration from a config file to set up the system.
Place that config file on other partition that can be mounted also read-write so you could be able to write configs. Mounting the file system in memory makes it work only until next reboot, so you will not be able to install applications (to add new applications you must rebuild the image), those will be lost after reboot, also you have a limited amount of memory. Those are bad things. Good things are: your Compact Flash will last forever since almost no writes will be made to CF, only writes to config file will be made from time to time, only when you configure it. Also by mounting the file system in memory it makes possible to update your OS easely, by overwritting the Compact Flash, because after boot everything is in memory, nothing on CF.

In my opinion, for a home/small office use, the best way is to install a minimal FreeBSD from ISO distribution, then recompile kernel removing everything you do not need and mount partition (you will need only one partition) with "noatime". If you have lot of activity in your log files is better to disable logging and send your logs to a log machine if logs are important, so that way you will protect the CF card.

I use alix for almost 2 years, my CF cards are ok, I had no problem with it. I also used in the past CF for other dual core systems booting from a IDE to CF adapter, that are file server with Samba, and also I had no problem with them.

It all depends on time you have to spare.


----------



## aragon (Sep 22, 2009)

Actually I like NanoBSD.  Once you've installed it with a flash card adapter it's pretty easy to upgrade over the network with the disk images that NanoBSD generates.  Easier than hauling the flash card out my router I'd say...


----------



## mix_room (Sep 22, 2009)

overmind said:
			
		

> I have 3 Alix and I use them, two of them are with Compact Flash, one of them is with an IDE 2.5 hard drive.



Did you have to do anything special to get the IDE HDD to be recognized? Mine does not want to boot from the HDD. With or without CF does not make a difference, it seems as though the HDD takes over both IDE channels. Perhaps you could give me a hint in the right direction.


----------



## overmind (Sep 22, 2009)

You must go to Alix's bios, using 'S' key during memory test (which is quickly). And there configure LBA for hard drive, and Wait for hard drive.

Do not choose UDMA (for me did not worked preety well with UDMA).

If after you did that you cannot boot from hard drive even if you installed properly, maybe you wrongly connected the hard drive to the Alix board. 

When you plug you Alix power source do you hear the sound of hard drive initializing? If you hear nothing then you hard drive cable is wrong connected.

(take a picture with your board + cable + hard drive, and show me a link)

I assume you are connected to alix via a serial cable an you can see boot messages and kernel booting from Alix. I am using minicom app from freebsd ports on a FreeBSD PC. If you use windows on your PC, you have hyperterminal, but you must of course have a serial port which is hard to find these days on a computer.


----------



## mix_room (Sep 23, 2009)

overmind said:
			
		

> You must go to Alix's bios, using 'S' key during memory test (which is quickly). And there configure LBA for hard drive, and Wait for hard drive.
> If after you did that you cannot boot from hard drive even if you installed properly, maybe you wrongly connected the hard drive to the Alix board.


Did you install directly on the ALIX board? Or did you connect the harddrive to another machine while installing? I did my installation on another machine, and then transferred the hardrive to my ALIX-board. 



> When you plug you Alix power source do you hear the sound of hard drive initializing? If you hear nothing then you hard drive cable is wrong connected.


Yes, I hear the harddrive spinning up. But to no avail. 



> (take a picture with your board + cable + hard drive, and show me a link)


I was about to say that I had tried all possible combinations, but then I realised that there were many more than I had thought about. This may be the case.


----------



## overmind (Sep 23, 2009)

I've used an external rack on USB and I've installed on other computer. It is possible to directly install only if you boot from network. (you cannot boot from USB on Alix).

So, it is working now?
Is important to see the error message. When you start Alix, first you see  bios mesages (memory check) which is on serial speed of 38400.

What software you use to connect to serial? You must configure your serial terminal client to the same speed as Alix which is 38400, to see boot messages and enter bios. After you've passed bios messages and kernel is booting de bootloader knows to send to serial on speed 9600, so to proper see boot messages you must re-configure terminal to speed 9600.

If you have a FreeBSD PC, install minicom, there you can change serial speed on the fly. I did not compiled my boot with 38400 speed so I change my minicom speed after FreeBSD boot process starts.

Probably the best way is to recompile bootloader to work at speed 38400, so both bios Alix and freebsd boot will work at 38400 and you will see the error.

For me it did not work from start, first it says, cannot boot then I realised my hard drive is not working and then it says it cannot boot after it detected the hard drive. At that point I removed my drive, I put in an usb case and on other computer I've replace boot again with:

boot0cfg -o packet -B -m 0xf da0

Please note that on your PC, the usb drive might be da0, but on alix will be ad0 again, well this is not a problem.

After you did this steps it should work. If it will work and boot but you can't login then is the problem that you did not modified /etc/ttys and /boot/loader.conf with proper settings for serial console.


----------



## mix_room (Sep 23, 2009)

overmind said:
			
		

> So, it is working now?
> Is important to see the error message. When you start Alix, first you see  bios mesages (memory check) which is on serial speed of 38400.


I have no idea. I am still at the office, and I have my ALIX machines at home. So no luck, probably won't be able to check today at all. 

I have no problem connecting, the machines work wonderfully with CF-cards, playing around with the serial console, etc. It is only the booting from harddrive that is causing problems. I appreciate you taking your time to explain the aspects of minicom/speed settings/etc etc. But that is already taken care off. 

If I remember correctly, the error message was something like 
	
	



```
No boot device detected
```



> I've replace boot again with:
> boot0cfg -o packet -B -m 0xf da0


This seems interesting, what does this command do? 



> If it will work and boot but you can't login then is the problem that you did not modified /etc/ttys and /boot/loader.conf with proper settings for serial console.


Again, thanks for the tips. But my problem concerns only the booting portion.


----------



## overmind (Sep 23, 2009)

```
boot0cfg -o packet -B -m 0xf da0
```

It will replace your boot record with a new one (it will install boot0 boot manager). You have all options explained properly in 'man boot0cfg' better that I could explain. I use this command if after a windows installation I lose boot sector. "No boot detected" was the message I get too, before re-adding the boot sector. Maybe FreeBSD installation do not place a boot sector on a usb drive, I don't know...


----------



## overmind (Sep 28, 2009)

*Did you solve the problem?*

And if yes, what was the cause you could not boot from hard drive?

Please note that on Alix board you have a VIA padlock feature that allows you (if you load proper driver in FreeBSD) to use hardware encryption. This is useful for ssh for example.


----------



## mix_room (Oct 20, 2009)

overmind said:
			
		

> And if yes, what was the cause you could not boot from hard drive?



Sorry that I have not replied earlier, I have had more important things to do. Unfortunately FreeBSD is only a hobby, so work and family have to come first.


I started the Alix-machine up again, and it works partially now: 


```
FreeBSD/i386 boot
Default: 0:ad(0,a)/boot/kernel/kernel
boot: PC Engines ALIX.2 v0.99h
640 KB Base Memory
261120 KB Extended Memory
Waiting for HDD ...

01F0 Master 427A WDC WD2500BEVE-00WZT0
Phys C/H/S 16383/16/63 Log C/H/S 16709/255/63 LBA

F1   FreeBSD
F2   FreeBSD

Boot:   F2
-
FreeBSD/i386 boot
Default: 0:ad(0,a)/boot/loader
boot: -
```
However, the boot loader does not go any further. It keeps spinning. Does this mean that I am missing a portion of the boot-loader? Similar to http://forums.freebsd.org/showthread.php?t=5516


----------



## overmind (Oct 20, 2009)

It seems you've installed boot loader and not just boot sector for booting from hard drive. And boot loader somehow does not see the partition to boot from (partition might not be active)

did you try:
[cmd=]boot0cfg -o packet -B -m 0xf da0[/cmd]

with hard drive put on a normal PC ?


----------



## mix_room (Oct 25, 2009)

overmind said:
			
		

> did you try:
> [cmd=]boot0cfg -o packet -B -m 0xf da0[/cmd]



No. I ended up installing OpenBSD instead. Was going to reinstall FreeBSD from scratch, but only had 7.0-Release CDs lying around, aswell as some brand new OpenBSD ones. Now it boots wonderfully, no problem at all. I assume that there was something wayward with my FreeBSD installation. May give it another try when 8.0 is released.


----------

