12-20-2014 12:37 PM - edited 03-03-2019 07:42 AM
Hi guys,
I would like to present one interesting and not well explained so far Compact Flash (CF) question here and to have it as a future reference for anybody in similar situation.
A 128M CF - booting without problems | 8G CF formated with FAT32 - no boot possible | 8G CF with FAT16 - should boot normally |
C3825ISR#sh flash: filesys ******** ATA Flash Card Geometry/Format Info ******** ATA CARD GEOMETRY Manufacturer Name Model Number TOSHIBA THNCF128MBA Serial Number STCB21M82017D98691C1 Firmware Revision 2.00 Number of Heads 8 Number of Cylinders 978 Sectors per Cylinder 32 Sector Size 512 Total Sectors 250368 ATA PARTITION 1 INFO Start Sector 32 Number of Sectors 250336 Size in Bytes 128172032 File System Type FAT16 Number of FAT Sectors 123 Sectors Per Cluster 8 Number of Clusters 31227 Number of Data Sectors 249816 Base FAT Sector 237 Base Root Sector 483 Base Data Sector 515 ATA MONLIB INFO Image Monlib size 118124 Disk Monlib Size 116764 Disk Space Available 120832 Name piptom-atafslib-m Start sector 2 End sector 230 Updated By C3825-ADVENTERPRISEK9-M12.4(22)YB8 Version 2 C3825ISR# | C3825ISR#sh flash: filesys ******** ATA Flash Card Geometry/Format Info ******** ATA CARD GEOMETRY Manufacturer Name Model Number LEXAR ATA FLASH CARD Serial Number 41803419207322165421 Firmware Revision 20101110 Number of Heads 16 Number of Cylinders 15506 Sectors per Cylinder 63 Sector Size 512 Total Sectors 15630048 ATA PARTITION 1 INFO Start Sector 63 Number of Sectors 15629985 Size in Bytes 8002552320 File System Type FAT32 Number of FAT Sectors 15234 Sectors Per Cluster 8 Number of Clusters 1949935 Number of Data Sectors 15599480 Base FAT Sector 32 Base Root Sector NA Base Data Sector 30500 Root Cluster 2 Backup Boot Sector 0 FS Info Sector 1 ATA MONLIB INFO Image Monlib size 118124 Disk Monlib Size NA Disk Space Available NA Name NA End Sector NA Start sector NA Updated By NA Version NA C3825ISR# | C3825ISR#sh flash: filesys ******** ATA Flash Card Geometry/Format Info ******** ATA CARD GEOMETRY Manufacturer Name Model Number LEXAR ATA FLASH CARD Serial Number 41803419207322165421 Firmware Revision 20101110 Number of Heads 16 Number of Cylinders 15506 Sectors per Cylinder 63 Sector Size 512 Total Sectors 15630048 ATA PARTITION 1 INFO Start Sector 63 Number of Sectors 524225 Size in Bytes 268403200 File System Type FAT16 Number of FAT Sectors 256 Sectors Per Cluster 8 Number of Clusters 65430 Number of Data Sectors 523440 Base FAT Sector 239 Base Root Sector 751 Base Data Sector 783 ATA MONLIB INFO Image Monlib size 118124 Disk Monlib Size 118124 Disk Space Available 121856 Name piptom-atafslib-m Start sector 2 End sector 232 Updated By C3825-ADVENTERPRISEK9-M12.4(24)T8 Version 2 C3825ISR# |
That 8G CF in the middle column is formatted with FAT32 and it's not going to boot - that's normal.
The same 8G CF was zeroed and partitioned to avoid the file-system limitations - FAT16 partition cannot be bigger than 4G and the fat table cannot address more than 2G. The first partition (256M) is formatted from the router with FAT16. Since all those activities were executed on the router, it generated even the additional ATA information appropriately (in the right column).
With the 3rd column CF we should be able to boot C3825ISR using "boot [flash-fs:][partition-number:][filename]" syntax - in this case:
boot system flash:0:c3825-adventerprisek9-mz.124-24.T8.bin
However, I'm hitting the ROMMON and the FC is not readable there
rommon 1 > set
PS1=rommon ! >
WARM_REBOOT=FALSE
BSI=0
RANDOM_NUM=397400253
BOOT=flash:0:c3825-adventerprisek9-mz.124-24.T8.bin,12;flash:c3825-adventerprisek9-mz.124-24.T8.bin,1;
RET_2_RTS=12:28:12 EST Sat Dec 20 2014
RET_2_RCALTS=1419096493
?=1
rommon 2 >
rommon 2 > dir flash:
program load complete, entry point: 0x8000f000, size: 0xcb40
open(): Open Error = -66
dir: cannot open device "flash:"
rommon 3 >
rommon 3 > boot flash:0:c3825-adventerprisek9-mz.124-24.T8.bin
illegal partition number
loadprog: error - on file open
boot: cannot load "flash:0:c3825-adventerprisek9-mz.124-24.T8.bin"
rommon 4 >
The 8G CF is the smalles one I found in the closest to my place Best Buy. It's a high speed (UDMA) one (Lexar PLATINUM II, 200x)
Most likely this type of card is not fully supported, but I wasn't able to find a clear technical explanation - just guesses around ;)
It seems like this compatibality is related somehow to the CF+ and CompactFlash specification revisions.
Any idea what is the correct explanation?
12-20-2014 02:18 PM
I've been playing with CF and USB since 2006 and all I can say is this: Do not just trust the "manufacturer" of the media. For example, Lexar, Toshiba, Sandisk, etc do NOT manufacture the CF/USB thumb drive.
All the big companies like the ones mentioned above buys them by a significant quantity and "formats" them to a certain physical shape and appearance. This is why you'll see "strange" things like, for example, you've got two Lexar-branded CF but are different sizes. You'll see one of the two work and the other won't. This is because some of the real manufacturers do NOT follow the standard. Cisco appliances support only Type 2 CF. Same goes with USB thumb drives. Some work, some don't (even if they are branded the same but of different sizes).
FAT16 partition cannot be bigger than 4G and the fat table cannot address more than 2G.
Not necessarily true. Depends on who's doing the formating. I've got three 8Gb Lexar Cruzer Facet and they work with Cisco routers and switches (didn't try other appliances). The main thing to consider is I opted to format the USB thumb drives using the Cisco appliances.
12-30-2014 05:17 AM
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
To add just a bit to Leo's post, you also need to realize quality of code that supports CF varies too. Your results might vary between Cisco devices or even between same version of Cisco device with different code bases (especially bootstrap version).
12-30-2014 06:27 PM
you also need to realize quality of code that supports CF varies too.
Good point, Joseph.
The same USB thumb drive will work with some IOS, for example 15.0(2)SE4 and below, but won't work on higher IOS level like 15.2(2)E and above. This is all due to the bad IOS codes.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide