Re: Compact Flash Booting on Alix 2D3 & mountroot issues
-
Hi all–-
I've been having lotsa problems with a new installation for the Alix platform 2D3.
Since I do not have a USB card reader, I have been using either a STD 40 pin IDE-CF adaper, or a 44 pin adapter for a laptop. Both of these adapters have worked just fine for CF/Standard PC installs in the past, and I never had an issue with mountroot. I previously used an older version of FreeBSD (6.3 or 6.4) to write and modify the embedded image, but I now find that current (frustrating) FreeBSD versions do not recognize the CF at all. Linux and NetBSD see it just fine...so whats up with FreeBSD ??? Quality Control issues? Disk labeling nonsense...ie. ufs:/dev/pfsense0 etc. ?
So since I can't use FreeBSD to write the image to Compact Flash, I have to use Linux or NetBSD to dump the image to Flash. OK, I get the image written and I'm able to boot the Alix to the point where it mounts the root file system.
Like a whole lot of other folks, I get stuck here with the <mountroot>prompt.
From the dmesg on boot, it is apparent that the kernel does not see or recognize the Compact Flash (even though it is booting from it!!!).It seems that the embedded image is hardcoded for da0s1a (or similar)...which is a pseudo-scsi device over usb. If someone knows for sure, please inform us.
Anyway, like most things in life, there are usually more than one way to get it to work. To make things short, I wrote the same embedded image to a USB stick, mounted it on the Alix, and booted the kernel from CF and told it when it halted on <mountroot>ufs:da0s1a.
Voila...PfSense now works....using the CF for kernel and USB Flash for root filesystem.
This is amusing, but If anyone KNOWS the fix for this, please share it.
It would also be a good idea to make a known good working image for Alix available for download. (To spare others the agony)I would also comment that if the image should be written to Compact Flash with a USB device, that this information be included in the Embedded documentation.
---------- Thanks for your insights and recommendations! ----------------------------------</mountroot></mountroot>
-
ALIX works perfectly on all embedded images we have. 1.2.3 release and 2.0 snapshots.
If it doesn't boot properly, make sure you are using the latest BIOS (check the doc wiki for upgrade instructions.)
-
The bios on the Alix is 99h…....does it need to be something else.
If the images just worked, I wouldn't be posting this....
I'm sure the images work for YOU and whatever method you use, but they are not working for me and quite a few others...You have still not answered the basic question.
1.) Do you need to write the image to CF with a USB device for Alix ? YES or NO.
--THaaaaaNk- YOU!
-
1.) Do you need to write the image to CF with a USB device for Alix ? YES or NO.
It shouldn't be necessary to use a USB drive. I suspect you have just worked around something you didn't expect to see.
You said "I now find that current (frustrating) FreeBSD versions do not recognize the CF at all" but you later report "PfSense now works….using the CF for kernel and USB Flash for root filesystem." To my mind there is an inherent contradiction in "does not recognize the CF at all" and "using the CF for kernel".
You also mention mountroot issues. Here's what I suspect is happening: The image has been correctly written to the CF. The system boots from the CF and FreeBSD reads /etc/fstab from the boot drive to mount the root file system. The installed image has specified some filesystem location which doesn't exist on your system so you see the mountroot prompt. At this point you should type in ufs:adxs1a (where x is 0 or 1 or 2 or 3 depending on your hardware and ad indicates an IDE drive or something emulating an IDE drive such as a CF card in a CF to DE adapter). Then after the device boots you will probably have to edit /etc/fstab to correct the location of the root file system.
Please provide the startup output when booting from the CF so we have a better understanding of what is happening.
-
The bios on the Alix is 99h…....does it need to be something else.
No, that is the correct version.
If the images just worked, I wouldn't be posting this….
I'm sure the images work for YOU and whatever method you use, but they are not working for me and quite a few others...They work for hundreds, perhaps thousands, of other ALIX users. You are the only one with the problem; it is not a common issue if you are on the current BIOS.
1.) Do you need to write the image to CF with a USB device for Alix ? YES or NO.
No. Just dd the image to CF from FreeBSD/Linux, or use physdiskwrite/win32-disk-imager on Windows.
The system boots from the CF and FreeBSD reads /etc/fstab from the boot drive to mount the root file system. The installed image has specified some filesystem location which doesn't exist on your system so you see the mountroot prompt.
This doesn't happen with NanoBSD. Slices are mounted using UFS labels, not directly as hardware devices.
-
*** Update to this Problem ***
1. Using a linux box to… Zcat pfSense-1.2.3-RELEASE-2g-nanobsd.img.gz | dd of=/dev/hda... to a Sandisk 2Gb Ultra Compact Flash results in getting a <mountroot>prompt, if you can get it to boot on a Alix 2D3 platform with the current .99h bios .
This is likely a LABELING issue -- message is
Trying to mount root from ufs:/dev/ufs/pfsense0....
NOTE: If I have a USB-thumbdrive (da0s1a) installed on the Alix, I get no prompt for <mountroot>. Either the CF image (partitions) are not labeled right to begin with, or the Kernel booting from CF has a thing for da0s1a .
2. I have verified the glabel on the USB-thumbdrive to be what is specified in the CF image fstab.
ufs:/dev/ufs/pfsense0
ufs:/dev/ufs/pfsense1
ufs:/dev/ufs/cf
Editing the Compact Flash fstab to change it to reflect actual devices
/dev/ad0s1a
/dev/ad0s2a
/dev/ad0s3
...............did not result in a loading a root file system from Compact Flash.3. Compact Flash Adapters used are not USB, they are IDE-CF.
I am able to install FreeBSD 4.10 and the latest NetBSD 5 to the CF while it is in the IDE-CF adapter in my laptop as well as boot and run both FreeBSD 4.10 and NetBSD from the CF. Devices show up as ad0 and wd0 respectively.Versions of FreeBSD later than 4.10 (ie. 7.2 and current) do not SEE the CF card at all even though the system bios sees it just fine.
I'm not looking for a "Science Project" here, I just want it to work the way it should. ___ Thanking you in advance for your assistance__</mountroot></mountroot>
-
A few things to try:
- Decompress the image first with gzip -d or gunzip, and then try to image the card
- On dd, put a bs=64k, or bs=1M.
- Go to wally world and buy a $12 USB CF reader and image the card on it. :-)
-
Hi all –-
In response....
I have dumped the decompressed image instead of zcatting the gzipped one.
I have use the bs=64k setting already (because of the bsd obs=64k)I seem to remember that someone here said that a USB-CF adapter was not necessary to install pfsense.
Theoretical What-if Question ?
What if I were to dump the pfsense image to a 2GB thumb drive first.
Get it to boot & run from flash.....
Then dump the thumb drive directly to a 2GB CF card.If the Thumb drive boots/works... the CF should as well...No?
-
ALIX devices can't boot straight from USB.
-
Hi all –-
I'm aware that the Alix will not boot from USB, but a STD PC will if the bios supports it. If it doesn't boot on a PC, it probably won't boot on a Alix...been using BSD's for over 10yrs. so ....
Where do I find the kernel config file for the pfSense-1.2.3-RELEASE embedded kernel. Is this available in developer land somewhere?
There used to be a kernel config option that sets the root device.
I do have a 7.2 FreeBSD setup on my main system...but I did not see the root device option in the GENERIC kernel...I expect that the embedded kernel has some options specific to embedded platforms... Thanks!Another thought is that the CF contains the kernel, but never gets seen as a system device (namely ad0). Kernel fully loads to the point to mount the root filesystem....so the kernel is booting on CF because the Alix bios sees the CF.
So, if someone who has pfsense1.2.3 running properly on the alix platform...
Can you tell me if the Compact Flash shows up as /dev/ad0 --- or is it just /dev/ufs/pfsense0? Can you fdisk /dev/ad0 ? If you can ....Thanks! -
On 1.2.3 and 2.0, root is mounted from /dev/ufs/pfsense0 (or pfsense1 if you're on the alternate slice)
The kind of problems you are describing would be all-or-nothing scenarios, not ones that work for one person but not another.
It works perfectly for 99% of people on that platform - it must be something specific to your set that is causing the issue. Either the CF, or the imaging method.
-
I'll repeat what I said previously–--
The CF boots and runs FreeBSD 4.10 and NetBSD 5.0
It also boots the FreeBSD 7.2 kernel in pfsense right now....SO if the pfsense image is good... the root partition on the compact flash should be labeled correctly and be usable when the kernel goes to load the filesystem.
....so kindly be specific and tell me whats wrong with the CF?
I am dumping the image according to the documentation.
This is not my first embedded pfsense installation. So if your documentation is correct,....I am doing it the "right way", otherwise your documentation is faulty.It really makes me wonder what the "paid" support is like ???
I appreciate your answers, but frankly Jimp you are not much help, and I really don't need to hear "it works for 99% ...blah blah", <bs>because it obviously doesn't...
- Nothing to see here...Move</bs>
-
It really makes me wonder what the "paid" support is like ???
We provide an exceptional level of service that customers are very happy with. We know what we're doing, to say the least.
I appreciate your answers, but frankly Jimp you are not much help, and I really don't need to hear "it works for 99% …blah blah", <bs>because it obviously doesn't...</bs>
It absolutely does, there really isn't anything to it. Our resellers combined ship in excess of 1000 ALIX boards a month pre-installed and never have an issue. They comprise a large percentage of our development hardware, we all have them, and never have issues. It works for well over 99%, you're the first I've seen on the right BIOS that has had issues. If you're exactly following the instructions to write it out, then something else is wrong, try a different CF writer, different OS, something. All the instructions are 100% correct, and it works perfectly in an ALIX after following them, so you have some kind of other issue if that's the case.
-
I have the best luck with obs=64k … In some cases I have found that bs=64k will fail and obs=64k works. Maybe give this a try.
-
*** PROBLEM SOLVED ***
Thanks for all the constructive posts….
Bought an Ativa USB/CF adapter (it just does CF nothing else). on Saturday.
Boot into FreeBSD 7.2 and adapter and flash are seen as da0...
Write the pfsense image ... but after writing the image.....
I now get messages referring to the glabels that are being written to CF.
ie.) /dev/ufs/pfsense0 , etc.
Now that's something I never saw when I dumped the image in Linux !
Moved the CF to the Alix...boots just fine.I might be wrong, but it seems that you cannot just dd the image in linux any longer....
Linux has absolutely no idea how to handle the FreeBSD glabels. -
I might be wrong, but it seems that you cannot just dd the image in linux any longer….
Linux has absolutely no idea how to handle the FreeBSD glabels.Nor does it need to, you're simply dumping a disk image to disk. Though your Linux distro is apparently doing something it shouldn't be when simply running dd, and hosing the disk in the process. Which distro are you running?