Olive (JunOS) and Troubles of 'Recovery' Mode - MyWiki

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

7/7/22, 8:43 PM Olive (JunOS) and troubles of 'recovery' mode - MyWiki

Olive (JunOS) and troubles of 'recovery' mode


From MyWiki

NOTE: I did this using virtual serial port (see Olive (JunOS) and serial port in VMWare Fusion). I have no clue
how to do the same on Windows. You have to figure it out yourself, but I'm pretty sure it's doable too.

I had this strange problem when I couldn't get JunOS password reset. This was a VMWare Olive image with JUNOS
9.6R2.11.

When I tried the usual recovery procedureit didn't work for me. Namely after stopping boot process and requesting
'boot -s' to get to single-user mode and the typing 'recovery', it simply booted normally and I faced the login prompt that
I couldn't get through without password. Doh!

Then I tried to type '/usr/libexec/ui/recovery-mode' instead of 'recovery' and it gave me the following screen:

Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: /usr/libexec/ui/recovery-mod
NOTE: to go to multi-user operation, exit the single-user shell (with ^D)

Apr 13 21:41:29 init: can't exec /junos/usr/libexec/ui/recovery-mode for single user: No such file or directory

To run the rest of rc manually (after the above):

chroot /junos /bin/sh /etc/rc.chroot

and to run a shell with a normal view of the system:

chroot /junos /bin/sh

Looking around revealed interesting view:

# ls

.snap dev kernel packages sbin

boot etc kernel.old pkg usr

cf junos opt root var

After some poking around and looking what have I got there and looking inside of /junos/etc/rc.chroot, I gave it a go:

# chroot /junos

# /bin/sh /etc/rc.chroot

After some lengthy output I ended up in a shell as root. Now I tried to run cli manually:

# cli

could not open user interface connection: management daemon not responding

Retry connection attempts ? [yes,no] (yes) no

Ok, let's get the daemon up by hand:

# mgd

markelov.org/wiki/index.php?title=Olive_(JunOS)_and_troubles_of_%27recovery%27_mode 1/2
7/7/22, 8:43 PM Olive (JunOS) and troubles of 'recovery' mode - MyWiki

One more try and I'm in:

# cli

root@JSR-ES-01> configure

Entering configuration mode

[edit]

root@JSR-ES-01# set system root-authentication plain-text-password

New password:

Retype new password:

[edit]

root@JSR-ES-01# commit

commit complete

[edit]

root@JSR-ES-01# exit

Exiting configuration mode

root@JSR-ES-01> exit

Rebooted the system and I'm back in business :-). Phew!

markelov.org/wiki/index.php?title=Olive_(JunOS)_and_troubles_of_%27recovery%27_mode 2/2

You might also like