{"id":14,"date":"2009-07-05T14:43:51","date_gmt":"2009-07-05T03:43:51","guid":{"rendered":"http:\/\/menhennitt.com.au\/wordpress\/?p=14"},"modified":"2010-10-19T11:27:16","modified_gmt":"2010-10-19T00:27:16","slug":"installing-freebsd-on-a-soekris-net5501-using-pxe-and-dnsmasq","status":"publish","type":"post","link":"https:\/\/menhennitt.com.au\/wordpress\/2009\/07\/05\/installing-freebsd-on-a-soekris-net5501-using-pxe-and-dnsmasq","title":{"rendered":"Installing FreeBSD on a Soekris net5501 using PXE and dnsmasq"},"content":{"rendered":"<p>I&#8217;m the proud owner of a new <a href=\"http:\/\/soekris.com\">Soekris<\/a> <a href=\"http:\/\/soekris.com\/net5501.htm\">net5501<\/a>. This is a low power SBC (Single Board Computer) that I intend to use as a:<\/p>\n<ul>\n<li>router,<\/li>\n<li>firewall,<\/li>\n<li>name server,<\/li>\n<li>wireless access point,<\/li>\n<li>VPN end-point,<\/li>\n<li>PBX,<\/li>\n<li>SMTP server,<\/li>\n<li>IMAP server,<\/li>\n<li>NTP server,<\/li>\n<li>file server (both NFS and SMB),<\/li>\n<li>UPS monitor,<\/li>\n<li>print server,<\/li>\n<li>database server, and<\/li>\n<li>source control server<\/li>\n<\/ul>\n<p>for my home network. My preferred operating system is <a href=\"http:\/\/freebsd.org\">FreeBSD<\/a> and I&#8217;m installing the most recent stable release &#8211; 7.2.<\/p>\n<p><!--more--><\/p>\n<p>Installation on a Soekris box is a bit different to installing on a normal PC since it has no video card (it&#8217;s headless), and mine doesn&#8217;t have a CDROM or DVD drive. There are several ways of doing the installation. One is via a Compact Flash card, another is putting a disk drive into another PC, installing the OS, and then moving the disk to the Soekris box. The way I&#8217;m going to do it is by network booting using PXE. There are number of guides to doing this around if you search for &#8220;PXE install FreeBSD&#8221;. I&#8217;m doing it a bit differently since I&#8217;m going to use <a href=\"http:\/\/www.thekelleys.org.uk\/dnsmasq\/doc.html\">dnsmasq<\/a> for the BOOTP and TFTP server. The reason I&#8217;m doing it this way is that I already have a FreeBSD server running dnsmasq and it&#8217;s capable of doing the job without having to install ISC DHCP3 server or a dedicated TFTP server.<\/p>\n<p>Basically, I follow the instructions from <a href=\"http:\/\/jdc.parodius.com\/freebsd\/pxeboot_serial_install.html\">this guide<\/a> with the following differences.<\/p>\n<ul>\n<li>I didn&#8217;t bother building pxeboot in Step 5. Instead, I changed baud rate in my terminal emulator (picocom) to 9600 at the point where pxeboot is running. You get a few garbage characters but it doesn&#8217;t really matter.<\/li>\n<li>Since I&#8217;m using dnsmasq from the BOOTP and TFTP server, I replaced Steps 1, 2, &amp; 3 with adding:<br \/>\n<code>enable-tftp<br \/>\ntftp-root=\/mnt\/pxeroot<br \/>\ndhcp-boot=pxeboot<br \/>\ndhcp-option=17,203.2.73.2:\/mnt\/pxeroot<\/code><br \/>\nto the bottom of dnsmasq.conf. Note that you should replace &#8220;\/mnt\/pxeroot&#8221; with the name of the directory where you&#8217;ve installed pxeboot and the FreeBSD install image (&#8220;\/usr\/local\/freebsd7&#8221; in the guide above).<\/li>\n<li>I used 19200 baud instead of 115200. That&#8217;s the default baud rate of the Soekris boot loader. For the amount of time spent on the console, it&#8217;s not really worth worrying about the higher speed.<\/li>\n<li>Finally, I had something go wrong when it was booting the FreeBSD kernel. It may have been the same problem noted in Step 7 of the guide, I don&#8217;t know. Anyway, my solution was to replace the standard FreeBSD kernel with a custom one. I&#8217;m building a custom one for the Soekris box anyway, so I just used that. Its config file can be found <a href=\"http:\/\/menhennitt.com.au\/maxwell.conf\">here<\/a>. I had to disable the IPFIREWALL options for the installation because it defaults to &#8220;deny all&#8221; which prevented me using NFS to do the installation!<\/li>\n<\/ul>\n<p>Anyway, it&#8217;s all working beautifully now. I hope this helps somebody else who&#8217;s trying to do that same thing. It will also help me remember how to do it for next time!<\/p>\n<p><b>Update: October 19, 2010 for FreeBSD 8.1: <\/b>My kernel config file for FreeBSD 8.1 is <a href=\"http:\/\/menhennitt.com.au\/maxwell_8.conf\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m the proud owner of a new Soekris net5501. This is a low power SBC (Single Board Computer) that I intend to use as a: router, firewall, name server, wireless access point, VPN end-point, PBX, SMTP server, IMAP server, NTP server, file server (both NFS and SMB), UPS monitor, print server, database server, and source [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[9,7,6,11,8,10],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-computing","tag-dnsmasq","tag-freebsd","tag-install","tag-net5501","tag-pxe","tag-soekris"],"_links":{"self":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":22,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/14\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}