Slightly undersized CF cards with nanobsd images?
-
Hey, I just recently purchased a stack of 5 Alix boxes to use with pfSense. They came with "2GB" CF cards.
However, when I try to use physdiskwrite to write the 2GB nanobsd images to them, I always get the following error:
2011226112/2048901120 bytes written
Write error after 2011226112 bytes.However, the resulting CF card appears to boot and work properly (but I don't trust it).
Flashing one of the 1GB nanobsd images doesn't result in an error.My request/question:
Should I continue to use the 1GB nanobsd images, and if so, can the 2GB images be "shrunk" to take into account the apparent multitude of cards that say they are one size when they are just a little smaller? -
You'll probably be safer using the 1GB images unless you really plan on filling up the card. Using less of the CF leaves more room for the wear leveling to work over time. Depending on the card, some will shrink little by little as sectors become unusable.
The 2GB cards can be sized when they are made, but not resized after the fact. I think the profile chosen was Sandisk, though I'd have to look up the sector size to be sure.
-
Just to note, I am in fact using SanDisk CF cards.
I will stick with the 1GB images, I don't think space will be a problem, I would be fine with 512MB CF cards, these are just what came with the Alix boxes when I ordered them.
Thanks!
-
pfsense_local.sh:export FLASH_MODEL="sandisk"
Not sure why yours are lower than what is defined in the list used by the builder.
-
Me either - its not a 1-off problem either, all 5 of the cards error at the exact same point when trying to flash the 2GB images. I tried several different 2GB snapshots as well.
Just to clarify, I am using SanDisk Ultra 2GB cards(supposedly 15MB/s, ha!)
From the Alix boot console:01F0 Master 848A SanDisk SDCFH-002G
Phys C/H/S 3897/16/63 Log C/H/S 974/64/63 -
The builder code shows this under Sandisk:
2048|2048mb|2g)
NANO_MEDIASIZE=expr 2048901120 / 512
NANO_HEADS=16
NANO_SECTS=63Which agrees with what you saw it trying to write.
What's even stranger is that Google has no relevant hits on your sector count, but a search for 2048901120 turns up several hundred.
-
Me either - its not a 1-off problem either, all 5 of the cards error at the exact same point when trying to flash the 2GB images. I tried several different 2GB snapshots as well.
Just to clarify, I am using SanDisk Ultra 2GB cards(supposedly 15MB/s, ha!)
From the Alix boot console:01F0 Master 848A SanDisk SDCFH-002G
Phys C/H/S 3897/16/63 Log C/H/S 974/64/63Interesting
512 X 63 X 16 X 3897 = 2,011,226,112
When my ALIX boots:
01F0 Master 848A SanDisk SDCFH2-002G Phys C/H/S 3970/16/63 Log C/H/S 992/64/63
512 X 63 x 16 x 3970 = 2,048,901,120
The only difference is the the "SDCFH2" in my vendor string as opposed to "SDCFH" above.
I believe we have found the problem!
-
oh nice I should have caught that!
I guess these cards are all 3 cylinders short of 2GB.
New phrase has been coined: "he's a few cylinders short of a gig, if you know what I mean"
-
oh nice I should have caught that!
I guess these cards are all 3 cylinders short of 2GB.
New phrase has been coined: "he's a few cylinders short of a gig, if you know what I mean"
My $.02: The build sizes should be recomputed to accommodate these "few cylinders short" CF cards. Those should be the new standards. In the case of the 2GB cards, we're only talking about a 36-ish MB difference.
-
My $.02: The build sizes should be recomputed to accommodate these "few cylinders short" CF cards. Those should be the new standards. In the case of the 2GB cards, we're only talking about a 36-ish MB difference.
The problem then is a question of limbo: "how low do we go?"
Your card is a few cyls short, but are there many more out there that are smaller? Or will using your size suffice?
I wonder if anyone has a database of card sizes that is actually worthwhile in this regard.
-
My $.02: The build sizes should be recomputed to accommodate these "few cylinders short" CF cards. Those should be the new standards. In the case of the 2GB cards, we're only talking about a 36-ish MB difference.
The problem then is a question of limbo: "how low do we go?"
Your card is a few cyls short, but are there many more out there that are smaller? Or will using your size suffice?
I wonder if anyone has a database of card sizes that is actually worthwhile in this regard.
I'm thinking the pfSense community can help. How about a new sticky thread: "Post Your CF card sizes" ?
-
Could it be that a 2GB card should have at least 2,000,000 bytes but may have more?
I don't know how the card size is used so this may not be a useful observation.
-
Could it be that a 2GB card should have at least 2,000,000 bytes but may have more?
I don't know how the card size is used so this may not be a useful observation.
Oh man, maybe we need to treat 2GB like HD makers do:
2GB where 1GB is defined as 1,000,000,000 bytes…After all, the cards do use the proper SI for that, they say 2GB, not 2GiB.
Time to follow the standards :) -
Good day,
I was also having all sorts of issues with trying to write to a 512MB CF card using physdiskwrite under windows, but as soon as I popped a Linux LiveCD (Knoppix) I performed the write without issue.
Another issue, is that some lower cost CF cards are made using "chip rejects" that do not meet specs. Just like most HDD, they all contain bad sectors that gets re-allocated by its firmware. I believe all the extra sectors that would have been used for re-allocation are all used up hence the unusually smaller size.
Finally, a couple of cheap CF reader I had were also to blame for not able to read larger CF cards.
-
Good day,
I was also having all sorts of issues with trying to write to a 512MB CF card using physdiskwrite under windows, but as soon as I popped a Linux LiveCD (Knoppix) I performed the write without issue.
Another issue, is that some lower cost CF cards are made using "chip rejects" that do not meet specs. Just like most HDD, they all contain bad sectors that gets re-allocated by its firmware. I believe all the extra sectors that would have been used for re-allocation are all used up hence the unusually smaller size.
Finally, a couple of cheap CF reader I had were also to blame for not able to read larger CF cards.
So what should the verdict be for those that have CF cards too small to fit the nanobsd images? I recently bought 2GB and 4GB cards and have no issues. But others no doubt would like to avoid purchasing new CF cards. I understand that pfSense is community supported and there really aren't a lot of resources to throw at this. I'm merely suggesting that the pfSense team needs to deliver a unified and unambiguous message to the users about this.
My personal feeling is that pfSense embedded is well worth the cost of new CF card(s).
-
Yeah, I totally agree, I would use only quality SanDisk CF cards.
However, in our local Fry's store, where no-name CF cards can be quite, well ALOT cheaper than even online, I buy several and perform a 10-pass destructive surface analysis, a read/seek/write test, check size, and return the ones or all of them that don't meet my expectations.
-
FWIW: I recently purchased 2 X 4GB Sandisk CF cards at Costco for $30.
In the early spring, I exhausted all of my local Radio Shack's supply of 2GB cards. These are the cards I've been using with recent snapshots and updates without incident.
-
Just note, all 5 of the SanDisk cards I have are the same size - too small, and they are from a "reputable" brand…so you can't trust much.
-
Just note, all 5 of the SanDisk cards I have are the same size - too small, and they are from a "reputable" brand…so you can't trust much.
I don't think yours are faulty, they're just an older (and unfortunately smaller) generation.
-
Just note, all 5 of the SanDisk cards I have are the same size - too small, and they are from a "reputable" brand…so you can't trust much.
You may have purchased "fake" SanDisk memory cards. They are mostly prevalent on auction sites and rarely on by major retailers.