Note: This is a guide on how to get FreeBSD working on this machine.
Long story: Newegg was selling these at a very low price of $135 shipped and I picked one up, immediately envisioning a new leaner router for my home network. Later research showed this would be a problem as the HP BIOS causes the BTX loader to hang. (See http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062952.html and http://lists.freebsd.org/pipermail/freebsd-bugs/2010-March/038758.html.
The problem: The hang is due to the btx binary, which is embedded into the file /boot/loader as part of the boot process. boot0, 2, and the rest of loader are unaffected. Nevertheless this hang causes FreeBSD 7+ to not boot at all on similar HP hardware.
The fix: The fix (worked for me!) is to take an older BTX 1.01 binary and embed it into an otherwise FreeBSD 9 /boot/loader, leaving all other components the same. This is then sufficient to successfully boot up the i386 kernel. The amd64 kernel still won't boot up due to HP providing a broken memory map in their BIOS.
Instructions:
FreeBSD9 on HP DC5850
1. Only works with FreeBSD9-i386. The btx.S file from FreeBSD 6.2 is needed.
1a. The DC5850 needs to have a DVD drive, and the FreeBSD 9.0 (i386) needs to be inserted into the drive
2. Set up a 6.2 system (in a VM) and obtain the btx.S file from there. The VM FreeBSD must have network access and then the file can be transferred using SMB, NFS, FTP, or protocol of your choice.
3. Install FreeBSD 9 i386 in a VM, then move the older btx.S (from above) to /usr/src/sys/i386/btx/ and compile everything under /boot. The two important files from here are /boot/loader and /boot/pxeload
3a. I have uploaded copies of these two files at http://jkansoft.mine.nu/bsd9_dc5850/. Feel free to use these if you are not up to setting up the two different FreeBSD systems to create them.
4. Create an NFS shareable FreeBSD 9 directory following instructions from http://jdc.parodius.com/freebsd/pxeboot_serial_install_8.html
(other relevant instructions at http://www.locolomo.org/howto/pxeboot/article.html )
For above step, I had to use 7-zip from a Windows host and copy the extracted files (from FreeBSD 9 ISO) to the directory. Then the pxeboot and loader files were updated with the two generated above.
Note that the NFS share must be mounted rw. This allows install to start but will cause problems if actually trying to install from NFS.
5. PXE boot the DC5850 but escape to loader prompt when option is given. Enter the commands
to successfully get the installer to load.
6. Choose Install from CD-DVD and make sure the installer can read from the FreeBSD 9 DVD in the drive.
7. Install to hard drive in DC5850.
8. Mount the NFS filesystem, or if mounted locate where it is mounted and copy the /boot/loader file from there to the same directry in the new install on the HDD. This is necessary since the modified loader contains the working BTX and the install will install the non-working btx from DVD.
9. Reboot and watch the system boot up as usual!
Alternative method
Follow steps 1-3 producing the two files mentioned. Install FreeBSD 9 to the target HD using a working PC without loader booting problems. Then update just the /boot/loader file on the finished install and reboot.
The alternative method did it for me, although the NFS way will work for people willing to spend some time debugging NFS.
If anyone has any suggestions to improve the instructions, feel free to post them here.
Long story: Newegg was selling these at a very low price of $135 shipped and I picked one up, immediately envisioning a new leaner router for my home network. Later research showed this would be a problem as the HP BIOS causes the BTX loader to hang. (See http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062952.html and http://lists.freebsd.org/pipermail/freebsd-bugs/2010-March/038758.html.
The problem: The hang is due to the btx binary, which is embedded into the file /boot/loader as part of the boot process. boot0, 2, and the rest of loader are unaffected. Nevertheless this hang causes FreeBSD 7+ to not boot at all on similar HP hardware.
The fix: The fix (worked for me!) is to take an older BTX 1.01 binary and embed it into an otherwise FreeBSD 9 /boot/loader, leaving all other components the same. This is then sufficient to successfully boot up the i386 kernel. The amd64 kernel still won't boot up due to HP providing a broken memory map in their BIOS.
Instructions:
FreeBSD9 on HP DC5850
1. Only works with FreeBSD9-i386. The btx.S file from FreeBSD 6.2 is needed.
1a. The DC5850 needs to have a DVD drive, and the FreeBSD 9.0 (i386) needs to be inserted into the drive
2. Set up a 6.2 system (in a VM) and obtain the btx.S file from there. The VM FreeBSD must have network access and then the file can be transferred using SMB, NFS, FTP, or protocol of your choice.
3. Install FreeBSD 9 i386 in a VM, then move the older btx.S (from above) to /usr/src/sys/i386/btx/ and compile everything under /boot. The two important files from here are /boot/loader and /boot/pxeload
3a. I have uploaded copies of these two files at http://jkansoft.mine.nu/bsd9_dc5850/. Feel free to use these if you are not up to setting up the two different FreeBSD systems to create them.
4. Create an NFS shareable FreeBSD 9 directory following instructions from http://jdc.parodius.com/freebsd/pxeboot_serial_install_8.html
(other relevant instructions at http://www.locolomo.org/howto/pxeboot/article.html )
For above step, I had to use 7-zip from a Windows host and copy the extracted files (from FreeBSD 9 ISO) to the directory. Then the pxeboot and loader files were updated with the two generated above.
Note that the NFS share must be mounted rw. This allows install to start but will cause problems if actually trying to install from NFS.
5. PXE boot the DC5850 but escape to loader prompt when option is given. Enter the commands
vfs.root.mountfrom.options=rw
boot
to successfully get the installer to load.
6. Choose Install from CD-DVD and make sure the installer can read from the FreeBSD 9 DVD in the drive.
7. Install to hard drive in DC5850.
8. Mount the NFS filesystem, or if mounted locate where it is mounted and copy the /boot/loader file from there to the same directry in the new install on the HDD. This is necessary since the modified loader contains the working BTX and the install will install the non-working btx from DVD.
9. Reboot and watch the system boot up as usual!
Alternative method
Follow steps 1-3 producing the two files mentioned. Install FreeBSD 9 to the target HD using a working PC without loader booting problems. Then update just the /boot/loader file on the finished install and reboot.
The alternative method did it for me, although the NFS way will work for people willing to spend some time debugging NFS.
If anyone has any suggestions to improve the instructions, feel free to post them here.