Beware of EMC switches sold as Mellanox SX6XXX on eBay

Discussion in 'Networking' started by mpogr, Aug 2, 2016.

  1. mpogr

    mpogr Active Member

    Joined:
    Jul 14, 2016
    Messages:
    113
    Likes Received:
    75
    You need to run a Subnet Manager on the computer. Not sure where you can get one for Windows. You will definitely have better luck with Linux...
     
    #61
  2. i386

    i386 Well-Known Member

    Joined:
    Mar 18, 2016
    Messages:
    1,721
    Likes Received:
    426
    The mellanox ofed distribution contains a subnet manager
     
    #62
  3. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    Ok I was able to run opensm in windows and flash it. I'm soo close I can taste it.

    Took forever to boot I was about to pull the power cable but man the fan is so much better in this mode.

    admin/admin isn't working on the console so I can't get in and it doesn't to have an IP. So something must not have stuck. Hostname and others seem set correctly.

    I see the MLNX OS from DHCP! So it's all good I just need to reset the admin password
     
    #63
    Last edited: Aug 2, 2018
  4. mpogr

    mpogr Active Member

    Joined:
    Jul 14, 2016
    Messages:
    113
    Likes Received:
    75
    You can boot into your scratch partition and edit /etc/shadow file at its appropriate location (you'll need to mount it) to have empty password for the admin user. The you'll be able to get in.
     
    #64
  5. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    I've been pulling my hair out trying to login. No matter what I do it says it's invalid.
    I even tried generating a hash. I tried enabling root. I've tried logging into the web client but it still isn't working.
    my shadow looks like this
    admin::10000:0:99999:7:::

    Aug 3 02:30:35 40GB login: pam_tallybyname(login:auth): Denying access to user 'admin': Maximum number of failed logins reached, account locked. You may try again in 5 second(s).
    Aug 3 02:30:37 40GB login: TOO MANY LOGIN TRIES (3) FROM (null) FOR admin, Have exhausted maximum number of retries for service
    Aug 3 02:30:37 40GB login: PAM 1 more authentication failure; logname=LOGIN uid=0 euid=0 tty=ttyS0 ruser= rhost= user=admin
    Aug 3 02:31:08 40GB wsmd[4775]: pam_unix(wsmd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=10x.x.x. user=admin
    Aug 3 02:31:08 40GB wsmd[4775]: [wsmd.NOTICE]: Authentication failure for user admin from 10.x.x.x

    When I boot into minimal linux and mount the file systems the file I am modifying is /mnt/root2/etc/shadow
     
    #65
  6. mpogr

    mpogr Active Member

    Joined:
    Jul 14, 2016
    Messages:
    113
    Likes Received:
    75
    Make sure you edit the right /etc/shadow file. MLNX-OS creates one under /var and links /etc/shadow to it. You may want to break this link and make the changes in /etc/shadow itself. Make sure you mount the right partition when you boot into the scratch.
     
    #66
  7. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    I've broken the link and modified the shadow file in both /mnt/var/opt/tms/output/shadow and /mnt/root2/etc/shadow but same issue.

    from uboot I am just using these 2 to go back and forth between block6 and 7.

    setenv jffs2_args "setenv bootargs root=${rootdev} rootfstype=jffs2 rw reset_button=${reset_button} ${image_kernel_args} ${extra_args}"

    setenv jffs2_args "setenv bootargs root=/dev/mtdblock7 rootfstype=jffs2 rw reset_button=${reset_button} ${image_kernel_args} ${extra_args}"
     
    #67
  8. mpogr

    mpogr Active Member

    Joined:
    Jul 14, 2016
    Messages:
    113
    Likes Received:
    75
    Not sure what's wrong. I'd also try to replace the admin shell with /bin/bash (in /etc/passwd) and login into bash.
     
    #68
  9. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    It seems like it isn't taking anything, I did replace the shell with bin/bash but it still gives me the same login prompt.
     
    #69
  10. mpogr

    mpogr Active Member

    Joined:
    Jul 14, 2016
    Messages:
    113
    Likes Received:
    75
    So you're changing wrong files. When you boot into scratch, mount MLNX-OS partition (in RW mode!) and double check the files. In "virgin" state, /etc/passwd and /etc/shadow (the path are relative to MLNX-OS root!) are symbolic links to files on another partition (don't remember exact path). Make sure you break the links and the files actually reside on MLNX-OS partition and have the right stuff in them...
     
    #70
  11. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    I don't see what other files I can change, and they are being kept. Just to walk through my steps.

    power switch -> break and get into uboot -> mount

    from here mount the volumes
    already removed symliink for passwd and shadow in /mnt/root2/etc/ and copied the 2 files over


    after complete I press the reset
    back in uboot - boot block7 this time

    it comes up, I can get to it via ssh, http and console
    login prompt I try admin/admin or admin no password. same issue
     
    #71
  12. mpogr

    mpogr Active Member

    Joined:
    Jul 14, 2016
    Messages:
    113
    Likes Received:
    75
    I'd try "setenv rootdev=/dev/mtdblock7" instead of what you've been doing and give it another try. Also, after you changed the shell in /etc/passwd, are you getting a different prompt? Can you post the prompt you're getting?
     
    #72
  13. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    I'll try that line now, as for the prompt. This is the same thing regardless of bash or cli in passwd;


    No change with the simpler line.
     
    #73
    Last edited: Aug 2, 2018
  14. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    Talked to a guy on Reddit who did the same thing. He had me link the passwd and shadow back to /var/opt/tms/output/. I rebooted and loaded it again and I'm in with admin/admin. Thank you for your help.
     
    #74
    metag, arglebargle and mpogr like this.
  15. mpogr

    mpogr Active Member

    Joined:
    Jul 14, 2016
    Messages:
    113
    Likes Received:
    75
    Glad it worked for you. Still not sure why it didn't work in the first place. FYI, I now (after the system has been setup) have the link broken and everything works fine...
     
    #75
  16. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    So last question, how can I get it to boot directly to the mlnx-os? Maybe I did something wrong though. In console I can press enter to stop and get into uboot to choose my 2 partitions but if I let it auto load it boots up something different.

    I get a "Switch-A(4)>" prompt and it takes different commands and I can't boot anything. Output looks like this.

    Code:
    ----------------------------- Board Info -----------------------------
    * Chasis Type        : DINGO
    * Number of Ports    : 12
    * U-Boot Revision    :U-Boot 2009.01 SX_PPC_M460EX SX_3.2.0330-82-EMC ppc (Feb 27 2013 - 12:13:42)
    * Firmware Revision  : 9.3.8170
    * INI file Revision  : 0x00000000
    ----------------------------------------------------------------------
                 BUILD INFO UTILITY
    
     GET_PROJECT_CVS_COMMIT_LEVEL..=1.395
     GET_BUILD_BASE................=
     GET_BUILD_SIGNATURE...........=0025b50070fd,2015-05-11,15:49:18,26896
     GET_BUILD_PATH................=/emc/tdowning/ppc460_release/may_11_2015
     
    #76
  17. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    Edit - I found it, So anyone else having this issue.

    Change your flash_jffs2 from run emc to run mlxlinux

    Code:
    => askenv flash_jffs2
    Please enter 'flash_jffs2':run mlxlinux
    => saveenv
    Saving Environment to Flash...
    . done
    Un-Protected 1 sectors
    Erasing Flash...
    . done
    Erased 1 sectors
    Writing to Flash... done
    . done
    Protected 1 sectors
    => reset ▒
     
    #77
    Last edited: Aug 5, 2018
    metag likes this.
  18. mb300sd

    mb300sd Active Member

    Joined:
    Aug 1, 2016
    Messages:
    191
    Likes Received:
    69
    Just picked up a SX6018 to upgrade to 40/56G. Are these able to bridge IB and Ethernet networks? I'd like to play with IB but need it linked to my ICX6610.
     
    #78
  19. i386

    i386 Well-Known Member

    Joined:
    Mar 18, 2016
    Messages:
    1,721
    Likes Received:
    426
    Yes, you can bridge ethernet and Infiniband with the vpi profile.
    But you can't run the sm manager on the switch when you use the vpi profile :D
     
    #79
  20. Hindsight

    Hindsight Member

    Joined:
    Mar 28, 2016
    Messages:
    55
    Likes Received:
    13
    I am in vpi mode and I just enabled sm manager
     

    Attached Files:

    #80

Share This Page