Documente Academic
Documente Profesional
Documente Cultură
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
GetfreeshippingwithinAustraliaonanyorderover$1000.
FixyourITproblems,forgood,
withtinyfanlesscomputers
@www.yawarra.com.au
Home>Tutorials>HowtoinstallpfSensesoftwareonanAPU
HowtoinstallpfSensesoftwareonan
APU
June26,2014
5Comments
Soyouvegotyourhandsonthefeaturepacked,supertinyAPUboard,andnowyouwant
todosomethingusefulwithit?
WhatbetterchoicethantoinstallthepfSenseopensourcefirewallandroutersoftware?
FollowalongstepbystepasweshowyouhowtoinstallthepfSensesoftwareontoan
APUboard,usingeither:
1.ThestandardpfSenseembeddedimage
2.OurRidentsoftwareimage,whichisbasedonthepfSensesoftwarewith
enhancementssoitworksoutoftheboxontheAPU
InstallingthepfSenseembeddedimage
Step1.Downloadtheimage
GotothepfSensewebsite.
ClickthebigredDownloadbutton.
ClickonthelinkinthesectiontitledNewInstallsthattakesyoutoaformtitled
DownloadFullInstall.
UnderWhichimagedoIneed?,selectthefollowingoptions:
Computerarchitecture:AMD64(64bit)
Platform:Embedded(NanoBSD)
Console:Serial
CFcardsize:Tosuityourmedia
Notes
FortheCFcardsizeoption,choosethesizethatmatchesyourmedia.
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
1/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
Ifyourmediaisabove4GBinsize,justusethe4GBimage.
Somemedia(especiallySanDisk)claimcertainsizesbutusesmallGB(ie1000K=
1MBand1000MB=1GB),sotheimagemaynotfitontoyourmedia,eventhough
theyaresupposedtobethesamesize.Ifthishappens,justusethenextimagesize
down.
Onceyouhavemadeyourselection,alistofmirrorswillappear.
Choosetheclosestonetoyou(orarandomone)andsavetheimagefiletoyourlocal
computer.
Step2.GettheimageontotheAPU
CopythepfSensesoftwareimageontoyourSDcardormSATAdrive.
U
IfyoureusingaLinuxmachinetocopytheimage,useddwiththefollowingcommand.
gunzipcpfSense2.1.3RELEASE4gamd64nanobsd.img.gz|ddof=/dev/sdcbs=4M
Important
Modifythefilenametosuittheimagefileyouhavedownloaded.
/dev/sdcwillvarydependingonhowyoursystemissetup.Itcouldbe/dev/sdb,or
/dev/sdd,or/dev/sde
Tofindouttype
fdiskl
Thiswillgiveyoualistofthedisksyoursystemknowsabout.
LookforonethatisthesamesizeasyourSDcard.
U
IfyoureusingaWindowsmachinetocopytheimage,usephydiskwritewiththe
followingcommand.
physdiskwriteupfSense2.1.3RELEASE4gamd64nanobsd.img.gz
Important:Modifythefilenametosuittheimagefileyouhavedownloaded.
InsertyourSDcardormSATAdriveintotheAPUboard.
Step3.BoottheAPU
ConnecttotheserialconsoleontheAPUandsetyourterminalspeedto9600baud.
ApplypowertotheAPU.
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
2/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
WhenpoweringuptheAPU,ensurethatthepoweristurnedoffattheswitchbefore
plugginginthepowersupplytotheboard.
Similarly,whenpoweringdowntheAPU,ensurethepoweristurnedoffattheswitch
beforeremovingthepowersupplyplugfromtheboard.
Thisistominimisethechanceofarcing,whichmaydamageyourboard,astheAPUis
verysensitivetovoltagevariations.
Ignorethegarbagethatyousee.
ThisgarbageappearsbecausetheAPUissetto115200baud.Thissettingcantbe
changed,butthegarbagecanbesafelyignored,andeventuallyitwillstop.
Waitforthegarbagetostop,andthefollowingtexttoappear
Booting[/boot/kernel/kernel]
PressCTL+C(Control+C)tointerruptloadingandgetthebootloaderprompt.
Interruptingthebootloaderattherightpointisliterallyhitandmiss.
Soifyourboxcontinuestoboot,poweritoffandtryagain.
Step4.GetthepfSensesoftwaretoboot
Attheprompt(OK),foranSDcard,type
setkern.cam.boot_delay="10000"
orforanmSATAdrive,type
sethw.ata.atapi_dma="1"
sethw.ata.ata_dma="1"
sethw.ata.wc="1"
thentype
boot
Waitfortheboxtogothroughthebootprocess,untilyouseethefollowingmessage
DefaultinterfacesnotfoundRunninginterfaceassignmentoption.
Step5.Assigninterfaces
Youllneedtoassigninterfacesatthispoint.
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
3/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
WhenitasksyouifyouwanttosetupVLANs,typen.
Andthenassigntheinterfacesasfollows
WANtore0
LANtore1
OPT1tore2
Whenitasksifyouwanttoproceed,typey.
ThepfSensesystemshouldnowbootcorrectly,andtakeyoutotheusualconsolemenu.
Step6.Createlocalconfigfile
Beforeyoudoanythingelse,youneedtocreatealoader.conf.localfiletoavoidtheAPU
fromhangingthenexttimethatyoureboot.
ThisfilewillcontainthenecessarycodetoallowthepfSensesystemtobootcorrectly
withoutneedinginterventionfromyou.
N
ThereareactuallytwocopiesofthepfSensesoftwareintheimage,soyouwillneed
tocreatethisfileonbothslices.
Tocreatethisconfigfile,youhavetwochoices:
1.UsethewebGUI
2.Usethecommandlineandvi
O
1C
GUI
Slice1
LogintothewebGUI(at192.168.1.1).
GotoDiagnostics>EditFile
IntheSave/Loadfrompath,type
/boot/loader.conf.local
Thenintheboxbelow,ifyoureusinganSDcard,type
kern.cam.boot_delay="10000"
orifyoureusinganmSATAdrive,type
hw.ata.atapi_dma="1"
hw.ata.ata_dma="1"
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
4/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
hw.ata.wc="1"
andclickSave.
HaltthepfSensesystemandpreparetoconfigureSlice2.
Slice2
Setyourconsolespeedto115200.
ApplypowertotheAPU.
Whenitsays
1pfSense
2pfSense
F6PXE
Boot:1
Press2toloadthesecondslice.
Ifyourefast,youcanchangeyourserialconsolespeedatthispointto9600inorderto
interruptthebootloader.
Ifyoumissitordontwanttotryandchangespeedmidconsole,turnthepoweroff,
changeyourconsolespeedto9600andpoweruptheAPUagain.
WaitforthegarbagetostopandinterruptthebootloaderwithCTL+Casbefore(Step3).
Thebootloaderautomaticallyrememberswhichsliceyouloadedlasttime,soitwillload
Slice2thistimeandyoucanrepeatStep4.
YoudontneedtorepeatStep5becausetheinterfaceshavealreadybeenassigned.
GobacktotheinstructionsforSlice1(Step6)andrepeattheprocesstocreatea
loader.conf.localviathewebGUIforSlice2.
YoucanswitchbacktoSlice1usingtheaboveprocess,orjustkeepusingSlice2theyre
identicalanditdoesntmatterwhichoneyouuse.
WealwaysconfigureourboxestouseSlice1bydefaulttominimiseconfusion.
O
2C
Fromtheconsolemenu,press8togetashellprompt.
Toputthediskintoreadwritemode,type
/etc/rc.conf_mount_rw
Tocreatetheconfigfileandbegineditingit,type
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
5/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
vi/boot/loader.conf.local
Pressitogetintoinsertmode.
TosetthebootdelayforanSDcard,type
kern.cam.boot_delay="10000"
ortoenableDMAandwritecachingforanmSATAdrive,type
hw.ata.atapi_dma="1"
hw.ata.ata_dma="1"
hw.ata.wc="1"
Pressescapetogetoutofinsertmode.
Type:wqtowritethefileandquit.
Gooutofreadwritemodebytyping
/etc/rc.conf_mount_ro
Mountthesecondslice,whichhasasecondcopyofthepfSensesoftware,bytyping
mount/dev/ufs/pfsense1/mnt
Copythefileyoucreatedpreviously,bytyping
cp/boot/loader.conf.local/mnt/boot/loader.conf.local
Unmountthesecondslicebytyping
umount/mnt
Toexittheshell,type
exit
Andyoushouldnowbebackattheconsolemenu.
Step7.StartusingthepfSensesoftware
YourpfSensesystemisnowreadytoconfigureanduse.
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
6/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
Fromnowon,whicheversliceyoubootinto,itshouldloadwithouthanging,andyour
changeswillpersistacrossupgrades.
InstallingtheYawarraRidentembeddedimage
Ifyoudlikeaneasierway,youcandownloadanduseourRidentimages,whichare
basedonthepfSensesoftwareandhavethesechangesalreadymadeforyou:
1.Theethernetportsarepreassigned
2.Itdoesnthangduringboot(italreadyhastheloader.conf.localfileonbothslices)
3.Itresetstoourfactorydefaults(andyoucansetsetyourowndefaultstoo)
TheYawarraRidentfirewallandroutersoftwareforembeddedservers,isamodified
versionofthepfSensesoftware,optimisedtosuitourhardware.
HowtoinstallourRidentimageontheAPU
Downloadtheembeddedimagefromouroperatingsystemimagespage.
Savetheimagefiletoyourlocalharddrive.
CopytheRidentimageontoyourSDcardormSATAdrive.
U
IfyoureusingaLinuxmachinetocopytheimage,useddwiththefollowingcommand.
gunzipcrident213_4GB_APU.img.gz|ddof=/dev/sdcbs=4M
Important
Modifythefilenametosuittheimagefileyouhavedownloaded.
/dev/sdcwillvarydependingonhowyoursystemissetup.Itcouldbe/dev/sdb,or
/dev/sdd,or/dev/sde
Tofindouttype
fdiskl
Thiswillgiveyoualistofthedisksyoursystemknowsabout.
LookforonethatisthesamesizeasyourSDcard.
U
IfyoureusingaWindowsmachinetocopytheimage,usephydiskwritewiththe
followingcommand.
physdiskwriteurident213_4GB_APU.img.gz
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
7/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
Important:Modifythefilenametosuittheimagefileyouhavedownloaded.
InsertyourSDcardormSATAdriveintotheAPUboard.
PoweruptheAPUandeitherconnecttotheserialconsole(at9600baud)orgostraightto
configuringRidentviathewebGUIat192.168.1.1
Howeasywasthat?
Orgetustodoit
Ifthatallsoundstoohard,thenyoucanalwaysgetustopreinstallRidentforyouwhen
youbuyanAPUserveroranSDcardfromus.
AndhavefunplayingwiththepfSensesoftwareonyourAPU!
Wantmoregreatarticleslikethis?
Signupforemailupdatesandgetthemdelivered
straighttoyourinbox.
We'llalsodonate$5toVoyageLinux,tosupport
theongoingdevelopmentofthisfantasticsoftware.
Signmeup!
TodowithAPU,Boot,pfSense,Software
Comments
Michaelsays:
September10,2014at8:34am
Thanksfortheguide!However,IreallyshotmyselfinthefootbyIjustcopyingthe
kern.cam.boot_delaysettingfromthiswebpageintothepfSenseGUI.Thereasonis
thatyoureusingtypographicquotesonthewebsite,whichcausedpfSensetochoked
onthenextreboot.Thatwasanastyonetofix
Reply
NikkiStokessays:
September10,2014at9:38am
HiMichael,
Firstly,abig,BIGapologyfortheSNAFUonourpart.Theproblemhasnowbeen
fixedandthequotesinthecodeshouldcopyandpastecorrectly.
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
8/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
Secondly,thankyouforlettingusknowsothatwecanfixitforeveryoneelse.
Thirdly,pfSensedoesntcareeitherwayaboutthequotes,soyoucanalsoleave
themoutentirelyifyoudprefer(althoughIrealisethatsnotmuchusetoyou
now!)
Nikki
Hunorsays:
January19,2015at11:10pm
Itisanawesometutorial,myonliproblemisthaticantstopthecountdown
PressCTL+C(Control+C)tointerruptloadingandgetthebootloaderprompt.
Isthereanotherwaytotrytostopit?
Reply
Hunorsays:
January19,2015at11:46pm
Ok,ihavefoundtheproblem.Itwastheusbtoserialconverter.Butstilliheavea
problemwhenbootingup:
umass0:onusbus6
umass0:SCSIoverBulkOnlyquirks=0x4001
umass0:0:0:1:Attachedtoscbus0
Tryingtomountrootfromufs:/dev/ufs/pfsense0
ROOTMOUNTERROR:
Ifyouhaveinvalidmountoptions,reboot,andfirsttrythefollowingfrom
theloaderprompt:
setvfs.root.mountfrom.options=rw
andthenremoveinvalidmountoptionsfrom/etc/fstab.
Loadervariables:
vfs.root.mountfrom=ufs:/dev/ufs/pfsense0
vfs.root.mountfrom.options=ro,sync,noatime
Manualrootfilesystemspecification:
:Mountusingfilesystem
eg.ufs:/dev/da0s1a
eg.cd9660:/dev/acd0
Thisisequivalentto:mounttcd9660/dev/acd0/
?Listvaliddiskbootdevices
Abortmanualinput
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
9/10
05/10/2016
HowtoinstallpfSensesoftwareonanAPU|TutorialsYawarraTinyComputers
mountroot>
PaulMcGowansays:
January20,2015at9:11pm
Imgladyoufoundawaytointerruptthebootloader.
Theerroryouaregettinglookslikewhathappenswhentheloaderoptionshavenot
beensetcorrectly.(Step4thefirsttime,step6forsubsequentreboot)
ThereisanothertutorialforthisonthepfSensewebsite,here:
https://doc.pfsense.org/index.php/Install_pfSense_nanobsd_2.0_to_thumb_drive
Shareyourthoughts
Comment
Name
Email
Submitcomment
https://www.yawarra.com.au/tutorials/howtoinstallpfsenseonanapu/
10/10