{"id":20,"date":"2006-02-17T16:16:42","date_gmt":"2006-02-17T22:16:42","guid":{"rendered":"http:\/\/www.p14nd4.com\/blog\/2006\/02\/17\/bsd-bootloader-read-error\/"},"modified":"2006-02-17T16:26:38","modified_gmt":"2006-02-17T22:26:38","slug":"bsd-bootloader-read-error","status":"publish","type":"post","link":"http:\/\/www.p14nd4.com\/blog\/2006\/02\/17\/bsd-bootloader-read-error\/","title":{"rendered":"BSD Bootloader &#8216;Read Error&#8217;"},"content":{"rendered":"<p>As part of my home network, I have been using an HP Vectra VL5\/166 Series 5 DT Pentium 166 <abbr title=\"Megahertz\">MHz<\/abbr> computer as my <acronym title=\"Network Address Translation\">NAT<\/acronym> router for several years now. I used <a href=\"http:\/\/www.ipcop.org\/\" title=\"IPCop\" rel=\"external\">IPCop<\/a> (Linux-based) since its 1.3 release, followed by 1.4 for quite a while, and then decided I should give <a href=\"http:\/\/www.m0n0.ch\/wall\/\" title=\"m0n0wall\" rel=\"external\">m0n0wall<\/a> (BSD-based) a try, starting at the 1.2b9 release. m0n0wall was originally designed to run on embedded \/ <acronym title=\"Single Board Computer\">SBC<\/acronym> systems, especially <a href=\"http:\/\/www.soekris.com\/\" title=\"Soekris Engineering\" rel=\"external\">Soekris<\/a> boards, which boot off a <acronym title=\"Compact Flash\">CF<\/acronym> card. It was later [easily] adapted to run on generic PCs, though there&#8217;s no real method provided to <q>install<\/q> it, other than performing a ~5 <acronym title=\"Mebibyte = 1024 KiB. 1 KiB = 1024 B\">MiB<\/acronym> disk image copy to the hard drive. I tried this (using Knoppix textmode, wget the image, then dd), but was plagued by a <q>Read error<\/q> after loading the BIOS. I worked on trying to fix this for quite a while, to no avail. Eventually I conceded defeat and just used the m0n0wall LiveCD to boot the system, and stored the configuration on a floppy disk. I later experimented with <a href=\"http:\/\/www.pfsense.com\/\" title=\"pfSense\" rel=\"external\">pfSense<\/a> very briefly, which is a modification of m0n0wall with a somewhat different target audience and different goals in mind. Of particular interest to me was the fact that after booting from the LiveCD, it provides an actual [optional] installer, which I hoped would avoid the problems I ran into with m0n0wall. Long story short, after about 6 attempted installs, it still didn&#8217;t work, so once again, I conceded defeat, and kept on truckin&#8217; with the m0n0wall LiveCD.<\/p>\n<h4>Fast forward about five months&#8230;<\/h4>\n<p>m0n0wall (1.2b9, LiveCD + floppy for config) was very stable &#8230; no lockups or reboots (planned or unplanned) for the whole time. One night, I decided to reboot all my computers including the m0n0wall router. Anyway, after it booted back up, it was acting strange &#8230; and then started telling me errors like no XML object found, etc. I pulled out the floppy disk, and checked it in my desktop, which spent about 10 minutes trying to read the ~12 KiB file, and later chkdisk confirmed that there were 512 bytes in bad sectors. Crap. Rather than <em>just<\/em> rebuilding my configuration, though, I decided to go all out and try the new pfSense Beta (finally out of alpha), which put me back in the situation of fixing the <q>Read error<\/q> once the system actually hit the BSD bootloader.<\/p>\n<h4>Read error THIS, bitches!<\/h4>\n<p>I googled briefly, and came across a page <q><a href=\"http:\/\/www.unixguide.net\/freebsd\/faq\/05.28.shtml\" title=\"BSD Boot Loader 'Read Error'\" rel=\"external\">Why does FreeBSD&#8217;s boot loader display <q>Read error<\/q> and stop after the BIOS screen?<\/a><\/q> Well, that seemed to capture the essense of my problem fairly well, so I gave it a go. There was some confusion to this issue, though, as my BIOS initially reported the disk was 16,383 cylinders, whereas the BSD bootloader installer [correctly] recognized that it was 39,703 cylinders. I tried various combinations of either using the BIOS&#8217;s wrong value in the bootloader installer, or entering the right value in the bios and bootloader, or entering a third value in both (somewhere between what the BIOS thought and what the hard drive thought); none of these approaches worked. I also tried most of these combinations without the default &#8216;packet mode&#8217; selected when installing the bootloader; again, no success. I even tried partitioning the disk into ~1 GiB partitions, in case the issue was with using a partition sized greater than a 32bit address; still no luck. Eventually, I pulled out my trusty <a href=\"http:\/\/www.ultimatebootcd.com\/\" title=\"Ultimate Boot CD\" rel=\"external\">Ultimate Boot CD<\/a> (<acronym title=\"Ultimate Boot CD\">UBCD<\/acronym>), and started going through the boot loaders provided on there. I didn&#8217;t make it through the whole list, because when I got to <a href=\"http:\/\/gag.sourceforge.net\/\" title=\"GAG Graphical Boot Manager\">GAG<\/a>, I was easily able to go into setup -&gt; add operating system -&gt; select FreeBSD from the list and name it\/pick an icon, then configure Boot timer to ~2 seconds (so that it will boot without my interaction, since the router is almost always headless \/ keyboardless), and pick the OS that I just added as the default choice. Lastly, selecting Save in Hard disk immediately installed the bootloader to the drive, and I was able to boot like a charm! It&#8217;s frustrating how quickly and easily GAG worked after I spent hours trying more complicated solutions&#8230;<\/p>\n<p>Anyway, I&#8217;m glad it works. I&#8217;ve mostly reconfigured my router with pfSense installed to the hard drive now, and it seems to be working fairly well. I haven&#8217;t checked out the Beta1 known bugs yet, but the first bug I&#8217;ve observed seems too obvious to even imagine someone hasn&#8217;t posted. I guess the pfSense logo is set as a background image (css, presumably &#8230; I haven&#8217;t actually looked at the code), so they use a transparent image statically placed above it for the actual linking (to the main page). For me, this image (http:\/\/arvin.local:446\/themes\/pfsense\/images\/transparent.gif) is missing (404 &#8211; Not Found) in each of the three themes provided with pfSense, so I get a nice little rectangle with the word <q>Transparent<\/q> (the alt text) above the pfSense logo. Aside from that, everything else has been sweet like candy. There&#8217;s rumor that I can even get more info than just traffic stats from SNMP (for use on my cacti box), but I haven&#8217;t looked into that very much yet. Anyway, I hope this can help someone else with a similar problem to mine. I don&#8217;t just write these technical posts because I like to regale myself with stories of grueling troubleshooting and frustration ;). Good luck, and have fun.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As part of my home network, I have been using an HP Vectra VL5\/166 Series 5 DT Pentium 166 MHz computer as my NAT router for several years now. I used IPCop (Linux-based) since its 1.3 release, followed by 1.4 for quite a while, and then decided I should give m0n0wall (BSD-based) a try, starting [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-technical"],"_links":{"self":[{"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.p14nd4.com\/blog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}