Instead of adding this as a reply to another thread about FreeBSD/OpenSolaris on H340, I thought this guide deserved a thread of its own. But you can see my earlier posts in the other thread over here: http://forum.wegotse...solarisfreebsd/
After days of researching, debugging, and trying things out I'm happy to get FreeNAS to work on H340.
First things first, get either a X1 PCIe Video card like I did or buy a set of special cables for the debug header. I bought an ATI FireMV 2250 X1 PCIe video card for CAD ~$100. There may be cheaper ones available but that was all I could find locally on a short notice. If someone can find a cheaper X1 or X4 video card, let me know I'd be interested. If you're interested in the cables, this guy sells them: http://www.mediasmar....php?f=6&t=3980 . Alternatively you can make your own.
In theory, you could do this install blindly using nothing but keyboard, but I would not suggest doing that. Especially if something does not go according to plan.
Things you need:
H340 service manual, read it. It gives you a lot of information about the location of things on the motherboard, chipsets, etc. Available here or you can Google to find it:
http://support.acer....OK_20080226.pdf
You need 2 USB sticks.
One with FreeNAS embedded install. You can consult FreeNAS website on how to image it onto a USB stick. The other USB stick with Marvell driver for FreeBSD (if_myk.ko) and libmbpool.ko (dependency for the driver). Read the FreeBSD/OpenSalaris thread I linked to above for info on where to get these files. Make sure that they're both either 32bit or 64bit variety. Do not mix and match them. My install uses 64bit FreeNAS and, consequently, 64bit driver and module.
You could install FreeNAS onto a harddrive on another machine and then plug into H340, but I like FreeNAS much better when its running off a USB stick. This eliminates at least one point of failure (spinning disk) for my NAS and keeps the actual NAS OS install as small and as simple as possible. You need something like a 64Mb USB stick as a minimum for FreeNAS. I used 256Mb stick for FreeNAS and another one for the drivers.
How to:
1. Jump JP3 jumper on the H340 motherboard to enter BIOS
2. Attach your USB drive with FreeNAS and a keyboard to H340
3. Start the H340 and enter BIOS by hitting F2.
4. Change the BIOS boot order to let you USB drive be the first boot device and save the BIOS settings
5. Reboot you H340 and let FreeNAS boot up from your USB stick. Once it is done you will have no ethernet connection as the driver has not been loaded yet.
6. Attach the USB stick with two .ko files on it
7. Enter shell console (option 6) in FreeNAS menu
8. Create a mount point for your USB device and mount your USB drive to it. I created /mnt/usb. Also your device might be called differently. So you might have to change this around. Another assumption is that the USB stick with drivers is FAT/FAT32 formatted.
mkdir /mnt/usb mount_msdosfs /dev/da0s1 /mnt/usb
9. Run these two commands in order that they appear. This will load driver dependency and then the driver itself.
kldload /mnt/usb/libmbpool.ko kldload /mnt/usb/if_myk.ko
10. You should now have your Marvell GigE interface brought up and connected to your network.
11. Exit the shell
exit
12. Select option (1) in the FreeNAS menu to assign interface and select your interface. Should be myk0 (not lo0!)
13. Select option (2) in FreeNAS menu to set lan IP address (or configure via DHCP)
14. Now you device should have an IP address.
15. Using a web browser connect to this IP to get FreeNAS WebGUI.
16. Add a disk, format it if necessary and mount the volume/partition. Make sure you know what you're doing here, otherwise you might lose your data. Consult FreeNAS guides for more info.
17. Let's presume that your partition is mounted on /mnt/my_first_disk
18. Copy the two .ko modules (driver and its dependency) from /mnt/usb to /mnt/my_first_disk or some directory thereof. You can do it via shell or from FreeNAS WebGUI -> Advanced -> Execute command and run the copy command below. This will put the two drivers on your hard drive. Meaning without that drive mounted at that point your H340 wont have the network if you reboot it without these drivers available. I'm working out on how to slip these drivers straight into FreeNAS embedded image. And someone else already posted a feature request to include these drivers in the future releases of FreeNAS here: https://sourceforge....51&atid=782619. The more people will request it the more likely it will become available. So, please, go there, sign up and make a request to show that this is a highly requested feature (thanks!).
cp /mnt/usb/*.ko /mnt/my_first_disk/
19. In FreeNAS WebGUI -> System -> Advanced -> Command scripts add following commands (one at a time and in the order listed) as PostInit. This will load the dependency, and driver automatically. This assumes that they're on the whatever drive at that mount point.
kldload /mnt/my_first_disk/libmbpool.ko kldload /mnt/my_first_disk/if_myk.ko ifconfig myk0 -txcsum
The last command will turn off hardware checksumming (for both tx and rx as they get turned on/off as a pair as per Marvell driver readme file). There is a bug in the driver and/or FreeNAS/FreeBSD that prevents FreeNAS from properly functioning after reboot/shutdown. At this point in time, if you do not turn off hardware checksumming on Marvell, FreeNAS will not be responsive upon a reboot. This was a stumbling block for me until I was able to narrow it down to checksumming issues after debugging things for a while. See this ticket for more info: http://sourceforge.n...951&atid=782619 . Possible fix exists in FreeBSD-current , but you have to backport the changes to msk(4) driver to FreeBSD 7.2 and then to FreeNAS . I'm not at the point to be able to do that.
20. In FreeNAS WebGUI -> System -> Advanced -> rc.conf, add variable called if_myk_load with value YES . No quotes. This enables Marvell NIC
21. You can restart your system now and it should come back up with no problems.
There exist some minor issues that I yet to find a solution for:
a.) i icon just flashes the whole time when booted in FreeNAS
b.) hard drive icons are off the whole time
c.) Additional drivers have to reside somewhere other than FreeNAS boot disk, but this might be solved in the next FreeNAS release by simply including the new Marvell driver and its dependency into the distribution. As I mentioned above there exists a feature request for this in FreeNAS bugtracker. So please stop by there and ask for this as well. Here's the link again: https://sourceforge....951&atid=782619
d.) At the moment, soft Power Off does not turn the machine completely off, FreeNAS goes through the shutdown process but then sits at this msg idling
ACPI Error: (psargs-0459): [HPEN] Namespace lookup failure, AE_NOT_FOUND ACPI Error (psparse-0626): Method parse/execution failed [\_PTS] (Node 0xffffff00073c40a0), AE_NOT_FOUND Powering system off using ACPI
Both a.) and b.) are purely cosmetic problems and relate to not having the LED driver. If someone knows how to reverse engineering those lights and write a driver module, it would be much appreciated. c.) is a matter of including the two driver modules in the default FreeNAS distribution
For d.) I have not had enough time to figure things out. It might be something really simple. Hopefully someone can provide more input.
Hopefully this will give someone else a chance to explore FreeNAS/FreeBSD on Acer easyStore H340 further and contribute back in some way. I will keep this thread updated if I have anything else new to add. I encourage for others to do the same.
Thanks for your attention and enjoy FreeNAS on your H340 (I know I do).




Sign In »
Register Now!
Help

Back to top













