How to: Install 1.2.2 on ALIX with IDE HDD (obsolete)
-
DO NOT FOLLOW THESE INSTRUCTIONS WITH VERSION 1.2.3
see http://forum.pfsense.org/index.php/topic,21688.0.htmlpfSense 1.2.2 full install with packages works wonderfully on the PC-Engine ALIX board. All the features of a PC but only useing 10 watts of power. An ALIX will pay for itself in about 18 months on energy savings alone.
There are a couple problems with the base 1.2.2 install that will prevent you from booting however, so a few manual corrections need to be made after you finish the initial install from the CD:
- The wrong boot block is written to disk. The correct one are installed in the /boot/ directory however.
- A kernel option needs to be added to /boot/loader.conf so that the IDE transfer speed is correctly detected.
I have prepared a simple install script for the ALIX w/IDE if you care to download it from
http://nw-ds.com/downloads/alix_ide_122.tgz
You will need to have a FreeBSD machine with the ALIX IDE drive installed to make use of the script.- tar -zxf alix_ide_122.tgz
- cd alix_ide_122
- install.sh
The script will prompt you for the IDE drive to overwrite with pfSense and confirm before doing anything. It will then create three slices on your drive. First a boot/recovery slice, second the pfSense slice, and thirdly a backup slice to use in future upgrades. While this seems a bit complicated it really makes long term maintenance much easier, there is even a script /root/restore_original.sh which will reinstall 1.2.2 in case some future change messes up your running system.
If you want to install 1.2.2 to an ALIX IDE manually here are the instructions.
This example ASSUMES that the HDD is ad0. Keep in mind that the ALIX bios doesn't support booting from large drives and it is strongly recommended that you create a small boot slice (partition) at the beginning of the drive.- Use 1.2.2 CD and install the "embedded kernel" option on your drive.
- Select the standard boot blocks, not GRUB.
- After installation is complete you will need to reboot. Don't boot off the HDD but rather the CD
- Select option 8 for a “Shell” command prompt
- cd /tmp
- mount /dev/ad0s1a /mnt
- cp /mnt/boot/mbr .
If your drive is not “ad0” you will need to edit your /etc/fstab file in step 8 - vi /mnt/etc/fstab (replace your drive designation with ad0)
- echo 'hw.ata.ata_dma_limit="4"' >>/mnt/boot/loader.conf
- umount /mnt
- fdisk -Bb mbr ad0
You will still need a serial cable on boot to correctly assign the NICs to LAN/WAN. Keep in mind that the default baud rate for the ALIX is 38400 not 9600, so you will need to enter the bios setup and change it to 9600. If you don't want to use a serial cable you may wish to edit the config.xml file between step 8 and 9.
8a) vi /mnt/cf/conf/config.xml
Look for the lines <lan>and <wan>changing the NICs specified on the lines below to vr0 and vr1. I use vr1 as my WAN as it's the middle one which is easy to identify.</wan></lan> -
Good post, made it a sticky.
-
can i run the installation to the hdd connected to alix with pfsense installed Compact flash?
-
You will need to have a FreeBSD machine with the ALIX IDE drive installed to make use of the script.
Nice post. Thanks!
Can anyone recommend a bootable CD distro with FreeBSD that can be used to make these changes? I would only need a temporary BSD "installation" to run this script.
-
Can anyone recommend a bootable CD distro with FreeBSD that can be used to make these changes? I would only need a temporary BSD "installation" to run this script.
The pfSense live CD should work fine.
-
Error in step 7??
-
step 7 should be cp /mnt/boot/mbr .
Last step fails (when doing inside vbox) with "class not found message" after parition table change is confirmed. -
My contribution to this thread…
STILL UNDER WORK
I will try to make it more readable (no image because to heavyI used many information of this thread to complete my setup including information found googling.
I thought creating a new thread but since this one is existing…
(I might create a separate one if needed and asked)How to install pfSense version 1.2.3 RC1 to an HDD on ALIX IDE "alix2d13" using VMWare
Can be compatible to few other ALIX boards type -> I can't test all :-
The ALIX "alix2d13" has internal IDE available, 3 LANs, 2 USB and the COM port (no VGA)
For more information, please check here http://pcengines.ch/alix.htmBefore starting :
1) Download latest pfSense installation CD (no need to burn it - store in place accessible from your VMWare)
2) Install and setup VMWare if not made already
3) Get your DB9F-DB9F null modem cable ready (mandatory for correct installation)Information
Few interesting things to notes…| WHAT | - | on VMWare | - | on ALIX |
| HDD | - | SCSI -> da0 | - | ad0 <- IDE |
| LAN1 | - | can vary | - | vr0 -> Closest to the USB ports (I choose for LAN) |
| LAN2 | - | can vary | - | vr1 -> Middle (I choose for WAN) |
| LAN3 | - | not needed | - | vr2 -> Closest to the COM port (I don't use yet) |
| WIFI | - | not needed | - | ath0 -> Internal Wireless card if existing (mini-PCI) |
| Serial | | | | 38400 by default -> must be set to 9600 ! |For this installation, I split my HDD into 3 slices (4GB, 4GB, *GB (remaining)) since I heard the ALIX got troubles with HDD > 4GB.
I can't confirm it. Maybe someone else could…VMWare
1) Prior starting VMWare, connect your 2.5 HDD device on the USB port or any other way.
The disk don't need to be formatted and can contain anything but, everything will be ERASED !
Note : I always plug the HDD device BEFORE starting VMWare.2) The first time…
Create a virtual machine with (everything can be adjusted AFTER the creation of the VM if needed);-
New virtual machine/Custom/Guest operating system -> Other/FreeBSD
-
256MB RAM
-
No floppy (if asked)
-
2 Networks virtual connectors (NAT or anything - THEY MUST BE 2 !!!!)
-
Assign the pfSense installation CD on the virtual CDROM (Use ISO image)
-
Add an HardDrive using type "Use a physical disk" then select "PhysicalDrive1" ******* with "Use entire disk" option.
-
Other options are not relevant
******* The "PhysicalDrive" number depend on your system.
******* Try to create a VM without your HDD connected then connect it…
******* The correct number should be the last one usually but BE CAREFULL CHOOSING or you might loose one of your drive !3) Start the VMWare machine and enter setup (F2).
Adjust boot option to CDROM first.You're done with the initial setup of the VMWare machine.
pfSense
1) Start the VMWare machine
When asked…-
n -> to the VLAN
-
manually enter the LAN and WAN (they should be visible - my VMWare gave me em0 and em1)
-
bypass the Optional 1 (just keep it empty and press return)
-
y -> to proceed !
2) Once you have the menu, select 99 and wait for the "gui installation"
3) Title : Configure Console
Set your "Keymap" -> make life easier once the pfSense is installed and you want to get the console ;D
< Accept these settings >
…
Title : Select Task
< Install pfSense >
…
Title : Select a Disk
You should have only 1 HDD (da0)
Select it en press enter
…
Title : Format this Disk?
< Format this disk >
…
Title : Select Geometry
Do NOT change anything
< Use this Geometry >
…
Title : ABOUT TO FORMAT! Proceed ?
< Format xxx >
…
Title : Partition Disk ?
< Partition Disk >
…
Title : Edit Partitions
The place we create slices !
According some information ALIX do not support primary bigger than 4GB
I cannot confirm this since I did not test it.
So let's create a 4GB slice and a second one with the remaining space.
To do so…Size (in sectors) Partition Type Active
8401932 FreeBSD X- FreeBSD
< Accept and Create >
…
Title : Select a Partition
Select the first line (with number 1)
Press enter
…
Title: Are you SURE?
< OK >
…
Title : Select Subpartitions
Do NOT change anything
< Accept and Create > -> the system will do the work. can take few minutes.
…
Title : …(s)
Select < Embedded kernel (no vga console, keyboard) >
…
Title : Install Bootblock(s)
Do not change anything.
DO NOT INSTALL GRUB !!!!!
< Accept and Install Bootblocks >
…
Title : …(s)
< Reboot >4) The system will restart on the CDROM again.
- Repeat point 1
At the pfSense menu choose : 8 (Shell)
5) The main idea is to modify the configuration to make it compatible with ALIX
This is including the fstab, the loader and pfSense configurationcd /tmp
mount /dev/da0s1a /mntSince the VMWare SCSI disk is define as da0 and ALIX IDE is ad0
we have to change the fstab.- Replace all da0 by ad0 !
vi /mnt/etc/fstab
Once done, we have to do some change on the loader configuration.
These changes are related to ;-
DMA
-
Console
I got few problem with the DMA configuration.
In order to avoid loosing more time, I deactivated the DMA.
Not the nicer way but at least it works.
I will spend more time soon (maybe someone can already fix the configuration for me ;o)It can be done with "vi" or "echo" command
ECHO way
echo 'comconsole_speed="9600"'
echo 'console=comconsole'
echo 'hw.ata.ata_dma="0"'VI way
vi /mnt/boot/loader.conf
Once done we have to alter/modify the pfSense configuration for the LANs
This is done through the VI tool…vi /mnt/cf/conf/config.xml
Look for the lines **<lan></lan>**and **<wan></wan>**changing the NICs specified on the lines below to and .
-> I use vr1 as my WAN as it's the middle one which is easy to identify
-> vr0 is the closest LAN port to the USBWe are don and need to "unmount" the HDD…
unmount /mnt
You can now stop your virtual machine (quit then halt)
Stop VMWare and unmount your USB drive from Windows.ALIX
ALIX initial baud rate is 38400.
Setup your terminal correctly (putty is a good one)1) Remove any FlashCard
2) Connect the HDD drive
3) Add option (wireless or anything else)4) Go to the BIOS (when power on ALIX, press S IMMEDIATELY)
-
Fix speed to 9600 <- to match de default configuration pfsense
-
Activate HDD delay if needed (I did even if not needed…)
-
DO NOT ACTIVATE HDD slave
-
DO NOT ACTIVATE DMA
-
Quit (quit save)
WARNING -> Since you change baud rate speed to 9600, you have to reconnect with this settings !
5) You might have some garbling at the beginning but this is fine.
Then…
-> All fine and you have the pfSense menu
or
-> You have to define the LAN assignment again (might happen if you have added an option (internal WIFI) or anything else)
I assigned the WAN to the vr1 because it's on the middle. Easy ;o)6) Connect your computer to the LAN port (the one you choose)
Get an IP address… connect to the router (check your ipconfig /all)You should be done.
Now... you need to setup pfSense.Issues / Questions
-
Do a slice > 4GB works on an ALIX board ?
-
How to make the DMA working on ALIX ? -> check answer by martin42 -> the kernel must be patched and rebuild !
-
-
Nice work!!
I'm planning to install pfsense on an alix too. And to avoid the problems with reading and writing too many times on the compact flash I'm thinking about using a 2.5" ide drive. But now I have some questions. Is there space enough in the alix enclosure to place the ide disk? Could you upload some pictures to see how you have made the install?
Thanks -
I wish my 2C2 Alix had the IDE pins to run a HD. I think only the 2Dx versions have the pins though.
Ive never tried to stuff a 2.5" HD in a standard Alix case but it looks like:
1. It wouldnt fit
2. If it did fit, operating temperature might become an issue.So either the hard drive would have to be outside of the case, or a larger enclosure (mini-itx) would be necessary
-
@onhel:
I wish my 2C2 Alix had the IDE pins to run a HD. I think only the 2Dx versions have the pins though.
Ive never tried to stuff a 2.5" HD in a standard Alix case but it looks like:
1. It wouldnt fit
2. If it did fit, operating temperature might become an issue.So either the hard drive would have to be outside of the case, or a larger enclosure (mini-itx) would be necessary
MoBo has installed it successfully, I would like to know what type of eclosure he has used. Mini-itx enclosure back holes don't fit with alix2d3 connexions.
It would be nice to have some pictures. -
No way you can place a 2.5" hard drive inside a PC Engines enclosure (like the one i have), but you can in other enclosures like http://www.applianceshop.eu/index.php/alix-parts/parts/deciso-tiny-enclosure-1.html
I don't think temperature could be an issue if you use the case as a heat sink.
I will check the 4gb partition issue as soon a i get one of those 44 pin IDE cables. -
Hi guys,
I'm working on a PDF file with screen capture with all steps.
Take more time than expected :PAnyway, to answer questions related to the enclosure, I did it the "bad way" ; HDD is outside the enclosure on soft "feutre" (a french word I cannot translate - soft things you put under you tables, chairs to avoid marking the floor).
Since my pfSense is in a safe place, inside and no risk or water or anything else, it's just PERFECT.
The good point is ; the day I will need to update it, it will just be SO easy.Check the pictures below…
-
Just to followup the first post in this thread, specifically step 9).
The sysctl flag, hw.ata.ata_dma_limit is not implemented in FreeBSD: it only works if you patch the ATA driver. So if your hardware needs this flag to stop FreeBSD from trying to run the DMA too quickly, then you will need to rebuild the FreeBSD kernel with my little patch. See: http://www.freebsd.org/cgi/query-pr.cgi?pr=123980&cat=kern
Like MoBO said, you can use hw.ata.ata_dma="0" to turn DMA off altogether. You can set this in /boot/loader.conf but to start with, if your system won't boot, this may be impossible! To set it temporarily before the system boots, at the console boot menu you can hit option 6 (Escape to load prompt) then at the "OK" prompt, type:-
OK set hw.ata.ata_dma=0
OK bootHope this helps
-
Thanks martin42 for this information.
I might try to rebuild the kernel once (I never done a FreeBSD kernel - I use to compile Gentoo kernel).
Can you create a smal "how to" to patch the pfSense kernel ? :PIf the Alix UDMA option is off and you add the hw.ata.ata_dma="0" it should work fine without error and you will be able to use pfSense until you rebuild the kernel (if you think it's needed).
To talk about the first post, some wrong information as been made bydsamms on point 7 and 11.
I can't figure out the need of the point 11 but, in point 7, you need to provide the name of the destination and according point 11 mbrSo….
7) cp /mnt/boot/mbr mbr
11) fdisk -Bb mbr ad0But again, can't understand the need of it (since the dev is wrong anyway and mount as da0). Maybe someone can explain.
-
Can you create a small "how to" to patch the pfSense kernel ?
Here is a generic version for FreeBSD. I've never tried rebuilding pfSense!
cd /usr/src/sys/dev/ata
fetch the patch, see http://www.freebsd.org/cgi/query-pr.cgi?pr=123980&cat=kern
this version is for FreeBSD 7.1-RELEASE only!
fetch http://net42.co.uk/downloads/ata-all.c.patch
cp ata-all.c ata-all.c.original
patch ata-all.c ata-all.c.patch
cd /usr/src
make KERNCONF=your_config buildkernel && make KERNCONF=your_config installkernel
rebootwhere your_config is your favourite kernel config file in /usr/src/sys/i386/conf/your_config. If you don't have your own favourite kernel config file, just miss out KERNCONF= completely, and the system will use /usr/src/sys/i386/conf/GENERIC as the config file.
As for the rest of it…. I haven't completely followed the thread, but ad0 is the first PATA hard disk, and da0 is the first SATA or SCSI hard disk. On some motherboards, SATA drives show as ad0 because the chipset emulates PATA anyway.
If you're seeing da0 then most likely you have SATA, and so you might not need to slow down the DMA anyway, I don't know. Certainly on my Soekris NET5501 boxes, the SATA works fine with default settings, and it's only PATA drives that have problems.
Good luck!
- Martin
-
No way you can place a 2.5" hard drive inside a PC Engines enclosure (like the one i have), but you can in other enclosures like http://www.applianceshop.eu/index.php/alix-parts/parts/deciso-tiny-enclosure-1.html
I don't think temperature could be an issue if you use the case as a heat sink.
I will check the 4gb partition issue as soon a i get one of those 44 pin IDE cables.Yes way… I drilled and tapered the holes on the top cover. Picked up some M3 0.55mm tapered head screws. The screws sit flush, the drive mounts underneath the top cover. The drive fits perfectly inside. It doesn't touch anything. As for heat, there's hardly any. I would describe the drive as cool/warm to the touch.
Check the photo... It can (and has) been done.
-William
-
I ran this HOW TO to install a IDE HD on my 2c2 with great success. I recently bought a 2D3 and cant seem to get it to run using the same instructions and using a recent 1.2.3 snapshot from July. Has something been changed in the recent snaps that would alter these instructions. With the current instructions I get a spinning | after the Alix BIos text and then it just stops there. ALIX Bios is .99h. Using an older snapshot works on installing to the IDE drive but then I get boot errors once I upgrade to a recent snap.
I was assuming that maybe since embedded kernels arent used anymore, since nanobsd seems to be the future of pfsense on embedded devices, that that's the reason why these instructions do not apply anymore. Just looking for some kind of confirmation or explanation to my scenario. Thanks in advance.
-
This is a great walkthrough! I followed it step-by-step for installing pfSense 1.2.3 RC1 onto a Seagate ST1 5GB MicroDrive in an Alix.2d3. Problem is it doesn't work :/
I don't know what's wrong :( I followed MoBo's guide, and after I plug in the drive and boot up the Alix, it boots up to the point where it displays "Default: F1" and sits there. I had a 4GB slice and installed pfSense to that (partitioned with * for / and 512MB for SWAP), and a 1GB slice formatted FreeBSD and left empty.
Does anyone know what I'm doing wrong? Or what else I should be checking? I checked the BIOS and I'm pretty sure UDMA was disabled (it had (U) instead of U I'm pretty sure that means it's disabled). I'll try 1.2.2 to see if it works, maybe like the previous poster suggested 1.2.3 RC1 won't work.
-
Hi,
First of all, THANK YOU MoBo for the explanation. I just installed pfsense in my brand-new ALIX with HDD in a couple of hours (including cable soldering)…
About FalconV problem, try to make ALIX "wait" for the HDD to get ready (setting W parameter on BIOS). Here is my BIOS config. pressing "S" while booting:
PC Engines ALIX.2 v0.99h
640 KB Base Memory261120 KB Extended Memory
Waiting for HDD ... <–- Try this01F0 Master 045A FUJITSU MHV2080AT
Phys C/H/S 16383/16/63 Log C/H/S 9729/255/63 LBABIOS setup:
9 9600 baud (2) 19200 baud (3) 38400 baud (5) 57600 baud (1) 115200 baud
C CHS mode (L) LBA mode W HDD wait (V) HDD slave (U) UDMA enable <–- Configuring it HERE
(M) MFGPT workaround
(P) late PCI init
R Serial console enable
(E) PXE boot enable
(X) Xmodem upload
(Q) QuitHope it helps.
Jose