[c-nsp] partition-table and file-system type on Cisco 4500 SUP compact-flash

Martin T m4rtntns at gmail.com
Mon Jun 17 10:18:25 EDT 2013


One utility, which supports reading the "Class A" file-system, is
ciscoflash(http://freecode.com/projects/ciscoflash) by Simon Lockhart:

T42 ~ # ciscoflash -d /dev/sdb dir
-#- --type-- --crc--- -seek-- -length- -----date/time------ name
  1 00000002 E81CCB85 09831C   426652 Jun 17 2013 03:56:03
cat4500-ios-promupgrade-122_31r_SGA7
T42 ~ # ciscoflash -d /dev/sdb extract
T42 ~ # ls -l cat4500-ios-promupgrade-122_31r_SGA7
-rw-r--r-- 1 root root 426652 2013-06-17 17:13
cat4500-ios-promupgrade-122_31r_SGA7
T42 ~ #

However, it does not support writing to "Class A" file-systems.


regards,
Martin

2013/6/17, Martin T <m4rtntns at gmail.com>:
> Hi,
>
> older Cisco 4500 series supervisor engines support compact flash
> cards. However, Cisco-branded 32MB compact-flash taken from Cisco 1800
> series router is not recognized by SUP:
>
> Catalyst4500#dir slot0:
> %Error opening slot0:/ (Bad device info block)
> Catalyst4500#
>
> After executing "format slot0:", the compact flash became accessible:
>
> Catalyst4500#format slot0:
> Format operation may take a while. Continue? [confirm]
> Format operation will destroy all data in "slot0:".  Continue? [confirm]
> Enter volume ID (up to 64 chars)[default slot0]:
>
> Format of slot0 complete
> Catalyst4500#dir slot0:
> Directory of slot0:/
>
> No files in directory
>
> 31784960 bytes total (31784960 bytes free)
> Catalyst4500#
>
>
> The problem is, that now I'm not able to access this compact-flash in
> my PC. Looks like it even does not have a partition-table:
>
> T42 ~ # dmesg | tail
> [1983944.880491] ata5.00: 62720 sectors, multi 0: LBA
> [1983944.888476] ata5.00: configured for PIO0
> [1983944.888794] scsi 4:0:0:0: Direct-Access     ATA      STI Flash
> 8.0.0  01/1 PQ: 0 ANSI: 5
> [1983944.889398] sd 4:0:0:0: Attached scsi generic sg2 type 0
> [1983944.891205] sd 4:0:0:0: [sdb] 62720 512-byte logical blocks:
> (32.1 MB/30.6 MiB)
> [1983944.891403] sd 4:0:0:0: [sdb] Write Protect is off
> [1983944.891414] sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00
> [1983944.891501] sd 4:0:0:0: [sdb] Write cache: enabled, read cache:
> enabled, doesn't support DPO or FUA
> [1983944.910031]  sdb: unknown partition table
> [1983944.910632] sd 4:0:0:0: [sdb] Attached SCSI removable disk
> T42 ~ # fdisk -lu /dev/sdb
>
> Disk /dev/sdb: 32 MB, 32112640 bytes
> 255 heads, 63 sectors/track, 3 cylinders, total 62720 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x00000000
>
> Disk /dev/sdb doesn't contain a valid partition table
> T42 ~ # file -s /dev/sdb
> /dev/sdb: data
> T42 ~ # dd if=/dev/sdb bs=512 count=1 | hexdump -C
> 00000000  88 06 35 76 ea 01 00 00  01 00 00 00 00 00 04 00
> |..5v............|
> 00000010  ff ff ff ff 01 00 06 00  03 00 00 00 e5 01 00 00
> |................|
> 00000020  00 00 00 01 02 00 7c 60  00 00 00 00 02 00 c2 ff
> |......|`........|
> 00000030  00 00 3e 00 e8 01 00 00  01 00 00 00 e9 01 00 00
> |..>.............|
> 00000040  01 00 00 00 6c 73 74 6f  00 30 00 00 00 00 00 00
> |....lsto.0......|
> 00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> |................|
> *
> 000000a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 01 00
> |................|
> 000000b0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
> |................|
> *
> 00000100  d0 ba 1e 0b 02 00 f8 5f  b8 80 ff ff ff ff ff ff
> |......._........|
> 00000110  6f 79 61 64 66 2d 6c 73  62 69 6d 2d 00 00 00 00
> |oyadf-lsbim-....|
> 00000120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> |................|
> *
> 00000140  45 7f 46 4c 02 01 00 01  00 00 00 00 00 00 00 00
> |E.FL............|
> 00000150  02 00 70 00 00 00 01 00  00 01 00 00 00 00 34 00
> |..p...........4.|
> 00000160  02 00 68 5e 00 00 00 00  34 00 20 00 01 00 28 00  |..h^....4.
> ...(.|
> 00000170  0a 00 09 00 00 00 01 00  01 00 00 00 00 01 00 00
> |................|
> 00000180  00 01 00 00 01 00 b4 57  29 00 a4 c2 00 00 07 00
> |.......W).......|
> 00000190  01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> |................|
> 000001a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> |................|
> *
> 1+0 records in
> 1+0 records out
> 512 bytes (512 B) copied, 0.0158727 s, 32.3 kB/s
> 00000200
> T42 ~ #
>
>
> "format" command creates a "Class A" file-system? Is this "Class A"
> file-system some kind of Cisco-proprietary file-system? is there a way
> to access this file-system under modern(2.6/3.x) Linux kernel?
>
>
> regards,
> Martin
>


More information about the cisco-nsp mailing list