Cisco Flash help needed
All, I'm writing some software which will allow me to read and write the PCMCIA flash cards from Ciscos on a linux laptop. I have got reading working fine for Class A (Cisco 7x00 and Cisco 12000) and Class B (Cisco 2600/3600) cards, and am just about to move onto being able to write to the cards. I've worked out the format of the flash filesystem with no problems, and am confident that I'll be able to write new files to the filesystem, apart from one bit - the CRC I've come across 2 CRCs so far - a 32 bit one used on the Class A cards, and a 16 bit one used on the Class B cards. I've tried a standard crc32 routine (stolen from ssh), but it doesn't match the CRC reported by the router. Is there anyone good at understanding CRC routines who can help me reverse-engineer the cisco CRC, or perhaps does someone have some inside information they would like to share? Secondly, I'd like to test my code against a wider range of cisco flash formats. I've got access to 1600/2600/3600/7200/12000/LS1010. If you've got a linux laptop with pcmcia support, and access to a cisco router not in that list, would you mind sending me a dump of your flash card? You can make an image of the flash card thus: $ dd if=/dev/mem0c of=/some/where/ciscoflash.dmp bs=1048576 count=20 $ gzip /some/where/ciscoflash.dmp (replace /dev/mem0c if necessary, and the =20 on the end is the size of the card in MB) If you're not happy with sending me your IOS image, tftp a couple of text files onto a formatted flash card and use that. Please ask me first before emailing, if the gzip'd image is more than a couple of meg! Please don't ask me for the code yet! I'll let the list know when it's available... Many thanks, Simon -- Simon Lockhart | Tel: +44 (0)1737 839676 Internet Engineering Manager | Fax: +44 (0)1737 839516 BBC Internet Services | Email: Simon.Lockhart@bbc.co.uk Kingswood Warren,Tadworth,Surrey,UK | URL: http://support.bbc.co.uk/
I've come across 2 CRCs so far - a 32 bit one used on the Class A cards, and a 16 bit one used on the Class B cards. I've tried a standard crc32 routine (stolen from ssh), but it doesn't match the CRC reported by the router. Is there anyone good at understanding CRC routines who can help me reverse-engineer the cisco CRC, or perhaps does someone have some inside information they would like to share?
After some suggestions from various people, I tried uploading a few test files onto a Cisco and seeing how the CRCs worked out. It turns out it's not a true CRC at all, but rather a variation on the TCP checksum algorithm.
Please don't ask me for the code yet! I'll let the list know when it's available...
v0.1 of the code is now available (read only at the moment): ftp://ftp.bbc.co.uk/pub/ciscoflash/ Enjoy, Simon -- Simon Lockhart | Tel: +44 (0)1737 839676 Internet Engineering Manager | Fax: +44 (0)1737 839516 BBC Internet Services | Email: Simon.Lockhart@bbc.co.uk Kingswood Warren,Tadworth,Surrey,UK | URL: http://support.bbc.co.uk/
Hi all, Anyone know if there's already something like this for NT? :) What exactly is the purpose anyway? Extra storage? If so, how fast can the labtop write/read to the flash? What is the biggest size of a flash anyone ever seen? I only saw 110M card before. While we are on the subject, is there way to look at the source code of the cisco ios? Kind Regards, /l
Anyone know if there's already something like this for NT? :)
No - although now I've done the work of working out the format, I'm sure someone will do it.
What exactly is the purpose anyway? Extra storage? If so, how fast can the labtop write/read to the flash?
The purpose is to avoid having to use tftp to get files on/off the cisco. The laptop can read the cards at the same speed as the cisco.
What is the biggest size of a flash anyone ever seen?
The biggest I've got is 20M
I only saw 110M card before.
I think you get up into the PCMCIA hard drives at those capacities.
While we are on the subject, is there way to look at the source code of the cisco ios?
Yes - go work for Cisco ;) Simon -- Simon Lockhart | Tel: +44 (0)1737 839676 Internet Engineering Manager | Fax: +44 (0)1737 839516 BBC Internet Services | Email: Simon.Lockhart@bbc.co.uk Kingswood Warren,Tadworth,Surrey,UK | URL: http://support.bbc.co.uk/
On Fri, 9 Feb 2001, Simon Lockhart wrote:
Anyone know if there's already something like this for NT? :)
No - although now I've done the work of working out the format, I'm sure someone will do it.
What exactly is the purpose anyway? Extra storage? If so, how fast can the labtop write/read to the flash?
The purpose is to avoid having to use tftp to get files on/off the cisco. The laptop can read the cards at the same speed as the cisco.
What is the biggest size of a flash anyone ever seen?
The biggest I've got is 20M
the biggest I've seen from cisco is 24MB
I only saw 110M card before.
I think you get up into the PCMCIA hard drives at those capacities.
the biggest ata-flash cards (type II pcmcia) are around 800MB right now http://www.simpletech.com/flash/ata.html
While we are on the subject, is there way to look at the source code of the cisco ios?
Yes - go work for Cisco ;)
Simon
-- -------------------------------------------------------------------------- Joel Jaeggli joelja@darkwing.uoregon.edu Academic User Services consult@gladstone.uoregon.edu PGP Key Fingerprint: 1DE9 8FCA 51FB 4195 B42A 9C32 A30D 121E -------------------------------------------------------------------------- It is clear that the arm of criticism cannot replace the criticism of arms. Karl Marx -- Introduction to the critique of Hegel's Philosophy of the right, 1843.
I only saw 110M card before.
I think you get up into the PCMCIA hard drives at those capacities.
the biggest ata-flash cards (type II pcmcia) are around 800MB right now
And then, of course, there's the 1Gb IBM Microdrive. Simon -- Simon Lockhart | Tel: +44 (0)1737 839676 Internet Engineering Manager | Fax: +44 (0)1737 839516 BBC Internet Services | Email: Simon.Lockhart@bbc.co.uk Kingswood Warren,Tadworth,Surrey,UK | URL: http://support.bbc.co.uk/
the biggest ata-flash cards (type II pcmcia) are around 800MB right now
And then, of course, there's the 1Gb IBM Microdrive.
If type-III is acceptible, SimpleTech makes a 1GB flash card as well. List price of $3278. Buy.com has it for $1862. http://www.us.buy.com/retail/product.asp?sku=10236089&loc=101 -- David
On Fri, Feb 09, 2001, Simon Lockhart wrote:
I only saw 110M card before.
I think you get up into the PCMCIA hard drives at those capacities.
the biggest ata-flash cards (type II pcmcia) are around 800MB right now
And then, of course, there's the 1Gb IBM Microdrive.
Has anyone tried this with a cisco, just out of morbid curiousity? The requirements for a flash filesystem are different from a disk filesystem.. Adrian -- Adrian Chadd "Romance novel?" <adrian@creative.net.au> "Girl Porn." - http://www.sinfest.net/d/20010202.html
Has anyone tried this with a cisco, just out of morbid curiousity? The requirements for a flash filesystem are different from a disk filesystem..
ata flash cards, are just that, ide interfaces to blobs of memory. ata disks look the same from the perspective of a device looking to read/write from them. disks happen to be significantly faster than flash in most cases but the 16bit pcmcia interface is fairly slow as well... joelja
Adrian
-- -------------------------------------------------------------------------- Joel Jaeggli joelja@darkwing.uoregon.edu Academic User Services consult@gladstone.uoregon.edu PGP Key Fingerprint: 1DE9 8FCA 51FB 4195 B42A 9C32 A30D 121E -------------------------------------------------------------------------- It is clear that the arm of criticism cannot replace the criticism of arms. Karl Marx -- Introduction to the critique of Hegel's Philosophy of the right, 1843.
And then, of course, there's the 1Gb IBM Microdrive.
Has anyone tried this with a cisco, just out of morbid curiousity? The requirements for a flash filesystem are different from a disk filesystem..
I just had to try it... rt0#dir disk1: Directory of disk1:/ No files in directory 1075347456 bytes total (1075347456 bytes free) rt0#sh disk1: all ******** ATA Flash Card Geometry/Format Info ******** ATA CARD GEOMETRY Number of Heads: 64 Number of Cylinders 2088 Sectors per Cylinder 63 Sector Size 512 Total Sectors 8418816 ATA CARD FORMAT Number of FAT Sectors 129 Sectors Per Cluster 64 Number of Clusters 32817 Number of Data Sectors 2100609 Base Root Sector 259 Base FAT Sector 1 Base Data Sector 291 Simon -- Simon Lockhart | Tel: +44 (0)1737 839676 Internet Engineering Manager | Fax: +44 (0)1737 839516 BBC Internet Services | Email: Simon.Lockhart@bbc.co.uk Kingswood Warren,Tadworth,Surrey,UK | URL: http://support.bbc.co.uk/
participants (5)
-
[Put-your-name-here]
-
Adrian Chadd
-
David Charlap
-
Joel Jaeggli
-
Simon Lockhart