September 3, 2010

Can’t write mem on ASA

x
Bookmark

frustratedToday while working on a config of a new ASA5510 I ran into a very strange error that I wanted to share with you.

I was configured the ASA as usual. When I was finished, I issued the standard "write mem" and saw the most bizarre error message...

asa# wr mem
Building configuration…
Cryptochecksum: 85ef8693 914a94f3 03a5bb9e 823bb285
%Error opening disk0:/.private/startup-config (Read-only file system)
Error executing command [FAILED]

I was speachless. What the heck does that mean? I could see the startup-config file on the firewall. I could do a "sh run" and see my running config. But I could not copy my running config to startup.

I tried a reboot but that only wiped out my config completely. I had to start over from scratch.

The solution was actually very simple.

Cisco has a built in file check utility to fix problems just like this. Many folks who are familiar with unix systems also know the file system check or fsck utility.

To fix this problem, from the command prompt run fsck...

asa# fsck disk0:

This of course assume that disck0: is your flash.

If this is successful you should see the following output:
asa# fsck of disk0: complete

You should now be able to save your config

asa# wr mem

Building configuration…

Cryptochecksum: 85ef8693 914a94f3 03a5bb9e 823bb285

80911 bytes copied in 4.60 secs (20227 bytes/sec) [OK]

If this still fails you need to contact Cisco TAc and get a replacement flash card

Here is the complete transaction in its entirety:

asa#copy run start

Source filename [running-config]?
Cryptochecksum: e958a84f 73198ab5 585c5a9f 9d39e3a8

%Error opening disk0:/.private/startup-config (Read-only file system)

asa# fsck disk0:
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Reclaimed 7 unused clusters (28672 bytes) in 2 chains.
Performing changes.
/dev/hda1: 76 files, 14623/15368 clusters

fsck of disk0: complete
asa# wr mem
Building configuration...
Cryptochecksum: b558388d cddfa287 d63f9b9a 10041e77

11870 bytes copied in 3.360 secs (3956 bytes/sec)
[OK]
asa#

I hope this helps you out as much as it did for me. I was tearing my hair out trying to figure out what was going on.

Until next time

FREAK!

No related posts.

Comments

  1. niko says:

    It works perfectly! Thank you very much.

  2. Naveen says:

    Super..I was having this issue and ur write up nailed it..

    By any chance is there any expalnation of the issue and its soln??

    I was haivng this issue only wen both the FWs were in failover mode.

    If the standby went down, I could wr mem on pri..

    Now I am able to do wen both are up…

  3. Ben says:

    We just had the same issue on our standby ASA 5520. The primary one was fine, but the failover standby ASA gave the exact message you saw. I actually first noticed there was a problem when trying to upgrade to the latest ASA and ASDM versions.

    Doing it via TFTP gave read-only errors, or no message at all but a failed copy, and doing it via ASDM just reported ‘error code 400′ which was fairly meaningless.

    Running that fsck has fixed it, so glad to have found this post, thanks.

  4. Chethan says:

    ciscoasa# fsck disk0:
    umount: Couldn’t umount /mnt/disk0: Invalid argument
    dosfsck 2.11, 12 Mar 2005, FAT32, LFN
    /dev/hda1: 32 files, 56/62334 clusters
    mount: Mounting /dev/hda1 on /mnt/disk0 failed: Device or resource busy

    fsck of disk0: complete
    WARNING: Restoring security context mode failed.

    the problem still exist Kindly help…!

    • Joe says:

      I haven’t run into this problem before. Are you running multiple contexts? Is this in a stand along ASA or a FWSM? I’ve seen some issues with code versions that may give the warning message. Sorry that this is much more help.

  5. Adam says:

    I have the same error message concerning disk0: but it’s because the internal flash has died. The device is still running and I’ve managed to pop in an external flash card, format it as disk1, and upload the correct software to it. I have changed the boot system and asdm image with the following command:

    boot system disk1:/asa724-k8.bin
    asdm image disk0:/asdm-61551.bin

    I then ran:

    copy run disk1:/ (- which executed successfully)

    Now I can’t ‘wr mem’ to disk1. I still get the error mentioned about disk0 in your original post. Being that disk0 is destroyed, how can i make this thing default to disk1. I’m assuming that’s what needs to happen.

    Thanks!

    A

    But I need to be able to ‘wr mem’ to disk1. Is this possible?

Speak Your Mind

*