Friday, November 18, 2016

Xmodem copy file to cisco device/Switch


 Error Loading boot image from flash


Loading "flash:c3750-ipbasek9-mz.122-55.SE7/c3750-ipbasek9-mz.122-55.SE7.bin"...flash:c3750-ipbasek9-mz.122-55.SE7/c3750-ipbasek9-mz.122-55.SE7.bin: no such file or directory

Error loading "flash:c3750-ipbasek9-mz.122-55.SE7/c3750-ipbasek9-mz.122-55.SE7.bin"

Interrupt within 5 seconds to abort boot process.
Loading "flash:/c3750-ipbasek9-mz.122-55.SE9.bin"...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Error loading "flash:/c3750-ipbasek9-mz.122-55.SE9.bin"

Interrupt within 5 seconds to abort boot process.
Boot process failed...

The system is unable to boot automatically.  The BOOT
environment variable needs to be set to a bootable
image.

switch:


Download Tera Term and Download device image e.g  c3750-ipbasek9-mz.122-55.SE9.bin from Cisco_website

Change Baud rate, both switch and Tera Term for optimum transfer

change Baud rate for optimam transfer, both at switch and Tera Term

switch: set BAUD 57600
Tera Terma


switch: copy xmodem: flash:c3750-ipbasek9-mz.122-55.SE9.bin

Tera Term: File -> Transfer -> Xmodem -> Send and  choose the file that you wish the transfer.




It takes many hours to copy

switch: copy xmodem: flash:c3750-ipbasek9-mz.122-55.SE9.bin
Begin the Xmodem or Xmodem-1K transfer now...
C...............................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                                                               ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             ................................................................................                                             .............................................................................
File "xmodem:" successfully copied to "flash:c3750-ipbasek9-mz.122-55.SE9.bin"


switch:

Change BAUD RATE back to normal 9600

switch: set BAUD 9600

switch: boot flash:c3750-ipbasek9-mz.122-55.SE9.bin


switch: boot flash:c3750-ipbasek9-mz.122-55.SE9.bin
Loading "flash:c3750-ipbasek9-mz.122-55.SE9.bin"...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                ........  
File "flash:c3750-ipbasek9-mz.122-55.SE9.bin" uncompressed and installed, entry point: 0x1000000
executing...

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco IOS Software, C3750 Software (C3750-IPBASEK9-M), Version 12.2(55)SE9, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2014 by Cisco Systems, Inc.
Compiled Mon 03-Mar-14 22:44 by prod_rel_team
Image text-base: 0x01000000, data-base: 0x02D00000

Initializing flashfs...

flashfs[1]: 6 files, 1 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 15998976
flashfs[1]: Bytes used: 12154368
flashfs[1]: Bytes available: 3844608
flashfs[1]: flashfs fsck took 1 seconds.
flashfs[1]: Initialization complete....done Initializing flashfs.

Checking for Bootloader upgrade.. not needed


Alternative Cisco Switch Recovery 


MongoDB

MongoDB is growing in popularity, open-source database. It stores data as documents and format is BSON,JSON.

1.  Installation

Create /etc/yum.repos.d/mongodb-org-3.0.repo 

[root@db02 ~]# cat /etc/yum.repos.d/mongodb-org-3.0.repo 
[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=0
enabled=1
#gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc

#For Old verion

#[mongodb-org-2.6]
#name=MongoDB 2.6 Repository
#baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
#gpgcheck=0
#enabled=1


[root@db02 ~]# yum clean all

Latest stable release
[root@db02 ~]# yum install -y mongodb-org

For a specific release: version 3.0.3
[root@db02 ~]# yum install -y mongodb-org-3.0.3 mongodb-org-server-3.0.3 mongodb-org-shell-3.0.3 mongodb-org-mongos-3.0.3 mongodb-org-tools-3.0.3

Version 3.2.9
[root@db02 ~]# yum install -y mongodb-org-3.2.9 mongodb-org-server-3.2.9 mongodb-org-shell-3.2.9 mongodb-org-mongos-3.2.9 mongodb-org-tools-3.2.9

Version 3.2.10
[root@db02 ~]# yum install -y mongodb-org-3.2.10 mongodb-org-server-3.2.10 mongodb-org-shell-3.2.10 mongodb-org-mongos-3.2.10 mongodb-org-tools-3.2.10

If you have older version of openssl than version: 1.0.1e, you can get issues after installajon/upgrading MongoDB 3.x  

Config File:

[root@db02 ~]# cat /etc/mongod.conf
# This is a mongo.conf file
dbpath=/db/mongo
logpath=/var/log/mongo/mongod.log
logappend=true
quiet = true
fork = true
port = 27017
replSet = rs0
oplogSize = 1000

Start/Stop MongoDB

[root@db02 ~]# /etc/init.d/mongod start

[root@db02 ~]# /etc/init.d/mongod stop

Other options
Usage: /etc/init.d/mongod {start|stop|status|restart|reload|force-reload|condrestart}

If you get some complaints about process limits (observered in version 3.2.9) when starting, create a file and add the nproc value manually in following file. 

[root@db02 ~]# cat /etc/security/limits.d/99-mongodb-nproc.conf
mongod     soft      nproc        64000

AUTO START:

It is observed that version 3.2.x has issue better to check and fix autostart 

[root@db02 ~]# chkconfig --list |grep mongod
mongod          0:off   1:off   2:off    3:off    4:off    5:off    6:off
[root@db02 ~]# chkconfig mongod on 

[root@ios-nod-qa-db02 ~]# chkconfig --list| grep mongod
mongod          0:off   1:off   2:on    3:on    4:on    5:on    6:off