This documentation is for the extended support release (ESR) version of Cumulus Linux. We will continue to keep this content up to date until 21 February, 2023, when ESR support ends. For more information about ESR, please read this knowledge base article.

If you are using the current version of Cumulus Linux, the content on this page may not be up to date. The current version of the documentation is available here. If you are redirected to the main page of the user guide, then this page may have been renamed; please search for it there.

Single User Mode - Password Recovery

Use single user mode to assist in troubleshooting system boot issues or for password recovery. To enter single user mode, follow the steps below.

A console connection is required to perform the following procedure.

  1. Boot the switch as soon as you see the GRUB menu.

Before the GRUB menu appears, the switch goes through the boot cycle. Do not interrupt this autoboot process when you see the following lines; wait until you see the GRUB menu.

...
CLOCKS:ARM Core=1000Hz, AXI=500Hz, APB=125Hz, Peripheral=500Hz
USB0:  Bringing USB2 host out of reset...
Net:   eth-0
SF:    MX25L6405D with page size 4 KiB, total 8 MiB
Hit any key to stop autoboot:  2

```
                       GNU GRUB  version 2.02-cl3u3
 
 +----------------------------------------------------------------------------+
 |*Cumulus Linux GNU/Linux                                                    |
 | Advanced options for Cumulus Linux GNU/Linux                               |
 | ONIE                                                                       |
 |                                                                            |
 +----------------------------------------------------------------------------+     
```
  1. Use the ^ and v arrow keys to select Advanced options for Cumulus Linux GNU/Linux. A menu similar to the following should appear:

                           GNU GRUB  version 2.02-cl3u3
         
     +----------------------------------------------------------------------------+
     | Cumulus Linux GNU/Linux, with Linux 4.1.0-cl-7-amd64                       |
     |*Cumulus Linux GNU/Linux, with Linux 4.1.0-cl-7-amd64 (recovery mode)       |
     |                                                                            |
     +----------------------------------------------------------------------------+  
    
  2. Select Cumulus Linux GNU/Linux, with Linux 4.1.0-cl-7-amd64 (recovery mode).

  3. Press ctrl-x to reboot.

  4. After the system reboots, set a new root password. This is useful since the root user provides complete control over the switch, and providing a new password now helps in case the current password has been forgotten, which is a common problem.

    root@switch:~# passwd
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated successfully
    

    You may want to take this opportunity to reset the password for the cumulus account as well.

       root@switch:~# passwd cumulus
       Enter new UNIX password:
       Retype new UNIX password:
       passwd: password updated successfully
    

  5. Sync the /etc directory using btrfs, then reboot the system:

    root@switch:~# btrfs filesystem sync /etc
    root@switch:~# reboot -f
    Restarting the system.