Switching

 View Only
last person joined: yesterday 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 16 days ago

    I have acquired a couple of EX4300-48T switches from an auction, and I am attempting to reset the root password on the switches so that I can wipe the configs and rebuild them.

    I have tried searching the forum and the documentation, and everything that I have found says that I need to get to the loader> prompt to boot into single user mode to reset the password Junos. Or I need to get into the grub menu to make changes to reset the password from there QFX. Or I need to select an option from the boot menu to reset the password 48MP.

    The problem that I have is none of those options exist on these switches. The only thing that I have been able to do is access the U-Boot prompt => and make changes to environment variables to no avail.

    I have tried booting the system multiple times pressing different keys trying to get a different menu. I have tried [space bar] as per the Junos documentation, I have tried e based on the QFX documentation. I have tried [esc]. And I have tried Ctrl-c which is how I found the U-Boot prompt. I have waited until after the U-Boot prompt and pressed Ctrl-C and I still have been unable to find a different menu.

    I did find one thread that I was hopeful for Set unattend environment variable
    But setting the environment variable and booting did not work either.

    setenv boot_unattended

     

    I have also tried using the LED screen to reset to factory defaults. But the LED screens are blank, even after pressing either the menu button or the ENTER button. I have also tried holding down each of the buttons in different combinations for different times, but the LED stays blank. During bootup, the LED screen does turn on, but it just displays gibberish.

    Here is the boot sequence of one of these switches:

    U-Boot 2011.06 (Jun 19 2013 - 20:41:32), Build: jenkins-DEV_X_132_X50_BRANCH-exdc-42
    
    Flash: Bank 1 is active
    switch bank[0]->bank[1]
    
    U-Boot 2011.12-00062-gf837a99 (Jul 11 2014 - 13:47:59)
    
    CPU0:  P20BJE, Version: 1.1, (0x82190111)
    Core:  E500MC, Version: 2.2, (0x80230022)
    Clock Configuration:
    CPU0:1500 MHz, CPU1:1500 MHz, 
    CCB:600  MHz,
    DDR:600  MHz (1200 MT/s data rate) (Asynchronous), LBC:75   MHz
    FMAN1: 500 MHz
    PME:   300 MHz
    L1:    D-cache 32 kB enabled
    I-cache 32 kB enabled
    Reset Configuration Word (RCW):
    00000000: 4c580000 00000000 1e140000 00440000
    00000010: 648e20c1 ffc02000 fe000000 41000000
    00000020: 00000000 00000000 00000000 f05b4101
    00000030: 00000000 00000000 00000000 00000000
    Board: EX4300-48T 6.10
    EPLD:  Version 10.0 (0x88)
    I2C:   ready
    DRAM:  Initializing
    Detected UDIMM TS256MLK72V3N     
    DDR: 2 GiB (DDR3, 64-bit, CL=8, ECC on)
    FLASH bank: 1
    Flash: 8 MiB
    L2:    128 KB enabled
    Corenet Platform Cache: 1024 KB enabled
    SERDES: bank 2 disabled
    SERDES: bank 3 disabled
    PCIe2: Root Complex, x2, regs @ 0xfe201000
    PCIe2: Bus 00 - 01
    
    In:    serial
    Out:   serial
    Err:   serial
    
    Firmware Version: 02.00.00
    Net:   Initializing Fman
    Hardcoded FMAN at 0x3ff935c4
    Fman1: Uploading microcode version 101.8.0
    FM1@DTSEC1 [PRIME]
    USB:   
    Register 10011 NbrPorts 1
    USB EHCI 1.00
    Register 10011 NbrPorts 1
    USB EHCI 1.00
    scanning bus for devices... 
    Root Hub 0: 2 USB Device(s) found
    Root Hub 1: 1 USB Device(s) found
    scanning bus for storage devices... 1 Storage Device(s) found
    reading uimage.bin
    
    5418749 bytes read
    reading EX4300T.dtb
    
    31901 bytes read
    reading ramdisk.ub
    
    14625773 bytes read
    WARNING: adjusting available memory to 30000000
    ## Booting kernel from Legacy Image at 01000000 ...
    Image Name:   Linux-3.10.62-ltsi-WR6.0.0.21_st
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    5418685 Bytes = 5.2 MiB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK
    ## Loading init Ramdisk from Legacy Image at 03000000 ...
    Image Name:   ramdisk
    Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
    Data Size:    14625709 Bytes = 13.9 MiB
    Load Address: 40000000
    Entry Point:  00000000
    Verifying Checksum ... OK
    ## Flattened Device Tree blob at 02000000
    Booting using the fdt blob at 0x02000000
    Uncompressing Kernel Image ... OK
    reserving fdt memory region: addr=40000000 size=4000000
    Loading Ramdisk to 2f20d000, end 2ffffbad ... OK
    Loading Device Tree to 03fe5000, end 03fffc9c ... OK
    setup_arch: bootmem
    arch: exit
    
    Freescale FM module (Nov 10 2017:02:12:44), FMD API version 21.1.0
    Freescale FM Ports module (Nov 10 2017:02:12:44)
    First Level Bootstrap using initramfs...
    sd 0:0:0:0: [sda] No Caching mode page found
    sd 0:0:0:0: [sda] Assuming drive cache: write through
    sd 0:0:0:0: [sda] No Caching mode page found
    sd 0:0:0:0: [sda] Assuming drive cache: write through
    sd 0:0:0:0: [sda] No Caching mode page found
    sd 0:0:0:0: [sda] Assuming drive cache: write through
    Mounting boot device LABEL=LINUX-BOOT
    Unpacking initrd.cpio.gz ....
    496969 blocks
    Unmount boot device LABEL=LINUX-BOOT
    INIT: Mouting VAR to /var
    Starting udev
    running pre rc steps on EX4300-48T
    Executing application pre-initilization
    Starting monit daemon with http interface at [localhost:2812]
    /usr/sbin/app_pre_init: line 97: dmidecode: command not found
    [  OK  ] Application Pre initialization.
    Wind River Linux 6.0.0.21
    Starting Bootlog daemon: bootlogd.
    ault.rp_filter = 1
    net.ipv4.conf.all.rp_filter = 1
    kernel.core_pattern = |/etc/init.d/zipcore.sh /var/tmp/corefiles/ %h.%e.%p.%t.core %e
    hwclock: Timed out waiting for time change.
    localhost login: nlevel: 3
    starting rsyslogd ... done
    done.
    rk interfaces... done.
    Restoring archived files to /var/log ...
    hwclock: Timed out waiting for time change.
    ware Clock does not contain a valid time, so we cannot set the System Time from it.
    Unable to set system clock.
    starting rsyslogd ... done
    Booting normal on EX4300-48T
    Executing /usr/local/bin/cjob
    Wind River Linux 6.0.0.21 localhost console
    localhost login: 
    
    

    I have tried all of the default usernames and passwords that I was able to find online, and none of them have worked.

    Is there a way for me to reset the password on these switches? Is there something that I can search for that will tell me more about the OS these 



    ------------------------------
    KEN HARVEY
    ------------------------------


  • 2.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 16 days ago

    Another option would be to download the install media for your model and create a bootable USB drive to do a fresh format install.

    https://supportportal.juniper.net/s/article/EX-How-to-format-install-EX2300s-and-EX3400s-via-USB?language=en_US



    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP - Retired)
    http://puluka.com/home
    ------------------------------



  • 3.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 15 days ago

    Thank you for your response.

    I read through the link that you gave, and I have not been able to find an .img file in the downloads for the EX4300. I have extracted the tar files that I was able to download, and there are no .img files for me to copy over to a USB stick. It appears that the EX4300 files are just the straight OS, and not actually packaged into anything.

    I tried searching for information on how to update the EX4300 and everything that I have found thus far says that I need to make it to the loader prompt and copy over the tar file and install it that way. But since I am unable to make it to the loader prompt, I am back at square one.

    Is there documentation somewhere for creating a bootable USB that works with the EX4300 files?
    Is there another way to do the install?

    A lot of the documentation says that I need to select boot from USB from the boot menu, which I still do not have access to. But there is a command in the Uboot prompt called usbboot which I hope will actually boot from the USB.



    ------------------------------
    KEN HARVEY
    ------------------------------



  • 4.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 15 days ago

    Ken,

    For the EX4300 (Not the EX4300-MP model) uses the same install file (.tgz) is also a bootable file from USB (or TFTP). There are no .img files for the EX4300. 

    https://supportportal.juniper.net/s/article/EX-Performing-and-resolving-any-common-issues-during-Format-Install-on-legacy-EX-platforms?language=en_US



    ------------------------------
    Hope this helps.

    Mark
    ------------------------------



  • 5.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 15 days ago

    Mark,

    I think that I am still missing a step. I copied the tgz file over to a FAT32 formatted USB stick (1 GB). Plugged it into the switch and powered on the switch. The switch still boots to the WindRiver linux, but it does say that it has 2 Storage Device(s) which before it had just said 1 Storage Device(s).

    When I press Ctrl+c at that prompt, I get the Uboot prompt. Following the instructions in link that you provided I changed the loaddev to disk66, saved the config and reset. But I still come back to the WindRiver linux prompt. I never get the option to exit into the loader prompt.

    After rebooting the switch again and going into the Uboot prompt I did a printenv and here is the output.

    => printenv
    LAST_UPDATED_BY_HOST=Thu Nov 16 20:08:29 UTC 2017
    baudrate=9600
    boot.bank0.loader=0x00700000 
    boot.bank0.uboot=0x00780000 
    boot.bank1.loader=0x00300000 
    boot.bank1.uboot=0x00380000 
    boot.btsq.disable=0
    boot.env.size=0x00010000 
    boot.env.start=0x00010000 
    boot.firmware.verstr=U-Boot 2011.12-00062-gf837a99 (Jul 11 2014 - 13:47:59)
    boot.flash.size=0x00800000 
    boot.flash.start=0xff800000 
    boot.ideeprom=0x72 
    boot.intrver= 2.0.0
    boot.opqenv.size=0x00010000 
    boot.opqenv.start=0x00020000 
    boot.primary=bank 0
    boot.primary.bank=1
    boot.state=8 
    boot.success=1
    boot.upgrade.state=0x000a0000 
    bootargs=root=LABEL=ROOT rw console=ttyS0,9600n8 quiet usbcore.autosuspend=-1 memmap=64M$0x40000000
    bootcmd=run bootselect;run loadlinux;bootm 1000000 3000000 2000000
    bootdelay=5
    bootselect=test
    dtb=EX4300T.dtb
    dtb_addr=0x2000000
    eth1addr=00:E0:0C:00:00:3D
    eth2addr=00:E0:0C:00:00:3E
    eth3addr=00:E0:0C:00:00:3F
    ethact=FM1@DTSEC1
    ethaddr=d0:07:ca:f5:18:00
    ethprime=FM1@DTSEC1
    fman_ucode=0x3ff935c4
    hw.board.reset=88 
    hw.board.type=0b5c 
    hw.uart.console=mm:0xfe11c500
    hw.vc.fabric_mode=0
    hw.vc.mixed_mode=0
    hwconfig=fsl_ddr:ctlr_intlv=cacheline,usb1:dr_mode=host,phy_type=utmi
    initrd=ramdisk.ub
    initrd_addr=0x3000000
    kernel_addr=0x1000000
    linux_kernel=uimage.bin
    loadaddr=0x400000
    loaddev=disk66
    loadlinux=fatload usb 0:1 0x1000000 uimage.bin;fatload usb 0:1 0x2000000 EX4300T.dtb; fatload usb 0:1 0x3000000 ramdisk.ub
    loads_echo=1
    stderr=serial
    stdin=serial
    stdout=serial
    uboot.linux.support=yes
    usb_dr_mode=host
    usb_phy_type=utmi
    
    Environment size: 1626/65532 bytes
    => 

    So it looks like my change took, but I still can't get to a loader prompt.

    I decompressed jinstall-ex-4300-21.4R3-S10.9-signed.tgz and then I decompressed jinstall-ex-4300-21.4R3-S10.9.tgz and I found a file named isofs-install-ex

    This is an actual ISO file that I was able to mount. I haven't tried booting to this file yet. I am still going through it's contents to see if it will actually help.

    • Besides a few basic *nix binaries, it does have a few Juniper shell scripts:
      create-juniper-conf
    • install-downgrade

    Hmm, the more that I dig through the ISO, the more I am finding. I will try to dd that file to a USB stick and see if I can boot from it and see what happens.



    ------------------------------
    KEN HARVEY
    ------------------------------



  • 6.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 14 days ago
    1. When the following prompt appears, press the Spacebar to access the router's bootstrap loader command prompt.
      content_copy zoom_out_map
      Hit [Enter] to boot immediately, or space bar for command prompt.
      Booting [kernel] in 9 seconds...
      
      Note: 

      Depending on your device hardware, the bootstrap loader might proceed quickly at this step without pausing for input. Pay close attention to the prompts that appear and press the Spacebar immediately after seeing the above prompt flash on the screen.

    2. At the following prompt, type boot -s to start the system in single-user mode.
      content_copy zoom_out_map
      boot -s
    3. At the following prompt, type recovery to start the root password recovery procedure.
      content_copy zoom_out_map
      Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: 
      recovery
    4. Enter configuration mode in the CLI.
    5. Set the root password.
      content_copy zoom_out_map
      [edit]
      user@host# 
      set system root-authentication plain-text-password
      
      

      When you configure a plain-text password, the system encrypts the password for you.



    ------------------------------
    TEDD
    Sr Net Eng
    ------------------------------



  • 7.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 14 days ago

    Thank you for your response.

    The problem that I have is that there is no 

    Hit [Enter] to boot immediately, or space bar for command prompt.

    It does not exist during the boot process that I can see. If you look at my original post, I show the entire boot process. If you see that option in my boot process, please point it out, as I haven't been able to find it.

    I did test out the isofs-install-ex yesterday by dd'ing it to a USB stick. But it was not a bootable image. I should have realized that when I mounted the file to a folder originally, oh well. So that did not work.

    So I am still stuck at the point where I do not know how to get to a loader prompt to either reinstall JunOS or to reset the root password.

    Today, I am going to try and install an SRX loader onto the switch to see if that will give me a loader prompt. 
    I am following the procedure in this post

    I don't know if this will work, or if I will brick the switch, as I do not know if the loader is compatible between switches. But I don't know what else to try.



    ------------------------------
    KEN HARVEY
    ------------------------------



  • 8.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 13 days ago

    I see in the ex download area there is no img file with the standard ex-4300 but the EX4300 MULTIGIGABIT does have that USB img file.

    This might be worth a try.



    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP - Retired)
    http://puluka.com/home
    ------------------------------



  • 9.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 11 days ago

    I have made a little more progress, but not much.

    First, what I tried and that didn't work:

    I fired up one of my other 4300's and created a backup USB drive. The problem that I ran into though, is I could not get the switch to boot off of the USB stick. I am still trying to download the EX4300-MP image to try and see if that works any better.

    I have finally been able to gain access to the command prompt on the switch. I found the info by opening the switch up and pulling out the flash module installed. The pin out of the flash module matched that of USB headers on a PC motherboard. So I installed the flash module onto a spare computer...you know just in case, and powered the PC up , and I was able to mount the drives (5 in total) to examine them. Digging through the files I found different boot options that I could execute in uBoot.

    To gain access to the shell I did the following:

    1. Connect a console cable to the switch
    2. Power cycle the switch
    3. Press Ctrl+c repeatedly until I made it to the uBoot prompt =>
    4. At the uBoot prompt type in printenv
    5. Note down the bootargs section it should look something like this bootargs=root=LABEL=ROOT rw console=ttyS0,9600n8 quiet usbcore.autosuspend=-1 memmap=64M$0x40000000
    6. Change the bootargs parameter by entering setenv bootargs root=LABEL=ROOT rw console=ttyS0,9600n8 shell usbcore.autosuspend=-1 memmap=64M$0x40000000
      Please note that you have to replace the = directly after bootargs with a space, and that you have to replace quiet with shell
    7. To boot the switch, type in boot

    This will boot the switch into a temp Linux OS and dump you out at a shell prompt. This is just an expanded initrd.cpio found on the first partition of the flash partition. So that means that any changes you make at this prompt will not be saved past a reboot.

    To make changes, you have to chroot into the OS on the switch:

    1. Mount the 3rd partition which appears to be the actual switch OS by running mount /dev/sda3 /mnt
    2. Load the OS by using chroot by running chroot /mnt
    3. Add a new user to the switch by running useradd me
    4. Change the password to your new user by running passwd me
    5. Add the new user to the super user group by running usermod -a -G superuser me
    6. Next we need to exit the chroot and finish booting the switch by type in exit twice

    Then the switch will finish booting, and you can sign into the switch with your new username and password.

    Now I am to the next part that I am stuck on. Once I am signed on, and I run cli this is all that I get:

    localhost:~$ cli
    
    
    > ?
     d [device-name]            Establish the CLI session
    
    > 

    I don't know what to do with the device name. I would love to wipe this switch and completely start over, but I don't know how to proceed. Every thing that I enter into the > prompt, just display the d [device-name]. To actually exit the prompt, I have to enter in d something and then exit.

    localhost:~$ cli
    
    
    > ?
     d [device-name]            Establish the CLI session
    
    > exit
     d [device-name]            Establish the CLI session
    
    > d exit
     
    exit>  exit
    Exiting CLI
    localhost:~$ uname -a
    Linux localhost 3.10.62-ltsi-WR6.0.0.21_standard #1 SMP PREEMPT Fri Nov 10 02:13:55 PST 2017 ppc ppc ppc GNU/Linux
    localhost:~$ 

    It appears that this is running the Wind River Linux still. When I dig around the OS, I found some info about how it has a snos_3.3R1.1.ppc package. I don't really know what this is yet.

    So as of right now, I have access to the shell on the switch, but I can't do anything with the switch. And I still haven't figured out how to boot a USB stick on the switch. 

    Any suggestions on next steps?



    ------------------------------
    KEN HARVEY
    ------------------------------



  • 10.  RE: EX4300-48T Password Reset on WindRiver Linux 6.0.0.21

    Posted 7 days ago

    Alright, I have tried to boot different files from the SRX series, EX series, and EX MP series switches.

    As long as a USB stick is formatted as FAT32, uBoot will mount the USB stick and allow you to look at files and make some minor changes.

    I tried copying over the kernel file from the jinstall-ex-4300-21.4R3-S10.9.tgz which is a PowerPC or cisco 4500 32-bit ELF file.
    After connecting the USB stick, I ran the following commands to load the kernel into memory and try to boot the switch using the ELF file:

    fatls usb 1:1
    fatload usb 1:1 0x100000 kernel
    bootelf 0x100000

    The switch attempts to boot off of this kernel, but crashes with:

    => bootelf 0x100000
    Bad trap at PC: 3ff3c1dc, SR: 29200, vector=d00
    NIP: 3FF3C1DC XER: 00000000 LR: 3FF3F3C8 REGS: 3fe1fbe8 TRAP: 0d00 DAR: 800000C0
    MSR: 00029200 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 00
    Relocation Base: 0x3ff30000
    GPR00: 00000000 3FE1FCD8 00000100 800000C0 001000C4 00707488 800000BC 3A000200 
    GPR08: 7E000124 00000002 00000008 3FE1FCF8 44022042 0208303C 00000000 00000000 
    GPR16: 3FF95684 00000000 00000000 3FE2C938 3FFB08E0 3FF7CC34 00000001 3FE2CA10 
    GPR24: 00000002 3FE2CAA8 00100000 00000001 00100000 3FE1FF18 3FF96530 009ED20C 
    Call backtrace: 
    00000000 3FF3F900 3FF50368 3FF509F4 3FF50BB8 3FF54448 3FF3C74C 
    3FF31650 
    Exception in kernel pc 3ff3c1dc signal 0
    

    I have tried similar things with other ELF images from SRX and MP switches, all with similar results.

    I then tried to use the loader file from the SRX switches to see if I could at least get that loaded and try to update the software. I copied over the loader file and ran the following commands:

    fatls usb 1:1
    fatload usb 1:1 0x100000 loader
    bootm 0x100000

    But that failed with the following messages:

    WARNING: adjusting available memory to 30000000
    ## Booting kernel from Legacy Image at 00100000 ...
       Image Name:   Junos Loader
       Image Type:   MIPS Unknown OS Firmware (uncompressed)
       Data Size:    297120 Bytes = 290.2 KiB
       Load Address: 00000000
       Entry Point:  00000000
       Verifying Checksum ... OK
    Unsupported Architecture 0x5
    ERROR: can't get kernel image!

    I tried various uBoot images that I found in the tar files of all the different types of switches, but I never did find one that would work.

    I took a look at possibly paying for a support ticket with Juniper, but I saw the price was around $1K, and since these switches are EOL, there is no guarantee that they would even try to help. But even if they did, there is no guarantee that they would be able to help me to solve the problem.

    At this point, unless someone has any other suggestions, I plan to cut my losses and just toss these into the dumpster (e-waste properly). 

    Thank you all for your help with this. I hope that if someone else runs into this problem this post may help them out.



    ------------------------------
    KEN HARVEY
    ------------------------------