Imaging to CF using i386-nanoBSD.img. Should I be using Liveinstaller instead?
I use an old pentium PC with multiple NICs and a 1GB Sandisk CF card. It has worked perfectly for years. Recently I've been trying to install pfSense 2 using the embedded images as I always have with m0n0wall. However this isn't really sustainable as I have more and more trouble getting these images to run each time I try.
Just recently have been using pfSense-2.1.5-RELEASE-1g-i386-nanobsd-vga.img.gz and can't get the spinner to show after the F1, F2, F6 prompt. It writes a screen full of #####s if I leave it long enough.
In the BIOS setup, i already tried disabling DMA mode, then Ultra DMA, LBA, CHS… etc. Having researched around I think I've tried everything, except re-imaging the CF card following each failure :-p
I always have trouble doing getting these images to load on this old hardware. Should I be using/Am I better to use the LiveInstaller instead? If so, when installing to CF, are there any special steps or will the installer's format process format the CF card in a way that will prevent sector write overuse?
Maybe this is not a problem any more?
Many thanks in advance!
Only Nano limits writes to the media, you should be using that with a CF card.
What are the specs on your 'old pentium'?
Hey thanks Steve,
So I have to get this working. Damn!
Re the spec of this machine, its lowlights include:
Intel Pentium D, up to 3.6GHz, 533/800MHz
1GB DDR2 400/533/667 MHz SDRAM
System Chipset SIS 671FX + 968
Integrated SIS Mirage 3 graphics
Integrated RealTek 8211B
My trusty Intel quad 10/100 NIC
In CHS mode, the geometry is:
PS. As it is has a SATA interface as well as 2 PATAs, I've tried using both modes (Eg. '2S+2P' and '2S2P') in the BIOS combined with no DMA/CHS only settings.
Thanks for the link to that thread, topic 78828. The exact same issue. Must be something about the geometry on that image once a slice is selected. Now I have verified the best 'failsafe' settings, I will re-image the card and test again.
Note: I just tried putting the CF card (and IDE adaptor) on my old Dell Optiplex GX150 P4HT box that previously ran a m0n0wall nanoBSD image on the same card- and it did exactly the same thing. EDIT: No, not quite- it did not put up any #. Screen updates just halted instead.
I wonder how the partition structure is defined, and what the image file assumes the geometry of the target should be.
PS. Info about the slices on these images was news to me- thanks!
== NanoBSD ==
- Two OS slices for redundancy, each slightly less than half the size of the image (e.g. 1.8GB OS slice sizes on 4GB image)
- Upgrades write to the alternate slice which is then used for the next boot
** Each upgrade is handled like a new installation + configuration restore
** Only certain special files are copied between OS slices during an upgrade
- Configuration is held on a third common slice unaffected by changes to either OS slice
… from https://doc.pfsense.org/index.php/Full_Install_and_NanoBSD_Comparison
When you said 'old pentium' I feared you might be running a Pentium 1! There's no reason it shouldn't run on that hardware. The fact that the card indentically fails to boot on two boxes implies the image may be bad. How did you write it? Some people have been able to solve card errors by first 'zeroing' it, writing 0s to the entire card.
On one box i've used I have sern the SATA controller mode effect booting even when the SATA interfaces weren't being used.
Sorry not to be more clear: The old Dell GX150 is an 800MHz Celeron, Intel 815E, with one stick of 256MB PC133 DRAM. Maybe I'll never get it to boot as the RAM is <1GB (?). I just went back to testing boot on that as it used to boot M0n0wall and the new system won't boot at all…
Confirmed the settings in the BIOS- the configuration table shown at POST shows the drive geometry to be CHS, PIO 4, 1025MB.
Zeroed and re-wrote the card just then using dd on OSX 10.7. Last week when I first tried to dd using OSX Yosemite it threw permissions errors I couldn't resolve. I read that it may be something to do with Apple changing the root owner of the filesystem from underneath my account so now disk level ops cause a permissions error (whether you are using a 'sudoed' admin account or not).
Anyway, I'm using 10.7 for this, so it worked as per the pfSense install guide:
gzcat pfSense-2.1.5-RELEASE-1g-i386-nanobsd-vga.img.gz | dd of=/dev/disk4 bs=16k and waited for it to finish. Once done OSX tries to mount it but I 'eject' and physically remove the disk. (I checked that at this point diskutil reports no mounted device).
1. Popped the card in the Dell, and it behaved the same way:
E.g. It booted to F1/F2 slice prompt, and displays
After a moment the cursor returns and just flashes on the next line. (No spinner).
2. Then put the card in the Pentium D box and started it up. It does the same thing except it doesn't return the cursor to the next line after 'Boot:F1', instead the HDD light comes on and it just prints a # every 10secs.
Maybe it's the way I'm writing the image: I am using a 16k block size, but in the page 'Writing Disk Images' the block size is different for each OS described. For Linux it says bs=1M, BSD obs=64k, and OSX bs=16k. I'm going to grab a monowall image next, write that and see if it boots the in the Pentium D box. (Interestingly the m0n0wall imaging instructions recommend bs=64k).
Confirmed that both systems won't boot my m0n0 images either now.
I tried with images written using bs=16k, 64k and 1M. HDD light on and screen shows
DISK BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER.
However, here's a fix: Once I found the config setting to change the PIO mode. For now it is set to PIO mode 0.
Now it boots the system to the menu, then up to umass0 where it throws a number of errors like this:
ad0: FAILURE - READ_DMA timed out LBA=2001872 (and not incrementing evenly up 2001887, the LBA values are all types- 16, 128, 0, 512, etc. As it slowly scrolls through the errors as they arise Ctl-Alt-Del doesn't work, only a royal finger will stop it.
I wonder what the images are built and tested on. I might find and try an 8GB CF card.
(This was with CHS settings manually set that the auto mode finds once it reads the card. Tried setting the geometry to LBA, Large and CHS, no difference)
Replaced the 1GB SanDisk CF card with a 2GB SD card on an PCB/IDE socket assembly. This little $3 board has an SD card socket on it and connects to a floppy power connector. After imaging exactly as above, psSense started. Now busy winding PIO modes up now to see which fail:
So far PIO Mode 4 is working. I enabled DMA and UltraDMA too, but doing so resulted in a system hang at umass0: …
Just prior the screen output showed-
ad0: FAILURE - SET FEATURES SET TRANSFER MODE status=51 <ready,dsc,error>error=4 (aborted)
ad0: 1936MB Memory Card Adapater at ata0-master WDMA2
So disabled Ultra DMA. Now pfSense boots just fine!
Perhaps still more to do, as the above ad0: FAILURE is still occurring.</ready,dsc,error>
A couple of things perhaps worth noting here.
The Nano+VGA images have DMA enabled where as the straight Nano images have it disabled. This is because many CF-IDE adapters, and on-board CF sockets, do not have the DMA pins connected and will not boot an image that has DMA enabled. The Nano+VGA images were originally created for a platform that would only boot with DMA enabled. At least that is my understanding.
Some CF cards, specifically Sandisk, report a bad geometry which cause errors:
I'm not sure either of those apply to you. Anyway glad to see you're up and running, persistence pays off. :)
That would explain all this certainly.
I'm very happy to re-read the page you linked to that shows that ad0 error can be ignored- I was yet to go back and check that was exactly what mine was reporting.
Up until now have been having trouble getting the WAN port to pickup a routable address from the bridged cable modem/4 port switch. Any of the pfSense's hosts' Intel NICs will happily pickup an IPv4 address if I connect them to a network with a DHCP server, but when I connect them to the cable modem's 3rd or 4th port it won't. It shows a link light and negotiates speed & duplex- but won't bring up an IP connection. I've tried assigning WAN to other ports, manually setting duplex to Full and Half. Other devices on my network pickup a routable address if I plug them into the cable modem instead of the pfSense host (LATER EDIT: but only ones which have been conected to it before)
In the end I read in another post that this is expected behaviour with cable modems/networks. After re-booting the cable modem it came up fine. Had some weird things happen during all this with the dhcpd/local interface after completing the webgui's config wizard. Couldn't regain access from the LAN and had to reboot a few times. Maybe my Netgear gigabit RTL card is not getting a warm welcome (it worked well under m0n0wall).
Anyway… thanks again. Finally it is time to try the lusher pastures over here at pfSense!
On the way home today I found a better rig to use- thrown out in the street just like the old one. An old AMD Sempron 1800+ powered Compaq desktop PC. It has better BIOS configuration screens- and the CPU is a 25W thermal design rather than the 65W Pentium D. The RAM from the old box fits, so now I have 2GB and after disabling all the unused hardware/interfaces such as Audio,I/O, etc. much faster boot and a bigger LED to tell me its on. Yay!