Is the VxWorks file system corrupted and is it possible to fix it?

I have a device with VxWorks 5 connected via a serial port. The device doesn’t boot properly, but I can get access to its CLI via PuTTY. OS looks working, for example I can get a list of tasks by the “i” command. But I can’t get any information about file system.

  • The “ls” command returns an error:
-> ls
Can't open ".".
value = -1 = 0xffffffff
  • The “pwd” command returns nothing:
-> pwd

value = 1 = 0x1
  • The “chkdsk” command just doesn’t work:
-> chkdsk
errno = 0xc0007
value = -1 = 0xffffffff

Does it mean that the file system is corrupted? Is there any chance to re-flash such device?

You could first check the device list and see if the device you are trying to access is still there (i.e. run devs in the C shell) and then run dosFsShow to see some file system information.

You should also post this question on the Wind River knowledge forum here: https://ask.windriver.com/en/questions/

The next block shows the dosFsShow output on VxWorks 5.5.1.

Adding 3311 symbols for standalone.


                VxWorks

Copyright 1984-2002  Wind River Systems, Inc.

            CPU: PC PENTIUM
   Runtime Name: VxWorks
Runtime Version: 5.5.1
    BSP version: 1.2/3
        Created: Feb  8 2011, 07:03:35
  WDB Comm Type: WDB_COMM_END
            WDB: Ready.

-> bootParamsShow sysBootLine

boot device          : elPci
unit number          : 0
processor number     : 0
host name            : hx
file name            : vxWorks
inet on ethernet (e) : 192.168.10.88
host inet (h)        : 192.168.10.132
user (u)             : user
ftp password (pw)    : password
flags (f)            : 0x8
target name (tn)     : vxp2
startup script (s)   : script.txt

value = 1 = 0x1
-> devs
drv name
  0 /null
  1 /tyCo/0
  1 /tyCo/1
  3 /fd0
  3 /ata0a
  5 hx:
  6 /vio
value = 25 = 0x19
-> i

  NAME        ENTRY       TID    PRI   STATUS      PC       SP     ERRNO  DELAY
---------- ------------ -------- --- ---------- -------- -------- ------- -----
tExcTask   excTask       df84410   0 PEND         3edea3  df84358       0     0
tLogTask   logTask       df81a70   0 PEND         3edea3  df819a8       0     0
tNbioLog   3cc130        df7f404   0 PEND         3184fb  df7f358       0     0
tShell     shell         de8a928   1 READY        3e2ad0  de8a58c       0     0
tWdbTask   wdbTask       de8bb4c   3 PEND         3184fb  de8ba40       0     0
tNetTask   netTask       df37c94  50 PEND         3184fb  df37c38       0     0
tDcacheUpd dcacheUpd     df5dc3c 250 DELAY        3e2421  df5dbc4       0    13
value = 0 = 0x0
-> dosFsShow "/ata0a"

volume descriptor ptr (pVolDesc):       0xdf3a2d0
cache block I/O descriptor ptr (cbio):  0xdf3aa18
auto disk check on mount:       NOT ENABLED
max # of simultaneously open files:     22
file descriptors in use:        0
# of different files in use:    0
# of descriptors for deleted files:     0
# of  obsolete descriptors:     0

current volume configuration:
 - volume label:        NO LABEL ; (in boot sector:                )
 - volume Id:           0x4d51332d
 - total number of sectors:  74,276
 - bytes per sector:         512
 - # of sectors per cluster: 4
 - # of reserved sectors:    1
 - FAT entry size:           FAT16
 - # of sectors per FAT copy:   73
 - # of FAT table copies:    2
 - # of hidden sectors:      0
 - first cluster is in sector # 179
 - Update last access date for open-read-close = FALSE
 - directory structure:      VFAT
 - root dir start sector:       147
 - # of sectors per root:       32
 - max # of entries in root:    512

FAT handler information:
------------------------
 - allocation group size:    2 clusters
 - free space on volume:     37,935,104 bytes
value = 0 = 0x0
->