Junos OS

 View Only
last person joined: yesterday 

Ask questions and share experiences about Junos OS.
  • 1.  EX2300 boot failure: "init: can't exec /bin/sh for single user: No such file or directory"

    Posted 12-12-2024 15:58

    In  my EX2300, I discover that, whereas just a few weeks ago I was logging in to this switch successfully on both serial console and via ssh, now it won't even boot as follows - this is from the serial console:

    ----------------------------------------------------------------
    Dec 12 11:42:55 init: can't exec /bin/sh for single user: No such file or directory
    Dec 12 11:42:55 init: can't exec /bin/sh for single user: No such file or directory
    Dec 12 11:43:25 init: can't exec /bin/sh for /etc/rc: No such file or directory

    Enter full pathname of shell or RETURN for /bin/sh:
    ----------------------------------------------------------------

    Could this be caused be frequent "ungraceful" power-downs?
    In fact, we have connected our switches to a networked PDU so we can easily turn them off/on often (this is a test environment).

    Should we be gracefully powering down these switches with a command such as "request system power-off" or "request system halt"

    In the meantime, how can I recover filesystem?

    Here's another section of the serial console log after a power down/up - many errors!

    DRAM: 2048MB

    Number of U-Boot devices: 2

    U-Boot env: loaderdev not set, will probe all devices.

    Found U-Boot device: disk

    Probing all disk devices...

    Checking unit=0 slice=<auto> partition=<auto>... good.

    -

    Main Menu

    1. Boot [J]unos volume

    2. Boot Junos volume in [S]afe mode

    3. [R]eboot

    4. [B]oot menu

    5. [M]ore options

    Choice:

    Booting from Junos volume ...

    |

    /packages/sets/active/boot/os-kernel/kernel text=0xc8d6ac EHCI timed out on TD - token=0x800d8d80

    data=0x80000 syms=[0x4+0x4e590+0x4+0x6f3d8]

    /packages/sets/active/boot/os-kernel/ex2300.dtb size=0x1de3

    /packages/sets/active/boot/junos-modules/fips_core.ko text=0x1074 data=0x247 syms=[0x4+0x600+0x4+0x40f]

    loading required module 'netstack'

    /packages/sets/active/boot/netstack/netstack.ko text=0x768660 data=0x1fde1+0xb3bb7 syms=[0x4+0xa8e20+0x4+0x805ae]

    loading required module 'crypto'

    /packages/sets/active/boot/os-crypto/crypto.ko text=0x21fb4 data=0x91e+0x302 syms=[0x4+0x30a0+0x4+0x1971]

    /packages/sets/active/boot/junos-modules/mac_fips.ko text=0x6a8 data=0x691 syms=[0x4+0x4f0+0x4+0x479]

    /packages/sets/active/boot/junos-modules/mac_sdk.ko text=0x1b24 data=0x693+0x15 syms=[0x4+0xa40+0x4+0x6e2]

    /packages/sets/active/boot/junos-modules/sdk_core.ko text=0xa358 data=0x641+0x13b syms=[0x4+0x1d30+0x4+0x158a]

    /packages/sets/active/boot/junos-modules/junosprocfs.ko text=0xe74 data=0x35b syms=[0x4+0x820+0x4+0x695]

    /packages/sets/active/boot/os-kernel/miibus.ko text=0x190f0 data=0x1127+0x79 syms=[0x4+0x48e0+0x4+0x2f37]

    /packages/sets/active/boot/os-kernel/if_gmac.ko text=0x11454 data=0xae5+0x57 syms=[0x4+0x22b0+0x4+0x1861]

    /packages/sets/active/boot/netstack/dcp_re.ko text=0x219c0 data=0x7239+0xcff syms=[0x4+0x5500+0x4+0x60c5]

    loading required module 'pvi_db'

    /packages/sets/active/boot/netstack/pvi_db.ko text=0x2718 data=0x3ac+0x4c syms=[0x4+0x840+0x4+0x534]

    /packages/sets/active/boot/netstack/poe.ko text=0x1da0 data=0x39f+0x31 syms=[0x4+0x7f0+0x4+0x514]

    /packages/sets/active/boot/os-kernel/contents.izo size=0x7bb800

    Hit [Enter] to boot immediately, or any other key for command prompt.

    Booting [/packages/sets/active/boot/os-kernel/kernel]...

    Using DTB from loaded file '/packages/sets/active/boot/os-kernel/ex2300.dtb'.

    SF: Detected MX25L6405D with page size 256 Bytes, erase size 64 KiB, total 8 MiB, mapped at dff90aac

    Kernel entry at 0xc1000100...

    Kernel args: (null)

    GDB: debug ports: uart

    GDB: current port: uart

    KDB: debugger backends: ddb gdb ndb

    KDB: current backend: ddb

    Copyright (c) 1992-2015 The FreeBSD Project.

    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

    The Regents of the University of California. All rights reserved.

    FreeBSD is a registered trademark of The FreeBSD Foundation.

    FreeBSD JNPR-11.0-20180119.e26d166_builder_master #5 e26d166(HEAD)-dirty: Fri Jan 19 21:26:44 PST 2018

    builder@feyrith.juniper.net" rel="noopener nofollow ugc" target="_blank">builder@feyrith.juniper.net:/volume/build/junos/occam/freebsd/master/20170822.builder.e26d166/obj/arm/juniper/kernels/JNPR-ARM-PRD/kernel arm

    Juniper clang version 3.5.0 (tags/RELEASE_350/final)

    CPU: Cortex A9-r4 rev 1 (Cortex-A core)

    Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext

    WB disabled EABT branch prediction enabled

    LoUU:2 LoC:2 LoUIS:2

    Cache level 1:

    32KB/32B 4-way data cache WB Read-Alloc Write-Alloc

    32KB/32B 4-way instruction cache Read-Alloc

    real memory = 2147483648 (2048 MB)

    avail memory = 2001547264 (1908 MB)

    Security policy loaded: Junos MAC/SDK (mac_sdk)

    Security policy loaded: JUNOS MAC/privcheck (mac_privcheck)

    Security policy loaded: MAC/veriexec (mac_veriexec)

    Security policy loaded: Junos MAC/fips (mac_fips)

    MAC/veriexec fingerprint module loaded: SHA1

    MAC/veriexec fingerprint module loaded: SHA256

    random: entropy device external interface

    Initializing DCF platform properties ..

    rts_sysconf_ifstate_init: registerd rtcb osd: slotid 2

    Calling dcf_ng_hw_init for platform hw vecs initialization

    ofwbus0: <Open Firmware Device Tree>

    simplebus0: <Flattened device tree simple bus> on ofwbus0

    mpcore0: <ARM Cortex-A9 MPCore> on simplebus0

    bcmidm0: <Broadcom Interconnect Device Management (IDM)> mem 0x100000-0x1fffff on simplebus0

    ihost_proc0: <Broadcom iHost PLL> mem 0x1000000-0x1000fff on simplebus0

    l2cache0: <PL310 L2 cache controller> mem 0x1022000-0x1022fff irq 32 on mpcore0

    l2cache0: Part number: 0x3, release: 0x9 (r3p3)

    l2cache0: L2 Cache enabled: 256KB/32B 16 ways

    gic0: <ARM Generic Interrupt Controller> mem 0x1021000-0x1021fff,0x1020100-0x10201ff on mpcore0

    gic0: pn 0x390, arch 0x1, rev 0x2, implementer 0x43b irqs 256

    mp_tmr0: <ARM MPCore Timers> mem 0x1020200-0x10202ff,0x1020600-0x102061f irq 27,29 on mpcore0

    Timecounter "MPCore" frequency 625000000 Hz quality 800

    Event timer "MPCore" frequency 625000000 Hz quality 1000

    cmic0: <Broadcom CMIC> mem 0x3200000-0x32fffff irq 221 on ofwbus0

    cmic0: called :bcm_cmic_attach,Dev Chip Id is 0x1b064:

    cmicbus0: <CMIC Functions> on cmic0

    epcmic0: <Broadcom,epcmic> mem 0x20000000-0x200fffff on ofwbus0

    epccg0: <Broadcom,epccg> mem 0x20800000-0x20807fff on ofwbus0

    bcmdmu0: <Broadcom BCM56XXX dmu> mem 0xf000-0xffff on simplebus0

    ccgmdio0: <Broadcom BCM56060 CCG-MDIO> mem 0x2000-0x20ff on simplebus0

    paxb0: <Broadcom,PAXB> mem 0x12000-0x12fff on simplebus0

    bcm560xgmac0: <Broadcom-56060 GMAC> mem 0x42000-0x42fff irq 142 on simplebus0

    bcmidm0: chip dev id :0x1b064 sc :0xc6312ee0 dev:0xc6465c00

    miibus0: <MII bus> on bcm560xgmac0

    brgphy0: <BCM54616S 10/100/1000baseTX PHY> PHY 1 on miibus0

    brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto

    ehci0: <BCMIPROC-USB-EHCI> mem 0x48000-0x49fff irq 104 on simplebus0

    ehci0: called :bcmusb_ehci_attach,Dev Chip Id is 0x1b064:

    usbus0: EHCI version 1.0

    usbus0 on ehci0

    gpio0: <Broadcom BCM56XXX GPIO controller> mem 0xa000-0xa0ff irq 116 on simplebus0

    gpiobus0: <GPIO bus> on gpio0

    gpioc0: <GPIO controller> on gpio0

    uart0: <16750 or compatible> mem 0x20000-0x200ff irq 105 on simplebus0

    uart0: console (9600,n,8,1)

    uart0: [GIANT-LOCKED]

    uart1: <16750 or compatible> mem 0x21000-0x210ff irq 106 on simplebus0

    uart1: [GIANT-LOCKED]

    iichb0: <Broadcom iProc SMBus Controller> mem 0x8000-0x8fff irq 117 on simplebus0

    iicbus0: <OFW I2C bus> on iichb0

    iic0: <I2C generic I/O> on iicbus0

    iicswitch0: <I2C Switch/Multiplexer> at addr 0x70 on iicbus0

    poe0: <POE> on iicswitch0

    poe reset failed

    rtc8564je_rtc0: <EPSON 8564JE Real Time Clock(RTC)> on iicswitch0

    cpld0: <Juniper CPLD for iProc> at addr 0x31 on iicbus0

    cpldbus0: <CPLD Functions> on cpld0

    wdog0: <CPLD Watchdog Timer for iProc> on cpldbus0

    oamctl0: <OAM Control using CPLD for iProc> on cpldbus0

    fan0: <CPLD fan controller> on cpldbus0

    fan1: <CPLD fan controller> on cpldbus0

    resetctrl0: <I2C switch reset driver> on cpldbus0

    resetpfe0: <Reset EP PFE> on cpldbus0

    bcmcru0: <Broadcom BCM56XXX cru> mem 0xe000-0xefff on simplebus0

    spi0: <Broadcom BCM56XXX SPI> mem 0x47000-0x47fff irq 102 on simplebus0

    spibus0: <OFW SPI bus> on spi0

    mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0

    mx25l0: mx25ll64, sector 65536 bytes, 128 sectors

    cryptosoft0: <software crypto>

    Initializing product: 169 ..

    md0: Preloaded image </packages/sets/active/boot/os-kernel/contents.izo> 8108032 bytes at 0xc284b000

    usbus0: 480Mbps High Speed USB v2.0

    JUNOS procfs is initialized.

    Timecounters tick every 10.000 msec

    Loading Redundant LT driver

    Registered AMT tunnel Encap with UDP Tunnel!

    ###PCB Group initialized for udppcbgroup

    ###PCB Group initialized for tcppcbgroup

    rts_init: registered inrtsock osd: slotid 3

    paxb0: paxb detachinfo

    ugen0.1: <Broadcom> at usbus0

    uhub0: <Broadcom EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0

    Root mount waiting for:Kernel thread "wkupdaemon" (pid 25) exited prematurely.

    usbus0

    Root mount waiting for: usbus0

    uhub0: 3 ports with 3 removable, self powered

    Root mount waiting for: usbus0

    ugen0.2: <vendor 0x05e3> at usbus0

    uhub1: <vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/85.37, addr 2> on usbus0

    Root mount waiting for: usbus0

    uhub1: 4 ports with 3 removable, self powered

    Root mount waiting for: usbus0

    ugen0.3: <vendor 0x13fe> at usbus0

    umass0: <vendor 0x13fe USB DISK 2.0, class 0/0, rev 2.00/1.00, addr 3> on usbus0

    umass0: SCSI over Bulk-Only; quirks = 0x8100

    umass0:0:0: Attached to scbus0

    Root mount waiting for: usbus0

    Trying to mount root from cd9660:/dev/md0.uzip []...

    da0 at umass-sim0 bus 0 scbus0 target 0 lun 0

    da0: < USB DISK 2.0 PMAP> Removable Direct Access SPC-4 SCSI device

    da0: Serial Number 650084B3E734AD32

    da0: 40.000MB/s transfers

    da0: 1910MB (3911680 512 byte sectors: 255H 63S/T 243C)

    da0: quirks=0x3<NO_SYNC_CACHE,NO_6_BYTE>

    ** /dev/gpt/junos

    ** Last Mounted on /.mount

    ** Phase 1 - Check Blocks and Sizes

    ** Phase 2 - Check Pathnames

    ** Phase 3 - Check Connectivity

    ** Phase 4 - Check Reference Counts

    ** Phase 5 - Check Cyl groups

    3873 files, 98223 used, 251341 free (205 frags, 31392 blocks, 0.1% fragmentation)

    thanks,
    js.

    <slot name="text-body"></slot>



  • 2.  RE: EX2300 boot failure: "init: can't exec /bin/sh for single user: No such file or directory"

    Posted 12-12-2024 19:34

    Yes, this can be caused by power events, especially if a second one occurs before a full reboot has taken place.

    Select the boot menu and depending on the final errors seen you can recover at via the organized kb articles here.

    https://supportportal.juniper.net/s/article/Upgrade-EX-switch-Stage-4-Troubleshooting-Upgrade-Failure-Crash-System-Stuck-on-Bootup?language=en_US

    The ultimate recover is to format install from USB when all else fails.

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

    If you want to do the power boots, make sure you have snapshots setup.  By configuring snapshots to be automatic on config changes there will be a backup partition ready to go when primary fails.  The device will let you know on next login that it is on the recovery partition.  And the next config change will automatically update the broken one you you can do so manually.

    You can also create a USB snapshot of the default config that would make recovery easier in the event of failure.

    https://www.juniper.net/documentation/us/en/software/junos/junos-install-upgrade/topics/topic-map/backing-up-install-using-snapshot.html



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



  • 3.  RE: EX2300 boot failure: "init: can't exec /bin/sh for single user: No such file or directory"

    Posted 12-13-2024 14:53

    Thanks Steve!

    I looked at that reference page - it appears that every recovery option requires a JunOS EX2300 recovery image, correct?

    I believe we bought this switch used, and my support portal account doesn't allow me to download software, so I think I'm stuck until I can find a recovery image.
    I have one for the EX3400, but my understanding is that these images are switch-specific.




  • 4.  RE: EX2300 boot failure: "init: can't exec /bin/sh for single user: No such file or directory"

     
    Posted 12-13-2024 15:04

    On the download portal, the images for the EX3400 and EX2300(-C) images appear to be the same.  You might be able to use the EX3400 image that you have, although I don't know which version you have etc.

    Regards




  • 5.  RE: EX2300 boot failure: "init: can't exec /bin/sh for single user: No such file or directory"

    Posted 12-13-2024 15:18

    Thanks - This is the image we have - I already have it burned to USB, since I used it last week to factory-default the EX3400:

    junos-install-media-usb-ex-arm-32-22.4R3.25.img.gz

    This is what our EX2300 showed a few weeks ago, when it was still fully booting:

    root@EX2300> show version
    fpc0:
    --------------------------------------------------------------------------
    Hostname: EX2300
    Model: ex2300-24t
    Junos: 15.1X53-D58.3
    JUNOS OS Kernel 32-bit  [20180119.e26d166_builder_master]
    JUNOS OS libs [20180119.e26d166_builder_master]
    JUNOS OS runtime [20180119.e26d166_builder_master]
    JUNOS OS time zone information [20180119.e26d166_builder_master]
    JUNOS py extensions [20180204.044726_builder_junos_151_x53_d58]
    JUNOS py base [20180204.044726_builder_junos_151_x53_d58]
    JUNOS OS crypto [20180119.e26d166_builder_master]
    JUNOS network stack and utilities [20180204.044726_builder_junos_151_x53_d58]
    JUNOS libs [20180204.044726_builder_junos_151_x53_d58]
    JUNOS runtime [20180204.044726_builder_junos_151_x53_d58]
    JUNOS Web Management Platform Package [20180204.044726_builder_junos_151_x53_d58]
    JUNOS ex libs [20180204.044726_builder_junos_151_x53_d58]
    JUNOS ex runtime [20180204.044726_builder_junos_151_x53_d58]
    JUNOS ex platform support [20180204.044726_builder_junos_151_x53_d58]
    JUNOS modules [20180204.044726_builder_junos_151_x53_d58]
    JUNOS ex modules [20180204.044726_builder_junos_151_x53_d58]
    JUNOS Data Plane Crypto Support [20180204.044726_builder_junos_151_x53_d58]
    JUNOS mtx Data Plane Crypto Support [20180204.044726_builder_junos_151_x53_d58]
    JUNOS daemons [20180204.044726_builder_junos_151_x53_d58]
    JUNOS Packet Forwarding Engine Support (EX34XX) [20180204.044726_builder_junos_151_x53_d58]
    JUNOS jdocs ex [20180204.044726_builder_junos_151_x53_d58]
    JUNOS jail runtime [20180119.e26d166_builder_master]
    JUNOS FIPS mode utilities [20180204.044726_builder_junos_151_x53_d58]

    {master:0}
    root@EX2300>

    thanks,

    js.




  • 6.  RE: EX2300 boot failure: "init: can't exec /bin/sh for single user: No such file or directory"

     
    Posted 12-13-2024 15:41

    Good luck!