Reformatting Flash


The Lucent operating system (ComOS) (TM) and all configurations of the Lucent PortMaster (TM) are stored in non-volatile RAM (NVRAM). The NVRAM is divided into partitions also called "cells", and like a disk these partitions contain files. One partition holds the configuration, another the system messages and so forth. This design allows the upgrade of the ComOS without disturbing the configuration and vice versa.

Warnings!

Extreme caution should be taken when erasing flash partitions. You can quickly remove all configuration and operating system from your unit making it difficult to restore.

  • If you "re-flash" the cells containing the ComOS and then reboot your PortMaster it will be necessary to perform a netboot procedure to restore the operating system. 
  • If your re-format the NVRAM partition containing the configurations and reboot your PortMaster  will be set back to the factory defaults. To enter current configurations, connect a console to the S0 or C0 port. 
  • Although the ComOS may still be running in Dynamic- RAM (DRAM), after erasing the ComOS cells most show commands will cease to function. Instead you will see SYSMSG's ( stubs of the actual messages displayed to the screen). 
  • Extreme care should be taken when entering  set register commands.

Reasons For Erasing/re-formatting The Flash Include:

  • Return to Factory Defaults: Reformatting the partition of flash where the configuration resides  return the PortMaster to factory defaults. 
  • Corrupted ComOS: A corrupt ComOS can cause the PortMaster to perform erratically or have problems issuing and responding to commands. 
  • Corrupted Configuration: A corrupt ComOS can cause the PortMaster to have boot up and performance problems. 
  • Upgrading: Both Lucent PMinstall (TM) and Lucent PMconsole (TM) will  automatically reformat the ComOS and System Message partitions before upgrading the ComOS. 

Debug Mask To Watch Reads Or Writes To The Flash (NVRAM)

You can watch reads and writes to the flash with the following commands:

Command> set console
Command> set debug 0x72

This is helpful when debugging potential flash problems. If it takes more than 150 tries to reformat any of the flash cells contact Lucent Technical Support.

Flash Erasure Commands

ComOS version 3.5 introduced the erase command  to make erasing/reformatting NVRAM easier

Prior to ComOS version 3.5  use the register command to reformat the flash.

Erase Command Examples

To show the flash being erased use the commands> set console and set debug 0x72.

erase configuration

Command> set console
Setting CONSOLE to port S0
Command> set debug 0x72
Setting debug value to 0x72
Command> erase configuration
Erasing FLASH cell 2 - 28F010 ... Succeeded in 82 tries
Successfully erased FLASH configuration

erase ComOS

Command> set console
Setting CONSOLE to port S0
Command> set debug 0x72
Setting debug value to 0x72
Command> erase Flash
Erasing FLASH cell 0 - 28F010 ... Succeeded in 75 tries
Erasing FLASH cell 1 - 28F010 ... Succeeded in 78 tries
Erasing FLASH cell 3 - 28F010 ... Succeeded in 69 tries
sys_msginit: Missing System Messages
Successfully erased ComOS

erase all-flash

Command> set console
Setting CONSOLE to port S0
Command> set debug 0x72
Setting debug value to 0x72
Command> erase all-flash
Erasing FLASH cell 0 - 28F010 ... Succeeded in 72 tries
Erasing FLASH cell 1 - 28F010 ... Succeeded in 76 tries
Erasing FLASH cell 2 - 28F010 ... Succeeded in 76 tries
Erasing FLASH cell 3 - 28F010 ... Succeeded in 66 tries
sys_msginit: Missing System Messages
Successfully erased all FLASH

erase file <filename>

Command> show files
File Name        Length
---------------- -------
confdata         216
config           11750
snmp             18
filters          26
sapfilt          26
modem            2206
                 -------
Total            14242
Command> erase file sapfilt
Successfully erased sapfilt

erase partition <cell number>

Command> set console
Setting CONSOLE to port S0
Command> set debug 0x72
Setting debug value to 0x72
Command> erase partition 0
Erasing FLASH cell 0 - 28F010 ... Succeeded in 70 tries
Successfully erased partition 0
Command> erase partition 1
Erasing FLASH cell 1 - 28F010 ... Succeeded in 74 tries
Successfully erased partition 1
Command> erase partition 2
Erasing FLASH cell 2 - 28F010 ... Succeeded in 73 tries
Successfully erased partition 2
Command> erase partition 3
Erasing FLASH cell 3 - 28F010 ... Succeeded in 64 tries
sys_msginit: Missing System Messages
Successfully erased partition 3

set register 0xffff 0x0f63

Command> set console
Setting CONSOLE to port S0
Command> set debug 0x72
Setting debug value to 0x72
Command> set register 0xffff 0x0f63
Erasing FLASH cell 0 - 28F010 ... Succeeded in 64 tries
Erasing FLASH cell 1 - 28F010 ... Succeeded in 68 tries
Erasing FLASH cell 2 - 28F010 ... Succeeded in 64 tries
Erasing FLASH cell 3 - 28F010 ... Succeeded in 59 tries
sys_msginit: Missing System Messages
SYSMSG672 Command> 

set register 0xffff 0x010<Cell Number>

Command> set console
Setting CONSOLE to port S0
Command> set debug 0x72
Setting debug value to 0x72
Command> set register 0xffff 0x0100
Erasing FLASH cell 0 - 28F010 ... Succeeded in 68 tries
Successfully formatted FLASH 0
Command> set register 0xffff 0x0101
Erasing FLASH cell 1 - 28F010 ... Succeeded in 71 tries
Successfully formatted FLASH 1
Command> set register 0xffff 0x0102
Erasing FLASH cell 2 - 28F010 ... Succeeded in 70 tries
Successfully formatted FLASH 2
Command> set register 0xffff 0x0103
Erasing FLASH cell 3 - 28F010 ... Succeeded in 62 tries
sys_msginit: Missing System Messages
SYSMSG672 Command>