Page 1 of 1

How to factory reset OS 6450

Posted: 15 Apr 2014 04:54
by DeichShaf
I've searched a little for this topic but there was only one How-To available for 6850s, so i thought it might be helpful to have one for the 6450 too ;-)


STEP 1: Resetting passwords and usernames
(Step 2 describes resetting the configuration only, proceed with step 2 if you have the password for your switch)

First of all you'll have to be quick at power-on and have to press 's' to get the switch to stop at Miniboot:

Code: Select all

AOS BootSelector Version: 6.6.3.259.R01

Creation Date: Mar 21 2012 23:07:59.

Press x to choose XMODEM...

Press s to STOP AT MINIBOOT...

 S Key was pressed
Next you will see the console of Miniboot, where you have to type the following command and will get an error-code in return. Note that quotation is mandatory!

Code: Select all

[Miniboot]->cd "network"
value = 0 = 0x0
The next thing is to list all files in this directory with the following command:

Code: Select all

[Miniboot]->ll
drw      2048 Dec  1  1999 ./
drw      2048 Dec  1  1999 ../
-rw     91392 Dec  1  1999 userTable5
-rw        12 Dec  1  1999 lockoutSetting
-rw        33 Dec  1  1999 policy.cfg
-rw       404 Dec  1  1999 ssh_host_dsa_key
-rw       358 Dec  1  1999 ssh_host_dsa_key.pub

        63174656 bytes free
value = 0 = 0x0
You see that there is at least one file with 'userTableN' (where N can be any number). These files contain usernames and passwords used on the device. You will have to delete them in order to make a complete clean start-over in the first place. WARNING: Do not delete files other than 'userTableN'!

Code: Select all

[Miniboot]->rm "userTable5"
value = 0 = 0x0
The next step is to reboot the switch and let it start up to the CLI. The respective command for that is 'reboot":

Code: Select all

[Miniboot]->reboot
mgi0 Interface Down
mgi0 Interface Stopped
WARNING: "sysResetHardwareFlag" flag is SET, forcing CMM board reset.

STEP 2: Resetting the configuration

OK, the boot process takes some time to complete. After the network interfaces have been brought up, you'll be able to login with facotry default username 'admin' and default password 'switch':

Code: Select all

SAT JAN 01 01:36:44 : INTERFACE (6) info message:
+++  NIs are ready

login : admin
password :switch
You will have to delete both configuration files from working and certified storage. The shortest way to do so is:

Code: Select all

-> rm ./working/boot.cfg
-> rm ./certified/boot.cfg
Of course you may check whether these files are present but this step is optional and not required. In case the respective file is missing you would get an error message...

Code: Select all

-> ls ./working

Listing Directory /flash/working:

drw      2048 Dec  1  1999 ./
drw      2048 Dec  1  1999 ../
-rw       705 Jun 11  2013 software.lsm
-rw  16086233 Jun 11  2013 KFbase.img
-rw   5174996 Jun 11  2013 KFeni.img
-rw   2518969 Jun 11  2013 KFos.img
-rw    602110 Jun 11  2013 KFsecu.img

        63223808 bytes free
I do hope that this will help a little, since the way to factory reset a 6450 is slightly different from 6850 where you would have to set environmental bootflags before Miniboot... ;-)

Re: How to factory reset OS 6450

Posted: 16 Apr 2014 03:01
by devnull
This is a good start but no factory reset.
- You are still having logs from the "old" version in swlog.
- You may be missing command.log
- You missed ssh_keys, banners, maybe aclman configs aso..

the best way is to issue
"sysNewfs /flash" from flash and do a disaster recovery from USB (TEST THAT BEFORE, needs minimum miniboot!) or afaik delete every file on flash apart from /flash/Certified. They should be recreated on reboot.

Re: How to factory reset OS 6450

Posted: 16 Apr 2014 03:44
by DeichShaf
Thanks for the advice. Yes, it is a good idea to delete banners and ssh keys as well. Apart from the fact that they aren't needed anymore they're a waste of precious flash space ;-)

A clean logfile saves some space on the flash, but only for a short term as it is growing permanent. And maybe it'll come in handy to view the logfile before deleting it. I'd leave that decision to the user...

Of course: If you want a real clean-sweep switch, your suggestion to issue 'sysNewfs' on the flash is a better way to perform.

Re: How to factory reset OS 6450

Posted: 16 Apr 2014 10:49
by devnull
Depends on.. i do factory reset before e.g. replacing customer hardware, sending it outwards aso..

Therefor i have to take care that i don't accidently leak any unwanted infos.

The size is irrelevant, as modern AO6 have plenty of flash compared to old devices.

SWlogs may contain usernames, command logs as well.

aclman cfg is not visible in boot.cfg so this may really shot you in the foot if you ever used that..