<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Little Off &#187; embedded</title>
	<atom:link href="http://www.bemasher.net/archives/tag/embedded/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bemasher.net</link>
	<description>Code, Computers, Photography and Guns</description>
	<lastBuildDate>Mon, 21 Nov 2011 06:38:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Installing pfSense on Jetway J7F4K1G5D-PB</title>
		<link>http://www.bemasher.net/archives/457?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-pfsense-on-jetway-j7f4k1g5d-pb</link>
		<comments>http://www.bemasher.net/archives/457#comments</comments>
		<pubDate>Fri, 03 Jul 2009 10:08:04 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[createrawvmdk]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[Jetway]]></category>
		<category><![CDATA[pfsense]]></category>
		<category><![CDATA[unetbootin]]></category>
		<category><![CDATA[Via C7]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=457</guid>
		<description><![CDATA[Summer is usually a bad thing for my hardware and projects. Once I've gone through all the trouble of getting them setup and working the way I like I get bored and wonder what else I could do to//with[1] them. My next project for my server[2] was to install pfSense[3]. I wasted most of my [...]]]></description>
			<content:encoded><![CDATA[<p>Summer is usually a bad thing for my hardware and projects. Once I've gone through all the trouble of getting them setup and working the way I like I get bored and wonder what else I could do to//with<sup>[<a href="http://www.bemasher.net/archives/457#footnote_0_457" id="identifier_0_457" class="footnote-link footnote-identifier-link" title="Read: dismantle and start a new project">1</a>]</sup> them.</p>
<p>My next project for my server<sup>[<a href="http://www.bemasher.net/archives/457#footnote_1_457" id="identifier_1_457" class="footnote-link footnote-identifier-link" title="http://www.newegg.com/Product/Product.aspx?Item=N82E16813153062 JetWay J7F4K1G5D-PB, main component anyway. Any compatibility issues would be with this as there are no other peripherals at the moment.">2</a>]</sup> was to install pfSense<sup>[<a href="http://www.bemasher.net/archives/457#footnote_2_457" id="identifier_2_457" class="footnote-link footnote-identifier-link" title="http://www.pfsense.com/ pfSense is a free, open source customized distribution of FreeBSD tailored for use as a firewall and router.">3</a>]</sup>. I wasted most of my time on this project trying to do it the ways that were either not recommended or not documented.</p>
<p>Things like using unetbootin<sup>[<a href="http://www.bemasher.net/archives/457#footnote_3_457" id="identifier_3_457" class="footnote-link footnote-identifier-link" title="http://unetbootin.sourceforge.net/ UNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD.">4</a>]</sup> to run the LiveCD<sup>[<a href="http://www.bemasher.net/archives/457#footnote_4_457" id="identifier_4_457" class="footnote-link footnote-identifier-link" title="LiveCD: A LiveCD or LiveDVD is a CD or DVD containing a bootable computer operating system.">5</a>]</sup> image since I have this strange hatred for optical media, it seems too wasteful to me, not to mention I rarely have the specific kind of media I need for the right project. That failed miserably of course since FreeBSD based LiveCD's never seem to like the extraction and customization process unetbootin does to linux based iso's.</p>
<p>After trying and failing to run the LiveCD from a thumb drive I did what I usually do to install OS's that require optical media for installation: I use my IDE-USB adapter<sup>[<a href="http://www.bemasher.net/archives/457#footnote_5_457" id="identifier_5_457" class="footnote-link footnote-identifier-link" title="http://www.newegg.com/Product/Product.aspx?Item=N82E16812156101 Not sure if this is the exact one I have but looks to be about the same.">6</a>]</sup> to chain it to the USB KVM<sup>[<a href="http://www.bemasher.net/archives/457#footnote_6_457" id="identifier_6_457" class="footnote-link footnote-identifier-link" title="KVM Switch: A KVM switch is a hardware device that allows a user to control multiple computers from a single keyboard, video monitor and mouse.">7</a>]</sup> I use so I don't have to take my optical drive out to do installs. Lo and behold pfSense just happens to not support USB optical drives, it boots to the point where it would normally mount the iso9660<sup>[<a href="http://www.bemasher.net/archives/457#footnote_7_457" id="identifier_7_457" class="footnote-link footnote-identifier-link" title="ISO 9660: also referred to as CDFS (CD File System) is a file system standard for optical disc media.">8</a>]</sup> formatted volume it expects to be at /dev/acd0 which isn't because FreeBSD 7.0 doesn't seem to have support for USB optical drives.</p>
<p>Anyway next in line was to use the embedded image. If you didn't already know the main storage for my server is a SYBA SD-CF-2IDE-U adapter<sup>[<a href="http://www.bemasher.net/archives/457#footnote_8_457" id="identifier_8_457" class="footnote-link footnote-identifier-link" title="http://www.newegg.com/Product/Product.aspx?Item=N82E16822998002 Closest thing to what I&#039;m using, they don&#039;t seem to be making the revision I&#039;m using anymore.">9</a>]</sup> or simpler: a Compact Flash to IDE adapter. I figured this would be simple enough as I used to do the same thing for running FreeNAS on my server. I'd just pop the CF card into the multi-reader on my desktop and use dd<sup>[<a href="http://www.bemasher.net/archives/457#footnote_9_457" id="identifier_9_457" class="footnote-link footnote-identifier-link" title="http://www.chrysocome.net/dd dd for Windows.">10</a>]</sup> to dump the embedded image that pfSense provides to it. My first instinct after getting the image downloaded was to decompress it since it was packaged as a GNU Zip file. Booting from this produced only a pipe character with a blinking cursor immediately beneath it. Reading through instructions further I discovered that the embedded version doesn't have keyboard or video support, only serial which I don't have on any of my systems anymore never mind that for once I have the proper cable for that. Also apparently I'm supposed to dump the compressed image to the card which produces no pipe character at all let alone a bootable card.</p>
<p>Clearly I was off to a good start<sup>[<a href="http://www.bemasher.net/archives/457#footnote_10_457" id="identifier_10_457" class="footnote-link footnote-identifier-link" title="Read: Sarcasm">11</a>]</sup>. I finally gave up on the whole idea of doing it any other way than what was tried and true. This lead to me dismantling my desktop to use the only working optical drive I've got left and plug it into my server to install from the LiveCD. Also took me a good long time to find the manual for the IDE-CF adapter to figure out which jumper<sup>[<a href="http://www.bemasher.net/archives/457#footnote_11_457" id="identifier_11_457" class="footnote-link footnote-identifier-link" title="Which are descriptively named: jmp1, jmp2, jmp3">12</a>]</sup> needed to be changed so it would act as a slave. Once that was all said and done and the system booted to the LiveCD I ran the install to harddisk option. After formatting the disk, partitioning it and setting up appropriate slices it started the install. I wasn't done yet with my troubles since it decided it was going to hang at 43%. Upon further investigation I noticed the light on the optical drive I was using wasn't on or indicating any accessing at all. Found out that power had somehow disappeared from the drive, either through mechanical error<sup>[<a href="http://www.bemasher.net/archives/457#footnote_12_457" id="identifier_12_457" class="footnote-link footnote-identifier-link" title="I may or may not have been using a 12V molex to SATA power adapter in between.">13</a>]</sup> or something else entirely. Rebooted and restarted the install once more, ended up disconnecting power and reconnecting it whilst installing. That seemed to do the trick as the install finished without further hitch excluding the fact that it wouldn't install GRUB citing an error return code of 1 so ditched that idea and just used their default setting.</p>
<p>You'd think I would have been done with installing and general mucking about at the low-level end of this whole thing and you'd be wrong. After putting the optical drive back in my desktop and rebooting the server I notice it did the same thing it did when I tried to boot it from the optical drive plugged in through USB, it couldn't find//mount the volume it thought the system was on. This is due to the CF adapter being a slave during the install and a master during boot after removing the optical drive. Instead of mucking around with the KVM switch and switching monitor display ports anymore<sup>[<a href="http://www.bemasher.net/archives/457#footnote_13_457" id="identifier_13_457" class="footnote-link footnote-identifier-link" title="Like I had been doing the entire time until this point.">14</a>]</sup> I popped the CF card out of my server and into the CF port on the multi-reader in my desktop. Instead of using the USB filtering that VirtualBox has since it rarely ever works//tends to break anything I touch with it, I fired up a command prompt and created a vmdk that points to the physical disk. Mind you the command prompt must be run as administrator if you're doing this in Windows 7 like I am. It will fail with a VERR_ACCESS_DENIED exception if you don't.</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">VBoxManage.exe internalcommands createrawvmdk -filename CF.vmdk -rawdisk \\.\PhysicalDrive3</div></td></tr></tbody></table></div>
<p>After creating <em>CF.vmdk</em> I made a new virtual machine for it to go into along with mounting the pfSense LiveCD. Starting a command prompt with option <em>8</em> I mounted <em>/dev/ad0s1a</em> to <em>/mnt</em> and edited <em>/mnt/etc/fstab</em> to change <em>ad1s1a</em> and <em>ad0s1b</em> to <em>ad0s1a</em> and <em>ad0s1b</em> respectively.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mount</span> ufs:<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ad0s1a <span style="color: #000000; font-weight: bold;">/</span>mnt<br />
vI <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab</div></td></tr></tbody></table></div>
<p>Reboot and it is finished! After all that is simple web-interface based configuration that didn't take very much time at all. Actually as I write this I am posting it through my new pfSense router.</p>
<ol class="footnotes"><li id="footnote_0_457" class="footnote">Read: dismantle and start a new project</li><li id="footnote_1_457" class="footnote"><a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16813153062">http://www.newegg.com/Product/Product.aspx?Item=N82E16813153062</a> JetWay J7F4K1G5D-PB, main component anyway. Any compatibility issues would be with this as there are no other peripherals at the moment.</li><li id="footnote_2_457" class="footnote"><a href="http://www.pfsense.com/">http://www.pfsense.com/</a> pfSense is a free, open source customized distribution of FreeBSD tailored for use as a firewall and router.</li><li id="footnote_3_457" class="footnote"><a href="http://unetbootin.sourceforge.net/">http://unetbootin.sourceforge.net/</a> UNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD.</li><li id="footnote_4_457" class="footnote"><a href="http://en.wikipedia.org/wiki/LiveCD">LiveCD</a>: A LiveCD or LiveDVD is a CD or DVD containing a bootable computer operating system.</li><li id="footnote_5_457" class="footnote"><a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16812156101">http://www.newegg.com/Product/Product.aspx?Item=N82E16812156101</a> Not sure if this is the exact one I have but looks to be about the same.</li><li id="footnote_6_457" class="footnote"><a href="http://en.wikipedia.org/wiki/KVM_Switch">KVM Switch</a>: A KVM switch is a hardware device that allows a user to control multiple computers from a single keyboard, video monitor and mouse.</li><li id="footnote_7_457" class="footnote"><a href="http://en.wikipedia.org/wiki/ISO_9660">ISO 9660</a>: also referred to as CDFS (CD File System) is a file system standard for optical disc media.</li><li id="footnote_8_457" class="footnote"><a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822998002">http://www.newegg.com/Product/Product.aspx?Item=N82E16822998002</a> Closest thing to what I'm using, they don't seem to be making the revision I'm using anymore.</li><li id="footnote_9_457" class="footnote"><a href="http://www.chrysocome.net/dd">http://www.chrysocome.net/dd</a> dd for Windows.</li><li id="footnote_10_457" class="footnote">Read: Sarcasm</li><li id="footnote_11_457" class="footnote">Which are descriptively named: jmp1, jmp2, jmp3</li><li id="footnote_12_457" class="footnote">I may or may not have been using a 12V molex to SATA power adapter in between.</li><li id="footnote_13_457" class="footnote">Like I had been doing the entire time until this point.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/457/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

